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

This Class defines the Discover attributes response payload. More...

#include <DiscoverAttributesResponsePayload.h>

Inheritance diagram for DiscoverAttributesResponsePayload:
ZCLPayload

List of all members.

Public Member Functions

 DiscoverAttributesResponsePayload (ZCLFrame *frame)
 Constructor.
bool isDiscoveyComplete () const
 Return true if there are no more attributes to be discovered.
void setDiscoveyComplete (bool complete)
 Set to true if there are no more attributes to be discovered.
const DiscoveredAttributegetDiscoveredAttributes (int &size) const
 Get the array of discovered attributes.
void addDiscoveredAttributes (const DiscoveredAttribute &attribute)
 Add a discovered attribute in the payload.
virtual const byte * toBytes (int &size)
 Return the DiscoverAttributesPayload as array of bytes.
virtual bool fromBytes (const byte payload[], int length)
 Build a DiscoverAttributesResponse payload from an array of bytes.

Detailed Description

This Class defines the Discover attributes response payload.


Constructor & Destructor Documentation

DiscoverAttributesResponsePayload::DiscoverAttributesResponsePayload ( ZCLFrame frame)

Constructor.

Parameters:
framethe frame containing this payload.

Member Function Documentation

void DiscoverAttributesResponsePayload::addDiscoveredAttributes ( const DiscoveredAttribute attribute)

Add a discovered attribute in the payload.

Parameters:
attributethe discovered attribute.
virtual bool DiscoverAttributesResponsePayload::fromBytes ( const byte  payload[],
int  length 
) [virtual]

Build a DiscoverAttributesResponse payload from an array of bytes.

Parameters:
payloadthe payload as bytes.
lengththe array length.
Returns:
true if success, otherwise false.

Implements ZCLPayload.

const DiscoveredAttribute* DiscoverAttributesResponsePayload::getDiscoveredAttributes ( int &  size) const

Get the array of discovered attributes.

Parameters:
[out]sizethe returned array size.
Returns:
the array of discovered attributes.
bool DiscoverAttributesResponsePayload::isDiscoveyComplete ( ) const

Return true if there are no more attributes to be discovered.

In other case, to obtain the rest of the attribute, the start attribute identifier specified in the next attribute discovery request command should be set equal to one plus the last attribute identifier received in the discover attributes response command.

Returns:
true if there are no more attributes to be discovered, otherwise false.
void DiscoverAttributesResponsePayload::setDiscoveyComplete ( bool  complete)

Set to true if there are no more attributes to be discovered.

Parameters:
completetrue if there are no more attributes to be discovered.
virtual const byte* DiscoverAttributesResponsePayload::toBytes ( int &  size) [virtual]

Return the DiscoverAttributesPayload as array of bytes.

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

Implements ZCLPayload.


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