le_antenna_interface.h File Reference
#include "legato.h"
Go to the source code of this file.
Typedefs | |
typedef struct le_antenna_Obj * | le_antenna_ObjRef_t |
typedef struct le_antenna_StatusEventHandler * | le_antenna_StatusEventHandlerRef_t |
typedef void(* | le_antenna_StatusHandlerFunc_t) (le_antenna_ObjRef_t antennaRef, le_antenna_Status_t status, void *contextPtr) |
Enumerations | |
enum | le_antenna_Type_t { LE_ANTENNA_PRIMARY_CELLULAR = 0, LE_ANTENNA_DIVERSITY_CELLULAR = 1, LE_ANTENNA_GNSS = 2, LE_ANTENNA_MAX = 3 } |
enum | le_antenna_Status_t { LE_ANTENNA_SHORT_CIRCUIT = 0, LE_ANTENNA_CLOSE_CIRCUIT = 1, LE_ANTENNA_OPEN_CIRCUIT = 2, LE_ANTENNA_OVER_CURRENT = 3, LE_ANTENNA_INACTIVE = 4, LE_ANTENNA_LAST_STATUS = 5 } |
Detailed Description
Legato Antenna Monitoring include file.
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
Typedef Documentation
typedef struct le_antenna_Obj* le_antenna_ObjRef_t |
Reference type for an antenna diagnostic.
typedef struct le_antenna_StatusEventHandler* le_antenna_StatusEventHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_antenna_StatusEvent'
typedef void(* le_antenna_StatusHandlerFunc_t) (le_antenna_ObjRef_t antennaRef, le_antenna_Status_t status, void *contextPtr) |
Handler for antenna status.
- Parameters
-
antennaRef antenna reference status antenna status contextPtr
Enumeration Type Documentation
enum le_antenna_Status_t |
Antenna status
enum le_antenna_Type_t |
Function Documentation
le_antenna_StatusEventHandlerRef_t le_antenna_AddStatusEventHandler | ( | le_antenna_ObjRef_t | antennaRef, |
le_antenna_StatusHandlerFunc_t | handlerPtr, | ||
void * | contextPtr | ||
) |
Add handler function for EVENT 'le_antenna_StatusEvent'
This event provides information on antenna status for the given antennaRef.
- Parameters
-
[in] antennaRef antenna reference [in] handlerPtr [in] contextPtr
void le_antenna_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.
void le_antenna_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_result_t le_antenna_GetExternalAdc | ( | le_antenna_ObjRef_t | antennaRef, |
int8_t * | adcIdPtr | ||
) |
Get the external ADC used to monitor the requested antenna.
- Returns
- LE_OK on success
- LE_NOT_FOUND if the antenna reference is unknown
- LE_UNSUPPORTED request not supported
- LE_FAULT on other failure
- Note
- If the returned ADC index is "-1", it means no external ADC are used to monitor the requested antenna.
- Parameters
-
[in] antennaRef antenna reference [out] adcIdPtr ADC index used to monitor the requested antenna
le_result_t le_antenna_GetOpenLimit | ( | le_antenna_ObjRef_t | antennaRef, |
uint32_t * | openLimitPtr | ||
) |
Get the ADC value used to detect an open circuit.
- Returns
- LE_OK on success
- LE_NOT_FOUND if the antenna reference is unknown
- LE_FAULT on other failure
- Parameters
-
[in] antennaRef antenna reference [out] openLimitPtr ADC value used to detect an open circuit
le_result_t le_antenna_GetShortLimit | ( | le_antenna_ObjRef_t | antennaRef, |
uint32_t * | shortLimitPtr | ||
) |
Get the ADC value used to detect a short circuit.
- Returns
- LE_OK on success
- LE_NOT_FOUND if the antenna reference is unknown
- LE_FAULT on other failure
- Parameters
-
[in] antennaRef antenna reference [out] shortLimitPtr ADC value used to detect a short circuit
le_result_t le_antenna_GetStatus | ( | le_antenna_ObjRef_t | antennaRef, |
le_antenna_Status_t * | statusPtr | ||
) |
Get the antenna status.
- Returns
- LE_OK on success
- LE_NOT_FOUND if the antenna reference is unknown
- LE_UNSUPPORTED if the antenna detection is not supported
- LE_FAULT on other failure
- Parameters
-
[in] antennaRef antenna reference [out] statusPtr antenna status
le_result_t le_antenna_GetType | ( | le_antenna_ObjRef_t | antennaRef, |
le_antenna_Type_t * | antennaTypePtr | ||
) |
Get the antenna type.
- Returns
- LE_OK on success
- LE_NOT_FOUND if the antenna reference is unknown
- Parameters
-
[in] antennaRef antenna reference [out] antennaTypePtr allocated antenna type
void le_antenna_RemoveStatusEventHandler | ( | le_antenna_StatusEventHandlerRef_t | addHandlerRef | ) |
Remove handler function for EVENT 'le_antenna_StatusEvent'
- Parameters
-
[in] addHandlerRef
le_antenna_ObjRef_t le_antenna_Request | ( | le_antenna_Type_t | antennaType | ) |
Requested the antenna monitoring.
- Returns
- Reference to the antenna object.
- NULL on failure.
- Parameters
-
[in] antennaType antenna to be monitored
le_result_t le_antenna_SetExternalAdc | ( | le_antenna_ObjRef_t | antennaRef, |
int8_t | adcId | ||
) |
Set the external ADC used to monitor the requested antenna.
- Returns
- LE_OK on success
- LE_NOT_FOUND if the antenna reference is unknown
- LE_UNSUPPORTED request not supported
- LE_FAULT on other failure
- Note
- The same external ADC may not be selected for both antennas at the same time.
- Parameters
-
[in] antennaRef antenna reference [in] adcId ADC index used to monitor the requested antenna
le_result_t le_antenna_SetOpenLimit | ( | le_antenna_ObjRef_t | antennaRef, |
uint32_t | openLimit | ||
) |
Set the ADC value used to detect an open circuit.
- Returns
- LE_OK on success
- LE_NOT_FOUND if the antenna reference is unknown
- LE_FAULT on other failure
- Parameters
-
[in] antennaRef antenna reference [in] openLimit ADC value used to detect an open circuit
le_result_t le_antenna_SetShortLimit | ( | le_antenna_ObjRef_t | antennaRef, |
uint32_t | shortLimit | ||
) |
Set the ADC value used to detect a short circuit.
- Returns
- LE_OK on success
- LE_NOT_FOUND if the antenna reference is unknown
- LE_FAULT on other failure
- Parameters
-
[in] antennaRef antenna reference [in] shortLimit ADC value used to detect a short circuit
le_result_t le_antenna_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.