File Information
Library: IoT/MobileConnection
Package: Generated
Header: IoT/MobileConnection/IMobileConnectionService.h
Description
The MobileConnectionService interface is used to configure and establish a mobile data connection.
Inheritance
Direct Base Classes: Poco::OSP::Service
All Base Classes: Poco::OSP::Service, Poco::RefCountedObject
Known Derived Classes: MobileConnectionServiceRemoteObject
Member Summary
Member Functions: authenticate, connectData, deviceName, disconnectData, enableRadio, enterPIN, getAPN, getPDPType, iccid, imei, imsi, isA, isDataConnected, isRadioEnabled, lockSIM, networkOperator, phoneNumber, radioAccessTechnology, registrationStatus, remoting__enableEvents, remoting__typeId, setAPN, setPDPType, signalStrength, simState, type, unlockSIM
Inherited Functions: duplicate, isA, referenceCount, release, type
Types Aliases
Ptr
using Ptr = Poco::AutoPtr < IMobileConnectionService >;
Constructors
IMobileConnectionService
Creates a IMobileConnectionService.
Destructor
~IMobileConnectionService
virtual ~IMobileConnectionService();
Destroys the IMobileConnectionService.
Member Functions
authenticate
virtual void authenticate(
IoT::MobileConnection::AuthMethod method,
const std::string & username,
const std::string & password
) = 0;
Provide the credentials for the mobile data connection.
connectData
virtual void connectData() = 0;
Establishes the data connection.
deviceName
virtual std::string deviceName() const = 0;
Returns the modem device name.
disconnectData
virtual void disconnectData() = 0;
Closes the data connection.
enableRadio
virtual void enableRadio(
bool enable
) = 0;
Enables or disables the radio.
enterPIN
virtual void enterPIN(
const std::string & pin
) = 0;
Provides the given PIN to the SIM.
getAPN
virtual std::string getAPN() const = 0;
Returns the configured Access Point Name (APN) for the mobile data connection.
getPDPType
virtual IoT::MobileConnection::PDPType getPDPType() const = 0;
Returns the PDP Type for the mobile data connection.
iccid
virtual std::string iccid() const = 0;
Returns the SIMs ICCID (Integrated Circuit Card Identifier).
imei
virtual std::string imei() const = 0;
Returns the IMEI (International Mobile Equipment Identity).
imsi
virtual std::string imsi() const = 0;
Returns the SIM's IMSI (International Mobile Subscriber Identity).
isA
bool isA(
const std::type_info & otherType
) const;
Returns true if the class is a subclass of the class given by otherType.
See also: Poco::OSP::Service::isA()
isDataConnected
virtual bool isDataConnected() = 0;
Returns true if the data connection is available.
isRadioEnabled
virtual bool isRadioEnabled() const = 0;
Returns true if the radio is enabled, otherwise false.
lockSIM
virtual void lockSIM(
const std::string & pin
) = 0;
Locks the SIM, using the given PIN.
networkOperator
virtual std::string networkOperator() const = 0;
Returns the name of the network operator, if available, or an empty string otherwise.
phoneNumber
virtual std::string phoneNumber() const = 0;
Returns the phone number associated with the SIM.
radioAccessTechnology
virtual IoT::MobileConnection::RadioAccessTechnology radioAccessTechnology() const = 0;
Returns the radio access technology (RAT) used to connect to the mobile network.
registrationStatus
virtual IoT::MobileConnection::RegistrationStatus registrationStatus() const = 0;
Returns the network registration status.
remoting__enableEvents
virtual std::string remoting__enableEvents(
Poco::RemotingNG::Listener::Ptr pListener,
bool enable = bool (true)
) = 0;
Enable or disable delivery of remote events.
The given Listener instance must implement the Poco::RemotingNG::EventListener interface, otherwise this method will fail with a RemotingException.
This method is only used with Proxy objects; calling this method on a RemoteObject will do nothing.
remoting__typeId
static const Poco::RemotingNG::Identifiable::TypeId & remoting__typeId();
Returns the TypeId of the class.
setAPN
virtual void setAPN(
const std::string & apn
) = 0;
Sets the Access Point Name (APN) for the mobile data connection.
setPDPType
virtual void setPDPType(
IoT::MobileConnection::PDPType type
) = 0;
Sets the PDP Type for the mobile data connection.
signalStrength
virtual int signalStrength() const = 0;
Returns the signal strength in a range from 0 to 5 (suitable for displaying corresponding "signal strength bars").
- 0: No signal.
- 1: Very weak signal.
- 2: Weak signal strength.
- 3: Good signal strength.
- 4: Strong signal strength.
- 5: Very strong signal strength.
Returns -1 if the signal strength cannot be obtained.
simState
virtual IoT::MobileConnection::SIMState simState() const = 0;
Returns the current state of the SIM.
type
const std::type_info & type() const;
Returns the type information for the object's class.
See also: Poco::OSP::Service::type()
unlockSIM
virtual void unlockSIM(
const std::string & pin
) = 0;
Unlocks the SIM, using the given PIN.
Variables
dataConnected
Poco::BasicEvent < void > dataConnected;
dataDisconnected
Poco::BasicEvent < void > dataDisconnected;