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

This module contains the common definitions for the Attribute Reporting service implementation. More...

+ Collaboration diagram for Common:

Data Structures

struct  HF::Core::AttributeReporting::Reference
 Report Identifier. More...
 
struct  HF::Core::AttributeReporting::Entry
 Parent class for all report rule entries. More...
 
struct  HF::Core::AttributeReporting::Rule
 Parent class for all report rules. More...
 

Enumerations

enum  HF::Core::AttributeReporting::CMD {
  HF::Core::AttributeReporting::PERIODIC_REPORT_CMD = 0x01, HF::Core::AttributeReporting::EVENT_REPORT_CMD = 0x02, HF::Core::AttributeReporting::CREATE_PERIODIC_CMD = 0x01, HF::Core::AttributeReporting::CREATE_EVENT_CMD = 0x02,
  HF::Core::AttributeReporting::ADD_PERIODIC_ENTRY_CMD = 0x03, HF::Core::AttributeReporting::ADD_EVENT_ENTRY_CMD = 0x04, HF::Core::AttributeReporting::DELETE_REPORT_CMD = 0x05, HF::Core::AttributeReporting::GET_PERIODIC_ENTRIES = 0x06,
  HF::Core::AttributeReporting::GET_EVENT_ENTRIES = 0x07, HF::Core::AttributeReporting::UPDATE_INTERVAL_CMD = 0x08
}
 Commands. More...
 
enum  HF::Core::AttributeReporting::Attributes { HF::Core::AttributeReporting::REPORT_COUNT_ATTR = 0x01, HF::Core::AttributeReporting::PERIODIC_REPORT_COUNT_ATTR = 0x02, HF::Core::AttributeReporting::EVENT_REPORT_COUNT_ATTR = 0x03 }
 Attributes. More...
 
enum  HF::Core::AttributeReporting::Type { HF::Core::AttributeReporting::PERIODIC = 0x00, HF::Core::AttributeReporting::EVENT = 0x01 }
 Types of reports send from the server to the client. More...
 

Functions

Protocol::MessageHF::Core::AttributeReporting::create (Protocol::Address &destination)
 Create a new attribute reporting event rule for the device with the given address. More...
 
Protocol::MessageHF::Core::AttributeReporting::create (Protocol::Address &destination, uint32_t interval)
 Create a new attribute reporting periodic rule for the device with the given address and the given interval. More...
 
Protocol::MessageHF::Core::AttributeReporting::destroy (Type type, uint8_t report_id)
 Remove the rule with the given type and the given report_id. More...
 
Protocol::MessageHF::Core::AttributeReporting::destroy (Reference report)
 Remove the rule for the given report reference. More...
 
Protocol::MessageHF::Core::AttributeReporting::add (Reference report, periodic_iterator begin, periodic_iterator end)
 Add the periodic entries from start to end into the rule with the given report reference. More...
 
Protocol::MessageHF::Core::AttributeReporting::update (Reference report, uint32_t new_interval)
 Change the Update Interval for the specified report. More...
 
HF::Attributes::IAttributeHF::Core::AttributeReporting::create_attribute (uint8_t uid)
 Create an attribute object that can hold the attribute with the given uid. (HF::Core::AttributeReporting::Server *,uint8_t) More...
 

Detailed Description

This module contains the common definitions for the Attribute Reporting service implementation.

Enumeration Type Documentation

◆ Attributes

Attributes.

Enumerator
REPORT_COUNT_ATTR 

Number of report entries attribute.

PERIODIC_REPORT_COUNT_ATTR 

Number of periodic report entries attribute.

EVENT_REPORT_COUNT_ATTR 

Number of event report entries attribute.

Definition at line 90 of file attribute_reporting.h.

91  {
92  REPORT_COUNT_ATTR = 0x01,
95  __LAST_ATTR__ = EVENT_REPORT_COUNT_ATTR
96  } Attributes;
Number of event report entries attribute.
Number of periodic report entries attribute.
Number of report entries attribute.

◆ CMD

Commands.

Enumerator
PERIODIC_REPORT_CMD 

Periodic Report.

EVENT_REPORT_CMD 

Event Report.

CREATE_PERIODIC_CMD 

Create Periodic Report.

CREATE_EVENT_CMD 

