![]() |
m2mb API docs
30.00.006
m2mb API sets documentation
|
Header file for m2mb_net APIs. More...
Go to the source code of this file.
Data Structures | |
struct | M2MB_NET_ERR_CAUSE_T |
struct | M2MB_NET_GENERIC_RESP_T |
struct | M2MB_NET_REG_STATUS_T |
struct | M2MB_NET_GET_EDRX_INFO_RESP_T |
struct | M2MB_NET_SIGNAL_INFO_UTRAN_T |
struct | M2MB_NET_SIGNAL_INFO_EUTRAN_T |
struct | M2MB_NET_GET_SIGNAL_INFO_RESP_T |
struct | M2MB_NET_GET_BER_RESP_T |
struct | M2M_T_NETWORK_CELL_NEIGHBOR_T |
struct | M2MB_NET_CELL_GERAN_FULL_T |
struct | M2MB_NET_CELL_GERAN_SUBSET1_T |
struct | M2MB_NET_CELL_GERAN_SUBSET2_T |
union | M2MB_NET_CELL_GERAN_U |
struct | M2MB_NET_CELL_UTRAN_FULL_T |
struct | M2MB_NET_CELL_UTRAN_SUBSET1_T |
union | M2MB_NET_CELL_UTRAN_U |
struct | M2MB_NET_CELL_EUTRAN_FULL_T |
struct | M2MB_NET_CELL_EUTRAN_SUBSET1_T |
union | M2MB_NET_CELL_EUTRAN_U |
struct | M2MB_NET_CELL_NEIGHBOR_T |
struct | M2MB_NET_GET_CURRENT_CELL_LIST_RESP_T |
struct | M2MB_NET_GET_CURRENT_OPERATOR_INFO_RESP_T |
struct | M2MB_NET_DESCRIPTION_T |
struct | M2MB_NET_GET_AVAILABLE_NW_LIST_RESP_T |
Typedefs | |
typedef HANDLE | M2MB_NET_HANDLE |
typedef struct M2MB_NET_CELL_NEIGHBOR_T | M2MB_NET_CELL_NEIGHBOR_T |
typedef struct M2MB_NET_DESCRIPTION_T | M2MB_NET_DESCRIPTION_T |
typedef void(* | m2mb_net_ind_callback) (M2MB_NET_HANDLE h, M2MB_NET_IND_E net_event, UINT16 resp_size, void *resp_struct, void *userdata) |
Functions | |
M2MB_RESULT_E | m2mb_net_init (M2MB_NET_HANDLE *h, m2mb_net_ind_callback callback, void *userdata) |
m2mb_net_init initializes NET service for current client. More... | |
M2MB_RESULT_E | m2mb_net_deinit (M2MB_NET_HANDLE h) |
m2mb_net_deinit deinitializes NET service for current client. More... | |
M2MB_RESULT_E | m2mb_net_conf (M2MB_NET_HANDLE h, UINT8 argc,...) |
m2mb_net_conf sets/gets some NET parameters. More... | |
M2MB_RESULT_E | m2mb_net_enable_ind (M2MB_NET_HANDLE h, M2MB_NET_IND_E ind, UINT8 enable) |
m2mb_net_enable_ind enables the indications of network state change events. More... | |
M2MB_RESULT_E | m2mb_net_get_signal_info (M2MB_NET_HANDLE h) |
m2mb_net_get_signal_info gets information about signal strength. More... | |
M2MB_RESULT_E | m2mb_net_get_ber (M2MB_NET_HANDLE h) |
m2mb_net_get_ber gets information about bit error rate. More... | |
M2MB_RESULT_E | m2mb_net_get_current_operator_info (M2MB_NET_HANDLE h) |
m2mb_net_get_current_operator_info gets information about current operator. More... | |
M2MB_RESULT_E | m2mb_net_get_current_cell_list (M2MB_NET_HANDLE h) |
m2mb_net_get_current_cell_list gets a list containing current cell neighbors. More... | |
M2MB_RESULT_E | m2mb_net_get_available_nw_list (M2MB_NET_HANDLE h) |
m2mb_net_get_available_nw_list gets a list containing current availble networks. More... | |
M2MB_RESULT_E | m2mb_net_get_reg_status_info (M2MB_NET_HANDLE h) |
m2mb_net_get_reg_status_info gets information about regitration status. More... | |
M2MB_RESULT_E | m2mb_net_get_edrx_info (M2MB_NET_HANDLE h, M2MB_NET_ACC_TECH_TYPE_E acc_tech) |
m2mb_net_get_edrx_info gets information about edrx. More... | |
M2MB_RESULT_E | m2mb_net_set_edrx_info (M2MB_NET_HANDLE h, M2MB_NET_ACC_TECH_TYPE_E acc_tech, UINT8 edrx, UINT8 enabled) |
m2mb_net_set_edrx_info sets information about edrx. More... | |
Header file for m2mb_net APIs.
m2m/m2m_common/m2mb_inc/m2mb_net.h
m2mb_net APIs provide actions and events for network events management.
M2MB_RESULT_E m2mb_net_conf | ( | M2MB_NET_HANDLE | h, |
UINT8 | argc, | ||
... | |||
) |
m2mb_net_conf sets/gets some NET parameters.
m2mb_net_conf sets/gets NET parameters listed in the M2MB_NET_ACTION_E enum.
[in] | h | Handle to the NET service, previously initialized by the m2mb_net_init function. |
[in] | argc | It determines the number of parameters that follows, plus one (e.g.: if two parameters follow, argc is 3). |
[in] | It | determines the action (among the ones listed in M2MB_NET_ACTION_E), while the parameters that follow depend on the action (see following note for further details). |
Description: choose the behaviour of the m2mb_net_enable_ind function: synchronous (default) or asynchronous. The asynchronous mode can be necessary when the calling function can't be locked for long time (eg.: a callback function). In asynchronous mode, the result of the m2mb_net_enable_ind is confirmed by the M2MB_NET_ENABLE_IND_RESP event.
Params(in): h(M2MB_NET_HANDLE), 3, action(M2MB_NET_ACTION_E), syncOrAsync(M2MB_NET_ENABLE_IND_ASYNC_E)
m2mb_net_conf(h, 3, M2MB_NET_SET_ENABLE_IND_ASYNC, M2MB_NET_ENABLE_IND_ASYNC_ENABLED);
Action: M2MB_NET_GET_ENABLE_IND_ASYNC
Description: get the current status (synchronous or asynchronous) of the m2mb_net_enable_ind behaviour.
Params(in): h(M2MB_NET_HANDLE), 3, action(M2MB_NET_ACTION_E), syncOrAsync(M2MB_NET_ENABLE_IND_ASYNC_E*)
M2MB_NET_ENABLE_IND_ASYNC_E currentStatus; m2mb_net_conf(h, 3, M2MB_NET_GET_ENABLE_IND_ASYNC, ¤tStatus);
M2MB_RESULT_E m2mb_net_deinit | ( | M2MB_NET_HANDLE | h | ) |
m2mb_net_deinit deinitializes NET service for current client.
m2mb_net_deinit deinitialize NET service for current client freeing the handle passed as first parameter. Calling the m2mb_net_deinit is useful after using the NET service in order to free memory space.
[in] | h | It is the handle to the NET service, that will be deinitialized by the function. |
m2mb_net_deinit(&h);
M2MB_RESULT_E m2mb_net_enable_ind | ( | M2MB_NET_HANDLE | h, |
M2MB_NET_IND_E | ind, | ||
UINT8 | enable | ||
) |
m2mb_net_enable_ind enables the indications of network state change events.
m2mb_net_enable_ind enables the indications of network state change events through the callback function previously registerd with the m2mb_net_init.
[in] | h | It is the handle to the NET service, previously initialized by the m2mb_net_init function. |
[in] | ind | Determines the event (among the ones ending with the _IND suffix, listed in M2MB_NET_IND_E) to be enabled/disabled. |
[in] | enable | It is 0 to disable or 1 to enable the event "ind". |
m2mb_net_enable_ind(h, M2MB_NET_REG_STATUS_IND, 1);
M2MB_RESULT_E m2mb_net_get_available_nw_list | ( | M2MB_NET_HANDLE | h | ) |
m2mb_net_get_available_nw_list gets a list containing current availble networks.
m2mb_net_get_available_nw_list gets a list containing current availble networks. The function is asynchronous. This means that the function returns immediately, but the signal information is received in the callback previously set by the m2mb_net_init function. The response event received in the callback will be the M2MB_NET_GET_AVAILABLE_NW_LIST_RESP. The resp_struct must be casted to the M2MB_NET_GET_AVAILABLE_NW_LIST_RESP_T type.
[in] | h | It is the handle to the NET service, previously initialized by the m2mb_net_init function. |
m2mb_net_get_available_nw_list(h);
M2MB_RESULT_E m2mb_net_get_ber | ( | M2MB_NET_HANDLE | h | ) |
m2mb_net_get_ber gets information about bit error rate.
m2mb_net_get_ber gets information about bit error rate of current network connection. The function is asynchronous. This means that the function returns immediately, but the signal information is received in the callback previously set by the m2mb_net_init function. The response event received in the callback will be the M2MB_NET_GET_BER_RESP. The resp_struct must be casted to the M2MB_NET_GET_BER_RESP_T type.
[in] | h | It is the handle to the NET service, previously initialized by the m2mb_net_init function. |
m2mb_net_get_ber(h);
M2MB_RESULT_E m2mb_net_get_current_cell_list | ( | M2MB_NET_HANDLE | h | ) |
m2mb_net_get_current_cell_list gets a list containing current cell neighbors.
m2mb_net_get_current_cell_list gets a list containing current cell neighbors, including serving cell. The function is asynchronous. This means that the function returns immediately, but the signal information is received in the callback previously set by the m2mb_net_init function. The response event received in the callback will be the M2MB_NET_GET_CURRENT_CELL_LIST_RESP. The resp_struct must be casted to the M2MB_NET_GET_CURRENT_CELL_LIST_RESP_T type.
[in] | h | It is the handle to the NET service, previously initialized by the m2mb_net_init function. |
m2mb_net_get_current_cell_list(h);
M2MB_RESULT_E m2mb_net_get_current_operator_info | ( | M2MB_NET_HANDLE | h | ) |
m2mb_net_get_current_operator_info gets information about current operator.
m2mb_net_get_current_operator_info gets information about current registered network operator. The function is asynchronous. This means that the function returns immediately, but the signal information is received in the callback previously set by the m2mb_net_init function. The response event received in the callback will be the M2MB_NET_GET_CURRENT_OPERATOR_INFO_RESP. The resp_struct must be casted to the M2MB_NET_GET_CURRENT_OPERATOR_INFO_RESP_T type.
[in] | h | It is the handle to the NET service, previously initialized by the m2mb_net_init function. |
m2mb_net_get_current_operator_info(h);
M2MB_RESULT_E m2mb_net_get_edrx_info | ( | M2MB_NET_HANDLE | h, |
M2MB_NET_ACC_TECH_TYPE_E | acc_tech | ||
) |
m2mb_net_get_edrx_info gets information about edrx.
m2mb_net_get_edrx_info gets information about edrx. The function is asynchronous. This means that the function returns immediately, but the signal information is received in the callback previously set by the m2mb_net_init function. The response event received in the callback will be the M2MB_NET_GET_EDRX_INFO_RESP. The resp_struct must be casted to the M2MB_NET_GET_EDRX_INFO_RESP_T type.
[in] | h | It is the handle to the NET service, previously initialized by the m2mb_net_init function. |
[in] | acc_tech | access technology to get eDRX. |
m2mb_net_get_edrx_info(h, acc_tech);
M2MB_RESULT_E m2mb_net_get_reg_status_info | ( | M2MB_NET_HANDLE | h | ) |
m2mb_net_get_reg_status_info gets information about regitration status.
m2mb_net_get_reg_status_info gets information about regitration status to the network. The function is asynchronous. This means that the function returns immediately, but the signal information is received in the callback previously set by the m2mb_net_init function. The response event received in the callback will be the M2MB_NET_GET_REG_STATUS_INFO_RESP. The resp_struct must be casted to the M2MB_NET_REG_STATUS_T type.
[in] | h | It is the handle to the NET service, previously initialized by the m2mb_net_init function. |
m2mb_net_get_reg_status_info(h);
M2MB_RESULT_E m2mb_net_get_signal_info | ( | M2MB_NET_HANDLE | h | ) |
m2mb_net_get_signal_info gets information about signal strength.
m2mb_net_get_signal_info gets information about signal strength. The function is asynchronous. This means that the function returns immediately, but the signal information is received in the callback previously set by the m2mb_net_init function. The response event received in the callback will be the M2MB_NET_GET_SIGNAL_INFO_RESP. The resp_struct must be casted to the M2MB_NET_GET_SIGNAL_INFO_RESP_T type.
[in] | h | It is the handle to the NET service, previously initialized by the m2mb_net_init function. |
m2mb_net_get_signal_info(h);
M2MB_RESULT_E m2mb_net_init | ( | M2MB_NET_HANDLE * | h, |
m2mb_net_ind_callback | callback, | ||
void * | userdata | ||
) |
m2mb_net_init initializes NET service for current client.
m2mb_net_init initialize NET service for current client returning the handle that must be passed as first parameter for all NET actions. Calling the m2mb_net_init is mandatory before using the NET service.
[in] | *h | It is the handle to the NET service, that will be initialized by the function. |
[in] | callback | It is the callback that will be called if an event or a response happens. |
[in] | userdata | It is a pointer to generic user data that will be returned as it is in the callback. |
m2mb_net_init(&h, myCallback, myUserdata);
M2MB_RESULT_E m2mb_net_set_edrx_info | ( | M2MB_NET_HANDLE | h, |
M2MB_NET_ACC_TECH_TYPE_E | acc_tech, | ||
UINT8 | edrx, | ||
UINT8 | enabled | ||
) |
m2mb_net_set_edrx_info sets information about edrx.
m2mb_net_set_edrx_info sets information about edrx. The function is asynchronous. This means that the function returns immediately, but the signal information is received in the callback previously set by the m2mb_net_init function. The response event received in the callback will be the M2MB_NET_SET_EDRX_RESP. The resp_struct must be casted to the M2MB_NET_GENERIC_RESP_T type.
[in] | h | It is the handle to the NET service, previously initialized by the m2mb_net_init function. |
[in] | acc_tech | access technology to set eDRX. |
[in] | edrx | the edrx to set. |
[in] | enabled | to enable the edrx. |
m2mb_net_set_edrx_info(h);