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

This Class defines the header of a ZCL frame. More...

#include <ZCLHeader.h>

List of all members.

Public Member Functions

FrameControlgetFrameControl ()
 Get the frame control field of this ZCL frame.
bool isManufacturerCodePresent () const
 Check if the manufacturer code is present in this ZCL frame.
dbyte getManufacturerCode () const
 Get the manufacturer code of this ZCL frame (optional).
void setManufacturerCode (dbyte manufacturerCode)
 Set the manufacturer code of this ZCL frame (optional).
byte getTransactionSequenceNumber () const
 Get the transaction sequence number of this ZCL frame.
void setTransactionSequenceNumber (byte number)
 Set the transaction sequence number of this ZCL frame.
CmdId::Value getCmdIdentifier () const
 Get the command identifier of this ZCL frame.
void setCmdIdentifier (CmdId::Value cmdId)
 Set the command identifier of this ZCL frame.
byte getCmdIdentifierAsValue () const
 Get the command identifier as a specific cluster value of this ZCL frame.
void setCmdIdentifierAsValue (byte value)
 Set the command identifier as a specific cluster value of this ZCL frame.
int fromBytes (const byte frame[])
 Build a ZCL header from an array of bytes.
const byte * toBytes (int &size)
 Get the ZCL header as array of bytes.

Friends

class ZCLFrame

Detailed Description

This Class defines the header of a ZCL frame.

A ZCL header is composed of

  • the Frame Control field
  • the Manufacturer Code field
  • the Transaction Sequence number
  • the Command Identifier field

Member Function Documentation

int ZCLHeader::fromBytes ( const byte  frame[])

Build a ZCL header from an array of bytes.

Parameters:
framean array of bytes.
Returns:
the number of bytes used for the ZCL header.
CmdId::Value ZCLHeader::getCmdIdentifier ( ) const

Get the command identifier of this ZCL frame.

Returns:
the command identifier.
byte ZCLHeader::getCmdIdentifierAsValue ( ) const

Get the command identifier as a specific cluster value of this ZCL frame.

Returns:
the command identifier as a specific cluster value.
FrameControl* ZCLHeader::getFrameControl ( )

Get the frame control field of this ZCL frame.

Returns:
the frame control field.
dbyte ZCLHeader::getManufacturerCode ( ) const

Get the manufacturer code of this ZCL frame (optional).

Check with the isManufacturerCodePresent() method.

Returns:
the manufacturer code.
byte ZCLHeader::getTransactionSequenceNumber ( ) const

Get the transaction sequence number of this ZCL frame.

Returns:
the transaction sequence number
bool ZCLHeader::isManufacturerCodePresent ( ) const

Check if the manufacturer code is present in this ZCL frame.

Returns:
true if the manufacturer code is present in this ZCL frame.
void ZCLHeader::setCmdIdentifier ( CmdId::Value  cmdId)

Set the command identifier of this ZCL frame.

Parameters:
cmdIdthe command identifier.
void ZCLHeader::setCmdIdentifierAsValue ( byte  value)

Set the command identifier as a specific cluster value of this ZCL frame.

Parameters:
valuethe command identifier as a specific cluster value.
void ZCLHeader::setManufacturerCode ( dbyte  manufacturerCode)

Set the manufacturer code of this ZCL frame (optional).

Check with the isManufacturerCodePresent() method.

Parameters:
manufacturerCodethe manufacturer code.
void ZCLHeader::setTransactionSequenceNumber ( byte  number)

Set the transaction sequence number of this ZCL frame.

Parameters:
numberthe transaction sequence number.
const byte* ZCLHeader::toBytes ( int &  size)

Get the ZCL header as array of bytes.

Parameters:
[out]size: the returned array size.
Returns:
the array of bytes.

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