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;
This is the header file for a generated source file, GitSHA1.cpp.
void process_config(const boost::property_tree::ptree &cfg)
Process the configuration, preparing configured GPIO pin.
zmqpp::socket bus_push_
Socket to write the bus.
SysFsGpioConfig * general_cfg_
General configuration for module.
SysFsGpioModule(zmqpp::context &ctx, zmqpp::socket *module_manager_pipe, const boost::property_tree::ptree &config, CoreUtilsPtr utils)
void publish_on_bus(zmqpp::message &msg)
Write the message eon the bus.
Handle GPIO management over sysfs.
Base class for module implementation.
SysFsGpioModule & operator=(SysFsGpioModule &&)=delete
Internal configuration helper for sysfsgpio module.
std::vector< SysFsGpioPin * > gpios_
Vector of underlying pin object.
std::shared_ptr< CoreUtils > CoreUtilsPtr
const SysFsGpioConfig & general_config() const
Retrieve a reference to the config object.
void export_gpio(int gpio_no)
Write to "gpio_export_path" so the kernel export the socket to sysfs.
virtual void run() override
This is the main loop of the module.
void process_general_config()
General configuration (file paths, etc).