|
Leosac
0.8.0
Open Source Access Control
|
Go to the documentation of this file.
24 #include <boost/property_tree/ptree.hpp>
26 #include <zmqpp/reactor.hpp>
27 #include <zmqpp/socket.hpp>
43 class SysFsGpioConfig;
52 SysFsGpioModule(zmqpp::context &ctx, zmqpp::socket *module_manager_pipe,
53 const boost::property_tree::ptree &config,
CoreUtilsPtr utils);
72 virtual void run()
override;
void process_config(const boost::property_tree::ptree &cfg)
Process the configuration, preparing configured GPIO pin.
Base class for module implementation.
virtual void run() override
This is the main loop of the module.
SysFsGpioConfig * general_cfg_
General configuration for module.
void publish_on_bus(zmqpp::message &msg)
Write the message eon the bus.
void process_general_config()
General configuration (file paths, etc).
Internal configuration helper for sysfsgpio module.
This is the header file for a generated source file, GitSHA1.cpp.
const SysFsGpioConfig & general_config() const
Retrieve a reference to the config object.
zmqpp::socket bus_push_
Socket to write the bus.
Handle GPIO management over sysfs.
SysFsGpioModule(zmqpp::context &ctx, zmqpp::socket *module_manager_pipe, const boost::property_tree::ptree &config, CoreUtilsPtr utils)
SysFsGpioModule & operator=(SysFsGpioModule &&)=delete
void export_gpio(int gpio_no)
Write to "gpio_export_path" so the kernel export the socket to sysfs.
std::shared_ptr< CoreUtils > CoreUtilsPtr
std::vector< SysFsGpioPin * > gpios_
Vector of underlying pin object.