ZCL library
4.3
ZCL library to manage a Zigbee network
|
This Class which defines a ZCL frame. More...
#include <ZCLFrame.h>
Public Member Functions | |
ZCLHeader * | getHeader () const |
Get the header of the ZCL frame. | |
ZCLPayload * | getPayload () const |
Get the payload of the ZCL frame, or NULL if not defined. | |
ReadAttributesPayload * | createReadAttributesPayload () |
Create a Read Attributes payload to complete by user. | |
ReadAttributesResponsePayload * | createReadAttributesResponsePayload () |
Return a Read Attributes response payload to complete by user. | |
WriteAttributesPayload * | createWriteAttributesPayload () |
Return a Write Attributes payload to complete by user. | |
WriteAttributesPayload * | createWriteAttributesUndividedPayload () |
Return a Write Attributes Undivided payload to complete by user. | |
WriteAttributesPayload * | createWriteAttributesNoResponsePayload () |
Return a Write Attributes No Response payload to complete by user. | |
WriteAttributesResponsePayload * | createWriteAttributesResponsePayload () |
Return a Write Attributes response payload to complete by user. | |
ConfigureReportingPayload * | createConfigureReportingPayload () |
Return a Configure Reporting payload to complete by user. | |
ConfigureReportingResponsePayload * | createConfigureReportingResponsePayload () |
Return a Configure Reporting response payload to complete by user. | |
ReadReportingConfigurationPayload * | createReadReportingConfigurationPayload () |
Return a Read Reporting Configuration payload to complete by user. | |
ReadReportingConfigurationResponsePayload * | createReadReportingConfigurationResponsePayload () |
Return a Read Reporting Configuration response payload to complete by user. | |
ReportAttributesPayload * | createReportAttributesPayload () |
Return a Report Attributes payload to complete by user. | |
DefaultResponsePayload * | createDefaultResponsePayload () |
Return a Default Response payload to complete by user. | |
DiscoverAttributesPayload * | createDiscoverAttributesPayload () |
Return a Discover Attributes payload to complete by user. | |
DiscoverAttributesResponsePayload * | createDiscoverAttributesResponsePayload () |
Return a Discover Attributes response payload to complete by user. | |
ClusterSpecificCommandPayload * | createClusterSpecificCommandPayload () |
Return a Specific Cluster payload to complete by user. | |
void | fromBytes (const byte frame[], int length) |
Build a ZCL frame from an array of bytes. | |
const byte * | toBytes (int &size) |
Return the ZCL frame as array of bytes. | |
std::string | toString () const |
Get the frame as a string. | |
Static Public Member Functions | |
static ZCLFrame * | decodeZCLFrameFromBytes (const byte data[], int length) |
Decode a ZCL Frame from an array of bytes. | |
static ZCLFrame * | newZCLFrameInstance () |
Get a new instance of ZCL Frame. | |
static ZCLFrame * | newZCLFrameInstance (byte seqNumber) |
Get a new instance of ZCL Frame response. |
This Class which defines a ZCL frame.
A ZCL frame is composed of a ZCL header and a ZCL payload.
ClusterSpecificCommandPayload* ZCLFrame::createClusterSpecificCommandPayload | ( | ) |
ConfigureReportingPayload* ZCLFrame::createConfigureReportingPayload | ( | ) |
Return a Configure Reporting payload to complete by user.
The command identifier of the header is initialized to CONFIGURE_REPORTING.
ConfigureReportingResponsePayload* ZCLFrame::createConfigureReportingResponsePayload | ( | ) |
Return a Configure Reporting response payload to complete by user.
The command identifier of the header is initialized to CONFIGURE_REPORTING_RESPONSE.
DefaultResponsePayload* ZCLFrame::createDefaultResponsePayload | ( | ) |
Return a Default Response payload to complete by user.
The command identifier of the header is initialized to DEFAULT_RESPONSE.
DiscoverAttributesPayload* ZCLFrame::createDiscoverAttributesPayload | ( | ) |
Return a Discover Attributes payload to complete by user.
The command identifier of the header is initialized to DISCOVER_ATTRIBUTES.
DiscoverAttributesResponsePayload* ZCLFrame::createDiscoverAttributesResponsePayload | ( | ) |
Return a Discover Attributes response payload to complete by user.
The command identifier of the header is positioned to DISCOVER_ATTRIBUTES_RESPONSE.
ReadAttributesPayload* ZCLFrame::createReadAttributesPayload | ( | ) |
Create a Read Attributes payload to complete by user.
The command identifier of the header is initialized to READ_ATTRIBUTES.
ReadAttributesResponsePayload* ZCLFrame::createReadAttributesResponsePayload | ( | ) |
Return a Read Attributes response payload to complete by user.
The command identifier of the header is initialized to READ_ATTRIBUTES_RESPONSE.
ReadReportingConfigurationPayload* ZCLFrame::createReadReportingConfigurationPayload | ( | ) |
Return a Read Reporting Configuration payload to complete by user.
The command identifier of the header is initialized to READ_REPORTING_CONFIGURATION.
ReadReportingConfigurationResponsePayload* ZCLFrame::createReadReportingConfigurationResponsePayload | ( | ) |
Return a Read Reporting Configuration response payload to complete by user.
The command identifier of the header is initialized to READ_REPORTING_CONFIGURATION_RESPONSE.
ReportAttributesPayload* ZCLFrame::createReportAttributesPayload | ( | ) |
Return a Report Attributes payload to complete by user.
The command identifier of the header is initialized to REPORT_ATTRIBUTES.
WriteAttributesPayload* ZCLFrame::createWriteAttributesNoResponsePayload | ( | ) |
Return a Write Attributes No Response payload to complete by user.
The command identifier of the header is initialized to WRITE_ATTRIBUTES_NO_RESPONSE.
WriteAttributesPayload* ZCLFrame::createWriteAttributesPayload | ( | ) |
Return a Write Attributes payload to complete by user.
The command identifier of the header is initialized to WRITE_ATTRIBUTES.
WriteAttributesResponsePayload* ZCLFrame::createWriteAttributesResponsePayload | ( | ) |
Return a Write Attributes response payload to complete by user.
The command identifier of the header is positioned to WRITE_ATTRIBUTES_RESPONSE.
WriteAttributesPayload* ZCLFrame::createWriteAttributesUndividedPayload | ( | ) |
Return a Write Attributes Undivided payload to complete by user.
The command identifier of the header is initialized to WRITE_ATTRIBUTES_UNDIVIDED.
static ZCLFrame* ZCLFrame::decodeZCLFrameFromBytes | ( | const byte | data[], |
int | length | ||
) | [static] |
Decode a ZCL Frame from an array of bytes.
data | the data as array of bytes. |
length | the data array length. |
void ZCLFrame::fromBytes | ( | const byte | frame[], |
int | length | ||
) |
Build a ZCL frame from an array of bytes.
frame | the frame as array of bytes. |
length | the array size. |
ZCLHeader* ZCLFrame::getHeader | ( | ) | const |
Get the header of the ZCL frame.
ZCLPayload* ZCLFrame::getPayload | ( | ) | const |
Get the payload of the ZCL frame, or NULL if not defined.
static ZCLFrame* ZCLFrame::newZCLFrameInstance | ( | ) | [static] |
Get a new instance of ZCL Frame.
A transaction sequence number is allocated and initialized in the ZCL Frame.
static ZCLFrame* ZCLFrame::newZCLFrameInstance | ( | byte | seqNumber | ) | [static] |
Get a new instance of ZCL Frame response.
seqNumber | the transaction sequence number to insert in the ZCL Frame incoming from the request. |
const byte* ZCLFrame::toBytes | ( | int & | size | ) |
Return the ZCL frame as array of bytes.
[out] | size | : the returned array size. |
std::string ZCLFrame::toString | ( | ) | const |
Get the frame as a string.