HAN-FUN API  1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
Common

This module contains the common classes for the Profiles API implementation. More...

+ Collaboration diagram for Common:

Data Structures

struct  HF::Profiles::IProfile
 Top level class representing a HAN-FUN profile. More...
 
struct  HF::Profiles::AbstractProfile< _uid >
 Class template for all profile implementations. More...
 
struct  HF::Profiles::Profile< _uid, Interface >
 Class template for profiles containing only one interface. More...
 
class  HF::Profiles::ProfileN< _uid, _Interfaces >
 Class template for profiles containing multiple interfaces. More...
 
struct  HF::Profiles::Profile2< _uid, Interface1, Interface2 >
 Class template for profiles containing two interfaces. More...
 
struct  HF::Profiles::Detector< _uid >
 Class template for Detector type profiles. More...
 

Enumerations

enum  HF::Profiles::UID {
  HF::Profiles::SIMPLE_ONOFF_SWITCHABLE = 0x0100, HF::Profiles::SIMPLE_ONOFF_SWITCH = 0x0101, HF::Profiles::SIMPLE_LEVEL_CONTROLLABLE = 0x0102, HF::Profiles::SIMPLE_LEVEL_CONTROL = 0x0103,
  HF::Profiles::SIMPLE_LEVEL_CONTROLLABLE_SWITCHABLE = 0x0104, HF::Profiles::SIMPLE_LEVEL_CONTROL_SWITCH = 0x0105, HF::Profiles::AC_OUTLET = 0x0106, HF::Profiles::AC_OUTLET_WITH_POWER_METERING = 0x0107,
  HF::Profiles::SIMPLE_LIGHT = 0x0108, HF::Profiles::DIMMABLE_LIGHT = 0x0109, HF::Profiles::DIMMER_SWITCH = 0x010A, HF::Profiles::SIMPLE_DOOR_LOCK = 0x010B,
  HF::Profiles::DOOR_BELL = 0x010C, HF::Profiles::SIMPLE_POWER_METER = 0x010D, HF::Profiles::SIMPLE_TEMPERATURE_SENSOR = 0x010E, HF::Profiles::SIMPLE_HUMIDITY_SENSOR = 0x010F,
  HF::Profiles::SIMPLE_AIR_PRESSURE_SENSOR = 0x0110, HF::Profiles::SIMPLE_BUTTON = 0x0111, HF::Profiles::CONTROLABLE_THERMOSTAT = 0x0112, HF::Profiles::SIMPLE_LED = 0x0113,
  HF::Profiles::ENVIRONMENT_MONITOR = 0x0114, HF::Profiles::COLOUR_BULB = 0x0115, HF::Profiles::DIMMABLE_COLOUR_BULB = 0x0116, HF::Profiles::TRACKER = 0x0117,
  HF::Profiles::SIMPLE_KEYPAD = 0x0118, HF::Profiles::SIMPLE_DETECTOR = 0x0200, HF::Profiles::DOOR_OPEN_CLOSE_DETECTOR = 0x0201, HF::Profiles::WINDOW_OPEN_CLOSE_DETECTOR = 0x0202,
  HF::Profiles::MOTION_DETECTOR = 0x0203, HF::Profiles::SMOKE_DETECTOR = 0x0204, HF::Profiles::GAS_DETECTOR = 0x0205, HF::Profiles::FLOOD_DETECTOR = 0x0206,
  HF::Profiles::GLASS_BREAK_DETECTOR = 0x0207, HF::Profiles::VIBRATION_DETECTOR = 0x0208, HF::Profiles::SIMPLE_LIGHT_SENSOR = 0x0209, HF::Profiles::SIREN = 0x0280,
  HF::Profiles::ALERTABLE = 0x0281, HF::Profiles::SIMPLE_PENDANT = 0x0300, HF::Profiles::USER_INTERFACE_LOCK = 0x0401, HF::Profiles::USER_INTERFACE = 0x0410,
  HF::Profiles::GENERIC_APPLICATION = 0x0411, HF::Profiles::PROPRIETARY_START = 0xFF00, HF::Profiles::PROPRIETARY_END = 0xFFFF
}
 Profiles UID's More...
 

Functions

Common::Interface const * HF::Profiles::interfaces (uint16_t profile, uint16_t &count)
 This function returns a pointer to a entry on a static const array, containing the interfaces the profile with the profile UID. More...
 

Detailed Description

This module contains the common classes for the Profiles API implementation.

Enumeration Type Documentation

◆ UID

Profiles UID's

Enumerator
SIMPLE_ONOFF_SWITCHABLE 

Allows a unit to receive and interpret on/off requests.

SIMPLE_ONOFF_SWITCH 

Allows a unit to send on/off requests.

SIMPLE_LEVEL_CONTROLLABLE 

Allows a unit to receive and interpret requests for adjustment of some quantity.

SIMPLE_LEVEL_CONTROL 

Allows a unit to send level adjustment requests.

