Main class for the monitor module.
More...
#include <MonitorModule.hpp>
|
using | TimePoint = std::chrono::system_clock::time_point |
|
|
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...
|
|
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_ |
|
Main class for the monitor module.
Definition at line 39 of file MonitorModule.hpp.
◆ TimePoint
◆ MonitorModule() [1/3]
MonitorModule::MonitorModule |
( |
zmqpp::context & |
ctx, |
|
|
zmqpp::socket * |
pipe, |
|
|
const boost::property_tree::ptree & |
cfg, |
|
|
CoreUtilsPtr |
utils |
|
) |
| |
◆ MonitorModule() [2/3]
Leosac::Module::Monitor::MonitorModule::MonitorModule |
( |
const MonitorModule & |
| ) |
|
|
delete |
◆ MonitorModule() [3/3]
Leosac::Module::Monitor::MonitorModule::MonitorModule |
( |
MonitorModule && |
| ) |
|
|
delete |
◆ log_system_bus()
void MonitorModule::log_system_bus |
( |
| ) |
|
|
private |
Called when a message arrives on the system bus and we are configured to log that.
Definition at line 68 of file MonitorModule.cpp.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ process_config()
void MonitorModule::process_config |
( |
| ) |
|
|
private |
◆ process_network_config()
void MonitorModule::process_network_config |
( |
| ) |
|
|
private |
◆ process_reader_config()
void MonitorModule::process_reader_config |
( |
| ) |
|
|
private |
Load config related to reader activity monitoring.
Definition at line 195 of file MonitorModule.cpp.
◆ req_scripts_dir()
std::string MonitorModule::req_scripts_dir |
( |
| ) |
|
|
private |
◆ run()
void MonitorModule::run |
( |
| ) |
|
|
overridevirtual |
This is the main loop of the module.
It should only exit when receiving signal::stop
on its pipe_
socket. This is completely handled by this base class. In case you override this, make sure you watch the pipe_
socket.
Reimplemented from Leosac::Module::BaseModule.
Definition at line 52 of file MonitorModule.cpp.
◆ test_ping()
void MonitorModule::test_ping |
( |
| ) |
|
|
private |
◆ addr_to_ping_
std::string Leosac::Module::Monitor::MonitorModule::addr_to_ping_ |
|
private |
◆ bus_
zmqpp::socket Leosac::Module::Monitor::MonitorModule::bus_ |
|
private |
◆ kernel_
zmqpp::socket Leosac::Module::Monitor::MonitorModule::kernel_ |
|
private |
◆ last_ping_
TimePoint Leosac::Module::Monitor::MonitorModule::last_ping_ |
|
private |
◆ network_led_
◆ reader_led_
◆ reader_to_watch_
std::string Leosac::Module::Monitor::MonitorModule::reader_to_watch_ |
|
private |
◆ system_led_
◆ verbose_
bool Leosac::Module::Monitor::MonitorModule::verbose_ |
|
private |
The documentation for this class was generated from the following files: