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

This module contains the classes that implement the Device Information service. More...

+ Collaboration diagram for Device Information:

Data Structures

struct  HF::Core::DeviceInformation::FriendlyName
 Data type to contain the Friendly name attribute. More...
 
class  HF::Core::DeviceInformation::Base
 Parent class for the Device Information interface implementation. More...
 
struct  HF::Core::DeviceInformation::Server
 Device Information interface : Server side. More...
 

Enumerations

enum  HF::Core::DeviceInformation::Attributes {
  HF::Core::DeviceInformation::CORE_VERSION_ATTR = 0x01, HF::Core::DeviceInformation::PROFILE_VERSION_ATTR = 0x02, HF::Core::DeviceInformation::INTERFACE_VERSION_ATTR = 0x03, HF::Core::DeviceInformation::EXTRA_CAP_ATTR = 0x04,
  HF::Core::DeviceInformation::MIN_SLEEP_TIME_ATTR = 0x05, HF::Core::DeviceInformation::ACTUAL_RESP_TIME_ATTR = 0x06, HF::Core::DeviceInformation::APP_VERSION_ATTR = 0x07, HF::Core::DeviceInformation::HW_VERSION_ATTR = 0x08,
  HF::Core::DeviceInformation::EMC_ATTR = 0x09, HF::Core::DeviceInformation::DECT_ID_ATTR = 0x0A, HF::Core::DeviceInformation::MANUFACTURER_NAME_ATTR = 0x0B, HF::Core::DeviceInformation::LOCATION_ATTR = 0x0C,
  HF::Core::DeviceInformation::ENABLED_ATTR = 0x0D, HF::Core::DeviceInformation::FRIENDLY_NAME_ATTR = 0x0E, HF::Core::DeviceInformation::UID_ATTR = 0x0F, HF::Core::DeviceInformation::SERIAL_NUMBER_ATTR = 0x10
}
 Attributes. More...
 

Functions

HF::Attributes::IAttributeHF::Core::create_attribute (HF::Core::DeviceInformation::Server *server, uint8_t uid)
 Create an attribute object that can hold the attribute with the given uid. More...
 
HF::Attributes::IAttributeHF::Core::DeviceInformation::create_attribute (uint8_t uid)
 Create an attribute object that can hold the attribute with the given uid. (HF::Core::DeviceInformation::Server *,uint8_t) More...
 
Protocol::MessageHF::Core::DeviceInformation::mandatory ()
 Create a message that can be used to retrieve the mandatory attributes on a remote device. More...
 
Protocol::MessageHF::Core::DeviceInformation::all ()
 Create a message that can be used to retrieve all the attributes on a remote device. More...
 
Protocol::MessageHF::Core::DeviceInformation::get (HF::Attributes::UIDS &uids)
 Create a message that can be used to retrieve the attributes with the given uids of the device information interface on a remote device. More...
 
Protocol::MessageHF::Core::DeviceInformation::get (uint8_t uid)
 Create a message that can be used to retrieve the attribute with the given uid. More...
 
std::ostream & operator<< (std::ostream &stream, const HF::Core::DeviceInformation::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 implement the Device Information service.

Enumeration Type Documentation

◆ Attributes

Attributes.

Enumerator
CORE_VERSION_ATTR 

HF Core version attribute.

(M)

PROFILE_VERSION_ATTR 

HF Profile version attribute.

(M)

INTERFACE_VERSION_ATTR 

HF Interface version attribute.

(M)

EXTRA_CAP_ATTR 

Extra capabilities attribute.

(M)

MIN_SLEEP_TIME_ATTR 

Minimum sleep time attribute.

(O)

ACTUAL_RESP_TIME_ATTR 

Actual response time attribute.

(O)

APP_VERSION_ATTR 

Hardware version attribute.

(O)

HW_VERSION_ATTR 

Hardware version attribute.

(O)

EMC_ATTR 

Electronic Manufacture Code attribute.

(O)

DECT_ID_ATTR 

RFPI / IPUI (0)

MANUFACTURER_NAME_ATTR 

Manufacture's name attribute.

(O)

LOCATION_ATTR 

Location attribute.

(O)

ENABLED_ATTR 

Device enabled attribute.

(O)

FRIENDLY_NAME_ATTR 

Device friendly name attribute.

(O)

UID_ATTR 

Device UID attribute.

(O)

SERIAL_NUMBER_ATTR 

Serial number attribute.

(O)

Definition at line 122 of file device_information.h.

123  {
124  CORE_VERSION_ATTR = 0x01,
125  PROFILE_VERSION_ATTR = 0x02,
126  INTERFACE_VERSION_ATTR = 0x03,
127  EXTRA_CAP_ATTR = 0x04,
128  MIN_SLEEP_TIME_ATTR = 0x05,
129  ACTUAL_RESP_TIME_ATTR = 0x06,
130  APP_VERSION_ATTR = 0x07,
131  HW_VERSION_ATTR = 0x08,
132  EMC_ATTR = 0x09,
133  DECT_ID_ATTR = 0x0A,
134  MANUFACTURER_NAME_ATTR = 0x0B,
135  LOCATION_ATTR = 0x0C,
136  ENABLED_ATTR = 0x0D,
137  FRIENDLY_NAME_ATTR = 0x0E,
138  UID_ATTR = 0x0F,
139  SERIAL_NUMBER_ATTR = 0x10,
140  __LAST_ATTR__ = SERIAL_NUMBER_ATTR,
141  } Attributes;
Electronic Manufacture Code attribute.

Function Documentation

◆ all()

Protocol::Message* HF::Core::DeviceInformation::all ( )

Create a message that can be used to retrieve all the attributes on a remote device.

Returns
pointer to a message to retrieve all the attributes.

◆ create_attribute() [1/2]

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

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

See also
HF::Core::create_attribute (HF::Core::DeviceInformation::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::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::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...

◆ get() [1/2]

Protocol::Message* HF::Core::DeviceInformation::get ( HF::Attributes::UIDS uids)

Create a message that can be used to retrieve the attributes with the given uids of the device information interface on a remote device.

Parameters
[in]uidsarray containing the attribute uids to retrive from the remote device.
Returns
pointer to a message to retrieve the attributes with the given uid's.

◆ get() [2/2]

Protocol::Message* HF::Core::DeviceInformation::get ( uint8_t  uid)

Create a message that can be used to retrieve the attribute with the given uid.

Parameters
[in]uidattribute's uid to retrieve.
Returns
pointer to a message to retrieve the attribute with the given uid.

◆ mandatory()

Protocol::Message* HF::Core::DeviceInformation::mandatory ( )

Create a message that can be used to retrieve the mandatory attributes on a remote device.

Returns
pointer to a message to retrieve the mandatory attributes.

◆ operator<<()

std::ostream& operator<< ( std::ostream &  stream,
const HF::Core::DeviceInformation::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