ZCL library
4.3
ZCL library to manage a Zigbee network
|
This Class defines the payload of a ZCL frame. More...
#include <ZCLPayload.h>
Public Member Functions | |
ZCLPayload (ZCLFrame *frame) | |
Constructor. | |
bool | isDiscoverAttributesCommand () const |
Return true if the payload is a Discover Attributes command. | |
const DiscoverAttributesPayload * | getDiscoverAttributesPayload () const |
Get the payload as a Discover Attributes command. | |
bool | isDiscoverAttributesResponse () const |
Return true if the payload is a Discover Attributes response. | |
const DiscoverAttributesResponsePayload * | getDiscoverAttributesResponsePayload () const |
Get the payload as a Discover Attributes response. | |
bool | isReadAttributesCommand () const |
Return true if the payload is a Read Attributes command. | |
const ReadAttributesPayload * | getReadAttributesPayload () const |
Get the payload as a Read Attributes command. | |
bool | isReadAttributesResponse () const |
Return true if the payload is a Read Attributes response. | |
const ReadAttributesResponsePayload * | getReadAttributesResponsePayload () const |
Get the payload as a Read Attributes response. | |
bool | isWriteAttributesCommand () const |
Return true if the payload is a Write Attributes command. | |
const WriteAttributesPayload * | getWriteAttributesPayload () const |
Get the payload as a Write Attributes command. | |
bool | isWriteAttributesResponse () const |
Return true if the payload is a Write Attributes response. | |
const WriteAttributesResponsePayload * | getWriteAttributesResponsePayload () const |
Get the payload as a Write Attributes response. | |
bool | isReadReportingConfigurationCommand () const |
Return true if the payload is a Read Reporting Configuration command. | |
const ReadReportingConfigurationPayload * | getReadReportingConfigurationPayload () const |
Get the payload as a Read Reporting Configuration command. | |
bool | isReadReportingConfigurationResponse () const |
Return true if the payload is a Read Reporting Configuration response. | |
const ReadReportingConfigurationResponsePayload * | getReadReportingConfigurationResponsePayload () const |
Get the payload as a Read Reporting Configuration response. | |
bool | isConfigureReportingCommand () const |
Return true if the payload is a Configure Reporting command. | |
const ConfigureReportingPayload * | getConfigureReportingPayload () const |
Get the payload as a Configure Reporting command. | |
bool | isConfigureReportingResponse () const |
Return true if the payload is a Configure Reporting response. | |
const ConfigureReportingResponsePayload * | getConfigureReportingResponsePayload () const |
Get the payload as a Configure Reporting response. | |
bool | isClusterSpecificCommand () const |
Return true if the payload is a Cluster Specific command. | |
const ClusterSpecificCommandPayload * | getClusterSpecificCommandPayload () const |
Get the payload as a Cluster Specific command. | |
bool | isReportAttributesCommand () const |
Return true if the payload is a Report Attributes command. | |
const ReportAttributesPayload * | getReportAttributesPayload () const |
Get the payload as a Report Attributes command. | |
bool | isDefaultResponse () const |
Return true if the payload is a Default response. | |
const DefaultResponsePayload * | getDefaultResponsePayload () const |
Get the payload as a Default response. | |
virtual const byte * | toBytes (int &size)=0 |
Return the ZCL payload as array of bytes. | |
virtual bool | fromBytes (const byte payload[], int length)=0 |
Build a ZCl payload from an array of bytes. | |
Friends | |
class | ZCLFrame |
This Class defines the payload of a ZCL frame.
ZCLPayload::ZCLPayload | ( | ZCLFrame * | frame | ) |
Constructor.
frame | the frame containing this payload. |
virtual bool ZCLPayload::fromBytes | ( | const byte | payload[], |
int | length | ||
) | [pure virtual] |
Build a ZCl payload from an array of bytes.
payload | the payload as array of bytes. |
length | the array size. |
Implemented in DefaultResponsePayload, DiscoverAttributesResponsePayload, ConfigureReportingResponsePayload, DiscoverAttributesPayload, WriteAttributesResponsePayload, ClusterSpecificCommandPayload, ConfigureReportingPayload, ReadAttributesPayload, ReadAttributesResponsePayload, ReadReportingConfigurationPayload, ReadReportingConfigurationResponsePayload, ReportAttributesPayload, and WriteAttributesPayload.
const ClusterSpecificCommandPayload* ZCLPayload::getClusterSpecificCommandPayload | ( | ) | const |
const ConfigureReportingPayload* ZCLPayload::getConfigureReportingPayload | ( | ) | const |
Get the payload as a Configure Reporting command.
const ConfigureReportingResponsePayload* ZCLPayload::getConfigureReportingResponsePayload | ( | ) | const |
Get the payload as a Configure Reporting response.
const DefaultResponsePayload* ZCLPayload::getDefaultResponsePayload | ( | ) | const |
Get the payload as a Default response.
const DiscoverAttributesPayload* ZCLPayload::getDiscoverAttributesPayload | ( | ) | const |
Get the payload as a Discover Attributes command.
const DiscoverAttributesResponsePayload* ZCLPayload::getDiscoverAttributesResponsePayload | ( | ) | const |
Get the payload as a Discover Attributes response.
const ReadAttributesPayload* ZCLPayload::getReadAttributesPayload | ( | ) | const |
Get the payload as a Read Attributes command.
const ReadAttributesResponsePayload* ZCLPayload::getReadAttributesResponsePayload | ( | ) | const |
Get the payload as a Read Attributes response.
const ReadReportingConfigurationPayload* ZCLPayload::getReadReportingConfigurationPayload | ( | ) | const |
Get the payload as a Read Reporting Configuration command.
const ReadReportingConfigurationResponsePayload* ZCLPayload::getReadReportingConfigurationResponsePayload | ( | ) | const |
Get the payload as a Read Reporting Configuration response.
const ReportAttributesPayload* ZCLPayload::getReportAttributesPayload | ( | ) | const |
Get the payload as a Report Attributes command.
const WriteAttributesPayload* ZCLPayload::getWriteAttributesPayload | ( | ) | const |
Get the payload as a Write Attributes command.
const WriteAttributesResponsePayload* ZCLPayload::getWriteAttributesResponsePayload | ( | ) | const |
Get the payload as a Write Attributes response.
bool ZCLPayload::isClusterSpecificCommand | ( | ) | const |
bool ZCLPayload::isConfigureReportingCommand | ( | ) | const |
Return true if the payload is a Configure Reporting command.
bool ZCLPayload::isConfigureReportingResponse | ( | ) | const |
Return true if the payload is a Configure Reporting response.
bool ZCLPayload::isDefaultResponse | ( | ) | const |
Return true if the payload is a Default response.
bool ZCLPayload::isDiscoverAttributesCommand | ( | ) | const |
Return true if the payload is a Discover Attributes command.
bool ZCLPayload::isDiscoverAttributesResponse | ( | ) | const |
Return true if the payload is a Discover Attributes response.
bool ZCLPayload::isReadAttributesCommand | ( | ) | const |
Return true if the payload is a Read Attributes command.
bool ZCLPayload::isReadAttributesResponse | ( | ) | const |
Return true if the payload is a Read Attributes response.
bool ZCLPayload::isReadReportingConfigurationCommand | ( | ) | const |
Return true if the payload is a Read Reporting Configuration command.
bool ZCLPayload::isReadReportingConfigurationResponse | ( | ) | const |
Return true if the payload is a Read Reporting Configuration response.
bool ZCLPayload::isReportAttributesCommand | ( | ) | const |
Return true if the payload is a Report Attributes command.
bool ZCLPayload::isWriteAttributesCommand | ( | ) | const |
Return true if the payload is a Write Attributes command.
bool ZCLPayload::isWriteAttributesResponse | ( | ) | const |
Return true if the payload is a Write Attributes response.
virtual const byte* ZCLPayload::toBytes | ( | int & | size | ) | [pure virtual] |
Return the ZCL payload as array of bytes.
[out] | size | : the returned array size. |
Implemented in DefaultResponsePayload, DiscoverAttributesResponsePayload, ConfigureReportingResponsePayload, DiscoverAttributesPayload, WriteAttributesResponsePayload, ClusterSpecificCommandPayload, ConfigureReportingPayload, ReadAttributesPayload, ReadAttributesResponsePayload, ReadReportingConfigurationPayload, ReadReportingConfigurationResponsePayload, ReportAttributesPayload, and WriteAttributesPayload.