Astarte device API for Zephyr 0.7.2
Astarte device SDK for Zephyr RTOS
Loading...
Searching...
No Matches

Definitions for Astarte individual data types. More...

Data Structures

struct  astarte_individual_t
 Base Astarte individual data type. More...
 

Functions

astarte_individual_t astarte_individual_from_binaryblob (void *binaryblob, size_t len)
 Initialize an astarte individual from the input binaryblob.
 
astarte_individual_t astarte_individual_from_boolean (bool boolean)
 Initialize an astarte individual from the input boolean.
 
astarte_individual_t astarte_individual_from_datetime (int64_t datetime)
 Initialize an astarte individual from the input datetime.
 
astarte_individual_t astarte_individual_from_double (double dbl)
 Initialize an astarte individual from the input double.
 
astarte_individual_t astarte_individual_from_integer (int32_t integer)
 Initialize an astarte individual from the input integer.
 
astarte_individual_t astarte_individual_from_longinteger (int64_t longinteger)
 Initialize an astarte individual from the input longinteger.
 
astarte_individual_t astarte_individual_from_string (const char *string)
 Initialize an astarte individual from the input string.
 
astarte_individual_t astarte_individual_from_binaryblob_array (const void **blobs, size_t *sizes, size_t count)
 Initialize an astarte individual from the input binaryblob array.
 
astarte_individual_t astarte_individual_from_boolean_array (bool *boolean_array, size_t len)
 Initialize an astarte individual from the input boolean array.
 
astarte_individual_t astarte_individual_from_datetime_array (int64_t *datetime_array, size_t len)
 Initialize an astarte individual from the input datetime array.
 
astarte_individual_t astarte_individual_from_double_array (double *double_array, size_t len)
 Initialize an astarte individual from the input double array.
 
astarte_individual_t astarte_individual_from_integer_array (int32_t *integer_array, size_t len)
 Initialize an astarte individual from the input integer array.
 
astarte_individual_t astarte_individual_from_longinteger_array (int64_t *longinteger_array, size_t len)
 Initialize an astarte individual from the input longinteger array.
 
astarte_individual_t astarte_individual_from_string_array (const char **string_array, size_t len)
 Initialize an astarte individual from the input string array.
 
astarte_mapping_type_t astarte_individual_get_type (astarte_individual_t individual)
 Get the type of an Astarte individual.
 
astarte_result_t astarte_individual_to_binaryblob (astarte_individual_t individual, void **binaryblob, size_t *len)
 Convert an Astarte individual (of the binary blob type) to an array of binary blobs.
 
astarte_result_t astarte_individual_to_boolean (astarte_individual_t individual, bool *boolean)
 Convert an Astarte individual (of the boolean type) to a bool.
 
astarte_result_t astarte_individual_to_datetime (astarte_individual_t individual, int64_t *datetime)
 Convert an Astarte individual (of the datetime type) to an int64_t.
 
astarte_result_t astarte_individual_to_double (astarte_individual_t individual, double *dbl)
 Convert an Astarte individual (of double type) to a double.
 
astarte_result_t astarte_individual_to_integer (astarte_individual_t individual, int32_t *integer)
 Convert an Astarte individual (of the integer type) to an int32_t.
 
astarte_result_t astarte_individual_to_longinteger (astarte_individual_t individual, int64_t *longinteger)
 Convert an Astarte individual (of the long integer type) to an int64_t.
 
astarte_result_t astarte_individual_to_string (astarte_individual_t individual, const char **string)
 Convert an Astarte individual (of the string type) to a const char *.
 
astarte_result_t astarte_individual_to_binaryblob_array (astarte_individual_t individual, const void ***blobs, size_t **sizes, size_t *count)
 Convert an Astarte individual (of binaryblob array type) to an array of binaryblob arrays.
 
astarte_result_t astarte_individual_to_boolean_array (astarte_individual_t individual, bool **boolean_array, size_t *len)
 Convert an Astarte individual (of boolean array type) to a bool array.
 
astarte_result_t astarte_individual_to_datetime_array (astarte_individual_t individual, int64_t **datetime_array, size_t *len)
 Convert an Astarte individual (of datetime array type) to an int64_t array.
 
astarte_result_t astarte_individual_to_double_array (astarte_individual_t individual, double **double_array, size_t *len)
 Convert an Astarte individual (of double array type) to a double array.
 
astarte_result_t astarte_individual_to_integer_array (astarte_individual_t individual, int32_t **integer_array, size_t *len)
 Convert an Astarte individual (of integer array type) to an int32_t array.
 
astarte_result_t astarte_individual_to_longinteger_array (astarte_individual_t individual, int64_t **longinteger_array, size_t *len)
 Convert an Astarte individual (of longinteger array type) to an int64_t array.
 
astarte_result_t astarte_individual_to_string_array (astarte_individual_t individual, const char ***string_array, size_t *len)
 Convert an Astarte individual (of string type) to a const char* array.
 

Detailed Description

Definitions for Astarte individual data types.

Function Documentation

◆ astarte_individual_from_binaryblob()

astarte_individual_t astarte_individual_from_binaryblob ( void * binaryblob,
size_t len )

Initialize an astarte individual from the input binaryblob.

Parameters
[in]binaryblobInput type that will be inserted in the astarte_individual_t.
[in]lenThe length of the input array.
Returns
The astarte individual that wraps the binaryblob input.

◆ astarte_individual_from_binaryblob_array()

astarte_individual_t astarte_individual_from_binaryblob_array ( const void ** blobs,
size_t * sizes,
size_t count )

Initialize an astarte individual from the input binaryblob array.

Parameters
[in]blobsA bi-dimensional array, the size of each array is contained in sizes while the number of arrays is contained in count
[in]sizesArray of sizes, each entry will be the size of the corresponding array contained in blobs
[in]countNumber of arrays contained in blobs
Returns
The astarte individual that wraps the binaryblob array input.

◆ astarte_individual_from_boolean()

astarte_individual_t astarte_individual_from_boolean ( bool boolean)

Initialize an astarte individual from the input boolean.

Parameters
[in]booleanInput type that will be inserted in the astarte_individual_t.
Returns
The astarte individual that wraps the boolean input.

◆ astarte_individual_from_boolean_array()

astarte_individual_t astarte_individual_from_boolean_array ( bool * boolean_array,
size_t len )

Initialize an astarte individual from the input boolean array.

Parameters
[in]boolean_arrayInput type that will be inserted in the astarte_individual_t.
[in]lenThe length of the input array.
Returns
The astarte individual that wraps the boolean array input.

◆ astarte_individual_from_datetime()

astarte_individual_t astarte_individual_from_datetime ( int64_t datetime)

Initialize an astarte individual from the input datetime.

Parameters
[in]datetimeInput type that will be inserted in the astarte_individual_t.
Returns
The astarte individual that wraps the datetime input.

◆ astarte_individual_from_datetime_array()

astarte_individual_t astarte_individual_from_datetime_array ( int64_t * datetime_array,
size_t len )

Initialize an astarte individual from the input datetime array.

Parameters
[in]datetime_arrayInput type that will be inserted in the astarte_individual_t.
[in]lenThe length of the input array.
Returns
The astarte individual that wraps the datetime array input.

◆ astarte_individual_from_double()

astarte_individual_t astarte_individual_from_double ( double dbl)

Initialize an astarte individual from the input double.

Parameters
[in]dblInput type that will be inserted in the astarte_individual_t.
Returns
The astarte individual that wraps the double input.

◆ astarte_individual_from_double_array()

astarte_individual_t astarte_individual_from_double_array ( double * double_array,
size_t len )

Initialize an astarte individual from the input double array.

Parameters
[in]double_arrayInput type that will be inserted in the astarte_individual_t.
[in]lenThe length of the input array.
Returns
The astarte individual that wraps the double array input.

◆ astarte_individual_from_integer()

astarte_individual_t astarte_individual_from_integer ( int32_t integer)

Initialize an astarte individual from the input integer.

Parameters
[in]integerInput type that will be inserted in the astarte_individual_t.
Returns
The astarte individual that wraps the integer input.

◆ astarte_individual_from_integer_array()

astarte_individual_t astarte_individual_from_integer_array ( int32_t * integer_array,
size_t len )

Initialize an astarte individual from the input integer array.

Parameters
[in]integer_arrayInput type that will be inserted in the astarte_individual_t.
[in]lenThe length of the input array.
Returns
The astarte individual that wraps the integer array input.

◆ astarte_individual_from_longinteger()

astarte_individual_t astarte_individual_from_longinteger ( int64_t longinteger)

Initialize an astarte individual from the input longinteger.

Parameters
[in]longintegerInput type that will be inserted in the astarte_individual_t.
Returns
The astarte individual that wraps the longinteger input.

◆ astarte_individual_from_longinteger_array()

astarte_individual_t astarte_individual_from_longinteger_array ( int64_t * longinteger_array,
size_t len )

Initialize an astarte individual from the input longinteger array.

Parameters
[in]longinteger_arrayInput type that will be inserted in the astarte_individual_t.
[in]lenThe length of the input array.
Returns
The astarte individual that wraps the longinteger array input.

◆ astarte_individual_from_string()

astarte_individual_t astarte_individual_from_string ( const char * string)

Initialize an astarte individual from the input string.

Parameters
[in]stringInput type that will be inserted in the astarte_individual_t.
Returns
The astarte individual that wraps the string input.

◆ astarte_individual_from_string_array()

astarte_individual_t astarte_individual_from_string_array ( const char ** string_array,
size_t len )

Initialize an astarte individual from the input string array.

Parameters
[in]string_arrayInput type that will be inserted in the astarte_individual_t.
[in]lenThe length of the input array.
Returns
The astarte individual that wraps the string array input.

◆ astarte_individual_get_type()

astarte_mapping_type_t astarte_individual_get_type ( astarte_individual_t individual)

Get the type of an Astarte individual.

Parameters
[in]individualAstarte individual for which to check the type.
Returns
The astarte individual type.

◆ astarte_individual_to_binaryblob()

astarte_result_t astarte_individual_to_binaryblob ( astarte_individual_t individual,
void ** binaryblob,
size_t * len )

Convert an Astarte individual (of the binary blob type) to an array of binary blobs.

Parameters
[in]individualAstarte individual to use for the extraction.
[out]binaryblobArray extracted.
[out]lenSize of extracted array.
Returns
ASTARTE_RESULT_OK if the conversion was successful, an error otherwise.

◆ astarte_individual_to_binaryblob_array()

astarte_result_t astarte_individual_to_binaryblob_array ( astarte_individual_t individual,
const void *** blobs,
size_t ** sizes,
size_t * count )

Convert an Astarte individual (of binaryblob array type) to an array of binaryblob arrays.

Parameters
[in]individualAstarte individual to use for the extraction.
[out]blobsBi-dimensional array of binary blobs.
[out]sizesArray of sizes (second dimension) of blobs
[out]countNumber or arrays (first dimension) of blobs
Returns
ASTARTE_RESULT_OK if the conversion was successful, an error otherwise.

◆ astarte_individual_to_boolean()

astarte_result_t astarte_individual_to_boolean ( astarte_individual_t individual,
bool * boolean )

Convert an Astarte individual (of the boolean type) to a bool.

Parameters
[in]individualAstarte individual to use for the extraction.
[out]booleanExtracted individual.
Returns
ASTARTE_RESULT_OK if the conversion was successful, an error otherwise.

◆ astarte_individual_to_boolean_array()

astarte_result_t astarte_individual_to_boolean_array ( astarte_individual_t individual,
bool ** boolean_array,
size_t * len )

Convert an Astarte individual (of boolean array type) to a bool array.

Parameters
[in]individualAstarte individual to use for the extraction.
[out]boolean_arrayArray extracted.
[out]lenSize of extracted array.
Returns
ASTARTE_RESULT_OK if the conversion was successful, an error otherwise.

◆ astarte_individual_to_datetime()

astarte_result_t astarte_individual_to_datetime ( astarte_individual_t individual,
int64_t * datetime )

Convert an Astarte individual (of the datetime type) to an int64_t.

Parameters
[in]individualAstarte individual to use for the extraction.
[out]datetimeExtracted individual.
Returns
ASTARTE_RESULT_OK if the conversion was successful, an error otherwise.

◆ astarte_individual_to_datetime_array()

astarte_result_t astarte_individual_to_datetime_array ( astarte_individual_t individual,
int64_t ** datetime_array,
size_t * len )

Convert an Astarte individual (of datetime array type) to an int64_t array.

Parameters
[in]individualAstarte individual to use for the extraction.
[out]datetime_arrayArray extracted.
[out]lenSize of extracted array.
Returns
ASTARTE_RESULT_OK if the conversion was successful, an error otherwise.

◆ astarte_individual_to_double()

astarte_result_t astarte_individual_to_double ( astarte_individual_t individual,
double * dbl )

Convert an Astarte individual (of double type) to a double.

Parameters
[in]individualAstarte individual to use for the extraction.
[out]dblDouble where to store the extracted individual.
Returns
ASTARTE_RESULT_OK if the conversion was successful, an error otherwise.

◆ astarte_individual_to_double_array()

astarte_result_t astarte_individual_to_double_array ( astarte_individual_t individual,
double ** double_array,
size_t * len )

Convert an Astarte individual (of double array type) to a double array.

Parameters
[in]individualAstarte individual to use for the extraction.
[out]double_arrayArray extracted.
[out]lenSize of extracted array.
Returns
ASTARTE_RESULT_OK if the conversion was successful, an error otherwise.

◆ astarte_individual_to_integer()

astarte_result_t astarte_individual_to_integer ( astarte_individual_t individual,
int32_t * integer )

Convert an Astarte individual (of the integer type) to an int32_t.

Parameters
[in]individualAstarte individual to use for the extraction.
[out]integerExtracted individual.
Returns
ASTARTE_RESULT_OK if the conversion was successful, an error otherwise.

◆ astarte_individual_to_integer_array()

astarte_result_t astarte_individual_to_integer_array ( astarte_individual_t individual,
int32_t ** integer_array,
size_t * len )

Convert an Astarte individual (of integer array type) to an int32_t array.

Parameters
[in]individualAstarte individual to use for the extraction.
[out]integer_arrayArray extracted.
[out]lenSize of extracted array.
Returns
ASTARTE_RESULT_OK if the conversion was successful, an error otherwise.

◆ astarte_individual_to_longinteger()

astarte_result_t astarte_individual_to_longinteger ( astarte_individual_t individual,
int64_t * longinteger )

Convert an Astarte individual (of the long integer type) to an int64_t.

Parameters
[in]individualAstarte individual to use for the extraction.
[out]longintegerExtracted individual.
Returns
ASTARTE_RESULT_OK if the conversion was successful, an error otherwise.

◆ astarte_individual_to_longinteger_array()

astarte_result_t astarte_individual_to_longinteger_array ( astarte_individual_t individual,
int64_t ** longinteger_array,
size_t * len )

Convert an Astarte individual (of longinteger array type) to an int64_t array.

Parameters
[in]individualAstarte individual to use for the extraction.
[out]longinteger_arrayArray extracted.
[out]lenSize of extracted array.
Returns
ASTARTE_RESULT_OK if the conversion was successful, an error otherwise.

◆ astarte_individual_to_string()

astarte_result_t astarte_individual_to_string ( astarte_individual_t individual,
const char ** string )

Convert an Astarte individual (of the string type) to a const char *.

Parameters
[in]individualAstarte individual to use for the extraction.
[out]stringExtracted individual.
Returns
ASTARTE_RESULT_OK if the conversion was successful, an error otherwise.

◆ astarte_individual_to_string_array()

astarte_result_t astarte_individual_to_string_array ( astarte_individual_t individual,
const char *** string_array,
size_t * len )

Convert an Astarte individual (of string type) to a const char* array.

Parameters
[in]individualAstarte individual to use for the extraction.
[out]string_arrayArray extracted.
[out]lenSize of extracted array.
Returns
ASTARTE_RESULT_OK if the conversion was successful, an error otherwise.