HAN-FUN API  1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
HF::Units::IUnit Struct Referenceabstract

This class represents the interface implemented by all HAN-FUN units. More...

#include <units.h>

+ Inheritance diagram for HF::Units::IUnit:
+ Collaboration diagram for HF::Units::IUnit:

Public Member Functions

virtual uint8_t id () const =0
 Get the id number of this unit on the device. More...
 
virtual IDevicedevice () 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::Interfaceinterfaces () 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...
 
- Public Member Functions inherited from HF::Profiles::IProfile
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...
 

Detailed Description

This class represents the interface implemented by all HAN-FUN units.

Definition at line 48 of file units.h.

Member Function Documentation

◆ device()

virtual IDevice& HF::Units::IUnit::device ( ) const
pure virtual

Reference to the device this unit belongs to.

Returns
reference to the device this unit belongs to

Implemented in HF::Units::AbstractUnit.

◆ handle()

virtual Common::Result HF::Units::IUnit::handle ( Protocol::Packet packet,
Common::ByteArray payload,
uint16_t  offset 
)
pure virtual

Handle incoming messages from the network.

Parameters
[in]packetthe packet receive from the network.
[in]payloadthe byte array containing the data received from the network.
[in]offsetthe offset the payload start at in the byte array.
Returns
the result of the message processing.

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 >.

◆ id()

virtual uint8_t HF::Units::IUnit::id ( ) const
pure virtual

◆ interfaces()

virtual std::vector<Common::Interface> HF::Units::IUnit::interfaces ( ) const
pure virtual

Return a vector containing a list of extra interfaces, other than the interfaces specified by the profile the unit implements)

Returns
vector containing the list of extra interfaces.

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.

◆ periodic()

virtual void HF::Units::IUnit::periodic ( uint32_t  time)
pure virtual

◆ send()

virtual void HF::Units::IUnit::send ( const Protocol::Address addr,
Protocol::Message message,
Transport::Link link = nullptr 
)
pure virtual

Create and send a new packet with the given message to the given address.

Parameters
[in]addraddress to send the message to.
[in]messagemessage to send.
[in]linkpreferred link to send the message on.

Implemented in HF::Units::AbstractUnit.


The documentation for this struct was generated from the following file: