#include "legato.h"
Go to the source code of this file.
Macros | |
#define | LE_AVDATA_ASSET_NAME_LEN 47 |
#define | LE_AVDATA_FIELD_NAME_LEN 47 |
#define | LE_AVDATA_STRING_VALUE_LEN 255 |
#define | LE_AVDATA_BINARY_VALUE_LEN 255 |
Typedefs | |
typedef struct le_avdata_AssetInstance * | le_avdata_AssetInstanceRef_t |
typedef struct le_avdata_FieldEventHandler * | le_avdata_FieldEventHandlerRef_t |
typedef void(* | le_avdata_FieldHandlerFunc_t) (le_avdata_AssetInstanceRef_t instRef, const char *fieldName, void *contextPtr) |
Functions | |
void | le_avdata_ConnectService (void) |
le_result_t | le_avdata_TryConnectService (void) |
void | le_avdata_DisconnectService (void) |
le_avdata_FieldEventHandlerRef_t | le_avdata_AddFieldEventHandler (le_avdata_AssetInstanceRef_t instRef, const char *fieldName, le_avdata_FieldHandlerFunc_t handlerPtr, void *contextPtr) |
void | le_avdata_RemoveFieldEventHandler (le_avdata_FieldEventHandlerRef_t addHandlerRef) |
le_avdata_AssetInstanceRef_t | le_avdata_Create (const char *assetName) |
void | le_avdata_Delete (le_avdata_AssetInstanceRef_t instRef) |
void | le_avdata_GetInt (le_avdata_AssetInstanceRef_t instRef, const char *fieldName, int32_t *valuePtr) |
void | le_avdata_SetInt (le_avdata_AssetInstanceRef_t instRef, const char *fieldName, int32_t value) |
void | le_avdata_GetFloat (le_avdata_AssetInstanceRef_t instRef, const char *fieldName, double *valuePtr) |
void | le_avdata_SetFloat (le_avdata_AssetInstanceRef_t instRef, const char *fieldName, double value) |
void | le_avdata_GetBool (le_avdata_AssetInstanceRef_t instRef, const char *fieldName, bool *valuePtr) |
void | le_avdata_SetBool (le_avdata_AssetInstanceRef_t instRef, const char *fieldName, bool value) |
void | le_avdata_GetString (le_avdata_AssetInstanceRef_t instRef, const char *fieldName, char *value, size_t valueNumElements) |
void | le_avdata_SetString (le_avdata_AssetInstanceRef_t instRef, const char *fieldName, const char *value) |
void | le_avdata_GetBinary (le_avdata_AssetInstanceRef_t instRef, const char *fieldName, uint8_t *valuePtr, size_t *valueNumElementsPtr) |
void | le_avdata_SetBinary (le_avdata_AssetInstanceRef_t instRef, const char *fieldName, const uint8_t *valuePtr, size_t valueNumElements) |
Detailed Description
Legato AirVantage Data include file.
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
Macro Definition Documentation
#define LE_AVDATA_ASSET_NAME_LEN 47 |
Define the maximum length of an asset name (TODO: verify value)
#define LE_AVDATA_BINARY_VALUE_LEN 255 |
Define the maximum length of a binary data field (TODO: verify value)
#define LE_AVDATA_FIELD_NAME_LEN 47 |
Define the maximum length of a field name (TODO: verify value)
#define LE_AVDATA_STRING_VALUE_LEN 255 |
Define the maximum length of a string field (TODO: verify value)
Typedef Documentation
typedef struct le_avdata_AssetInstance* le_avdata_AssetInstanceRef_t |
An asset data instance reference
typedef struct le_avdata_FieldEventHandler* le_avdata_FieldEventHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_avdata_FieldEvent'
typedef void(* le_avdata_FieldHandlerFunc_t) (le_avdata_AssetInstanceRef_t instRef, const char *fieldName, void *contextPtr) |
Handler for field activity
- Parameters
-
instRef fieldName contextPtr
Function Documentation
le_avdata_FieldEventHandlerRef_t le_avdata_AddFieldEventHandler | ( | le_avdata_AssetInstanceRef_t | instRef, |
const char * | fieldName, | ||
le_avdata_FieldHandlerFunc_t | handlerPtr, | ||
void * | contextPtr | ||
) |
Add handler function for EVENT 'le_avdata_FieldEvent'
This event provides information on field activity
- Parameters
-
[in] instRef [in] fieldName [in] handlerPtr [in] contextPtr
void le_avdata_ConnectService | ( | void | ) |
Connect the current client thread to the service providing this API. Block until the service is available.
For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client-specific Functions.
This function is created automatically.
le_avdata_AssetInstanceRef_t le_avdata_Create | ( | const char * | assetName | ) |
Create an instance of AirVantage asset
- Returns
- Reference to the asset instance
- Note
- It is a fatal error if the asset isn't defined.
- Parameters
-
[in] assetName
void le_avdata_Delete | ( | le_avdata_AssetInstanceRef_t | instRef | ) |
Delete an instance of AirVantage asset
- Note
- It's a fatal error if the instRef isn't valid
- Parameters
-
[in] instRef
void le_avdata_DisconnectService | ( | void | ) |
Disconnect the current client thread from the service providing this API.
Normally, this function doesn't need to be called. After this function is called, there's no longer a connection to the service, and the functions in this API can't be used. For details, see Client-specific Functions.
This function is created automatically.
void le_avdata_GetBinary | ( | le_avdata_AssetInstanceRef_t | instRef, |
const char * | fieldName, | ||
uint8_t * | valuePtr, | ||
size_t * | valueNumElementsPtr | ||
) |
Get the value of a binary data setting field
- Note
- It's a fatal error if the instRef isn't valid, or the field doesn't exist
- Parameters
-
[in] instRef [in] fieldName [out] valuePtr [in,out] valueNumElementsPtr
void le_avdata_GetBool | ( | le_avdata_AssetInstanceRef_t | instRef, |
const char * | fieldName, | ||
bool * | valuePtr | ||
) |
Get the value of a boolean setting field
- Note
- It's a fatal error if the instRef isn't valid, or the field doesn't exist
- Parameters
-
[in] instRef [in] fieldName [out] valuePtr
void le_avdata_GetFloat | ( | le_avdata_AssetInstanceRef_t | instRef, |
const char * | fieldName, | ||
double * | valuePtr | ||
) |
Get the value of a float setting field
- Note
- It's a fatal error if the instRef isn't valid, or the field doesn't exist
- Parameters
-
[in] instRef [in] fieldName [out] valuePtr
void le_avdata_GetInt | ( | le_avdata_AssetInstanceRef_t | instRef, |
const char * | fieldName, | ||
int32_t * | valuePtr | ||
) |
Get the value of an integer setting field
- Note
- It's a fatal error if the instRef isn't valid, or the field doesn't exist
- Parameters
-
[in] instRef [in] fieldName [out] valuePtr
void le_avdata_GetString | ( | le_avdata_AssetInstanceRef_t | instRef, |
const char * | fieldName, | ||
char * | value, | ||
size_t | valueNumElements | ||
) |
Get the value of a string setting field
- Note
- It's a fatal error if the instRef isn't valid, or the field doesn't exist
- Parameters
-
[in] instRef [in] fieldName [out] value [in] valueNumElements
void le_avdata_RemoveFieldEventHandler | ( | le_avdata_FieldEventHandlerRef_t | addHandlerRef | ) |
Remove handler function for EVENT 'le_avdata_FieldEvent'
- Parameters
-
[in] addHandlerRef
void le_avdata_SetBinary | ( | le_avdata_AssetInstanceRef_t | instRef, |
const char * | fieldName, | ||
const uint8_t * | valuePtr, | ||
size_t | valueNumElements | ||
) |
Set the value of a binary data variable field
- Note
- It's a fatal error if the instRef isn't valid, or the field doesn't exist
- Parameters
-
[in] instRef [in] fieldName [in] valuePtr [in] valueNumElements
void le_avdata_SetBool | ( | le_avdata_AssetInstanceRef_t | instRef, |
const char * | fieldName, | ||
bool | value | ||
) |
Set the value of a boolean variable field
- Note
- It's a fatal error if the instRef isn't valid, or the field doesn't exist
- Parameters
-
[in] instRef [in] fieldName [in] value
void le_avdata_SetFloat | ( | le_avdata_AssetInstanceRef_t | instRef, |
const char * | fieldName, | ||
double | value | ||
) |
Set the value of a float variable field
- Note
- It's a fatal error if the instRef isn't valid, or the field doesn't exist
- Parameters
-
[in] instRef [in] fieldName [in] value
void le_avdata_SetInt | ( | le_avdata_AssetInstanceRef_t | instRef, |
const char * | fieldName, | ||
int32_t | value | ||
) |
Set the value of an integer variable field
- Note
- It's a fatal error if the instRef isn't valid, or the field doesn't exist
- Parameters
-
[in] instRef [in] fieldName [in] value
void le_avdata_SetString | ( | le_avdata_AssetInstanceRef_t | instRef, |
const char * | fieldName, | ||
const char * | value | ||
) |
Set the value of a string variable field
- Note
- It's a fatal error if the instRef isn't valid, or the field doesn't exist
- Parameters
-
[in] instRef [in] fieldName [in] value
le_result_t le_avdata_TryConnectService | ( | void | ) |
Try to connect the current client thread to the service providing this API. Return with an error if the service is not available.
For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client-specific Functions.
This function is created automatically.
- Returns
- LE_OK if the client connected successfully to the service.
- LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
- LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
- LE_COMM_ERROR if the Service Directory cannot be reached.