#include <udpadapter.h>
Public Member Functions | |
UDPAdapter () | |
virtual | ~UDPAdapter () |
virtual bool | init (utility::ErrorState &errorState) override final |
virtual void | onDestroy () override final |
virtual bool | start (utility::ErrorState &errorState) override final |
virtual void | stop () override final |
![]() | |
Resource () | |
![]() | |
Object () | |
virtual | ~Object () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
ResourcePtr< UDPThread > | mThread |
Property: 'Thread' the udp thread the adapter registers itself to. More... | |
bool | mAllowFailure = false |
Property: 'AllowFailure' if binding to socket is allowed to fail on initialization. More... | |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Protected Member Functions | |
virtual bool | onStart (utility::ErrorState &errorState)=0 |
virtual void | onStop ()=0 |
virtual void | onProcess ()=0 |
void | process () |
bool | handleAsioError (const std::error_code &errorCode, utility::ErrorState &errorState, bool &success) |
asio::io_context & | getIOContext () |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Base class of specific UDP client and server resources. process() is automatically called by the thread this adapter links to. Both UDPClient & UDPServer extend UDPAdapter.
UDPAdapter | ( | ) |
Constructor
|
virtual |
Destructor
|
protected |
|
protected |
|
finaloverridevirtual |
Initialization
errorState | contains error information |
Reimplemented from Object.
|
finaloverridevirtual |
called on destruction
Reimplemented from Object.
|
protectedpure virtual |
|
protectedpure virtual |
|
protectedpure virtual |
|
protected |
|
finaloverridevirtual |
Start the adapter. Called after initialization. When called it is safe to assume that all dependencies have been resolved up to this point. Internally calls virtual method 'onStart' that is implemented in derived class Upon successfull start, registers adapter to UDP thread
errorState | The error state |
Reimplemented from Device.
|
finaloverridevirtual |
bool mAllowFailure = false |
Property: 'AllowFailure' if binding to socket is allowed to fail on initialization.
ResourcePtr<UDPThread> mThread |
Property: 'Thread' the udp thread the adapter registers itself to.