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

Interface which defines a Write attribute. More...

#include <WriteAttribute.h>

Inheritance diagram for WriteAttribute:
ReportAttribute ReadAttribute DiscoveredAttribute Attribute ReadAttributeResponse

List of all members.

Public Member Functions

void setData (const byte data[], int length)
 Set the data as an array of bytes of this attribute.
void setDataAsNumber (long value)
 Set the data as a number of this attribute.
void setDataAs64bitsNumber (long long value)
 Set the data as a number of this attribute.
void setDataAsString (const char *value)
 Set the data as a String of this attribute.
void setDataAsBoolean (bool value)
 Set the data as a boolean of this attribute.
void setDataAsFloat (float value)
 Set the data as a float of this attribute.
void setDataAsDouble (double value)
 Set the data as a double of this attribute.
virtual const byte * toBytes (int &size)
 Return this attribute as array of bytes.

Detailed Description

Interface which defines a Write attribute.


Member Function Documentation

void WriteAttribute::setData ( const byte  data[],
int  length 
)

Set the data as an array of bytes of this attribute.


Warning: the DataType must be set before.

Parameters:
datathe data as array of bytes.
lengththe data array length.

Reimplemented from ReportAttribute.

void WriteAttribute::setDataAs64bitsNumber ( long long  value)

Set the data as a number of this attribute.

Warning: the DataType must be set before and must be equal to

  • UNSIGNED_8BITS to UNSIGNED_64BITS
  • SIGNED_8BITS to SIGNED_64BITS
  • DATA_8BITS to DATA_64BITS
  • BITMAP_8BITS to BITMAP_64BITS
  • ENUMERATION_8BITS to ENUMERATION_16BITS
  • UTC_TIME
  • CLUSTER_ID
  • ATTRIBUTE_ID
  • BACNET_OID
  • BOOLEAN_8BITS
Parameters:
valuethe data as a number.
void WriteAttribute::setDataAsBoolean ( bool  value)

Set the data as a boolean of this attribute.

Warning: the DataType must be set before and must be equal to

  • BOOLEAN_8BITS
Parameters:
valuethe data as a boolean.
void WriteAttribute::setDataAsDouble ( double  value)

Set the data as a double of this attribute.

Warning: the DataType must be set before and must be equal to

  • DataType.SEMI_PRECISION
  • DataType.SINGLE_PRECISION
  • DataType.DOUBLE_PRECISION
Parameters:
valuethe data as a double.
void WriteAttribute::setDataAsFloat ( float  value)

Set the data as a float of this attribute.

Warning: the DataType must be set before and must be equal to

  • DataType.SEMI_PRECISION
  • DataType.SINGLE_PRECISION
Parameters:
valuethe data as a float.
void WriteAttribute::setDataAsNumber ( long  value)

Set the data as a number of this attribute.

Warning: the DataType must be set before and must be equal to

  • UNSIGNED_8BITS to UNSIGNED_32BITS
  • SIGNED_8BITS to SIGNED_32BITS
  • DATA_8BITS to DATA_32BITS
  • BITMAP_8BITS to BITMAP_32BITS
  • ENUMERATION_8BITS to ENUMERATION_16BITS
  • UTC_TIME
  • CLUSTER_ID
  • ATTRIBUTE_ID
  • BACNET_OID
  • BOOLEAN_8BITS
Parameters:
valuethe data as a number.
void WriteAttribute::setDataAsString ( const char *  value)

Set the data as a String of this attribute.


Warning: the DataType must be set before and must be equal to

  • CHARACTER_STRING
  • LONG_CHAR_STRING
Parameters:
valuethe data as a string.
virtual const byte* WriteAttribute::toBytes ( int &  size) [virtual]

Return this attribute as array of bytes.

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

Reimplemented from ReportAttribute.

Reimplemented in ReadAttributeResponse.


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