![]() |
HAN-FUN API
1.5.3
This project provides the common implementation of ULE Alliance's HAN-FUN application protocol.
|
This module contains the classes that define and implement the Protocol API. More...
Modules | |
Attributes | |
This module contains the classes that define and implement the common API for handling attributes. | |
Filters | |
This module contains the filters used in the Protocol API implementation. | |
Data Structures | |
struct | HF::Protocol::Message |
Network Message. More... | |
struct | HF::Protocol::Address |
Network Address. More... | |
struct | HF::Protocol::Packet |
HAN-FUN Protocol Packet. More... | |
struct | HF::Protocol::Response |
Parent class for the response messages. More... | |
Functions | |
bool | HF::Protocol::request (Message::Type type, bool response=false) |
Check if message type is a request. More... | |
bool | HF::Protocol::response (Message::Type type) |
Check if message is a response. More... | |
bool | HF::Protocol::matches (Message::Type lhs, Message::Type rhs) |
Check if the given message types are the request and response for each other, for example, the Message::Type::COMMAND_RES matches both the Message::Type::COMMAND_REQ and Message::Type::COMMAND_RESP_REQ. More... | |
std::ostream & | operator<< (std::ostream &stream, const HF::Protocol::Message::Type type) |
Convert the given message type into a string and write it to the given stream . More... | |
std::ostream & | operator<< (std::ostream &stream, const HF::Protocol::Message &message) |
Convert the given message into a string and write it to the given stream . More... | |
std::ostream & | operator<< (std::ostream &stream, const HF::Protocol::Address &address) |
Convert the given address into a string and write it to the given stream . More... | |
std::ostream & | operator<< (std::ostream &stream, const HF::Protocol::Packet &packet) |
Convert the given packet into a string and write it to the given stream . More... | |
Variables | |
constexpr uint16_t | HF::Protocol::BROADCAST_ADDR = 0x7FFF |
HAN-FUN Broadcast - device address. | |
constexpr uint8_t | HF::Protocol::BROADCAST_UNIT = 0xFF |
HAN-FUN Broadcast - unit address. | |
constexpr uint16_t | HF::Protocol::MAX_PAYLOAD = 0x01FF |
HAN-FUN Network - Maximum application payload length. | |
This module contains the classes that define and implement the Protocol API.
bool HF::Protocol::matches | ( | Message::Type | lhs, |
Message::Type | rhs | ||
) |
Check if the given message types are the request and response for each other, for example, the Message::Type::COMMAND_RES matches both the Message::Type::COMMAND_REQ and Message::Type::COMMAND_RESP_REQ.
[in] | lhs | message type to match. |
[in] | rhs | message type to match. |
true | if the message types match. |
false | otherwise. |
std::ostream& operator<< | ( | std::ostream & | stream, |
const HF::Protocol::Message::Type | type | ||
) |
Convert the given message type
into a string and write it to the given stream
.
[in] | stream | out stream to write the string to. |
[in] | type | message type value to convert to a string. |
stream
std::ostream& operator<< | ( | std::ostream & | stream, |
const HF::Protocol::Message & | message | ||
) |
Convert the given message
into a string and write it to the given stream
.
[in] | stream | out stream to write the string to. |
[in] | message | message value to convert to a string. |
stream
std::ostream& operator<< | ( | std::ostream & | stream, |
const HF::Protocol::Address & | address | ||
) |
Convert the given address
into a string and write it to the given stream
.
[in] | stream | out stream to write the string to. |
[in] | address | HAN-FUN address to convert to a string. |
stream
std::ostream& operator<< | ( | std::ostream & | stream, |
const HF::Protocol::Packet & | packet | ||
) |
Convert the given packet
into a string and write it to the given stream
.
[in] | stream | out stream to write the string to. |
[in] | packet | HAN-FUN packet to convert to a string. |
stream
bool HF::Protocol::request | ( | Message::Type | type, |
bool | response = false |
||
) |
Check if message type is a request.
If response
is false
then return true for all requests, otherwise only for those that require a response.
[in] | type | message type to check if it is a request. |
[in] | response | false check for all request types, otherwise only those that require a response. |
true | if the message is a request. |
false | otherwise. |
Referenced by HF::Core::BatchProgramManagement::Client::define_program().
bool HF::Protocol::response | ( | Message::Type | type | ) |
Check if message is a response.
[in] | type | message type to check if it is a response. |
true | if the message is a response. |
false | otherwise. |
Referenced by HF::Core::AttributeReporting::Client::added(), HF::Core::AttributeReporting::Client::created(), HF::Core::AttributeReporting::Client::deleted(), HF::Core::SessionManagement::Server< Entries >::entries(), HF::Core::SessionManagement::Client< Device >::entries(), and HF::Core::AttributeReporting::Client::updated().