![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
Parent class for all HF::Transport::Layer implementations. More...
#include <transport.h>
Public Member Functions | |
void | initialize () |
Initialize the associated transport layer. More... | |
void | destroy () |
Free the system resources associated with this transport layer. | |
void | add (HF::Transport::Endpoint *ep) |
Add an entry to the list of end-points connected to the transport layer. More... | |
void | remove (HF::Transport::Endpoint *ep=nullptr) |
Remove the entry in ep , from the list of end-points connected to the transport layer. More... | |
void | receive (HF::Transport::Link *link, HF::Common::ByteArray &payload) |
Receive the data in payload , coming in in the given link and deliver the decoded packet to all registered end-points. More... | |
const HF::UID::UID | uid () const |
Return the UID of the local device on this transport layer. More... | |
void | uid (HF::UID::UID_T *_uid) |
Set the UID to the given value. More... | |
void | connected (HF::Transport::Link *link) |
Call the connected method for all the registered end-points with the given link as argument. More... | |
void | disconnected (HF::Transport::Link *link) |
Call the disconnected method for all the registered end-points with the given link as argument. More... | |
Commands |
Protected Attributes | |
Common::SimpleList< HF::Transport::Endpoint * > | endpoints |
List of registered end-points for this layer. | |
HF::UID::UID_T * | _uid |
UID associated with the local transport layer. | |
Parent class for all HF::Transport::Layer implementations.
Definition at line 239 of file inc/hanfun/transport.h.
|
inlinevirtual |
Add an entry to the list of end-points connected to the transport layer.
[in] | ep | pointer to the end-point to add. |
Implements HF::Transport::Layer.
Definition at line 268 of file inc/hanfun/transport.h.
References endpoints.
Referenced by HF::Devices::Node::Transport::add(), and HF::Devices::Concentrator::Transport::add().
|
inline |
Call the connected
method for all the registered end-points with the given link
as argument.
[in] | link | pointer to the link to call the connected method with. |
Definition at line 342 of file inc/hanfun/transport.h.
References endpoints.
Referenced by HF::Devices::Node::Transport::add(), and HF::Devices::Concentrator::Transport::add().
|
inline |
Call the disconnected
method for all the registered end-points with the given link
as argument.
[in] | link | pointer to the link to call the disconnected method with. |
Definition at line 361 of file inc/hanfun/transport.h.
References endpoints.
Referenced by HF::Devices::Node::Transport::remove().
|
inlinevirtual |
Initialize the associated transport layer.
This method should initialize the transport layer using it's default values.
Implements HF::Transport::Layer.
Reimplemented in HF::Application::Transport.
Definition at line 259 of file inc/hanfun/transport.h.
|
inline |
Receive the data in payload
, coming in in the given link
and deliver the decoded packet to all registered end-points.
[in] | link | pointer to the link the incoming data was received. |
[in] | payload | reference to the ByteArray containing the data received. |
Definition at line 302 of file inc/hanfun/transport.h.
References endpoints, HF::Protocol::Packet::link, and HF::Protocol::Packet::unpack().
|
inlinevirtual |
Remove the entry in ep
, from the list of end-points connected to the transport layer.
If ep
is equal to nullptr
then all end-points are removed.
[in] | ep | pointer to the end-point entry to remove or nullptr to remove all entries. |
Implements HF::Transport::Layer.
Definition at line 283 of file inc/hanfun/transport.h.
References endpoints.
|
inlinevirtual |
Return the UID of the local device on this transport layer.
For example on an ULE device this would return the IPUI of the device.
Implements HF::Transport::Layer.
Definition at line 321 of file inc/hanfun/transport.h.
References _uid.
|
inline |
Set the UID to the given value.
[in] | _uid | pointer to the UID to use. |
Definition at line 331 of file inc/hanfun/transport.h.
References _uid.