![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
Helper template class to implement units. More...
#include <units.h>
Public Member Functions | |
Unit (uint8_t id, IDevice &device) | |
Constructor. More... | |
uint8_t | id () const |
Get the id number of this unit on the device. More... | |
uint16_t | uid () const |
Return this profile HAN-FUN UID. More... | |
Common::Result | handle (Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset) |
Handle incoming messages from the network. More... | |
HF::Attributes::List | attributes (Common::Interface itf, uint8_t pack_id, const HF::Attributes::UIDS &uids) const |
Return a list of all the attributes for a given interface, pack id and list of attributes UID's. More... | |
void | send (const Protocol::Address &addr, Protocol::Message &message) |
Send message msg to the network address given by addr . 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... | |
std::vector< Common::Interface > | interfaces () const |
Return the list of optional interfaces implemented by this unit. More... | |
void | periodic (uint32_t time) |
Handle periodic processing. More... | |
![]() | |
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... | |
![]() | |
Container (HF::Units::Unit< Profile, ITF... > &base) | |
Constructor. More... | |
Common::Result | handle (Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset) |
Handle incoming messages from the network. More... | |
void | attributes (HF::Attributes::List &attr_list, Common::Interface itf, uint8_t pack_id, const HF::Attributes::UIDS &uids) const |
Return a list of all the attributes for a given interface, pack id and list of attributes UID's. More... | |
std::vector< Common::Interface > | interfaces () const |
Return the list of interfaces present in the wrapper. More... | |
const std::tuple_element< N, interfaces_t >::type::base * | get () const |
Retrieve a pointer to the N optional interface implemented by this unit. More... | |
Additional Inherited Members | |
![]() | |
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... | |
![]() | |
void | for_each (std::function< void(HF::Interface &)> func) const |
Call the given function for all the interfaces. More... | |
void | for_each (std::function< void(HF::Interface &)> func) |
Call the given function for all the interfaces. More... | |
void | for_each (std::function< void(HF::Interface &)> func) const |
Helper template function to implement the HF::Units::Unit::for_each functionality. More... | |
void | for_each (std::function< void(HF::Interface &)> func) const |
Helper template function to implement the HF::Units::Unit::for_each functionality. More... | |
HF::Interface * | find (uint16_t itf_uid) const |
Find the interface with the given UID. More... | |
HF::Interface * | find (uint16_t itf_uid) const |
Final template instantiation that finds the wrapped interface with the given UID. More... | |
void | attributes_itf (HF::Attributes::List &attrs, Common::Interface itf, uint8_t pack_id, const HF::Attributes::UIDS &uids) const |
Helper function used to provide HF::Units::Unit::attributes functionality. More... | |
void | attributes_itf (HF::Attributes::List &attrs, Common::Interface itf, uint8_t pack_id, const HF::Attributes::UIDS &uids) const |
Helper function used to provide HF::Units::Unit::attributes functionality. More... | |
![]() | |
uint8_t | _id |
Unit ID used to identify a given unit in a given HAN-FUN device. | |
Helper template class to implement units.
|
inline |
Constructor.
[in] | id | unit identifier. |
[in] | device | device that contains this units. |
Definition at line 212 of file units.h.
|
inlinevirtual |
Return a list of all the attributes for a given interface, pack id and list of attributes UID's.
Implements HF::Profiles::IProfile.
Definition at line 245 of file units.h.
|
inlinevirtual |
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. |
Implements HF::Units::IUnit.
Definition at line 230 of file units.h.
|
inlinevirtual |
Get the id number of this unit on the device.
Implements HF::Units::IUnit.
|
inlinevirtual |
Return the list of optional interfaces implemented by this unit.
Reimplemented from HF::Units::AbstractUnit.
Definition at line 276 of file units.h.
|
inline |
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. |
Definition at line 264 of file units.h.
|
inlinevirtual |
Handle periodic processing.
[in] | time | current system clock value in seconds. |
Reimplemented from HF::Units::AbstractUnit.
|
inline |
Send message msg
to the network address given by addr
.
[in] | addr | HF network address. |
[in] | message | pointer to the message to be sent to the network. |
Definition at line 258 of file units.h.
|
inlinevirtual |
Return this profile HAN-FUN UID.
Implements HF::Profiles::IProfile.