50 eventAgents_.push_back(std::move(pAgent));
60 "IPv4 or IPv6 Event Service channel multicast endpoint.");
62 configRegistrar.registerNonNumeric<std::string>(
"eventservicedevice",
65 "Device to associate with the Event Service channel multicast endpoint.");
67 configRegistrar.registerNumeric<std::uint8_t>(
"eventservicettl",
70 "Device to associate with the Event Service channel multicast endpoint.");
75 for(
const auto & item : update)
77 if(item.first ==
"eventservicegroup")
79 eventServiceGroupAddr_ = item.second[0].asINETAddr();
83 "EventAgentManagerImpl::configure %s: %s",
85 eventServiceGroupAddr_.
str().c_str());
87 else if(item.first ==
"eventservicedevice")
89 sEventServiceDevice_ = item.second[0].asString();
93 "EventAgentManagerImpl::configure %s: %s",
95 sEventServiceDevice_.c_str());
98 else if(item.first ==
"eventservicettl")
100 u8EventServiceTTL_ = item.second[0].asUINT8();
104 "EventAgentManagerImpl::configure %s: %hhu",
110 throw makeException<ConfigureException>(
"EventAgentManagerImpl: " 111 "Unexpected configuration item %s",
122 sEventServiceDevice_,
132 std::for_each(eventAgents_.begin(),
139 std::for_each(eventAgents_.begin(),
146 std::for_each(eventAgents_.begin(),
154 std::for_each(eventAgents_.begin(),
The Registrar interface provides access to all of the emulator registrars.
virtual ConfigurationRegistrar & configurationRegistrar()=0
void registerNonNumeric(const std::string &sName, const ConfigurationProperties &properties=ConfigurationProperties::NONE, const std::initializer_list< T > &values={}, const std::string &sUsage="", std::size_t minOccurs=1, std::size_t maxOccurs=1, const std::string &sRegexPattern={})
void configure(const ConfigurationUpdate &update) override
void postStart() override
void initialize(Registrar ®istrar) override
const char * what() const
void open(const INETAddr &eventChannelAddress, const std::string &sDevice, int iTTL, bool loopbackEnable, const uuid_t &uuid)
std::string str(bool bWithPort=true) const
Component start exception is used to indicate an exception during transition to the start state...
std::vector< ConfigurationNameAnyValues > ConfigurationUpdate
#define LOGGER_STANDARD_LOGGING(logger, level, fmt, args...)
EventAgentManagerImpl(const uuid_t &uuid)
static LogService * instance()
Exception thrown during open/establishment of the event service communication channel.
void add(std::unique_ptr< EventAgent > &pEventAgent) override