AceSmartSoft API Documentation
|
#include <smartState.hh>
Public Member Functions | |
StateSlaveHandler (StateSlave *state) | |
Constructor. More... | |
virtual | ~StateSlaveHandler ()=default |
Destructor. More... | |
virtual void | handleQuery (IQueryServer &server, const Smart::QueryIdPtr &id, const SmartCommStateRequest &request) |
Handler method for an incoming query request. More... | |
![]() | |
virtual | ~QueryServerHandler ()=default |
Additional Inherited Members | |
![]() | |
using | IQueryServer = Smart::IQueryServerPattern< SmartCommStateRequest, SmartCommStateResponse > |
this Alias simplifies usage in the handleQuery method More... | |
Handler for slave part of wiring pattern.
The wiring handler is called by the internally used query pattern and connects / disconnects a port with a server.
SmartACE::StateSlaveHandler::StateSlaveHandler | ( | StateSlave * | state | ) |
Constructor.
state | StateSlave needed to access it from the handler |
|
virtualdefault |
Destructor.
|
virtual |
Handler method for an incoming query request.
This method is called by the communication pattern every time a new query request is received. It must be provided by the component developer to handle incoming requests. Since the method is executed by the communication thread, it must be very fast and non-blocking.
Usually the request and the id will be inserted into a queue and another working thread processes the request and provides the result. The ThreadedQueryHandler decorator provides such a processing pattern.
server | a reference to the "parent" query-server that triggers this handler callback; can be used to provide the query-answer |
id | the query-id can be used to provide the query answer |
request | the request itself |
Implements SmartACE::QueryServerHandler< SmartCommStateRequest, SmartCommStateResponse >.