Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: nRF51_Vdd TextLCD BME280
CellularDevice Class Reference
Class CellularDevice. More...
#include <CellularDevice.h>
Inherited by AT_CellularDevice.
Public Member Functions | |
virtual | ~CellularDevice () |
virtual Destructor | |
virtual CellularNetwork * | open_network (FileHandle *fh)=0 |
Create new CellularNetwork interface. | |
virtual CellularSMS * | open_sms (FileHandle *fh)=0 |
Create new CellularSMS interface. | |
virtual CellularPower * | open_power (FileHandle *fh)=0 |
Create new CellularPower interface. | |
virtual CellularSIM * | open_sim (FileHandle *fh)=0 |
Create new CellularSIM interface. | |
virtual CellularInformation * | open_information (FileHandle *fh)=0 |
Create new CellularInformation interface. | |
virtual void | close_network ()=0 |
Closes the opened CellularNetwork by deleting the CellularNetwork instance. | |
virtual void | close_sms ()=0 |
Closes the opened CellularSMS by deleting the CellularSMS instance. | |
virtual void | close_power ()=0 |
Closes the opened CellularPower by deleting the CellularPower instance. | |
virtual void | close_sim ()=0 |
Closes the opened CellularSIM by deleting the CellularSIM instance. | |
virtual void | close_information ()=0 |
Closes the opened CellularInformation by deleting the CellularInformation instance. | |
virtual void | set_timeout (int timeout)=0 |
Set the default response timeout. | |
virtual void | modem_debug_on (bool on)=0 |
Turn modem debug traces on. | |
virtual NetworkStack * | get_stack ()=0 |
Get network stack. | |
virtual nsapi_error_t | init_module (FileHandle *fh)=0 |
Initialize cellular module must be called right after module is ready. |
Detailed Description
Class CellularDevice.
An abstract interface that defines opening and closing of cellular interfaces. Deleting/Closing of opened interfaces can be done only via this class.
Definition at line 38 of file CellularDevice.h.
Constructor & Destructor Documentation
virtual ~CellularDevice | ( | ) | [virtual] |
virtual Destructor
Definition at line 42 of file CellularDevice.h.
Member Function Documentation
virtual void close_information | ( | ) | [pure virtual] |
Closes the opened CellularInformation by deleting the CellularInformation instance.
Implemented in AT_CellularDevice.
virtual void close_network | ( | ) | [pure virtual] |
Closes the opened CellularNetwork by deleting the CellularNetwork instance.
Implemented in AT_CellularDevice.
virtual void close_power | ( | ) | [pure virtual] |
Closes the opened CellularPower by deleting the CellularPower instance.
Implemented in AT_CellularDevice.
virtual void close_sim | ( | ) | [pure virtual] |
Closes the opened CellularSIM by deleting the CellularSIM instance.
Implemented in AT_CellularDevice.
virtual void close_sms | ( | ) | [pure virtual] |
Closes the opened CellularSMS by deleting the CellularSMS instance.
Implemented in AT_CellularDevice.
virtual NetworkStack* get_stack | ( | ) | [pure virtual] |
virtual nsapi_error_t init_module | ( | FileHandle * | fh ) | [pure virtual] |
Initialize cellular module must be called right after module is ready.
For example, when multiple modules are supported in a single AT driver this function detects and adapts to an actual module at runtime.
- Parameters:
-
fh file handle used in communication to modem.
- Returns:
- 0 on success
Implemented in AT_CellularDevice.
virtual void modem_debug_on | ( | bool | on ) | [pure virtual] |
Turn modem debug traces on.
- Parameters:
-
on set true to enable debug traces
Implemented in AT_CellularDevice.
virtual CellularInformation* open_information | ( | FileHandle * | fh ) | [pure virtual] |
Create new CellularInformation interface.
- Parameters:
-
fh file handle used in communication to modem. Can be for example UART handle.
- Returns:
- New instance of interface CellularInformation.
Implemented in AT_CellularDevice.
virtual CellularNetwork* open_network | ( | FileHandle * | fh ) | [pure virtual] |
Create new CellularNetwork interface.
- Parameters:
-
fh file handle used in communication to modem. Can be for example UART handle.
- Returns:
- New instance of interface CellularNetwork.
Implemented in AT_CellularDevice.
virtual CellularPower* open_power | ( | FileHandle * | fh ) | [pure virtual] |
Create new CellularPower interface.
- Parameters:
-
fh file handle used in communication to modem. Can be for example UART handle.
- Returns:
- New instance of interface CellularPower.
Implemented in AT_CellularDevice.
virtual CellularSIM* open_sim | ( | FileHandle * | fh ) | [pure virtual] |
Create new CellularSIM interface.
- Parameters:
-
fh file handle used in communication to modem. Can be for example UART handle.
- Returns:
- New instance of interface CellularSIM.
Implemented in AT_CellularDevice.
virtual CellularSMS* open_sms | ( | FileHandle * | fh ) | [pure virtual] |
Create new CellularSMS interface.
- Parameters:
-
fh file handle used in communication to modem. Can be for example UART handle.
- Returns:
- New instance of interface CellularSMS.
Implemented in AT_CellularDevice.
virtual void set_timeout | ( | int | timeout ) | [pure virtual] |
Set the default response timeout.
- Parameters:
-
timeout milliseconds to wait response from modem
Implemented in AT_CellularDevice.
Generated on Tue Jul 12 2022 15:16:19 by
