HAN-FUN API  1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
HF::Core::Unit0 Struct Reference

This represent the special unit with ID/UID = 0. More...

#include <core.h>

+ Inheritance diagram for HF::Core::Unit0:
+ Collaboration diagram for HF::Core::Unit0:

Public Member Functions

 Unit0 (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...
 
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...
 
- Public Member Functions inherited from HF::Units::AbstractUnit
IDevicedevice () 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::Interfaceinterfaces () 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...
 
- Public Member Functions inherited from HF::Units::IUnit
virtual Common::Result handle (Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset)=0
 Handle incoming messages from the network. More...
 

Additional Inherited Members

- Protected Member Functions inherited from HF::Units::AbstractUnit
 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 inherited from HF::Units::AbstractUnit
uint8_t _id
 Unit ID used to identify a given unit in a given HAN-FUN device.
 

Detailed Description

This represent the special unit with ID/UID = 0.

Definition at line 67 of file core.h.

Constructor & Destructor Documentation

◆ Unit0()

HF::Core::Unit0::Unit0 ( IDevice device)
inline

Constructor.

Parameters
[in]devicereference to the device that holds this unit.

Definition at line 76 of file core.h.

76  : Units::AbstractUnit(device)
77  {}
IDevice & device() const
Reference to the device this unit belongs to.
Definition: units.h:107

Member Function Documentation

◆ attributes()

HF::Attributes::List HF::Core::Unit0::attributes ( Common::Interface  itf,
uint8_t  pack_id,
const HF::Attributes::UIDS uids 
) const
inlinevirtual

Return a list of all the attributes for a given interface, pack id and list of attributes UID's.

Parameters
[in]itfinterface UID.
[in]pack_idattribute pack id.
[in]uidslist of attributes UID's.
Returns
attribute list.

Implements HF::Profiles::IProfile.

Definition at line 91 of file core.h.

References UNUSED.

93  {
94  UNUSED(itf);
95  UNUSED(pack_id);
96  UNUSED(uids);
97  return HF::Attributes::List();
98  }
This class has the same behavior has a list, however the list element access methods where overwritte...
Definition: attributes.h:752
#define UNUSED(x)
Helper macro to remove warning about unused function/method argument.

◆ id()

uint8_t HF::Core::Unit0::id ( ) const
inlinevirtual

Get the id number of this unit on the device.

Returns
id number of this unit on the device.

Implements HF::Units::IUnit.

Definition at line 79 of file core.h.

80  {
81  return 0;
82  }

◆ uid()

uint16_t HF::Core::Unit0::uid ( ) const
inlinevirtual

Return this profile HAN-FUN UID.

Returns
the UID associated with this profile.
See also
IProfile::UID.

Implements HF::Profiles::IProfile.

Definition at line 84 of file core.h.

85  {
86  return 0;
87  }

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