SIMPLE_LEVEL_CONTROLLABLE_SWITCHABLE 

Allows a unit to receive and interpret both on/off and level control requests.

SIMPLE_LEVEL_CONTROL_SWITCH 

Allows a unit to send both on/off and level control requests.

AC_OUTLET 

This unit will be acting upon some physical AC switch.

AC_OUTLET_WITH_POWER_METERING 

This unit will be acting upon some physical AC switch and provides measurements over electric quantities.

SIMPLE_LIGHT 

This unit will be acting upon some physical Light switch.

DIMMABLE_LIGHT 

This unit will be acting upon some dimmable light.

DIMMER_SWITCH 

This unit will be acting upon some dimmable light switch.

SIMPLE_DOOR_LOCK 

This unit will be acting upon some physical door lock switch.

DOOR_BELL 

This unit will be acting upon some physical door bell.

SIMPLE_POWER_METER 

Allows a unit to do and provide measurements over electric quantities.

SIMPLE_TEMPERATURE_SENSOR 

Simple sensor to measure the temperature.

SIMPLE_HUMIDITY_SENSOR 

Simple sensor to measure the relative humidity.

SIMPLE_AIR_PRESSURE_SENSOR 

Simple Air Pressure Sensor.

SIMPLE_BUTTON 

Simple button.

CONTROLABLE_THERMOSTAT 

Controllable thermostat.

SIMPLE_LED 

Simple LED profile.

ENVIRONMENT_MONITOR 

Environment Monitoring.

COLOUR_BULB 

Colour Bulb.

DIMMABLE_COLOUR_BULB 

Dimmable Colour Bulb.

TRACKER 

Tracker.

SIMPLE_KEYPAD 

Simple Keypad.

SIMPLE_DETECTOR 

Use for a generic detector that senses and sends an alert.

DOOR_OPEN_CLOSE_DETECTOR 

Use for an open/close door detector that senses and sends an alert.

WINDOW_OPEN_CLOSE_DETECTOR 

Use for an open/close window detector that senses and sends an alert.

MOTION_DETECTOR 

Use for a motion detector that senses and sends an alert.

SMOKE_DETECTOR 

Use for a smoke detector that senses and sends an alert.

GAS_DETECTOR 

Use for a carbon monoxide detector that senses and sends an alert.

FLOOD_DETECTOR 

Use for a flood detector that senses and sends an alert.

GLASS_BREAK_DETECTOR 

Use for a glass break detector that senses and sends an alert.

VIBRATION_DETECTOR 

Use for a vibration detector that senses and sends an alert.

SIMPLE_LIGHT_SENSOR 

Allows a unit to provide light readings.

SIREN 

This unit will be acting upon some physical siren that will sound an alert.

ALERTABLE 

This profile can be used to receive alerts.

SIMPLE_PENDANT 

This unit will trigger an alert, much like a panic button.

USER_INTERFACE_LOCK 

User Interface Lock.

USER_INTERFACE 

User Interface unit (e.g. keypad, remote control)

GENERIC_APPLICATION 

Logic Application logic unit, (e.g. can be at the concentrator, Portal, user controller)

PROPRIETARY_START 

Proprietary profiles UID start value.

PROPRIETARY_END 

Proprietary profiles UID end value.

Definition at line 60 of file profiles.h.

61  {
62  // =============================================================================
63  // Home Control Unit Types
64  // =============================================================================
65 
67  SIMPLE_ONOFF_SWITCHABLE = 0x0100,
68 
70  SIMPLE_ONOFF_SWITCH = 0x0101,
71 
74 
76  SIMPLE_LEVEL_CONTROL = 0x0103,
77 
80 
83 
85  AC_OUTLET = 0x0106,
86 
92 
94  SIMPLE_LIGHT = 0x0108,
95 
97  DIMMABLE_LIGHT = 0x0109,
98 
100  DIMMER_SWITCH = 0x010A,
101 
103  SIMPLE_DOOR_LOCK = 0x010B,
104 
106  DOOR_BELL = 0x010C,
107 
109  SIMPLE_POWER_METER = 0x010D,
110 
112  SIMPLE_TEMPERATURE_SENSOR = 0x010E,
113 
115  SIMPLE_HUMIDITY_SENSOR = 0x010F,
116 
119 
121  SIMPLE_BUTTON = 0x0111,
122 
124  CONTROLABLE_THERMOSTAT = 0x0112,
125 
127  SIMPLE_LED = 0x0113,
128 
130  ENVIRONMENT_MONITOR = 0x0114,
131 
133  COLOUR_BULB = 0x0115,
134 
136  DIMMABLE_COLOUR_BULB = 0x0116,
137 
139  TRACKER = 0x0117,
140 
142  SIMPLE_KEYPAD = 0x0118,
143 
144  // =============================================================================
145  // Security Unit Types
146  // =============================================================================
147 
149  SIMPLE_DETECTOR = 0x0200,
150 
152  DOOR_OPEN_CLOSE_DETECTOR = 0x0201,
153 
156 
158  MOTION_DETECTOR = 0x0203,
159 
161  SMOKE_DETECTOR = 0x0204,
162 
164  GAS_DETECTOR = 0x0205,
165 
167  FLOOD_DETECTOR = 0x0206,
168 
170  GLASS_BREAK_DETECTOR = 0x0207,
171 
173  VIBRATION_DETECTOR = 0x0208,
174 
176  SIMPLE_LIGHT_SENSOR = 0x0209,
177 
179  SIREN = 0x0280,
180 
182  ALERTABLE = 0x0281,
183 
184  // =============================================================================
185  // Home care Unit Types
186  // =============================================================================
187 
189  SIMPLE_PENDANT = 0x0300,
190 
191  // =============================================================================
192  // Application Unit Types
193  // =============================================================================
194 
196  USER_INTERFACE_LOCK = 0x0401,
197 
199  USER_INTERFACE = 0x0410,
200 
202  GENERIC_APPLICATION = 0x0411,
203 
204  // =============================================================================
205  // Proprietary Unit Types
206  // =============================================================================
207 
208  // Use an ID from within the specified range to identify a proprietary unit type.
209 
211  PROPRIETARY_START = 0xFF00,
212 
214  PROPRIETARY_END = 0xFFFF,
215  };
This unit will be acting upon some physical AC switch.
Definition: profiles.h:85
Allows a unit to receive and interpret requests for adjustment of some quantity.
Definition: profiles.h:73
Use for a motion detector that senses and sends an alert.
Definition: profiles.h:158
Use for a flood detector that senses and sends an alert.
Definition: profiles.h:167
Allows a unit to do and provide measurements over electric quantities.
Definition: profiles.h:109
User Interface Lock.
Definition: profiles.h:196
Allows a unit to receive and interpret on/off requests.
Definition: profiles.h:67
Use for a carbon monoxide detector that senses and sends an alert.
Definition: profiles.h:164
This unit will be acting upon some physical siren that will sound an alert.
Definition: profiles.h:179
Allows a unit to provide light readings.
Definition: profiles.h:176
This unit will be acting upon some physical door bell.
Definition: profiles.h:106
Use for an open/close window detector that senses and sends an alert.
Definition: profiles.h:155
Dimmable Colour Bulb.
Definition: profiles.h:136
Allows a unit to send both on/off and level control requests.
Definition: profiles.h:82
Simple Air Pressure Sensor.
Definition: profiles.h:118
Use for an open/close door detector that senses and sends an alert.
Definition: profiles.h:152
Controllable thermostat.
Definition: profiles.h:124
User Interface unit (e.g. keypad, remote control)
Definition: profiles.h:199
Simple sensor to measure the relative humidity.
Definition: profiles.h:115
Simple LED profile.
Definition: profiles.h:127
Logic Application logic unit, (e.g. can be at the concentrator, Portal, user controller) ...
Definition: profiles.h:202
Use for a smoke detector that senses and sends an alert.
Definition: profiles.h:161
Allows a unit to send on/off requests.
Definition: profiles.h:70
This unit will trigger an alert, much like a panic button.
Definition: profiles.h:189
Use for a glass break detector that senses and sends an alert.
Definition: profiles.h:170
Use for a generic detector that senses and sends an alert.
Definition: profiles.h:149
Proprietary profiles UID end value.
Definition: profiles.h:214
Proprietary profiles UID start value.
Definition: profiles.h:211
Allows a unit to receive and interpret both on/off and level control requests.
Definition: profiles.h:79
Use for a vibration detector that senses and sends an alert.
Definition: profiles.h:173
Environment Monitoring.
Definition: profiles.h:130
This unit will be acting upon some physical Light switch.
Definition: profiles.h:94
This unit will be acting upon some dimmable light.
Definition: profiles.h:97
This unit will be acting upon some dimmable light switch.
Definition: profiles.h:100
This unit will be acting upon some physical AC switch and provides measurements over electric quantit...
Definition: profiles.h:91
This unit will be acting upon some physical door lock switch.
Definition: profiles.h:103
Simple sensor to measure the temperature.
Definition: profiles.h:112
Allows a unit to send level adjustment requests.
Definition: profiles.h:76
This profile can be used to receive alerts.
Definition: profiles.h:182

Function Documentation

◆ interfaces()

Common::Interface const* HF::Profiles::interfaces ( uint16_t  profile,
uint16_t &  count 
)

This function returns a pointer to a entry on a static const array, containing the interfaces the profile with the profile UID.

The number of interfaces is given by count. You can get the addicional interfaces by incrementing the returned pointer.

Warning
The returned pointer MUST NOT be used with free/delete.
Parameters
[in]profilethe profile UID to retrieve the interfaces for.
[out]countthe number of interfaces this profile has.
Returns
a pointer to structure containing the interface information for the profile or nullptr if the profile is not known or does not use any of the official interfaces.