Leosac  0.8.0
Open Source Access Control
Leosac::Module::Piface::WSHelperThread Class Reference

#include <PFDigitalModule.hpp>

+ Inheritance diagram for Leosac::Module::Piface::WSHelperThread:
+ Collaboration diagram for Leosac::Module::Piface::WSHelperThread:

Public Member Functions

 WSHelperThread (const CoreUtilsPtr &core_utils)
 
void test_output_pin (const UUID &gpio_id)
 Implements the "pfdigital.test_output_pin" API call. More...
 
void unregister_ws_handlers (WebSockAPI::Service &ws_service) override
 
- Public Member Functions inherited from Leosac::Module::WebSockAPI::BaseModuleSupportThread< ModuleParameters >
 BaseModuleSupportThread (const CoreUtilsPtr &core_utils, const ModuleParameters &param)
 
virtual ~BaseModuleSupportThread ()
 
void start_running ()
 Effectively starts an helper thread and run its io_service. More...
 
void set_parameter (const ModuleParameters &p)
 

Private Member Functions

void register_ws_handlers (WebSockAPI::Service &ws_service) override
 Called when websocket handler registration is possible. More...
 

Additional Inherited Members

- Protected Attributes inherited from Leosac::Module::WebSockAPI::BaseModuleSupportThread< ModuleParameters >
CoreUtilsPtr core_utils_
 
bs2::scoped_connection service_event_listener_
 
std::unique_ptr< std::thread > thread_
 
boost::asio::io_service io_
 
std::unique_ptr< boost::asio::io_service::work > work_
 
ModuleParameters parameters_
 
std::mutex mutex_
 
std::shared_ptr< WebSockAPI::Serviceservice_ptr_
 

Detailed Description

Definition at line 60 of file PFDigitalModule.hpp.

Constructor & Destructor Documentation

◆ WSHelperThread()

Leosac::Module::Piface::WSHelperThread::WSHelperThread ( const CoreUtilsPtr core_utils)
inlineexplicit

Definition at line 63 of file PFDigitalModule.hpp.

Member Function Documentation

◆ register_ws_handlers()

void Leosac::Module::Piface::WSHelperThread::register_ws_handlers ( WebSockAPI::Service ws_service)
overrideprivatevirtual

Called when websocket handler registration is possible.

This function is called with the internal mutex locked, to prevent conflict with a call to set_parameters().

Implements Leosac::Module::WebSockAPI::BaseModuleSupportThread< ModuleParameters >.

Definition at line 353 of file PFDigitalModule.cpp.

◆ test_output_pin()

void Leosac::Module::Piface::WSHelperThread::test_output_pin ( const UUID gpio_id)

Implements the "pfdigital.test_output_pin" API call.

Definition at line 309 of file PFDigitalModule.cpp.

◆ unregister_ws_handlers()

void Leosac::Module::Piface::WSHelperThread::unregister_ws_handlers ( WebSockAPI::Service ws_service)
overridevirtual

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