Legrand / Raritan / Server Technology Xerus™ PDU JSON-RPC API
|
Interface for communication with a GSM modem attached to a serial port. More...
import"GsmModem.idl";
Classes | |
struct | Information |
Structure holding information about the modem and the SIM card. More... | |
struct | Settings |
Structure for holding settings of the GSM modem and its SIM card. More... | |
struct | SimPinUpdatedEvent |
Sim pin updated event. More... | |
struct | SimSecurityStatusChangedEvent |
Sim card security status changed event. More... | |
Public Types | |
enum | SimSecurityStatus { UNLOCKED , WAITFORPIN , WAITFORPUK , UNKNOWN } |
Possible security states the sim card can be in at a given time. More... | |
Public Member Functions | |
Settings | getSettings () |
Get modem settings. More... | |
int | setSettings (in Settings settings) |
Set modem settings. More... | |
int | sendSms (in string recipient, in string text) |
Send out a SMS message. More... | |
int | sendTestSms (in string recipient, in Settings testSettings) |
Send out a test SMS message. More... | |
int | getInformation (out Information info) |
Retrieve low-level information about the modem and the SIM card. More... | |
int | getInformationWithPin (in string pin, out Information info) |
Retrieve low-level information about the modem and the SIM card. More... | |
int | getSimSecurityStatus (out SimSecurityStatus simStatus) |
Retrieve security status of the SIM card. More... | |
int | unlockSimCard (in string puk, in string newPin) |
Unlock SIM card with PUK and set new PIN if the SIM card is in security status WAITFORPUK. More... | |
Public Attributes | |
constant int | SUCCESS = 0 |
Error codes. More... | |
constant int | ERR_INVALID_VALUE = 1 |
Invalid argument. | |
constant int | ERR_WRONG_PIN = 2 |
The PIN is incorrect or missing. | |
constant int | ERR_SMS_SEND_FAILED = 3 |
SMS delivery failed. | |
constant int | ERR_COMMUNICATION_FAILURE = 4 |
Communication with the modem failed. | |
constant int | ERR_SIM_LOCKED = 5 |
The SIM card is locked and waits for the PUK. | |
constant int | ERR_WRONG_SIM_STATUS = 6 |
The SIM card doesn't wait for the PUK. | |
constant int | ERR_WRONG_PUK = 7 |
The PUK is incorrect or missing. | |
constant int | ERR_SIM_PROBLEM = 8 |
There is a problem with the SIM or service subscription. | |
Interface for communication with a GSM modem attached to a serial port.
int serial::GsmModem::getInformation | ( | out Information | info | ) |
Retrieve low-level information about the modem and the SIM card.
info | – structure holding the returned information |
int serial::GsmModem::getInformationWithPin | ( | in string | pin, |
out Information | info | ||
) |
Retrieve low-level information about the modem and the SIM card.
Like getInformation, but allows providing a PIN not stored in the settings
pin | – PIN to use for authentication |
info | – structure holding the returned information |
Settings serial::GsmModem::getSettings | ( | ) |
Get modem settings.
int serial::GsmModem::getSimSecurityStatus | ( | out SimSecurityStatus | simStatus | ) |
Retrieve security status of the SIM card.
simStatus | – SIM card security status |
int serial::GsmModem::sendSms | ( | in string | recipient, |
in string | text | ||
) |
Send out a SMS message.
recipient | – Phone number of the message recipient in ITU-T E.164 format |
text | – Message text (will be sent in multiple messages if longer than 160 characters) |
int serial::GsmModem::sendTestSms | ( | in string | recipient, |
in Settings | testSettings | ||
) |
Send out a test SMS message.
The message will be sent to the selected recipient with the text 'SMS Test'.
recipient | – Phone number of the message recipient in ITU-T E.164 format |
testSettings | – Modem settings to be used temporarily during testing |
int serial::GsmModem::setSettings | ( | in Settings | settings | ) |
Set modem settings.
settings | – New settings |
int serial::GsmModem::unlockSimCard | ( | in string | puk, |
in string | newPin | ||
) |
Unlock SIM card with PUK and set new PIN if the SIM card is in security status WAITFORPUK.
The new PIN is automatically saved in the settings.
puk | – PUK to use for authentication |
newPin | – new PIN to use for future authentication |
constant int serial::GsmModem::SUCCESS = 0 |
Error codes.
No error