AceSmartSoft API Documentation
Public Member Functions | List of all members
SmartACE::StateSlaveHandler Class Reference

#include <smartState.hh>

Inheritance diagram for SmartACE::StateSlaveHandler:
SmartACE::QueryServerHandler< SmartCommStateRequest, SmartCommStateResponse >

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...
 
- Public Member Functions inherited from SmartACE::QueryServerHandler< SmartCommStateRequest, SmartCommStateResponse >
virtual ~QueryServerHandler ()=default
 

Additional Inherited Members

- Public Types inherited from SmartACE::QueryServerHandler< SmartCommStateRequest, SmartCommStateResponse >
using IQueryServer = Smart::IQueryServerPattern< SmartCommStateRequest, SmartCommStateResponse >
 this Alias simplifies usage in the handleQuery method More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ StateSlaveHandler()

SmartACE::StateSlaveHandler::StateSlaveHandler ( StateSlave state)

Constructor.

Parameters
stateStateSlave needed to access it from the handler

◆ ~StateSlaveHandler()

virtual SmartACE::StateSlaveHandler::~StateSlaveHandler ( )
virtualdefault

Destructor.

Member Function Documentation

◆ handleQuery()

virtual void SmartACE::StateSlaveHandler::handleQuery ( IQueryServer server,
const Smart::QueryIdPtr &  id,
const SmartCommStateRequest request 
)
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.

Parameters
servera reference to the "parent" query-server that triggers this handler callback; can be used to provide the query-answer
idthe query-id can be used to provide the query answer
requestthe request itself
See also
IQueryServer

Implements SmartACE::QueryServerHandler< SmartCommStateRequest, SmartCommStateResponse >.


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