BeeeOn Gateway  v2020.3.1-2-g6f737dc
Platform to interconnect the IoT world
Data Structures | Public Member Functions | Protected Member Functions
BeeeOn::GWSCommandSender Class Reference

Pass requests received from the remote server to the configured CommandDispatcher instance. The following messages are processed: More...

#include <GWSCommandSender.h>

Inheritance diagram for BeeeOn::GWSCommandSender:
BeeeOn::StoppableRunnable BeeeOn::GWSListener BeeeOn::CommandSender BeeeOn::Loggable

Data Structures

class  RequestAnswer
 

Public Member Functions

void setConnector (GWSConnector::Ptr connector)
 
void setUnpairDuration (const Poco::Timespan &duration)
 
void run () override
 A loop that processes answers' updates of commands as created from the remote server requests.
 
void stop () override
 
void onRequest (GWRequest::Ptr request) override
 Receive a request from the remote server, convert it to the appropriate Command instance and dispatch to the rest of the application.
 
- Public Member Functions inherited from BeeeOn::GWSListener
virtual void onConnected (const Address &address)
 Fired when the connection to the remote server is successfully created and it is possible to exchange messages.
 
virtual void onDisconnected (const Address &address)
 Fired when the connection to the remote server is considered broken or when it is disconnected on a request.
 
virtual void onResponse (const GWResponse::Ptr response)
 When a response is received, this event is fired.
 
virtual void onAck (const GWAck::Ptr ack)
 When an ack is received, this event is fired.
 
virtual void onOther (const GWMessage::Ptr other)
 When a message other then request, response or ack is received, this event is fired.
 
virtual void onTrySend (const GWMessage::Ptr message)
 Fire when a message is about to be sent to the server. After the send is successful (no network failure), the GWSListener::onSend() event would be generated as well.
 
virtual void onSent (const GWMessage::Ptr message)
 Fire when a message is being sent to the server. There might be a delay between putting a messing into an output queue and the actual sending process. This event allows to track such delay.
 
- Public Member Functions inherited from BeeeOn::CommandSender
void setCommandDispatcher (CommandDispatcher *dispatcher)
 
void dispatch (Poco::AutoPtr< Command > cmd, Poco::AutoPtr< Answer > answer)
 
void dispatch (Poco::AutoPtr< Command > cmd)
 
AnswerQueueanswerQueue ()
 

Protected Member Functions

void handleDeviceAccept (GWDeviceAcceptRequest::Ptr request)
 
void handleListen (GWListenRequest::Ptr request)
 
void handleSearch (GWSearchRequest::Ptr request)
 
void handleSetValue (GWSetValueRequest::Ptr request)
 
void handleUnpair (GWUnpairRequest::Ptr request)
 
void dispatch (Command::Ptr command, GWRequest::Ptr request)
 
void respond (RequestAnswer::Ptr answer, bool failed)
 When a RequestAnswer instance becomes finished, report its results to the remote server.
 

Additional Inherited Members

- Public Types inherited from BeeeOn::StoppableRunnable
typedef Poco::SharedPtr
< StoppableRunnable
Ptr
 
- Public Types inherited from BeeeOn::GWSListener
typedef Poco::SharedPtr
< GWSListener
Ptr
 

Detailed Description

Pass requests received from the remote server to the configured CommandDispatcher instance. The following messages are processed:

Changes of Answer and Result are translated back to appropriate GWMessage instances and send to the remote server.

Member Function Documentation

void GWSCommandSender::stop ( )
overridevirtual

Stop the runnable. The call should not block.

Implements BeeeOn::StoppableRunnable.


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