HAN-FUN API  1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
HF::Profiles::AbstractProfile< _uid > Struct Template Reference

Class template for all profile implementations. More...

#include <profiles.h>

+ Inheritance diagram for HF::Profiles::AbstractProfile< _uid >:
+ Collaboration diagram for HF::Profiles::AbstractProfile< _uid >:

Public Member Functions

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...
 
Common::Result handle (Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset)
 Handle incoming messages from the network. More...
 

Detailed Description

template<uint16_t _uid>
struct HF::Profiles::AbstractProfile< _uid >

Class template for all profile implementations.

Definition at line 269 of file profiles.h.

Member Function Documentation

◆ attributes()

template<uint16_t _uid>
HF::Attributes::List HF::Profiles::AbstractProfile< _uid >::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.

Reimplemented in HF::Profiles::Detector< _uid >, HF::Profiles::Detector< VIBRATION_DETECTOR >, HF::Profiles::Detector< SIMPLE_PENDANT >, HF::Profiles::Detector< SMOKE_DETECTOR >, HF::Profiles::Detector< DOOR_OPEN_CLOSE_DETECTOR >, HF::Profiles::Detector< WINDOW_OPEN_CLOSE_DETECTOR >, HF::Profiles::Detector< MOTION_DETECTOR >, HF::Profiles::Detector< GAS_DETECTOR >, HF::Profiles::Detector< GLASS_BREAK_DETECTOR >, HF::Profiles::Detector< SIMPLE_DETECTOR >, HF::Profiles::Detector< FLOOD_DETECTOR >, HF::Profiles::ProfileN< _uid, _Interfaces >, HF::Profiles::ProfileN< _uid, Interface1, Interface2 >, HF::Profiles::ProfileN< _uid, OnOffServer, SimpleThermostatServer >, HF::Profiles::ProfileN< ENVIRONMENT_MONITOR, Interfaces::SimpleTemperature::Server, Interfaces::SimpleHumidity::Server, Interfaces::SimpleAirPressure::Server >, HF::Profiles::ProfileN< _uid, OnOffServer, ColourControlServer >, HF::Profiles::ProfileN< _uid, OnOffServer, SimplePowerMeterServer >, HF::Profiles::ProfileN< _uid, OnOffServer, LevelControlServer >, HF::Profiles::ProfileN< _uid, OnOffClient, LevelControlClient >, HF::Profiles::ProfileN< DIMMABLE_COLOUR_BULB, OnOffServer, ColourControlServer, LevelControlServer >, HF::Profiles::Profile< _uid, Interface >, 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 279 of file profiles.h.

281  {
282  UNUSED(itf);
283  UNUSED(pack_id);
284  UNUSED(uids);
285 
286  return HF::Attributes::List();
287  }
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.

◆ handle()

template<uint16_t _uid>
Common::Result HF::Profiles::AbstractProfile< _uid >::handle ( Protocol::Packet packet,
Common::ByteArray payload,
uint16_t  offset 
)
inline

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.

Definition at line 290 of file profiles.h.

292  {
293  UNUSED(packet);
294  UNUSED(payload);
295  UNUSED(offset);
296 
298  }
Fail - Invalid Argument.
#define UNUSED(x)
Helper macro to remove warning about unused function/method argument.

◆ uid()

template<uint16_t _uid>
uint16_t HF::Profiles::AbstractProfile< _uid >::uid ( ) const
inlinevirtual

Return this profile HAN-FUN UID.

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

Implements HF::Profiles::IProfile.

Reimplemented in 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 274 of file profiles.h.

Referenced by HF::Profiles::Detector< FLOOD_DETECTOR >::alert().

275  {
276  return _uid;
277  }
+ Here is the caller graph for this function:

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