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

This module contains the classes that define and implement the Simple Button interface API. More...

+ Collaboration diagram for Simple Button:

Data Structures

struct  HF::Interfaces::SimpleButton::ShortPressMaxDuration
 Helper class to handle the Short Press Max Duration attribute for the Simple Button interface. More...
 
struct  HF::Interfaces::SimpleButton::ExtraLongPressMinDuration
 Helper class to handle the Extra Long Press Min Duration attribute for the Simple Button interface. More...
 
struct  HF::Interfaces::SimpleButton::DoubleClickGapDuration
 Helper class to handle the Double Click Gap Duration attribute for the Simple Button interface. More...
 
struct  HF::Interfaces::SimpleButton::Base
 Simple Button Interface : Parent. More...
 
class  HF::Interfaces::SimpleButton::Server
 Simple Button Interface : Server side implementation. More...
 
struct  HF::Interfaces::SimpleButton::Client
 Simple Button Interface : Client side implementation. More...
 

Enumerations

enum  HF::Interfaces::SimpleButton::CMD { HF::Interfaces::SimpleButton::SHORT_PRESS_CMD = 1, HF::Interfaces::SimpleButton::LONG_PRESS_CMD = 2, HF::Interfaces::SimpleButton::EXTRA_LONG_PRESS_CMD = 3, HF::Interfaces::SimpleButton::DOUBLE_CLICK_PRESS_CMD = 4 }
 Command IDs. More...
 
enum  HF::Interfaces::SimpleButton::Attributes { HF::Interfaces::SimpleButton::SHORT_PRESS_MAX_DURATION_ATTR = 1, HF::Interfaces::SimpleButton::EXTRA_LONG_PRESS_MIN_DURATION_ATTR = 2, HF::Interfaces::SimpleButton::DOUBLE_CLICK_GAP_DURATION_ATTR = 3 }
 Attributes. More...
 

Functions

HF::Attributes::IAttributeHF::Interfaces::create_attribute (SimpleButton::Server *server, uint8_t uid)
 Create an attribute object that can hold the attribute with the given uid. More...
 
HF::Attributes::IAttributeHF::Interfaces::SimpleButton::create_attribute (uint8_t uid)
 Create an attribute object that can hold the attribute with the given uid. (HF::Interfaces::SimpleButton::Server *,uint8_t) More...
 
std::ostream & operator<< (std::ostream &stream, const HF::Interfaces::SimpleButton::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::SimpleButton::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 Simple Button interface API.

Enumeration Type Documentation

◆ Attributes

Attributes.

Enumerator
SHORT_PRESS_MAX_DURATION_ATTR 

Short Press Max Duration attribute UID.

EXTRA_LONG_PRESS_MIN_DURATION_ATTR 

Extra Long Press Min Duration attribute UID.

DOUBLE_CLICK_GAP_DURATION_ATTR 

Double Click Gap Duration attribute UID.

Definition at line 76 of file simple_button.h.

◆ CMD

Command IDs.

Enumerator
SHORT_PRESS_CMD 

Short Press command UID.

LONG_PRESS_CMD 

Long Press command UID.

EXTRA_LONG_PRESS_CMD 

Extra Long Press command UID.

DOUBLE_CLICK_PRESS_CMD 

Double Click Press command UID.

Definition at line 66 of file simple_button.h.

Function Documentation

◆ create_attribute() [1/2]

HF::Attributes::IAttribute* HF::Interfaces::create_attribute ( SimpleButton::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::SimpleButton::create_attribute ( uint8_t  uid)
inline

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

See also
HF::Interfaces::create_attribute (HF::Interfaces::SimpleButton::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::SimpleButton::Server *,uint8_t)

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

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

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::SimpleButton::Server *,uint8_t)

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

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

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::SimpleButton::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::SimpleButton::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