Leosac  0.8.0
Open Source Access Control
Leosac::Module::EventPublish::EventPublish Class Reference

Run the Event publication module. More...

#include <EventPublish.h>

+ Inheritance diagram for Leosac::Module::EventPublish::EventPublish:
+ Collaboration diagram for Leosac::Module::EventPublish::EventPublish:

Public Member Functions

 EventPublish (zmqpp::context &ctx, zmqpp::socket *pipe, const boost::property_tree::ptree &cfg, CoreUtilsPtr utils)
 
 EventPublish (const EventPublish &)=delete
 
EventPublishoperator= (const EventPublish &)=delete
 
 ~EventPublish ()=default
 
- Public Member Functions inherited from Leosac::Module::BaseModule
 BaseModule (zmqpp::context &ctx, zmqpp::socket *pipe, const boost::property_tree::ptree &cfg, CoreUtilsPtr utils)
 Constructor of BaseModule. More...
 
virtual ~BaseModule ()=default
 
virtual void run ()
 This is the main loop of the module. More...
 

Private Member Functions

void handle_msg_bus ()
 
void process_config ()
 Processing the configuration tree, spawning AuthFileInstance object as described in the configuration file. More...
 

Private Attributes

zmqpp::socket bus_sub_
 Read internal message bus. More...
 
zmqpp::socket network_pub_
 Publish to the internet. More...
 
bool publish_source_
 

Additional Inherited Members

- Protected Member Functions inherited from Leosac::Module::BaseModule
virtual void handle_pipe ()
 The base class register the pipe_ socket to its reactor_ so that this function is called when the pipe_ is available from reading. More...
 
virtual void handle_control ()
 Handle called when a message on the module's control socket arrives. More...
 
virtual void dump_additional_config (zmqpp::message *out) const
 Dump additional configuration (for example module specific config file). More...
 
void dump_config (ConfigManager::ConfigFormat fmt, zmqpp::message *out_msg) const
 Fills a message with the module's configuration information. More...
 
void config_check (const std::string &obj_name, Leosac::Hardware::DeviceClass type)
 An helper that checks configuration the existence of some objects. More...
 
void config_check (const std::string &obj_name)
 An helper that checks configuration the existence of some objects. More...
 
- Protected Attributes inherited from Leosac::Module::BaseModule
zmqpp::context & ctx_
 A reference to the ZeroMQ context in case you need it to create additional socket. More...
 
zmqpp::socket & pipe_
 A reference to the pair socket that link back to the module manager. More...
 
boost::property_tree::ptree config_
 The configuration tree passed to the start_module function. More...
 
CoreUtilsPtr utils_
 Pointer to the core utils, which gives access to scheduler and others. More...
 
bool is_running_
 Boolean indicating whether the main loop should run or not. More...
 
zmqpp::socket control_
 Control REP socket. More...
 
zmqpp::reactor reactor_
 The reactor object we poll() on in the main loop. More...
 
std::string name_
 

Detailed Description

Run the Event publication module.

See also
Configuration Options for configuration information.

Definition at line 48 of file EventPublish.h.

Constructor & Destructor Documentation

◆ EventPublish() [1/2]

EventPublish::EventPublish ( zmqpp::context &  ctx,
zmqpp::socket *  pipe,
const boost::property_tree::ptree &  cfg,
CoreUtilsPtr  utils 
)

Definition at line 25 of file EventPublish.cpp.

◆ EventPublish() [2/2]

Leosac::Module::EventPublish::EventPublish::EventPublish ( const EventPublish )
delete

◆ ~EventPublish()

Leosac::Module::EventPublish::EventPublish::~EventPublish ( )
default

Member Function Documentation

◆ handle_msg_bus()

void EventPublish::handle_msg_bus ( )
private

Definition at line 37 of file EventPublish.cpp.

◆ operator=()

EventPublish& Leosac::Module::EventPublish::EventPublish::operator= ( const EventPublish )
delete

◆ process_config()

void EventPublish::process_config ( )
private

Processing the configuration tree, spawning AuthFileInstance object as described in the configuration file.

Definition at line 94 of file EventPublish.cpp.

Member Data Documentation

◆ bus_sub_

zmqpp::socket Leosac::Module::EventPublish::EventPublish::bus_sub_
private

Read internal message bus.

Definition at line 74 of file EventPublish.h.

◆ network_pub_

zmqpp::socket Leosac::Module::EventPublish::EventPublish::network_pub_
private

Publish to the internet.

Definition at line 79 of file EventPublish.h.

◆ publish_source_

bool Leosac::Module::EventPublish::EventPublish::publish_source_
private

Definition at line 81 of file EventPublish.h.


The documentation for this class was generated from the following files: