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

This module contains the classes that define and implement the Level Control interface API. More...

+ Collaboration diagram for Level Control:

Data Structures

struct  HF::Interfaces::LevelControl::Level
 Helper class to handle the Level attribute for the Level Control interface. More...
 
struct  HF::Interfaces::LevelControl::Base
 Level Control Interface : Parent. More...
 
class  HF::Interfaces::LevelControl::Server
 Level Control Interface : Server side implementation. More...
 
class  HF::Interfaces::LevelControl::Client
 Level Control Interface : Client side implementation. More...
 

Enumerations

enum  HF::Interfaces::LevelControl::CMD { HF::Interfaces::LevelControl::SET_LEVEL_CMD = 0x01, HF::Interfaces::LevelControl::INCREASE_LEVEL_CMD = 0x02, HF::Interfaces::LevelControl::DECREASE_LEVEL_CMD = 0x03 }
 Command IDs. More...
 
enum  HF::Interfaces::LevelControl::Attributes { HF::Interfaces::LevelControl::LEVEL_ATTR = 0x01 }
 Attributes. More...
 

Functions

HF::Attributes::IAttributeHF::Interfaces::create_attribute (HF::Interfaces::LevelControl::Server *server, uint8_t uid)
 Create an attribute object that can hold the attribute with the given uid. More...
 
HF::Attributes::IAttributeHF::Interfaces::LevelControl::create_attribute (uint8_t uid)
 Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::LevelControl::Server *,uint8_t) More...
 
std::ostream & operator<< (std::ostream &stream, const HF::Interfaces::LevelControl::CMD command)
 Convert the given command into a string and write it to the given stream. More...
 
std::ostream & operator<< (std::ostream &stream, const HF::Interfaces::LevelControl::Attributes attribute)
 Convert the given attribute into a string and write it to the given stream. More...
 

Detailed Description

This module contains the classes that define and implement the Level Control interface API.

Enumeration Type Documentation

◆ Attributes

Attributes.

Enumerator
LEVEL_ATTR 

State attribute UID.

Definition at line 73 of file level_control.h.

74  {
75  LEVEL_ATTR = 0x01,
76  __LAST_ATTR__ = LEVEL_ATTR,
77  } Attributes;

◆ CMD

Command IDs.

Enumerator
SET_LEVEL_CMD 

Set Level Command ID.

INCREASE_LEVEL_CMD 

Increase Level Command ID.

DECREASE_LEVEL_CMD 

Decrease Level Command ID.

Definition at line 64 of file level_control.h.

65  {
66  SET_LEVEL_CMD = 0x01,
67  INCREASE_LEVEL_CMD = 0x02,
68  DECREASE_LEVEL_CMD = 0x03,
69  __LAST_CMD__ = DECREASE_LEVEL_CMD
70  } CMD;

Function Documentation

◆ create_attribute() [1/2]

HF::Attributes::IAttribute* HF::Interfaces::create_attribute ( HF::Interfaces::LevelControl::Server server,
uint8_t  uid 
)

Create an attribute object that can hold the attribute with the given uid.

If server is not equal to nullptr then initialize it with the current value.

Parameters
[in]serverpointer to the object to read the current value from.
[in]uidattribute's UID to create the attribute object for.
Returns
pointer to an attribute object or nullptr if the attribute UID does not exist.

◆ create_attribute() [2/2]

HF::Attributes::IAttribute* HF::Interfaces::LevelControl::create_attribute ( uint8_t  uid)
inline

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::LevelControl::Server *,uint8_t)

See also
HF::Interfaces::create_attribute (HF::Interfaces::LevelControl::Server *,uint8_t)
Parameters
[in]uidattribute UID to create the attribute object for.
Return values
pointerto an attribute object
<tt>nullptr</tt>if the attribute UID does not exist.

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::LevelControl::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::ColourControl::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::Alert::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::Scheduling::Weekly::IServer *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::Time::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::SUOTA::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::RSSI::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::GroupTable::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid.

Create an attribute object that can hold the attribute with the given uid. (HF::Core::Scheduling::Event::IServer *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::DeviceManagement::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::DeviceInformation::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::BindManagement::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::BatchProgramManagement::IServer *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::AttributeReporting::Server *,uint8_t)

See also
HF::Interfaces::create_attribute (HF::Interfaces::SimpleHumidity::Server *,uint8_t)
Parameters
[in]uidattribute UID to create the attribute object for.
Returns
pointer to an attribute object or nullptr if the attribute UID does not exist.

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::LevelControl::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::ColourControl::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::Alert::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::Scheduling::Weekly::IServer *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::Time::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::SUOTA::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::RSSI::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::GroupTable::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid.

Create an attribute object that can hold the attribute with the given uid. (HF::Core::Scheduling::Event::IServer *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::DeviceManagement::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::DeviceInformation::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::BindManagement::Server *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::BatchProgramManagement::IServer *,uint8_t)

Create an attribute object that can hold the attribute with the given uid. (HF::Core::AttributeReporting::Server *,uint8_t)

See also
HF::Interfaces::create_attribute (HF::Interfaces::SimpleTemperature::Server *,uint8_t)
Parameters
[in]uidattribute UID to create the attribute object for.
Return values
pointerto an attribute object
<tt>nullptr</tt>if the attribute UID does not exist.

Definition at line 108 of file simple_humidity.h.

109  {
110  return Interfaces::create_attribute(static_cast<SimpleHumidity::Server *>(nullptr),
111  uid);
112  }
HF::Attributes::IAttribute * create_attribute(uint8_t uid)
Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::SimpleHum...

◆ operator<<() [1/2]

std::ostream& operator<< ( std::ostream &  stream,
const HF::Interfaces::LevelControl::CMD  command 
)

Convert the given command into a string and write it to the given stream.

Parameters
[in]streamout stream to write the string to.
[in]commandrole value to convert to a string.
Returns
stream

◆ operator<<() [2/2]

std::ostream& operator<< ( std::ostream &  stream,
const HF::Interfaces::LevelControl::Attributes  attribute 
)

Convert the given attribute into a string and write it to the given stream.

Parameters
[in]streamout stream to write the string to.
[in]attributeattribute value to convert to a string.
Returns
stream