deCONZ C++ API v2.6.1
Loading...
Searching...
No Matches
deCONZ::ZclFrame Class Reference

Helper to build ZCL based payloads to be transported via ApsDataRequest. More...

#include <zcl.h>

Public Member Functions

 ZclFrame ()
 Constructor.
 
 ZclFrame (const ZclFrame &other)
 Copy constructor.
 
ZclFrameoperator= (const ZclFrame &other)
 Copy assignment constructor.
 
virtual ~ZclFrame ()
 Deconstructor.
 
uint8_t frameControl () const
 Returns ZCL header frame control field.
 
void setFrameControl (uint8_t frameControl)
 Sets the ZCL header frame control field.
 
uint16_t manufacturerCode () const
 Returns the vendor specific manufacturer code.
 
ManufacturerCode_t manufacturerCode_t () const
 Returns the strong typed vendor specific manufacturer code.
 
void setManufacturerCode (uint16_t code)
 Sets the vendor specific manufacturer code.
 
void setManufacturerCode (ManufacturerCode_t code)
 Sets the strong typed vendor specific manufacturer code.
 
uint8_t sequenceNumber () const
 Returns the sequence number associated with a request.
 
void setSequenceNumber (uint8_t seqNumber)
 Sets the sequence number of a request.
 
uint8_t commandId () const
 Returns the ZCL command identifier.
 
ZclCommandId_t commandId_t () const
 Returns the strong typed ZCL command identifier.
 
void setCommandId (uint8_t commandId)
 Sets the ZCL command identifier.
 
void setCommandId (ZclCommandId_t commandId)
 Sets the strong typed ZCL command identifier.
 
unsigned char payloadAt (int index) const
 Returns the ZCL payload byte at given index.
 
const QByteArray & payload () const
 Returns the const ZCL payload.
 
QByteArray & payload ()
 Returns the modifiable ZCL payload.
 
void setPayload (const QByteArray &payload)
 Sets the ZCL payload.
 
void writeToStream (QDataStream &stream)
 Writes the ZCL frame in ZigBee standard conform format to the stream.
 
void readFromStream (QDataStream &stream)
 Reads a ZCL frame in ZigBee standard conform format from the stream.
 
bool isClusterCommand () const
 Returns true if the command() is related to a cluster (for example OnOff cluster).
 
bool isProfileWideCommand () const
 Returns true if the command() is profile wide (any ZclGeneralCommandId).
 
bool isDefaultResponse () const
 Returns true if the ZCL frame is a default response.
 
bool isValid () const
 Returns true if readFromStream() succeeded.
 
uint8_t defaultResponseCommandId () const
 Returns the command identifier wich belongs to a default response.
 
ZclCommandId_t defaultResponseCommandId_t () const
 Returns the strong typed command identifier wich belongs to a default response.
 
ZclStatus defaultResponseStatus () const
 Returns the ZCL status wich belongs to a default response.
 
void reset ()
 Resets the object to it's initial state, allowing reusing it without allocating a new one.
 

Detailed Description

Helper to build ZCL based payloads to be transported via ApsDataRequest.

Member Function Documentation

◆ commandId_t()

ZclCommandId_t deCONZ::ZclFrame::commandId_t ( ) const

Returns the strong typed ZCL command identifier.

Since
v2.6.1

◆ defaultResponseCommandId_t()

ZclCommandId_t deCONZ::ZclFrame::defaultResponseCommandId_t ( ) const

Returns the strong typed command identifier wich belongs to a default response.

Since
v2.6.1

◆ frameControl()

uint8_t deCONZ::ZclFrame::frameControl ( ) const

Returns ZCL header frame control field.

Returns
An OR combinded value of deCONZ::ZclFrameControl flags

◆ isValid()

bool deCONZ::ZclFrame::isValid ( ) const

Returns true if readFromStream() succeeded.

Since
v2.11.5

◆ manufacturerCode_t()

ManufacturerCode_t deCONZ::ZclFrame::manufacturerCode_t ( ) const

Returns the strong typed vendor specific manufacturer code.

Since
v2.6.1

◆ payloadAt()

unsigned char deCONZ::ZclFrame::payloadAt ( int  index) const

Returns the ZCL payload byte at given index.

If the index is out of bounds 0 is returned.

Since
v2.18.0

◆ readFromStream()

void deCONZ::ZclFrame::readFromStream ( QDataStream &  stream)

Reads a ZCL frame in ZigBee standard conform format from the stream.

Parameters
streamshall read from a ApsDatarequest::asdu() buffer

◆ reset()

void deCONZ::ZclFrame::reset ( )

Resets the object to it's initial state, allowing reusing it without allocating a new one.

Since
v2.12.0

◆ setCommandId()

void deCONZ::ZclFrame::setCommandId ( ZclCommandId_t  commandId)

Sets the strong typed ZCL command identifier.

Since
v2.6.1

◆ setFrameControl()

void deCONZ::ZclFrame::setFrameControl ( uint8_t  frameControl)

Sets the ZCL header frame control field.

Parameters
frameControlis an OR combinded value of deCONZ::ZclFrameControl flags

◆ setManufacturerCode()

void deCONZ::ZclFrame::setManufacturerCode ( ManufacturerCode_t  code)

Sets the strong typed vendor specific manufacturer code.

Since
v2.6.1

◆ writeToStream()

void deCONZ::ZclFrame::writeToStream ( QDataStream &  stream)

Writes the ZCL frame in ZigBee standard conform format to the stream.

Parameters
streamshall write to a ApsDatarequest::asdu() buffer

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