ZCL library  4.3
ZCL library to manage a Zigbee network
ZCLFrame Class Reference

This Class which defines a ZCL frame. More...

#include <ZCLFrame.h>

List of all members.

Public Member Functions

ZCLHeadergetHeader () const
 Get the header of the ZCL frame.
ZCLPayloadgetPayload () const
 Get the payload of the ZCL frame, or NULL if not defined.
ReadAttributesPayloadcreateReadAttributesPayload ()
 Create a Read Attributes payload to complete by user.
ReadAttributesResponsePayloadcreateReadAttributesResponsePayload ()
 Return a Read Attributes response payload to complete by user.
WriteAttributesPayloadcreateWriteAttributesPayload ()
 Return a Write Attributes payload to complete by user.
WriteAttributesPayloadcreateWriteAttributesUndividedPayload ()
 Return a Write Attributes Undivided payload to complete by user.
WriteAttributesPayloadcreateWriteAttributesNoResponsePayload ()
 Return a Write Attributes No Response payload to complete by user.
WriteAttributesResponsePayloadcreateWriteAttributesResponsePayload ()
 Return a Write Attributes response payload to complete by user.
ConfigureReportingPayloadcreateConfigureReportingPayload ()
 Return a Configure Reporting payload to complete by user.
ConfigureReportingResponsePayloadcreateConfigureReportingResponsePayload ()
 Return a Configure Reporting response payload to complete by user.
ReadReportingConfigurationPayloadcreateReadReportingConfigurationPayload ()
 Return a Read Reporting Configuration payload to complete by user.
ReadReportingConfigurationResponsePayloadcreateReadReportingConfigurationResponsePayload ()
 Return a Read Reporting Configuration response payload to complete by user.
ReportAttributesPayloadcreateReportAttributesPayload ()
 Return a Report Attributes payload to complete by user.
DefaultResponsePayloadcreateDefaultResponsePayload ()
 Return a Default Response payload to complete by user.
DiscoverAttributesPayloadcreateDiscoverAttributesPayload ()
 Return a Discover Attributes payload to complete by user.
DiscoverAttributesResponsePayloadcreateDiscoverAttributesResponsePayload ()
 Return a Discover Attributes response payload to complete by user.
ClusterSpecificCommandPayloadcreateClusterSpecificCommandPayload ()
 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 ZCLFramedecodeZCLFrameFromBytes (const byte data[], int length)
 Decode a ZCL Frame from an array of bytes.
static ZCLFramenewZCLFrameInstance ()
 Get a new instance of ZCL Frame.
static ZCLFramenewZCLFrameInstance (byte seqNumber)
 Get a new instance of ZCL Frame response.

Detailed Description

This Class which defines a ZCL frame.

A ZCL frame is composed of a ZCL header and a ZCL payload.


Member Function Documentation

ClusterSpecificCommandPayload* ZCLFrame::createClusterSpecificCommandPayload ( )

Return a Specific Cluster payload to complete by user.

The command identifier of the header is initialized to CLUSTER_SPECIFIC_COMMAND.

Returns:
the Cluster Specific Command payload to complete.
ConfigureReportingPayload* ZCLFrame::createConfigureReportingPayload ( )

Return a Configure Reporting payload to complete by user.

The command identifier of the header is initialized to CONFIGURE_REPORTING.

Returns:
the Configure Reporting payload to complete.
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.

Returns:
the Configure Reporting response payload to complete.
DefaultResponsePayload* ZCLFrame::createDefaultResponsePayload ( )

Return a Default Response payload to complete by user.

The command identifier of the header is initialized to DEFAULT_RESPONSE.

Returns:
the Default Response payload to complete.
DiscoverAttributesPayload* ZCLFrame::createDiscoverAttributesPayload ( )

Return a Discover Attributes payload to complete by user.

The command identifier of the header is initialized to DISCOVER_ATTRIBUTES.

Returns:
the Discover Attributes payload to complete.
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.

Returns:
the Discover Attributes response payload to complete.
ReadAttributesPayload* ZCLFrame::createReadAttributesPayload ( )

Create a Read Attributes payload to complete by user.

The command identifier of the header is initialized to READ_ATTRIBUTES.

Returns:
the Read Attributes payload to complete.
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.

Returns:
the Read Attributes response payload to complete.
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.

Returns:
the Read Reporting Configuration payload to complete.
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.

Returns:
the Read Reporting Configuration response payload to complete.
ReportAttributesPayload* ZCLFrame::createReportAttributesPayload ( )

Return a Report Attributes payload to complete by user.

The command identifier of the header is initialized to REPORT_ATTRIBUTES.

Returns:
the Report Attributes payload to complete.
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.

Returns:
the Write Attributes No Response payload to complete.
WriteAttributesPayload* ZCLFrame::createWriteAttributesPayload ( )

Return a Write Attributes payload to complete by user.

The command identifier of the header is initialized to WRITE_ATTRIBUTES.

Returns:
the Write Attributes payload to complete.
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.

Returns:
the Write Attributes response payload to complete.
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.

Returns:
the Write Attributes payload to complete.
static ZCLFrame* ZCLFrame::decodeZCLFrameFromBytes ( const byte  data[],
int  length 
) [static]

Decode a ZCL Frame from an array of bytes.

Parameters:
datathe data as array of bytes.
lengththe data array length.
Returns:
the decoded ZCLFrame.
void ZCLFrame::fromBytes ( const byte  frame[],
int  length 
)

Build a ZCL frame from an array of bytes.

Parameters:
framethe frame as array of bytes.
lengththe array size.
ZCLHeader* ZCLFrame::getHeader ( ) const

Get the header of the ZCL frame.

Returns:
the ZCL header.
ZCLPayload* ZCLFrame::getPayload ( ) const

Get the payload of the ZCL frame, or NULL if not defined.

Returns:
the ZCL payload, 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.

Returns:
a new ZCL Frame instance.
static ZCLFrame* ZCLFrame::newZCLFrameInstance ( byte  seqNumber) [static]

Get a new instance of ZCL Frame response.

Parameters:
seqNumberthe transaction sequence number to insert in the ZCL Frame incoming from the request.
Returns:
a new ZCL Frame instance.
const byte* ZCLFrame::toBytes ( int &  size)

Return the ZCL frame as array of bytes.

Parameters:
[out]size: the returned array size.
Returns:
the array of bytes.
std::string ZCLFrame::toString ( ) const

Get the frame as a string.

Returns:
the frame as a string.

The documentation for this class was generated from the following file: