Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Cayenne-MQTT-mbed by
DataArray< BUFFER_SIZE, MAX_VALUES > Class Template Reference
Class for manipulating a data array of unit/value pairs. More...
#include <CayenneDataArray.h>
Public Member Functions | |
| DataArray () | |
| Construct an empty array. | |
| void | clear () |
| Clear the array. | |
| void | add (const char *unit, const char *value, bool unitInFlash=false, bool valueInFlash=false) |
| Add the specified unit/value pair to the array. | |
| void | add (const char *unit, const int value) |
| Add the specified unit/value pair to the array. | |
| void | add (const char *unit, const unsigned int value) |
| Add the specified unit/value pair to the array. | |
| void | add (const char *unit, const long value) |
| Add the specified unit/value pair to the array. | |
| void | add (const char *unit, const unsigned long value) |
| Add the specified unit/value pair to the array. | |
| void | add (const char *unit, const float value) |
| Add the specified unit/value pair to the array. | |
| void | add (const char *unit, const double value) |
| Add the specified unit/value pair to the array. | |
| void | add (const char *unit, const float value) |
| Add the specified unit/value pair to the array. | |
| void | add (const char *unit, const double value) |
| Add the specified unit/value pair to the array. | |
| void | add (const char *unit, const __FlashStringHelper *value) |
| Add the specified unit/value pair to the array. | |
| void | add (const __FlashStringHelper *unit, const char *value) |
| Add the specified unit/value pair to the array. | |
| void | add (const __FlashStringHelper *unit, const __FlashStringHelper *value) |
| Add the specified unit/value pair to the array. | |
| void | add (const __FlashStringHelper *unit, const int value) |
| Add the specified unit/value pair to the array. | |
| void | add (const __FlashStringHelper *unit, const unsigned int value) |
| Add the specified unit/value pair to the array. | |
| void | add (const __FlashStringHelper *unit, const long value) |
| Add the specified unit/value pair to the array. | |
| void | add (const __FlashStringHelper *unit, const unsigned long value) |
| Add the specified unit/value pair to the array. | |
| void | add (const __FlashStringHelper *unit, const float value) |
| Add the specified unit/value pair to the array. | |
| void | add (const __FlashStringHelper *unit, const double value) |
| Add the specified unit/value pair to the array. | |
| const CayenneValuePair * | getArray () const |
| Get the unit/value pair array. | |
| size_t | getCount () const |
| Get the number of items in the unit/value pair array. | |
Detailed Description
template<int BUFFER_SIZE = CAYENNE_MAX_MESSAGE_SIZE, int MAX_VALUES = CAYENNE_MAX_MESSAGE_VALUES>
class CayenneMQTT::DataArray< BUFFER_SIZE, MAX_VALUES >
Class for manipulating a data array of unit/value pairs.
- Parameters:
-
BUFFER_SIZE Maximum buffer size to use for data array, in bytes. MAX_VALUES Maximum number of unit/value pairs in the array.
Definition at line 36 of file CayenneDataArray.h.
Constructor & Destructor Documentation
| DataArray | ( | ) |
Construct an empty array.
Definition at line 42 of file CayenneDataArray.h.
Member Function Documentation
| void add | ( | const char * | unit, |
| const char * | value, | ||
| bool | unitInFlash = false, |
||
| bool | valueInFlash = false |
||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add. [in] unitInFlash If true the unit string is in flash memory, otherwise false. [in] valueInFlash If true the value string is in flash memory, otherwise false.
Definition at line 65 of file CayenneDataArray.h.
| void add | ( | const char * | unit, |
| const unsigned int | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 121 of file CayenneDataArray.h.
| void add | ( | const char * | unit, |
| const double | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 178 of file CayenneDataArray.h.
| void add | ( | const __FlashStringHelper * | unit, |
| const double | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 305 of file CayenneDataArray.h.
| void add | ( | const __FlashStringHelper * | unit, |
| const float | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 290 of file CayenneDataArray.h.
| void add | ( | const __FlashStringHelper * | unit, |
| const long | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 268 of file CayenneDataArray.h.
| void add | ( | const __FlashStringHelper * | unit, |
| const unsigned long | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 279 of file CayenneDataArray.h.
| void add | ( | const __FlashStringHelper * | unit, |
| const unsigned int | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 257 of file CayenneDataArray.h.
| void add | ( | const __FlashStringHelper * | unit, |
| const int | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 246 of file CayenneDataArray.h.
| void add | ( | const __FlashStringHelper * | unit, |
| const __FlashStringHelper * | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 235 of file CayenneDataArray.h.
| void add | ( | const __FlashStringHelper * | unit, |
| const char * | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 225 of file CayenneDataArray.h.
| void add | ( | const char * | unit, |
| const __FlashStringHelper * | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 215 of file CayenneDataArray.h.
| void add | ( | const char * | unit, |
| const double | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 201 of file CayenneDataArray.h.
| void add | ( | const char * | unit, |
| const float | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 190 of file CayenneDataArray.h.
| void add | ( | const char * | unit, |
| const long | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 136 of file CayenneDataArray.h.
| void add | ( | const char * | unit, |
| const float | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 167 of file CayenneDataArray.h.
| void add | ( | const char * | unit, |
| const unsigned long | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 151 of file CayenneDataArray.h.
| void add | ( | const char * | unit, |
| const int | value | ||
| ) |
Add the specified unit/value pair to the array.
- Parameters:
-
[in] unit The unit to add. [in] value The value to add.
Definition at line 106 of file CayenneDataArray.h.
| void clear | ( | ) |
Clear the array.
Definition at line 49 of file CayenneDataArray.h.
| const CayenneValuePair* getArray | ( | ) | const |
Get the unit/value pair array.
- Returns:
- Pointer to the array.
Definition at line 320 of file CayenneDataArray.h.
| size_t getCount | ( | ) | const |
Get the number of items in the unit/value pair array.
- Returns:
- Count of items.
Definition at line 328 of file CayenneDataArray.h.
Generated on Tue Jul 12 2022 21:31:39 by
1.7.2
