ZCL library
4.3
ZCL library to manage a Zigbee network
|
Interface which defines a Write attribute. More...
#include <WriteAttribute.h>
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. |
Interface which defines a Write attribute.
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.
data | the data as array of bytes. |
length | the 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
value | the 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
value | the 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
value | the 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
value | the 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
value | the 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
value | the data as a string. |
virtual const byte* WriteAttribute::toBytes | ( | int & | size | ) | [virtual] |
Return this attribute as array of bytes.
[out] | size | the returned array size. |
Reimplemented from ReportAttribute.
Reimplemented in ReadAttributeResponse.