Main class for the piface digital module.
More...
#include <PFDigitalModule.hpp>
|
| 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 piface digital module.
Definition at line 82 of file PFDigitalModule.hpp.
◆ PFDigitalModule()
| Leosac::Module::Piface::PFDigitalModule::PFDigitalModule |
( |
zmqpp::context & |
ctx, |
|
|
zmqpp::socket * |
module_manager_pipe, |
|
|
const boost::property_tree::ptree & |
config, |
|
|
CoreUtilsPtr |
utils |
|
) |
| |
◆ ~PFDigitalModule()
| Leosac::Module::Piface::PFDigitalModule::~PFDigitalModule |
( |
| ) |
|
◆ get_input_pin_name()
| bool Leosac::Module::Piface::PFDigitalModule::get_input_pin_name |
( |
std::string & |
dest, |
|
|
int |
idx, |
|
|
uint8_t |
hw_addr |
|
) |
| |
|
private |
Retrieve the (user-given) name of the pin and store it in dest.
- Parameters
-
| dest | string to store the name into |
| idx | The ping number, starting at 0 for the first one. |
| hw_addr | The underlying hardware address of the pifacedigital. |
- Returns
- True if we found the pin, false otherwise.
Definition at line 168 of file PFDigitalModule.cpp.
◆ handle_interrupt()
| void Leosac::Module::Piface::PFDigitalModule::handle_interrupt |
( |
| ) |
|
|
private |
◆ load_config_from_database()
| void Leosac::Module::Piface::PFDigitalModule::load_config_from_database |
( |
| ) |
|
|
private |
◆ process_config()
| void Leosac::Module::Piface::PFDigitalModule::process_config |
( |
| ) |
|
|
private |
◆ process_xml_config()
| void Leosac::Module::Piface::PFDigitalModule::process_xml_config |
( |
const boost::property_tree::ptree & |
cfg | ) |
|
|
private |
Process the XML configuration, preparing configured GPIO pin.
Definition at line 182 of file PFDigitalModule.cpp.
◆ run()
| void Leosac::Module::Piface::PFDigitalModule::run |
( |
| ) |
|
|
overridevirtual |
◆ setup_database()
| void Leosac::Module::Piface::PFDigitalModule::setup_database |
( |
| ) |
|
|
private |
◆ bus_push_
| zmqpp::socket Leosac::Module::Piface::PFDigitalModule::bus_push_ |
|
private |
◆ degraded_mode_
| bool Leosac::Module::Piface::PFDigitalModule::degraded_mode_ |
|
private |
True if we are running in "degraded" mode (ie, not on a device that support the PifaceDigital).
Definition at line 153 of file PFDigitalModule.hpp.
◆ gpios_
| std::vector<PFDigitalPin> Leosac::Module::Piface::PFDigitalModule::gpios_ |
|
private |
◆ interrupt_fd_
| int Leosac::Module::Piface::PFDigitalModule::interrupt_fd_ |
|
private |
File descriptor of the PIN that triggers interrupts.
This is card and will not change.
Definition at line 142 of file PFDigitalModule.hpp.
◆ ws_helper_thread_
| WSHelperThread Leosac::Module::Piface::PFDigitalModule::ws_helper_thread_ |
|
private |
The documentation for this class was generated from the following files: