This library enables serialization / deserialization of AWT-DA Objects. More...
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include "awt_status.h"
Typedefs | |
typedef struct AwtDaObject_ | AwtDaObject |
AWT-DA Object definition. | |
Enumerations | |
enum | AwtDaObjectClass |
List of available AWT-DA Objects. More... | |
enum | AwtDaMessageType |
List of AWT-DA message types. More... | |
Functions | |
LIB_API const char * | AWT_DaLibGetVersion (void) |
Retrieve the version of the library. | |
LIB_API AwtStatus | AWT_DaObject_Use (AwtDaObject *object) |
Mark an object as used. | |
LIB_API AwtStatus | AWT_DaObject_Release (AwtDaObject *object) |
Release a given object. | |
LIB_API AwtDaObjectClass | AWT_DaObject_GetType (AwtDaObject *object) |
Retrieve the type of an object. | |
LIB_API int | AWT_DaObject_Compare (AwtDaObject *obj1, AwtDaObject *obj2) |
Compare two objects by value. | |
LIB_API AwtDaObject * | AWT_List_New (void) |
Create a new empty list. | |
LIB_API AwtStatus | AWT_List_AddItem (AwtDaObject *list, AwtDaObject *item) |
Add an item into a list object. | |
LIB_API AwtStatus | AWT_List_AddItems (AwtDaObject *list, AwtDaObject *items) |
Add some items into a list object. | |
LIB_API AwtStatus | AWT_List_GetNumberOfItems (AwtDaObject *list, uint32_t *numberOfItems) |
Retrieve the number of items into a list. | |
LIB_API AwtStatus | AWT_List_Iterator_GetNext (AwtDaObject *list, uint32_t *iterator, AwtDaObject **item) |
Iterate over the elements of a list. | |
AwtDaObject * | AWT_DeltasVector_New (AwtDaObject *factor, AwtDaObject *values) |
Create a new Deltas Vector with a given factor and some optional initial values. | |
AwtStatus | AWT_DeltasVector_Get (const AwtDaObject *object, AwtDaObject **factor, AwtDaObject **start, AwtDaObject **deltas) |
Retrieve the fields of a Deltas Vector object. | |
AwtStatus | AWT_DeltasVector_AddValue (AwtDaObject *object, AwtDaObject *value) |
Add a value into a Deltas Vector object. | |
AwtStatus | AWT_DeltasVector_AddValues (AwtDaObject *object, AwtDaObject *values) |
Add a values into a Deltas Vector object. | |
AwtStatus | AWT_DeltasVector_GetValues (AwtDaObject *object, AwtDaObject **values) |
Get the values of a Deltas Vector object. | |
LIB_API AwtDaObject * | AWT_Map_New (void) |
Create a new empty Map. | |
LIB_API AwtStatus | AWT_Map_AddItem (AwtDaObject *map, AwtDaObject *key, AwtDaObject *value) |
Add an item into a map object. | |
LIB_API AwtStatus | AWT_Map_GetItemByKey (AwtDaObject *map, AwtDaObject *key, AwtDaObject **value) |
Retrieve a value from a map, by its key. | |
LIB_API AwtStatus | AWT_Map_GetNumberOfItems (AwtDaObject *map, uint32_t *numberOfItems) |
Retrieve the number of couple (key, value) into a map. | |
LIB_API AwtStatus | AWT_Map_Iterator_GetNext (AwtDaObject *map, uint32_t *iterator, AwtDaObject **key, AwtDaObject **value) |
Iterate over the elements of a map. | |
LIB_API AwtDaObject * | AWT_Boolean_New (bool value) |
Create a boolean object. | |
LIB_API AwtStatus | AWT_Boolean_Get (const AwtDaObject *object, bool *value) |
Retrieve the content of a boolean object. | |
LIB_API AwtDaObject * | AWT_Int32_New (int32_t value) |
Create a 32 bits integer object. | |
LIB_API AwtStatus | AWT_Int32_Get (const AwtDaObject *object, int32_t *value) |
Retrieve the object value. | |
LIB_API AwtDaObject * | AWT_Int64_New (int64_t value) |
Create a 64 bits integer object. | |
LIB_API AwtStatus | AWT_Int64_Get (const AwtDaObject *object, int64_t *value) |
Retrieve the object value. | |
LIB_API AwtDaObject * | AWT_Double_New (double value) |
Create a double precision float object. | |
LIB_API AwtStatus | AWT_Double_Get (const AwtDaObject *object, double *value) |
Retrieve the object value. | |
LIB_API AwtDaObject * | AWT_String_New (const char *path) |
Create a string object. | |
LIB_API AwtStatus | AWT_String_Get (const AwtDaObject *object, const char **path) |
Retrieve the object value. | |
LIB_API AwtDaObject * | AWT_Message_New (AwtDaMessageType type, const char *path, int32_t ticketId, AwtDaObject *body) |
Create an AWT-DA message object. | |
LIB_API AwtStatus | AWT_Message_Get (const AwtDaObject *object, AwtDaMessageType *type, const char **path, int32_t *ticketId, AwtDaObject **body) |
Retrieve the message fields. | |
LIB_API AwtDaObject * | AWT_Geoposition_New (double longitude, double latitude, double course, double speed) |
Create an AWT-DA geoposition object. | |
LIB_API AwtStatus | AWT_Geoposition_Get (AwtDaObject *object, double *longitude, double *latitude, double *course, double *speed) |
Retrieve the geoposition fields. | |
LIB_API AwtDaObject * | AWT_Event_New (uint32_t type, uint32_t code, AwtDaObject *data) |
Create an AWT-DA event object. | |
LIB_API AwtStatus | AWT_Event_Get (AwtDaObject *event, uint32_t *type, uint32_t *code, AwtDaObject **data) |
Retrieve the event fields. | |
LIB_API AwtDaObject * | AWT_Command_New (const char *name, AwtDaObject *argsList) |
Create an AWt-DA Command object. | |
LIB_API AwtStatus | AWT_Command_Get (AwtDaObject *object, char **name, AwtDaObject **argsList) |
Retrieve the command fields. | |
LIB_API AwtDaObject * | AWT_Response_New (int32_t ticketId, int32_t statusCode, AwtDaObject *data) |
Create an AWT-DA Response object. | |
LIB_API AwtStatus | AWT_Response_Get (AwtDaObject *object, int32_t *ticketId, int32_t *statusCode, AwtDaObject **data) |
Retrieve the response fields. | |
LIB_API AwtDaObject * | AWT_TimestampedValue_New (int32_t timestamp, AwtDaObject *value) |
Create a AWT-DA timestamped value object. | |
LIB_API AwtStatus | AWT_TimestampedValue_Get (AwtDaObject *object, int32_t *timestamp, AwtDaObject **value) |
Retrieve the timestamped value fields. | |
LIB_API AwtDaObject * | AWT_TimestampedValues_New (int32_t startTime, AwtDaObject *timeDeltaList, AwtDaObject *valuesList) |
Create a AWT-DA timestamped values object. | |
LIB_API AwtStatus | AWT_TimestampedValues_Get (AwtDaObject *object, int32_t *startTime, AwtDaObject **timeDeltaList, AwtDaObject **valuesList) |
Retrieve the timestamped values fields. | |
LIB_API AwtDaObject * | AWT_TimestampedDeltas_New (int32_t startTime, AwtDaObject *timeDeltaList, AwtDaObject *firstValue, AwtDaObject *valuesDeltaList) |
Create a AWT-DA timestamped deltas object. | |
LIB_API AwtStatus | AWT_TimestampedDeltas_Get (AwtDaObject *object, int32_t *startTime, AwtDaObject **timeDeltaList, AwtDaObject **firstValue, AwtDaObject **valuesDeltaList) |
Retrieve the timestamped deltas fields. | |
LIB_API AwtDaObject * | AWT_PeriodicDeltas_New (int32_t startTime, int32_t period, AwtDaObject *firstValue, AwtDaObject *valuesDeltaList) |
Create a AWT-DA periodic deltas object. | |
LIB_API AwtStatus | AWT_PeriodicDeltas_Get (AwtDaObject *object, int32_t *startTime, int32_t *period, AwtDaObject **firstValue, AwtDaObject **valuesDeltaList) |
Retrieve the periodic deltas fields. | |
LIB_API AwtDaObject * | AWT_PeriodicValues_New (int32_t startTime, int32_t period, AwtDaObject *valuesList) |
Create a AWT-DA periodic values object. | |
LIB_API AwtStatus | AWT_PeriodicValues_Get (AwtDaObject *object, int32_t *startTime, int32_t *period, AwtDaObject **valuesList) |
Retrieve the periodic values fields. | |
LIB_API AwtDaObject * | AWT_Envelope_New (void) |
Create an AWT-DA envelope object. | |
LIB_API AwtStatus | AWT_Envelope_SetMethod (AwtDaObject *object, const char *method) |
Set the method string of an envelope. | |
LIB_API AwtStatus | AWT_Envelope_AddHeaderProperty (AwtDaObject *object, AwtDaObject *key, AwtDaObject *value) |
Add Header properties (as in a map). | |
LIB_API AwtStatus | AWT_Envelope_AddFooterProperty (AwtDaObject *object, AwtDaObject *key, AwtDaObject *value) |
Add Footer properties (as in a map). | |
LIB_API AwtStatus | AWT_Envelope_SetPayLoad (AwtDaObject *object, const char *payload, int32_t payloadSize) |
Set the payload of an envelope. | |
LIB_API AwtStatus | AWT_Envelope_Get (AwtDaObject *object, const char **method, AwtDaObject **headerMap, AwtDaObject **footerMap, const char **payload, int32_t *payLoadSize) |
Retrieve the fields of an envelope object. | |
LIB_API AwtDaObject * | AWT_Binary_New (const char *data, uint32_t size) |
Create an AWT-DA binary object. | |
LIB_API AwtStatus | AWT_Binary_Get (const AwtDaObject *object, const char **data, uint32_t *size) |
Retrieve the buffer of a binary object. | |
LIB_API AwtStatus | AWT_DaObject_Serialize (AwtDaObject *object, char *outBuffer, int32_t *length) |
Serialize an AWT-DA object. | |
LIB_API AwtStatus | AWT_DaObject_Deserialize (const char **buffer, int32_t *length, AwtDaObject **object) |
Deserialize a binary string into real AWT-DA objects. | |
LIB_API AwtStatus | AWT_DaObject_Transport_Deserialize (const char **buffer, int32_t *length, AwtDaObject **object) |
Deserialize a binary string into a AWT-DA envelope object. | |
AwtStatus | AWT_DaObject_ToString (AwtDaObject *object) |
Print a string representing the element on stdout. |
This library enables serialization / deserialization of AWT-DA Objects.
typedef struct AwtDaObject_ AwtDaObject |
AWT-DA Object definition.
This is the generic definition making all the internal fields private. The properties of the objects and its type can be set/retrieved thanks to helper functions.
enum AwtDaMessageType |
List of AWT-DA message types.
The meaning of the different message types is documented into AWT-DA Protocol specification.
enum AwtDaObjectClass |
List of available AWT-DA Objects.
Those enum values can be used in order to get the type of an object.
LIB_API AwtDaObject* AWT_Binary_New | ( | const char * | data, | |
uint32_t | size | |||
) |
Create an AWT-DA binary object.
The buffer is copied internally.
LIB_API AwtStatus AWT_Command_Get | ( | AwtDaObject * | object, | |
char ** | name, | |||
AwtDaObject ** | argsList | |||
) |
Retrieve the command fields.
The string pointer is valid until the object is destroyed. No need to manually free it. The argsList object reference counter is incremented by this call. The user need to release it when he does not need it anymore.
LIB_API AwtDaObject* AWT_Command_New | ( | const char * | name, | |
AwtDaObject * | argsList | |||
) |
Create an AWt-DA Command object.
Referenced objects are marked as used by this function. The user must then call AWT_DaObject_Release on the argsList if he does no need it anymore.
LIB_API const char* AWT_DaLibGetVersion | ( | void | ) |
Retrieve the version of the library.
The returned value is statically allocated and need to to be released.
LIB_API int AWT_DaObject_Compare | ( | AwtDaObject * | obj1, | |
AwtDaObject * | obj2 | |||
) |
Compare two objects by value.
This is useful to compare simple objects (numbers and string) that are different (different pointers) but can hold the same value.
LIB_API AwtStatus AWT_DaObject_Deserialize | ( | const char ** | buffer, | |
int32_t * | length, | |||
AwtDaObject ** | object | |||
) |
Deserialize a binary string into real AWT-DA objects.
[in] | buffer | where to read the data from |
[out] | buffer | points to the byte following the last deserialized byte. |
[in] | length | byte available into the buffer |
[out] | length | byte actually consumed from the buffer |
[out] | object | object that is deserialized |
LIB_API AwtDaObjectClass AWT_DaObject_GetType | ( | AwtDaObject * | object | ) |
Retrieve the type of an object.
object | Pointer on the object to get the type of. |
LIB_API AwtStatus AWT_DaObject_Release | ( | AwtDaObject * | object | ) |
Release a given object.
Internally decrement the reference counter. When the reference counter is null the object is destroyed and actually freed. Once this function is called on an object the user has to assume that this object is not accessible anymore (unless he knows for sure that there is another reference on that object). When calling this function on a null pointer, it returns AWT_STATUS_OK (and does nothing else)
object | Pointer on the object to release. Can be null. |
LIB_API AwtStatus AWT_DaObject_Serialize | ( | AwtDaObject * | object, | |
char * | outBuffer, | |||
int32_t * | length | |||
) |
Serialize an AWT-DA object.
The serialization is recursive through all referenced object, when relevant. The function can also be used in order to calculate the size of the serialized object. The buffer must be allocated by the user and big enough to hold all the serialized data.
object | the object to serialize. | |
outBuffer | the buffer where to write the serialized data. If set to null the function will just calculate the size of the serialized object. | |
[in] | length | the size of the given buffer |
[out] | length | the actual number of bytes used for the serialization |
LIB_API AwtStatus AWT_DaObject_Transport_Deserialize | ( | const char ** | buffer, | |
int32_t * | length, | |||
AwtDaObject ** | object | |||
) |
Deserialize a binary string into a AWT-DA envelope object.
This for the transport level.
[in] | buffer | where to read the data from |
[out] | buffer | points to the byte following the last deserialized byte. |
[in] | length | byte available into the buffer |
[out] | length | byte actually consumed from the buffer |
[out] | object | object that is deserialized |
LIB_API AwtStatus AWT_DaObject_Use | ( | AwtDaObject * | object | ) |
Mark an object as used.
Internally increment the reference counter.
object | Pointer on the object to use. Can be null. |
AwtStatus AWT_DeltasVector_AddValue | ( | AwtDaObject * | object, | |
AwtDaObject * | value | |||
) |
Add a value into a Deltas Vector object.
The value must be a Int32/Int64/Double object
AwtStatus AWT_DeltasVector_AddValues | ( | AwtDaObject * | object, | |
AwtDaObject * | values | |||
) |
Add a values into a Deltas Vector object.
The values must be a List of Int32/Int64/Double objects
AwtStatus AWT_DeltasVector_GetValues | ( | AwtDaObject * | object, | |
AwtDaObject ** | values | |||
) |
Get the values of a Deltas Vector object.
values | the returned value: a List of number objects objects | |
object | the object to get values from |
AwtDaObject* AWT_DeltasVector_New | ( | AwtDaObject * | factor, | |
AwtDaObject * | values | |||
) |
Create a new Deltas Vector with a given factor and some optional initial values.
The Deltas Vector object enable efficient serialization of similar values. The factor
parameter allow the user to set the "compression" used to serialize the values
.
The following algorithm is used:
values
are first rounded to an integer multiple of factor
(factor
can be a floating number). The rounding algorithm is: (integer(((v+(abs(f)/2)*sign(v))/f)) * f)
where v
is the value
and f
the factor
.values
which will be rounded to an integer multiple of factor
. factor | the "compression" factor. | |
values | initial values (Must be a List object). Can be null if no initial values needed. |
LIB_API AwtStatus AWT_Envelope_AddFooterProperty | ( | AwtDaObject * | object, | |
AwtDaObject * | key, | |||
AwtDaObject * | value | |||
) |
Add Footer properties (as in a map).
Added objects a referenced by this function and thus the user should release key and value objects after this call.
LIB_API AwtStatus AWT_Envelope_AddHeaderProperty | ( | AwtDaObject * | object, | |
AwtDaObject * | key, | |||
AwtDaObject * | value | |||
) |
Add Header properties (as in a map).
Added objects a referenced by this function and thus the user should release key and value objects after this call.
LIB_API AwtStatus AWT_Envelope_SetMethod | ( | AwtDaObject * | object, | |
const char * | method | |||
) |
Set the method string of an envelope.
The string is copied internally.
LIB_API AwtStatus AWT_Envelope_SetPayLoad | ( | AwtDaObject * | object, | |
const char * | payload, | |||
int32_t | payloadSize | |||
) |
Set the payload of an envelope.
The buffer is copied internally.
LIB_API AwtStatus AWT_Event_Get | ( | AwtDaObject * | event, | |
uint32_t * | type, | |||
uint32_t * | code, | |||
AwtDaObject ** | data | |||
) |
Retrieve the event fields.
The data object reference counter is incremented by this call. The user need to release it when he does not need it anymore.
LIB_API AwtDaObject* AWT_Event_New | ( | uint32_t | type, | |
uint32_t | code, | |||
AwtDaObject * | data | |||
) |
Create an AWT-DA event object.
Referenced objects are marked as used by this function. The user must then call AWT_DaObject_Release on the data if he does no need it anymore.
LIB_API AwtStatus AWT_List_AddItem | ( | AwtDaObject * | list, | |
AwtDaObject * | item | |||
) |
Add an item into a list object.
list | the list to add the object into. | |
item | the object to add into the list. |
LIB_API AwtStatus AWT_List_AddItems | ( | AwtDaObject * | list, | |
AwtDaObject * | items | |||
) |
Add some items into a list object.
list | the list to add the object into. | |
items | the object to add into the list. |
LIB_API AwtStatus AWT_List_GetNumberOfItems | ( | AwtDaObject * | list, | |
uint32_t * | numberOfItems | |||
) |
Retrieve the number of items into a list.
list | the list to get the size of. | |
numberOfItems | pointer on where to write the number of item of the list. |
LIB_API AwtStatus AWT_List_Iterator_GetNext | ( | AwtDaObject * | list, | |
uint32_t * | iterator, | |||
AwtDaObject ** | item | |||
) |
Iterate over the elements of a list.
The iterator are handy when a list need to be processed. The iterator context is hold into a uint32_t variable. Before iterating the variable must be set to 0. The iteration is finished when the *item object is set to null. Modifying the list while iterating lead to undefined behavior.
list | the list to iterate over. | |
iterator | pointer on the iterator context. Before iterating, the pointed value must be set to 0. | |
item | pointer where the item pointer will be written to while iterating. |
LIB_API AwtDaObject* AWT_List_New | ( | void | ) |
Create a new empty list.
LIB_API AwtStatus AWT_Map_AddItem | ( | AwtDaObject * | map, | |
AwtDaObject * | key, | |||
AwtDaObject * | value | |||
) |
Add an item into a map object.
The unicity of the key is not verified at the moment. Putting another couple (key, value) into a map will not replace the previous couple (key, value) that has the same key.
map | the map to add the (key, value) couple into. | |
key | the key of the couple (key, value). | |
value | the value of the couple (key, value). |
LIB_API AwtStatus AWT_Map_GetItemByKey | ( | AwtDaObject * | map, | |
AwtDaObject * | key, | |||
AwtDaObject ** | value | |||
) |
Retrieve a value from a map, by its key.
If the key is not unique into the map, it returns the value of one of the couple (key, value) with key equals to the asked key. When a key is not present into the map, *value is set to null.
map | the map to retrieve the element into. | |
key | the key the looked up value. | |
value | a pointer where the value will be written, if found. |
LIB_API AwtStatus AWT_Map_GetNumberOfItems | ( | AwtDaObject * | map, | |
uint32_t * | numberOfItems | |||
) |
Retrieve the number of couple (key, value) into a map.
map | the map to get the size of. | |
numberOfItems | pointer on where to write the number of couple (key, value) of the map. |
LIB_API AwtStatus AWT_Map_Iterator_GetNext | ( | AwtDaObject * | map, | |
uint32_t * | iterator, | |||
AwtDaObject ** | key, | |||
AwtDaObject ** | value | |||
) |
Iterate over the elements of a map.
The iterator are handy when a map need to be processed. The iterator context is hold into a uint32_t variable. Before iterating the variable must be set to 0. The iteration is finished when the *key object is set to null. Modifying the map while iterating lead to undefined behavior.
map | the map to iterate over. | |
iterator | pointer on the iterator context. Before iterating, the pointed value must be set to 0. | |
key | pointer where the key will be written to while iterating. | |
value | pointer where the value will be written to while iterating. |
LIB_API AwtDaObject* AWT_Map_New | ( | void | ) |
Create a new empty Map.
LIB_API AwtStatus AWT_Message_Get | ( | const AwtDaObject * | object, | |
AwtDaMessageType * | type, | |||
const char ** | path, | |||
int32_t * | ticketId, | |||
AwtDaObject ** | body | |||
) |
Retrieve the message fields.
The string pointer is valid until the object is destroyed. No need to manually free it. The body object reference counter is incremented by this call. The user need to release it when he does not need it anymore.
LIB_API AwtDaObject* AWT_Message_New | ( | AwtDaMessageType | type, | |
const char * | path, | |||
int32_t | ticketId, | |||
AwtDaObject * | body | |||
) |
Create an AWT-DA message object.
Referenced strings are copied internally so they can be released after the call of this function. Referenced objects are marked as used by this function. The user must then call AWT_DaObject_Release on the body if he does no need it anymore.
LIB_API AwtStatus AWT_PeriodicDeltas_Get | ( | AwtDaObject * | object, | |
int32_t * | startTime, | |||
int32_t * | period, | |||
AwtDaObject ** | firstValue, | |||
AwtDaObject ** | valuesDeltaList | |||
) |
Retrieve the periodic deltas fields.
The objects reference counter is incremented by this call. The user need to release it when he does not need it anymore.
LIB_API AwtDaObject* AWT_PeriodicDeltas_New | ( | int32_t | startTime, | |
int32_t | period, | |||
AwtDaObject * | firstValue, | |||
AwtDaObject * | valuesDeltaList | |||
) |
Create a AWT-DA periodic deltas object.
Referenced objects are marked as used by this function. The user must then call AWT_DaObject_Release on the firstValue and valuesDeltaList if he does no need it anymore.
LIB_API AwtStatus AWT_PeriodicValues_Get | ( | AwtDaObject * | object, | |
int32_t * | startTime, | |||
int32_t * | period, | |||
AwtDaObject ** | valuesList | |||
) |
Retrieve the periodic values fields.
The objects reference counter is incremented by this call. The user need to release it when he does not need it anymore.
LIB_API AwtDaObject* AWT_PeriodicValues_New | ( | int32_t | startTime, | |
int32_t | period, | |||
AwtDaObject * | valuesList | |||
) |
Create a AWT-DA periodic values object.
Referenced objects are marked as used by this function. The user must then call AWT_DaObject_Release on the valuesList if he does no need it anymore.
LIB_API AwtStatus AWT_Response_Get | ( | AwtDaObject * | object, | |
int32_t * | ticketId, | |||
int32_t * | statusCode, | |||
AwtDaObject ** | data | |||
) |
Retrieve the response fields.
The data object reference counter is incremented by this call. The user need to release it when he does not need it anymore.
LIB_API AwtDaObject* AWT_Response_New | ( | int32_t | ticketId, | |
int32_t | statusCode, | |||
AwtDaObject * | data | |||
) |
Create an AWT-DA Response object.
Referenced objects are marked as used by this function. The user must then call AWT_DaObject_Release on the data if he does no need it anymore.
LIB_API AwtStatus AWT_String_Get | ( | const AwtDaObject * | object, | |
const char ** | path | |||
) |
Retrieve the object value.
The string pointer is valid until the object is destroyed. No need to manually free it.
LIB_API AwtDaObject* AWT_String_New | ( | const char * | path | ) |
Create a string object.
The given string is copied into the String object so it needs not to be maintained during the life of this object.
LIB_API AwtStatus AWT_TimestampedDeltas_Get | ( | AwtDaObject * | object, | |
int32_t * | startTime, | |||
AwtDaObject ** | timeDeltaList, | |||
AwtDaObject ** | firstValue, | |||
AwtDaObject ** | valuesDeltaList | |||
) |
Retrieve the timestamped deltas fields.
The objects reference counter is incremented by this call. The user need to release it when he does not need it anymore.
LIB_API AwtDaObject* AWT_TimestampedDeltas_New | ( | int32_t | startTime, | |
AwtDaObject * | timeDeltaList, | |||
AwtDaObject * | firstValue, | |||
AwtDaObject * | valuesDeltaList | |||
) |
Create a AWT-DA timestamped deltas object.
Referenced objects are marked as used by this function. The user must then call AWT_DaObject_Release on the timeDeltaList, firstValue and valuesDeltaList if he does no need it anymore.
LIB_API AwtStatus AWT_TimestampedValue_Get | ( | AwtDaObject * | object, | |
int32_t * | timestamp, | |||
AwtDaObject ** | value | |||
) |
Retrieve the timestamped value fields.
The objects reference counter is incremented by this call. The user need to release it when he does not need it anymore.
LIB_API AwtDaObject* AWT_TimestampedValue_New | ( | int32_t | timestamp, | |
AwtDaObject * | value | |||
) |
Create a AWT-DA timestamped value object.
Referenced objects are marked as used by this function. The user must then call AWT_DaObject_Release on the value if he does no need it anymore.
LIB_API AwtStatus AWT_TimestampedValues_Get | ( | AwtDaObject * | object, | |
int32_t * | startTime, | |||
AwtDaObject ** | timeDeltaList, | |||
AwtDaObject ** | valuesList | |||
) |
Retrieve the timestamped values fields.
The objects reference counter is incremented by this call. The user need to release it when he does not need it anymore.
LIB_API AwtDaObject* AWT_TimestampedValues_New | ( | int32_t | startTime, | |
AwtDaObject * | timeDeltaList, | |||
AwtDaObject * | valuesList | |||
) |
Create a AWT-DA timestamped values object.
Referenced objects are marked as used by this function. The user must then call AWT_DaObject_Release on the timeDeltaList and valuesList if he does no need it anymore.