Create Event Report.

ADD_PERIODIC_ENTRY_CMD 

Add periodic report entry.

ADD_EVENT_ENTRY_CMD 

Add event report entry.

DELETE_REPORT_CMD 

Delete report.

GET_PERIODIC_ENTRIES 

Get periodic entries.

GET_EVENT_ENTRIES 

Get event entries.

UPDATE_INTERVAL_CMD 

Update the interval of an existent report.

Definition at line 74 of file attribute_reporting.h.

75  {
76  PERIODIC_REPORT_CMD = 0x01,
77  EVENT_REPORT_CMD = 0x02,
78  CREATE_PERIODIC_CMD = 0x01,
79  CREATE_EVENT_CMD = 0x02,
80  ADD_PERIODIC_ENTRY_CMD = 0x03,
81  ADD_EVENT_ENTRY_CMD = 0x04,
82  DELETE_REPORT_CMD = 0x05,
83  GET_PERIODIC_ENTRIES = 0x06,
84  GET_EVENT_ENTRIES = 0x07,
85  UPDATE_INTERVAL_CMD = 0x08,
86  __LAST_CMD__ = UPDATE_INTERVAL_CMD
87  } CMD;
Update the interval of an existent report.

◆ Type

Types of reports send from the server to the client.

Enumerator
PERIODIC 

Periodic Report.

EVENT 

Event Report.

Definition at line 99 of file attribute_reporting.h.

100  {
101  PERIODIC = 0x00,
102  EVENT = 0x01,
103  } Type;

Function Documentation

◆ add()

Protocol::Message * HF::Core::AttributeReporting::add ( Reference  report,
periodic_iterator  begin,
periodic_iterator  end 
)

Add the periodic entries from start to end into the rule with the given report reference.

Add the event entries from start to end into the rule with the given report reference.

Parameters
[in]reportreport reference
[in]beginiterator to the start of the periodic entries to add.
[in]enditerator to the end of the periodic entries to add.
Returns
pointer to a message indicating the result of the operation to be sent to the requesting device.
Parameters
[in]reportreport reference
[in]beginiterator to the start of the event entries to add.
[in]enditerator to the end of the event entries to add.
Returns
pointer to a message indicating the result of the operation to be sent to the requesting device.

◆ create() [1/2]

Protocol::Message* HF::Core::AttributeReporting::create ( Protocol::Address destination)

Create a new attribute reporting event rule for the device with the given address.

Parameters
[in]destinationdevice address the rule should be created for.
Returns
pointer to a message indicating the result of the operation to be sent to the requesting device.

◆ create() [2/2]

Protocol::Message* HF::Core::AttributeReporting::create ( Protocol::Address destination,
uint32_t  interval 
)

Create a new attribute reporting periodic rule for the device with the given address and the given interval.

Parameters
[in]destinationdevice address the rule should be created for.
[in]intervaltime interval in seconds for the periodic rule.
Returns
pointer to a message indicating the result of the operation to be sent to the requesting device.

◆ create_attribute()

HF::Attributes::IAttribute* HF::Core::AttributeReporting::create_attribute ( uint8_t  uid)
inline

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

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

◆ destroy() [1/2]

Protocol::Message* HF::Core::AttributeReporting::destroy ( Type  type,
uint8_t  report_id 
)

Remove the rule with the given type and the given report_id.

Parameters
[in]typereport type (HF::Core::AttributeReporting::Type)
[in]report_idreport ID.
Returns
pointer to a message indicating the result of the operation to be sent to the requesting device.

Referenced by HF::Core::SessionManagement::EntriesWrapper< _Entries >::destroy().

+ Here is the caller graph for this function:

◆ destroy() [2/2]

Protocol::Message* HF::Core::AttributeReporting::destroy ( Reference  report)

Remove the rule for the given report reference.

Parameters
[in]reportreport reference to remove the rule for.
Returns
pointer to a message indicating the result of the operation to be sent to the requesting device.

◆ update()

Protocol::Message* HF::Core::AttributeReporting::update ( Reference  report,
uint32_t  new_interval 
)

Change the Update Interval for the specified report.

Parameters
[in]reportReport reference
[in]new_intervalNew updata interval.
Returns
pointer to a message indicating the result of the operation to be sent to the requesting device.