![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
This is the parent class for all HAN-FUN units. More...
#include <units.h>
Public Member Functions | |
IDevice & | device () const |
Reference to the device this unit belongs to. More... | |
void | send (const Protocol::Address &addr, Protocol::Message &message, Transport::Link *link) |
Create and send a new packet with the given message to the given address. More... | |
std::vector< Common::Interface > | interfaces () const |
Return a vector containing a list of extra interfaces, other than the interfaces specified by the profile the unit implements) More... | |
void | periodic (uint32_t time) |
Handle periodic processing. More... | |
![]() | |
virtual uint8_t | id () const =0 |
Get the id number of this unit on the device. More... | |
virtual Common::Result | handle (Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset)=0 |
Handle incoming messages from the network. 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... | |
Protected Member Functions | |
AbstractUnit (IDevice &device) | |
Constructor. More... | |
void | notify (const HF::Attributes::IAttribute &old_value, const HF::Attributes::IAttribute &new_value) const |
Notify the attribute reporting service that the given attribute has changed value. More... | |
Protected Attributes | |
uint8_t | _id |
Unit ID used to identify a given unit in a given HAN-FUN device. | |
|
inlineprotected |
Constructor.
[in] | device | reference to the device that holds this unit. |
Definition at line 135 of file units.h.
References HF::IDevice::add(), and device().
|
inlinevirtual |
Reference to the device this unit belongs to.
Implements HF::Units::IUnit.
Definition at line 107 of file units.h.
Referenced by AbstractUnit().
|
inlinevirtual |
Return a vector containing a list of extra interfaces, other than the interfaces specified by the profile the unit implements)
Implements HF::Units::IUnit.
Reimplemented 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 >.
|
protected |
Notify the attribute reporting service that the given attribute has changed value.
[in] | old_value | reference to the previous value of the attribute. |
[in] | new_value | reference to the current value of the attribute. |
Referenced by HF::Units::Unit< HF::Profiles::SimpleLight >::notify().
|
inlinevirtual |
Handle periodic processing.
[in] | time | current system clock value in seconds. |
Implements HF::Units::IUnit.
Reimplemented 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 >.
Definition at line 120 of file units.h.
References UNUSED.
|
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. |
Implements HF::Units::IUnit.
Referenced by HF::Core::AbstractService::send(), and HF::Units::Unit< HF::Profiles::SimpleLight >::send().