![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
Helper class used to implement custom functionality to the group management server side. More...
#include <group_management.h>
Public Member Functions | |
Server (Unit0 &unit) | |
Constructor. More... | |
Server (const Server &other) | |
Copy-Constructor. More... | |
_Entries & | entries () const |
Get a reference to the current object implementing the persistence API, for the device information. More... | |
![]() | |
IServer (Unit0 &unit) | |
Constructor. | |
virtual | ~IServer () |
Destructor. | |
HF::Devices::Concentrator::IUnit0 * | unit0 () const |
Return a reference to the unit that this service belongs to. More... | |
GroupPtr | entry (const uint16_t address) const |
Get the group entry given by address . More... | |
GroupPtr | entry (const std::string &name) const |
Get the group entry given by name . More... | |
uint16_t | next_address () const |
Return next available address for device group. More... | |
uint8_t | number_of_groups () const |
Get the Number Of Groups for the Group Management server. More... | |
HF::Attributes::IAttribute * | attribute (uint8_t uid) |
Return a pointer to the interface attribute with the given uid . More... | |
HF::Attributes::UIDS | attributes (uint8_t pack_id=HF::Attributes::Pack::MANDATORY) const |
Return a vector containing the attribute UIDs, for the given pack ID. More... | |
Common::Result | handle (Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset) |
Handle incoming messages from the network. More... | |
virtual Common::Result | create (Protocol::Packet &packet, CreateMessage &msg) |
Callback that is called when a GroupManagement::CREATE_CMD , is received. More... | |
virtual void | created (const GroupPtr &group) |
Indicate that a new group was created. More... | |
virtual Common::Result | remove (Protocol::Packet &packet, DeleteMessage &msg) |
Callback that is called when a GroupManagement::DELETE_CMD , is received. More... | |
virtual void | deleted (const Group &group) |
Indicate that a group was deleted. More... | |
virtual Common::Result | add (Protocol::Packet &packet, const AddMessage &msg) |
Callback that is called when a GroupManagement::ADD_CMD , is received. More... | |
virtual void | added (const GroupPtr &group, const Member &member) |
Indicate that a new device/unit was added to an existing group. More... | |
virtual Common::Result | remove (Protocol::Packet &packet, const RemoveMessage &msg) |
Callback that is called when a GroupManagement::REMOVE_CMD , is received. More... | |
virtual void | removed (const GroupPtr &group, const Member &member) |
Indicate that a device/unit was removed from an existing group. More... | |
![]() | |
Interface::Role | role () const |
Return the Interface::Role this interface implements. More... | |
![]() | |
uint16_t | uid () const |
This method returns the interface UID. More... | |
![]() | |
Unit0 & | unit () const |
The device this unit is associated with. | |
HF::Attributes::IAttribute * | attribute (uint8_t uid) |
Return a pointer to the interface attribute with the given uid . More... | |
HF::Attributes::UIDS | attributes (uint8_t pack_id=HF::Attributes::Pack::MANDATORY) const |
Return a vector containing the attribute UIDs, for the given pack ID. More... | |
![]() | |
Common::Result | handle (Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset) |
Handle incoming messages from the network. More... | |
void | periodic (uint32_t time) |
Handle periodic processing. More... | |
HF::Attributes::IAttribute * | attribute (uint8_t uid) |
Return a pointer to the interface attribute with the given uid . More... | |
Protected Member Functions | |
_GroupTable & | group_table () const |
Get the Group Table client associated with this Group Management server. More... | |
![]() | |
virtual bool | authorized (CMD member, const Protocol::Address &source, const Protocol::Address &destination) |
This method serves to indicate if a given member of the interface can be used by the source device affecting the destination device configuration on the system. More... | |
void | number_of_groups_update (int8_t diff) const |
Get the Number Of Groups for the Group Management server. More... | |
uint16_t | payload_size (Protocol::Message::Interface &itf) const |
Return the minimal payload size that a message should hold when addressed at the given interface. More... | |
Common::Result | handle_command (Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset) |
Handle incoming messages from the network. More... | |
void | added (const Protocol::Address &addr, Common::Result result, const AddMessage &request, uint8_t reference) |
Process the result of adding a device to a group. More... | |
![]() | |
ServiceRole (Unit0 &unit) | |
Constructor. More... | |
![]() | |
Base (Unit0 &unit) | |
Constructor. | |
![]() | |
Service (Unit0 &unit) | |
Constructor. More... | |
bool | check_uid (uint16_t uid) const |
Check if the given uid value matches the service's UID value. More... | |
![]() | |
AbstractService (Unit0 &unit) | |
Constructor. More... | |
void | send (const Protocol::Address &addr, Protocol::Message &message) |
Send message msg to the network address given by addr . More... | |
void | send (const Protocol::Address &addr, Protocol::Message &message, Transport::Link *link) |
Create and send a new packet with the given message to the given address. More... | |
![]() | |
virtual void | notify (const HF::Attributes::IAttribute &old_value, const HF::Attributes::IAttribute &new_value) const |
Notify that an attribute value as changed. More... | |
Common::Result | check (Protocol::Message &message, Common::ByteArray &payload, uint16_t offset) |
Check if message has correct attributes to be processed by the interface. More... | |
Common::Result | check_payload_size (Protocol::Message &message, Common::ByteArray &payload, uint16_t offset) |
Check if payload data size if sufficient for processing the message . More... | |
virtual uint16_t | payload_size (Protocol::Message &message) const |
Return the minimal payload size that should be present for the given message. More... | |
template<typename _Message > | |
uint16_t | payload_size_helper () const |
Helper function template to retrieve minimum size required for serializing/deserializing the class given. More... | |
virtual Common::Result | handle_attribute (Protocol::Packet &packet, Common::ByteArray &payload, uint16_t offset) |
Handle incoming messages from the network. More... | |
Additional Inherited Members | |
![]() | |
enum | Role { CLIENT_ROLE = 0, SERVER_ROLE = 1 } |
Interface roles. More... | |
enum | UID { DEVICE_MANAGEMENT = 0x0001, BIND_MANAGEMENT = 0x0002, GROUP_MANAGEMENT = 0x0003, IDENTIFY = 0x0004, DEVICE_INFORMATION = 0x0005, ATTRIBUTE_REPORTING = 0x0006, BATCH_PROGRAM_MANAGEMENT = 0x0007, EVENT_SCHEDULING = 0x0008, WEEKLY_SCHEDULING = 0x0009, GROUP_TABLE = 0x000A, TAMPER_ALERT = 0x0101, TIME = 0x0102, POWER = 0x0110, KEEP_ALIVE = 0x0115, RSSI = 0x0111, SUOTA = 0x0400, ALERT = 0x0100, ON_OFF = 0x0200, LEVEL_CONTROL = 0x0201, COLOUR_CONTROL = 0x0202, SIMPLE_KEYPAD = 0x0203, SIMPLE_POWER_METER = 0x0300, SIMPLE_TEMPERATURE = 0x0301, SIMPLE_HUMIDITY = 0x0302, SIMPLE_THERMOSTAT = 0x0303, SIMPLE_BUTTON = 0x0304, SIMPLE_VISUAL_EFFECTS = 0x0305, SIMPLE_AIR_PRESSURE = 0x0306, SIMPLE_LIGHT_SENSOR = 0x0307, RESERVED = 0x7F00, MAX_UID = 0x7FFE, ANY_UID = 0x7FFF } |
Interfaces Unique Identifiers (UID). More... | |
![]() | |
static constexpr uint8_t | MAX_CMD_ID = 0xFF |
Maximum value for command IDs in interfaces. | |
![]() | |
Unit0 & | _unit |
Reference to the unit the service belongs to. | |
Helper class used to implement custom functionality to the group management server side.
Definition at line 1104 of file group_management.h.
|
inline |
Constructor.
[in] | unit | reference to the unit containing this service. |
Definition at line 1118 of file group_management.h.
|
inline |
Copy-Constructor.
[in] | other | reference to the object to copy from. |
Definition at line 1126 of file group_management.h.
|
inlinevirtual |
Get a reference to the current object implementing the persistence API, for the device information.
Implements HF::Core::GroupManagement::IServer.
Definition at line 1133 of file group_management.h.
|
inlineprotectedvirtual |
Get the Group Table client associated with this Group Management server.
Implements HF::Core::GroupManagement::IServer.
Definition at line 1140 of file group_management.h.