![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
This class represents the interface implemented by all HAN-FUN units. More...
#include <units.h>
Public Member Functions | |
virtual uint8_t | id () const =0 |
Get the id number of this unit on the device. More... | |
virtual IDevice & | device () const =0 |
Reference to the device this unit belongs to. More... | |
virtual Common::Result | handle (Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset)=0 |
Handle incoming messages from the network. More... | |
virtual void | send (const Protocol::Address &addr, Protocol::Message &message, Transport::Link *link=nullptr)=0 |
Create and send a new packet with the given message to the given address. More... | |
virtual std::vector< Common::Interface > | interfaces () const =0 |
Return a vector containing a list of extra interfaces, other than the interfaces specified by the profile the unit implements) More... | |
virtual void | periodic (uint32_t time)=0 |
Handle periodic processing. More... | |
![]() | |
virtual uint16_t | uid () const =0 |
Return this profile HAN-FUN UID. More... | |
virtual HF::Attributes::List | attributes (Common::Interface itf, uint8_t pack_id, const HF::Attributes::UIDS &uids) const =0 |
Return a list of all the attributes for a given interface, pack id and list of attributes UID's. More... | |
This class represents the interface implemented by all HAN-FUN units.
|
pure virtual |
Reference to the device this unit belongs to.
Implemented in HF::Units::AbstractUnit.
|
pure virtual |
Handle incoming messages from the network.
[in] | packet | the packet receive from the network. |
[in] | payload | the byte array containing the data received from the network. |
[in] | offset | the offset the payload start at in the byte array. |
Implemented in HF::Units::Unit< Profile, ITF >, HF::Units::Unit< HF::Profiles::SimpleOnOffSwitch >, HF::Units::Unit< HF::Profiles::GenericApplicationLogic, Alert, LevelControl, OnOff, SimplePowerMeter >, and HF::Units::Unit< HF::Profiles::SimpleLight >.
|
pure virtual |
Get the id number of this unit on the device.
Implemented in HF::Units::Unit< Profile, ITF >, HF::Units::Unit< HF::Profiles::SimpleOnOffSwitch >, HF::Units::Unit< HF::Profiles::GenericApplicationLogic, Alert, LevelControl, OnOff, SimplePowerMeter >, HF::Units::Unit< HF::Profiles::SimpleLight >, and HF::Core::Unit0.
|
pure virtual |
Return a vector containing a list of extra interfaces, other than the interfaces specified by the profile the unit implements)
Implemented in HF::Units::Unit< Profile, ITF >, HF::Units::Unit< HF::Profiles::SimpleOnOffSwitch >, HF::Units::Unit< HF::Profiles::GenericApplicationLogic, Alert, LevelControl, OnOff, SimplePowerMeter >, HF::Units::Unit< HF::Profiles::SimpleLight >, and HF::Units::AbstractUnit.
|
pure virtual |
Handle periodic processing.
[in] | time | current system clock value in seconds. |
Implemented in HF::Units::Unit< Profile, ITF >, HF::Units::Unit< HF::Profiles::SimpleOnOffSwitch >, HF::Units::Unit< HF::Profiles::GenericApplicationLogic, Alert, LevelControl, OnOff, SimplePowerMeter >, HF::Units::Unit< HF::Profiles::SimpleLight >, and HF::Units::AbstractUnit.
|
pure virtual |
Create and send a new packet with the given message to the given address.
[in] | addr | address to send the message to. |
[in] | message | message to send. |
[in] | link | preferred link to send the message on. |
Implemented in HF::Units::AbstractUnit.