gsmGetProviderList (Functionblock) |
Top Previous Next |
This function block can be used to get a list of available GSM providers. This function can be called during an active mobile network session.
It is possible to use the gsmSetProvider() function to select a different operator.
Note: This operation can take a long time to execute - up to 2 minutes. This function may fail if the GSM module is busy or the GSM coverage is reduced. In this case, it is recommended to wait a minimum of 30 seconds and retry the operation. It is recommended not to call this function more frequently than every 5 minutes.
Input: None.
Output: status : INT (0..1) 0 - If list is available. 1 - If an error occurred while getting the list or during a GSM module power-off.
CurrentLAI : DINT The GSM Public Land Mobile Network number (PLMN) of the current provider.
LAI : ARRAY[1..16] OF DINT The GSM PLMN number of the provider "n".
Name : ARRAY[1..16] OF STRING The name of the provider "n".
State : ARRAY[1..16] OF SINT The state of the provider "n": 0=unknown, 1=operator available, 2=current operator (registered), 3=forbidden operator.
Declaration: FUNCTION_BLOCK gsmGetProviderList;
Example: //----------------------------------------------------------------------------- |