le_avc API Reference
Files | |
file | le_avc_common.h |
file | le_avc_interface.h |
Macros | |
#define | LE_AVC_APN_NAME_MAX_LEN 48 |
#define | LE_AVC_APN_NAME_MAX_LEN_BYTES 49 |
#define | LE_AVC_USERNAME_MAX_LEN 28 |
#define | LE_AVC_USERNAME_MAX_LEN_BYTES 29 |
#define | LE_AVC_PASSWORD_MAX_LEN 28 |
#define | LE_AVC_PASSWORD_MAX_LEN_BYTES 29 |
#define | LE_AVC_NUM_RETRY_TIMERS 8 |
#define | LE_AVC_POLLING_TIMER_MAX_VAL 525600 |
#define | LE_AVC_POLLING_TIMER_MIN_VAL 0 |
#define | LE_AVC_RETRY_TIMER_MAX_VAL 20160 |
#define | LE_AVC_RETRY_TIMER_MIN_VAL 0 |
#define | LE_AVC_HTTP_STATUS_INVALID 65535 |
#define | LE_AVC_COMM_INFO_STR_MAX_LEN 256 |
#define | LE_AVC_MAX_LWM2M_RESOURCE_LEN 512 |
#define | LE_AVC_MAX_LWM2M_RESOURCE_BYTES 513 |
#define | LE_AVC_COMM_INFO_UDP_NO_ERR 0 |
#define | LE_AVC_COMM_INFO_UDP_OPEN_ERR 1 |
#define | LE_AVC_COMM_INFO_UDP_CLOSE_ERR 2 |
#define | LE_AVC_COMM_INFO_UDP_SEND_ERR 3 |
#define | LE_AVC_COMM_INFO_UDP_RECV_ERR 4 |
#define | LE_AVC_COMM_INFO_UDP_CONNECT_ERR 5 |
#define | LE_AVC_COMM_INFO_BEARER_UP 6 |
#define | LE_AVC_COMM_INFO_BEARER_DOWN 7 |
#define | LE_AVC_COMM_INFO_PDP_CONTEXT 8 |
#define | LE_AVC_COMM_INFO_COAP_201_CREATED 65 |
#define | LE_AVC_COMM_INFO_COAP_202_DELETED 66 |
#define | LE_AVC_COMM_INFO_COAP_204_CHANGED 68 |
#define | LE_AVC_COMM_INFO_COAP_205_CONTENT 69 |
#define | LE_AVC_COMM_INFO_COAP_231_CONTINUE 95 |
#define | LE_AVC_COMM_INFO_COAP_400_BAD_REQUEST 128 |
#define | LE_AVC_COMM_INFO_COAP_401_UNAUTHORIZED 129 |
#define | LE_AVC_COMM_INFO_COAP_402_BAD_OPTION 130 |
#define | LE_AVC_COMM_INFO_COAP_404_NOT_FOUND 132 |
#define | LE_AVC_COMM_INFO_COAP_405_METHOD_NOT_ALLOWED 133 |
#define | LE_AVC_COMM_INFO_COAP_406_NOT_ACCEPTABLE 134 |
#define | LE_AVC_COMM_INFO_COAP_408_REQ_ENTITY_INCOMPLETE 136 |
#define | LE_AVC_COMM_INFO_COAP_412_PRECONDITION_FAILED 140 |
#define | LE_AVC_COMM_INFO_COAP_413_ENTITY_TOO_LARGE 141 |
#define | LE_AVC_COMM_INFO_COAP_500_INTERNAL_SERVER_ERROR 160 |
#define | LE_AVC_COMM_INFO_COAP_501_NOT_IMPLEMENTED 161 |
#define | LE_AVC_COMM_INFO_COAP_503_SERVICE_UNAVAILABLE 163 |
#define | LE_AVC_SERVER_ID_ALL_SERVERS 65535 |
#define | LE_AVC_SERVER_ID_AIRVANTAGE 1 |
#define | LE_AVC_CONFIG_TREE_ROOT "avcService:/" |
#define | LE_AVC_CONFIG_SIM_APDU_PATH "SIM_APDU" |
#define | LE_AVC_CONFIG_SIM_APDU_RESP_PATH "SIM_APDU_RESP" |
Typedefs | |
typedef struct le_avc_StatusEventHandler * | le_avc_StatusEventHandlerRef_t |
typedef struct le_avc_SessionRequestEventHandler * | le_avc_SessionRequestEventHandlerRef_t |
typedef struct le_avc_CommInfoHandler * | le_avc_CommInfoHandlerRef_t |
typedef struct le_avc_BlockRequest * | le_avc_BlockRequestRef_t |
typedef void(* | le_avc_StatusHandlerFunc_t) (le_avc_Status_t updateStatus, int32_t totalNumBytes, int32_t progress, void *contextPtr) |
typedef void(* | le_avc_SessionRequestHandlerFunc_t) (le_avc_SessionRequest_t request, void *contextPtr) |
typedef void(* | le_avc_CommInfoHandlerFunc_t) (uint8_t code, const char *LE_NONNULL str, void *contextPtr) |
typedef void(* | le_avc_DisconnectHandler_t) (void *) |
Detailed Description
Macro Definition Documentation
◆ LE_AVC_APN_NAME_MAX_LEN
#define LE_AVC_APN_NAME_MAX_LEN 48 |
Maximum APN name length without NULL terminator.
◆ LE_AVC_APN_NAME_MAX_LEN_BYTES
#define LE_AVC_APN_NAME_MAX_LEN_BYTES 49 |
Maximum APN name length including NULL terminator.
◆ LE_AVC_COMM_INFO_STR_MAX_LEN
#define LE_AVC_COMM_INFO_STR_MAX_LEN 256 |
Communication info max string size
◆ LE_AVC_COMM_INFO_UDP_NO_ERR
#define LE_AVC_COMM_INFO_UDP_NO_ERR 0 |
Communication info codes
◆ LE_AVC_CONFIG_SIM_APDU_PATH
#define LE_AVC_CONFIG_SIM_APDU_PATH "SIM_APDU" |
Config tree entry to store the SIM APDU data
◆ LE_AVC_CONFIG_SIM_APDU_RESP_PATH
#define LE_AVC_CONFIG_SIM_APDU_RESP_PATH "SIM_APDU_RESP" |
Config tree entry to store the SIM APDU response
◆ LE_AVC_CONFIG_TREE_ROOT
#define LE_AVC_CONFIG_TREE_ROOT "avcService:/" |
Config tree root to store the SIM APDU data
◆ LE_AVC_HTTP_STATUS_INVALID
#define LE_AVC_HTTP_STATUS_INVALID 65535 |
Default HTTP status.
◆ LE_AVC_MAX_LWM2M_RESOURCE_BYTES
#define LE_AVC_MAX_LWM2M_RESOURCE_BYTES 513 |
Maximum length of a LwM2M resource. One extra byte is added for the null character.
◆ LE_AVC_MAX_LWM2M_RESOURCE_LEN
#define LE_AVC_MAX_LWM2M_RESOURCE_LEN 512 |
Maximum length of a LwM2M resource excluding any termination character.
◆ LE_AVC_NUM_RETRY_TIMERS
#define LE_AVC_NUM_RETRY_TIMERS 8 |
Maximum number of retry timers.
◆ LE_AVC_PASSWORD_MAX_LEN
#define LE_AVC_PASSWORD_MAX_LEN 28 |
Maximum password length without NULL terminator..
◆ LE_AVC_PASSWORD_MAX_LEN_BYTES
#define LE_AVC_PASSWORD_MAX_LEN_BYTES 29 |
Maximum password length including NULL terminator.
◆ LE_AVC_POLLING_TIMER_MAX_VAL
#define LE_AVC_POLLING_TIMER_MAX_VAL 525600 |
Polling timer value range in minutes. 525600 minutes = 1 year.
◆ LE_AVC_RETRY_TIMER_MAX_VAL
#define LE_AVC_RETRY_TIMER_MAX_VAL 20160 |
Retry timer value range in minutes. 20160 minutes = 2 weeks.
◆ LE_AVC_SERVER_ID_AIRVANTAGE
#define LE_AVC_SERVER_ID_AIRVANTAGE 1 |
Server ID of the AirVantage server (by convention).
◆ LE_AVC_SERVER_ID_ALL_SERVERS
#define LE_AVC_SERVER_ID_ALL_SERVERS 65535 |
When used as a Server ID, indicate that the operation is applicable to all servers.
◆ LE_AVC_USERNAME_MAX_LEN
#define LE_AVC_USERNAME_MAX_LEN 28 |
Maximum user name length without NULL terminator.
◆ LE_AVC_USERNAME_MAX_LEN_BYTES
#define LE_AVC_USERNAME_MAX_LEN_BYTES 29 |
Maximum user name length including NULL terminator.
Typedef Documentation
◆ le_avc_BlockRequestRef_t
typedef struct le_avc_BlockRequest* le_avc_BlockRequestRef_t |
Reference returned by BlockInstall function and used by UnblockInstall function
◆ le_avc_CommInfoHandlerFunc_t
typedef void(* le_avc_CommInfoHandlerFunc_t) (uint8_t code, const char *LE_NONNULL str, void *contextPtr) |
Handler for receiving communication information.
◆ le_avc_CommInfoHandlerRef_t
typedef struct le_avc_CommInfoHandler* le_avc_CommInfoHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_avc_CommInfo'
◆ le_avc_DisconnectHandler_t
typedef void(* le_avc_DisconnectHandler_t) (void *) |
Type for handler called when a server disconnects.
◆ le_avc_SessionRequestEventHandlerRef_t
typedef struct le_avc_SessionRequestEventHandler* le_avc_SessionRequestEventHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_avc_SessionRequestEvent'
◆ le_avc_SessionRequestHandlerFunc_t
typedef void(* le_avc_SessionRequestHandlerFunc_t) (le_avc_SessionRequest_t request, void *contextPtr) |
Handler for receiving session open or close request.
◆ le_avc_StatusEventHandlerRef_t
typedef struct le_avc_StatusEventHandler* le_avc_StatusEventHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_avc_StatusEvent'
◆ le_avc_StatusHandlerFunc_t
typedef void(* le_avc_StatusHandlerFunc_t) (le_avc_Status_t updateStatus, int32_t totalNumBytes, int32_t progress, void *contextPtr) |
Handler for update availability status
Enumeration Type Documentation
◆ le_avc_ConfigType_t
enum le_avc_ConfigType_t |
◆ le_avc_CredentialStatus_t
Status of the device credentials
◆ le_avc_ErrorCode_t
enum le_avc_ErrorCode_t |
Error code used to provide diagnostic information after a failure (includes both download and install failure).
- Note
- Additional information may also be available in the target device's system log.
◆ le_avc_SessionRequest_t
◆ le_avc_SessionType_t
enum le_avc_SessionType_t |
◆ le_avc_Status_t
enum le_avc_Status_t |
Status of session or update
If an update is pending, it must first be downloaded and then installed.
◆ le_avc_UpdateType_t
enum le_avc_UpdateType_t |
The type of pending update
◆ le_avc_UserAgreement_t
Operations which require user agreement
Function Documentation
◆ le_avc_AcceptDownload()
le_result_t le_avc_AcceptDownload | ( | void | ) |
Accept the currently pending download
- Returns
- LE_OK on success
- LE_FAULT on failure
◆ le_avc_AcceptInstall()
le_result_t le_avc_AcceptInstall | ( | void | ) |
Accept the currently pending install
- Returns
- LE_OK on success
- LE_FAULT on failure
◆ le_avc_AcceptReboot()
le_result_t le_avc_AcceptReboot | ( | void | ) |
Accept the currently pending reboot
- Note
- When this function is called, a 2-second timer is launched and the reboot function is called when the timer expires.
- Returns
- LE_OK on success
- LE_FAULT on failure
◆ le_avc_AcceptUninstall()
le_result_t le_avc_AcceptUninstall | ( | void | ) |
Accept the currently pending uninstall
- Returns
- LE_OK on success
- LE_FAULT on failure
◆ le_avc_AddCommInfoHandler()
le_avc_CommInfoHandlerRef_t le_avc_AddCommInfoHandler | ( | le_avc_CommInfoHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'le_avc_CommInfo'
This event provides communication errors.
- Parameters
-
[in] handlerPtr [in] contextPtr
◆ le_avc_AddSessionRequestEventHandler()
le_avc_SessionRequestEventHandlerRef_t le_avc_AddSessionRequestEventHandler | ( | le_avc_SessionRequestHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'le_avc_SessionRequestEvent'
This event provides information on session open or close request.
- Parameters
-
[in] handlerPtr [in] contextPtr
◆ le_avc_AddStatusEventHandler()
le_avc_StatusEventHandlerRef_t le_avc_AddStatusEventHandler | ( | le_avc_StatusHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Status of session or update
If an update is pending, it must first be downloaded and then installed. Operations which require user agreement Request to open or close avms session. The type of pending update Error code used to provide diagnostic information after a failure (includes both download and install failure).
- Note
- Additional information may also be available in the target device's system log. Session type indicates whether the device is connected to the bootstrap server or the device management server. Status of the device credentials Type of the configuration to pass to the API Handler for update availability status Reference type used by Add/Remove functions for EVENT 'le_avc_StatusEvent' Handler for receiving session open or close request. Reference type used by Add/Remove functions for EVENT 'le_avc_SessionRequestEvent' Handler for receiving communication information. Reference type used by Add/Remove functions for EVENT 'le_avc_CommInfo' Reference returned by BlockInstall function and used by UnblockInstall function Add handler function for EVENT 'le_avc_StatusEvent'
This event provides information on update availability status
- Parameters
-
[in] handlerPtr [in] contextPtr
◆ le_avc_BlockInstall()
le_avc_BlockRequestRef_t le_avc_BlockInstall | ( | void | ) |
Prevent any pending updates from being installed.
- Returns
- Reference for block update request (to be used later for unblocking updates)
- NULL if the operation was not successful
◆ le_avc_CheckRoute()
le_result_t le_avc_CheckRoute | ( | void | ) |
Send a specific message to the server to be sure that the route between the device and the server is available. This API needs to be called when any package download is over (successfully or not) and before sending any notification on asset data to the server.
- Returns
- LE_OK when the treatment is launched
- LE_FAULT on failure
- LE_UNSUPPORTED when the API is not supported
◆ le_avc_ConnectService()
void le_avc_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_avc_DeferConnect()
le_result_t le_avc_DeferConnect | ( | uint32_t | deferMinutes | ) |
Defer the currently pending connection, for the given number of minutes
- Returns
- LE_OK on success
- LE_FAULT on failure
- Parameters
-
[in] deferMinutes
◆ le_avc_DeferDownload()
le_result_t le_avc_DeferDownload | ( | uint32_t | deferMinutes | ) |
Defer the currently pending download, for the given number of minutes
- Returns
- LE_OK on success
- LE_FAULT on failure
- Parameters
-
[in] deferMinutes
◆ le_avc_DeferInstall()
le_result_t le_avc_DeferInstall | ( | uint32_t | deferMinutes | ) |
Defer the currently pending install
- Returns
- LE_OK on success
- LE_FAULT on failure
- Parameters
-
[in] deferMinutes
◆ le_avc_DeferReboot()
le_result_t le_avc_DeferReboot | ( | uint32_t | deferMinutes | ) |
Defer the currently pending reboot
- Returns
- LE_OK on success
- LE_FAULT on failure
- Parameters
-
[in] deferMinutes
◆ le_avc_DeferUninstall()
le_result_t le_avc_DeferUninstall | ( | uint32_t | deferMinutes | ) |
Defer the currently pending uninstall
- Returns
- LE_OK on success
- LE_FAULT on failure
- Parameters
-
[in] deferMinutes
◆ le_avc_DisconnectService()
void le_avc_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.
◆ le_avc_GetApnConfig()
le_result_t le_avc_GetApnConfig | ( | char * | apnName, |
size_t | apnNameSize, | ||
char * | userName, | ||
size_t | userNameSize, | ||
char * | userPwd, | ||
size_t | userPwdSize | ||
) |
Function to read APN configuration.
- Returns
- LE_OK on success.
- LE_FAULT if there is any error while reading.
- LE_OVERFLOW if the buffer provided is too small.
- Parameters
-
[out] apnName [in] apnNameSize [out] userName [in] userNameSize [out] userPwd [in] userPwdSize
◆ le_avc_GetAppUpdateName()
le_result_t le_avc_GetAppUpdateName | ( | char * | updateName, |
size_t | updateNameSize | ||
) |
Get the name for the currently pending app update
- Returns
- LE_OK on success
- LE_FAULT if not available, or isn't APPL_UPDATE type
- Parameters
-
[out] updateName [in] updateNameSize
◆ le_avc_GetCredentialStatus()
le_avc_CredentialStatus_t le_avc_GetCredentialStatus | ( | void | ) |
Function to retrieve status of the credentials provisioned on the device.
- Returns
- LE_AVC_NO_CREDENTIAL_PROVISIONED
- If neither Bootstrap nor Device Management credential is provisioned. LE_AVC_BS_CREDENTIAL_PROVISIONED
- If Bootstrap credential is provisioned but Device Management credential is not provisioned. LE_AVC_DM_CREDENTIAL_PROVISIONED
- If Device management key is provisioned.
◆ le_avc_GetErrorCode()
le_avc_ErrorCode_t le_avc_GetErrorCode | ( | void | ) |
Function to get error code when update fails.
- Returns
- Error code of encountered error.
- ERR_NONE if update is in any other state.
◆ le_avc_GetHttpStatus()
uint16_t le_avc_GetHttpStatus | ( | void | ) |
Function to read the http status of the last download.
- Returns
- HttpStatus as defined in RFC 7231, Section 6.
◆ le_avc_GetPollingTimer()
le_result_t le_avc_GetPollingTimer | ( | uint32_t * | pollingTimerPtr | ) |
Function to read the polling timer.
- Returns
- LE_OK on success
- LE_FAULT if not available
- LE_OUT_OF_RANGE if the polling timer value is out of range (0 to 525600).
- Parameters
-
[out] pollingTimerPtr Polling timer interval, minutes
◆ le_avc_GetRetryTimers()
le_result_t le_avc_GetRetryTimers | ( | uint16_t * | timerValuePtr, |
size_t * | timerValueSizePtr | ||
) |
Function to read the retry timers.
- Returns
- LE_OK on success.
- LE_FAULT if not able to read the timers.
- LE_OUT_OF_RANGE if one of the retry timers is out of range (0 to 20160).
- Parameters
-
[out] timerValuePtr Array of retry timer intervals, minutes. [in,out] timerValueSizePtr
◆ le_avc_GetSessionType()
le_avc_SessionType_t le_avc_GetSessionType | ( | void | ) |
Function to read the current session type, or the last session type if there is no active session.
- Returns
- SessionType
◆ le_avc_GetUpdateType()
le_result_t le_avc_GetUpdateType | ( | le_avc_UpdateType_t * | updateTypePtr | ) |
Get the update type of the currently pending update
- Returns
- LE_OK on success
- LE_FAULT if not available
- Parameters
-
[out] updateTypePtr
◆ le_avc_GetUserAgreement()
le_result_t le_avc_GetUserAgreement | ( | le_avc_UserAgreement_t | updateStatus, |
bool * | enablePtr | ||
) |
Function to get user agreements for download, install, reboot, connection and uninstall.
- Returns
- LE_OK on success.
- LE_FAULT if failed to read user agreement state.
- Parameters
-
[in] updateStatus Operation for which user agreements has to be read. [out] enablePtr true = enable, false = disable.
◆ le_avc_IsSessionStarted()
bool le_avc_IsSessionStarted | ( | uint16_t | serverId | ) |
Check whether the session is started for a given Server Id.
- Returns
- true if session is started
- false otherwise
- Parameters
-
[in] serverId Short Server ID
◆ le_avc_ReadLwm2mResource()
le_result_t le_avc_ReadLwm2mResource | ( | uint16_t | objectId, |
uint16_t | objectInstanceId, | ||
uint16_t | resourceId, | ||
uint16_t | resourceInstanceId, | ||
char * | data, | ||
size_t | dataSize | ||
) |
Function to read a resource from a LWM2M object
- Returns
- LE_OK on success.
- LE_FAULT if failed.
- LE_UNSUPPORTED if unsupported.
- Parameters
-
[in] objectId Object identifier [in] objectInstanceId Object instance identifier [in] resourceId Resource identifier [in] resourceInstanceId Resource instance identifier [out] data String of requested resources to be read [in] dataSize
◆ le_avc_RemoveCommInfoHandler()
void le_avc_RemoveCommInfoHandler | ( | le_avc_CommInfoHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'le_avc_CommInfo'
- Parameters
-
[in] handlerRef
◆ le_avc_RemoveSessionRequestEventHandler()
void le_avc_RemoveSessionRequestEventHandler | ( | le_avc_SessionRequestEventHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'le_avc_SessionRequestEvent'
- Parameters
-
[in] handlerRef
◆ le_avc_RemoveStatusEventHandler()
void le_avc_RemoveStatusEventHandler | ( | le_avc_StatusEventHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'le_avc_StatusEvent'
- Parameters
-
[in] handlerRef
◆ le_avc_SetApnConfig()
le_result_t le_avc_SetApnConfig | ( | const char *LE_NONNULL | apnName, |
const char *LE_NONNULL | userName, | ||
const char *LE_NONNULL | userPwd | ||
) |
Function to write APN configuration.
- Returns
- LE_OK on success.
- LE_OVERFLOW if one of the input strings is too long.
- Parameters
-
[in] apnName [in] userName [in] userPwd
◆ le_avc_SetNatTimeout()
void le_avc_SetNatTimeout | ( | uint32_t | timeout | ) |
Function to set the NAT timeout
This function sets the NAT timeout in volatile memory. When data need to be sent by the client, a check is made between this NAT timeout value and the time when last data were received from the server or sent to the server. If one of these times is greater than the NAT timeout, a DTLS resume is initiated. Default value if this function is not called: 40 seconds. Value 0 will deactivate any DTLS resume. This function can be called at any time.
- Parameters
-
[in] timeout Timeout (unit: seconds)
◆ le_avc_SetPollingTimer()
le_result_t le_avc_SetPollingTimer | ( | uint32_t | pollingTimer | ) |
Function to set the polling timer to a value in minutes.
- Returns
- LE_OK on success.
- LE_OUT_OF_RANGE if the polling timer value is out of range (0 to 525600).
- Parameters
-
[in] pollingTimer Polling timer interval, minutes
◆ le_avc_SetRetryTimers()
le_result_t le_avc_SetRetryTimers | ( | const uint16_t * | timerValuePtr, |
size_t | timerValueSize | ||
) |
Function to set the retry timers.
- Returns
- LE_OK on success.
- LE_FAULT if not able to set the timers.
- LE_OUT_OF_RANGE if one of the retry timers is out of range (0 to 20160).
- Parameters
-
[in] timerValuePtr Array of retry timer intervals, minutes. [in] timerValueSize
◆ le_avc_SetServerDisconnectHandler()
LE_FULL_API void le_avc_SetServerDisconnectHandler | ( | le_avc_DisconnectHandler_t | disconnectHandler, |
void * | contextPtr | ||
) |
Set handler called when server disconnection is detected.
When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants to continue without exiting, it should call longjmp() from inside the handler.
◆ le_avc_SetUserAgreement()
le_result_t le_avc_SetUserAgreement | ( | le_avc_UserAgreement_t | updateStatus, |
bool | enable | ||
) |
Function to set user agreements for download, install, reboot, connection and uninstall.
- Returns
- LE_OK on success.
- LE_FAULT if failed to configure user agreement.
- Parameters
-
[in] updateStatus Operation for which user agreements has to be set. [in] enable true = enable, false = disable.
◆ le_avc_StartDmSession()
le_result_t le_avc_StartDmSession | ( | uint16_t | serverId, |
bool | isAutoDisconnect | ||
) |
Start a session with a specific Device Management (DM) server.
This function is similar to le_avc_StartSession(), with the main difference of adding extra parameter to specify the Server ID of the DM server; this way, it provides flexibility to connect to any DM server, not just AirVantage.
For example, the device may need to communicate with EDM server that is providing support for the SIM Reachability features (LWM2M proprietory object 33408).
Reserved Server IDs are: 0 for Bootstrap server 1 for AirVantage server 1000 for EDM server
- Note
- DM servers may have different capabilities in terms of which LWM2M objects they support. For instance, EDM server supports only one specific type of object (Object 33408), and does not support Objects 5 and 9, which means it doesn't allow SOTA/FOTA operations.
- To initiate a session with AirVantage server, it's preferable to use le_avc_StartSession() which exists specifically for this purpose.
- If the device doesn't have credentials for the specificed DM server, the boostrapping process will be automatically initiated.
- Returns
- LE_OK if connection request has been sent.
- LE_FAULT on failure
- LE_DUPLICATE if already connected to the server.
- Parameters
-
[in] serverId Short ID of the DM server. If equals to ALL_SERVERS, the session will be started with all available DM servers. [in] isAutoDisconnect Whether the session should be auto disconnected
◆ le_avc_StartSession()
le_result_t le_avc_StartSession | ( | void | ) |
Start a session with the AirVantage server
This will cause a query to be sent to the server, for pending updates.
- Returns
- LE_OK if connection request has been sent.
- LE_FAULT on failure
- LE_DUPLICATE if already connected.
◆ le_avc_StopSession()
le_result_t le_avc_StopSession | ( | void | ) |
Stop a session with the DM server
If a download is in progress and the user agreement is enabled, this suspends the download, otherwise if the user agreement is disabled, a new connection is automatically initiated in order to resume the download.
- Returns
- LE_OK on success
- LE_FAULT on failure
- LE_DUPLICATE if already disconnected
◆ le_avc_TryConnectService()
le_result_t le_avc_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.
◆ le_avc_UnblockInstall()
void le_avc_UnblockInstall | ( | le_avc_BlockRequestRef_t | blockRef | ) |
Allow any pending updates to be installed
- Parameters
-
[in] blockRef block request ref returned by le_avc_BlockInstall