49 eventGenerators_.push_back(std::move(pGenerator));
59 "IPv4 or IPv6 Event Service channel multicast endpoint.");
61 configRegistrar.registerNonNumeric<std::string>(
"eventservicedevice",
64 "Device to associate with the Event Service channel multicast endpoint.");
66 configRegistrar.registerNumeric<std::uint8_t>(
"eventservicettl",
69 "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 "EventGeneratorManagerImpl::configure %s: %s",
85 eventServiceGroupAddr_.
str().c_str());
87 else if(item.first ==
"eventservicedevice")
89 sEventServiceDevice_ = item.second[0].asString();
93 "EventGeneratorManagerImpl::configure %s: %s",
95 sEventServiceDevice_.c_str());
98 else if(item.first ==
"eventservicettl")
100 u8EventServiceTTL_ = item.second[0].asUINT8();
104 "EventGeneratorManagerImpl::configure %s: %hhu",
110 throw makeException<ConfigureException>(
"EventGeneratorManagerImpl: " 111 "Unexpected configuration item %s",
123 sEventServiceDevice_,
133 std::for_each(eventGenerators_.begin(),
134 eventGenerators_.end(),
140 std::for_each(eventGenerators_.begin(),
141 eventGenerators_.end(),
147 std::for_each(eventGenerators_.begin(),
148 eventGenerators_.end(),
155 std::for_each(eventGenerators_.begin(),
156 eventGenerators_.end(),
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 initialize(Registrar ®istrar) override
void add(std::unique_ptr< EventGenerator > &pEventGenerator) 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
~EventGeneratorManagerImpl()
EventGeneratorManagerImpl(const uuid_t &uuid)
Component start exception is used to indicate an exception during transition to the start state...
std::vector< ConfigurationNameAnyValues > ConfigurationUpdate
Deployment event server interface.
void postStart() override
#define LOGGER_STANDARD_LOGGING(logger, level, fmt, args...)
void configure(const ConfigurationUpdate &update) override
static LogService * instance()
Exception thrown during open/establishment of the event service communication channel.