takashi kadono / Mbed OS Nucleo_446

Dependencies:   ssd1331

Embed: (wiki syntax)

« Back to documentation index

CellularDevice Class Reference

CellularDevice Class Reference

Class CellularDevice. More...

#include <CellularDevice.h>

Inherited by AT_CellularDevice.

Public Member Functions

virtual events::EventQueueget_queue () const
 Get event queue that can be chained to main event queue.
 CellularDevice ()
 Default constructor.
virtual ~CellularDevice ()
 virtual Destructor
virtual CellularNetworkopen_network (FileHandle *fh)=0
 Create new CellularNetwork interface.
virtual CellularSMSopen_sms (FileHandle *fh)=0
 Create new CellularSMS interface.
virtual CellularPoweropen_power (FileHandle *fh)=0
 Create new CellularPower interface.
virtual CellularSIMopen_sim (FileHandle *fh)=0
 Create new CellularSIM interface.
virtual CellularInformationopen_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.

Static Public Member Functions

static CellularDeviceget_default_instance ()
 Return singleton instance of CellularDevice if CELLULAR_DEVICE is defined.

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 43 of file CellularDevice.h.


Constructor & Destructor Documentation

Default constructor.

Definition at line 42 of file CellularDevice.cpp.

virtual ~CellularDevice (  ) [virtual]

virtual Destructor

Definition at line 65 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.

MBED_WEAK CellularDevice * get_default_instance (  ) [static]

Return singleton instance of CellularDevice if CELLULAR_DEVICE is defined.

If CELLULAR_DEVICE is not defined then returns NULL. Implementation is marked as weak.

Returns:
CellularDevice* instance if any

Definition at line 29 of file CellularDevice.cpp.

events::EventQueue * get_queue (  ) const [virtual]

Get event queue that can be chained to main event queue.

EventQueue is created in get_default_instance() or given to CELLULAR_DEVICE (for example TELIT_HE910 class).

Returns:
event queue

Reimplemented in AT_CellularDevice.

Definition at line 47 of file CellularDevice.cpp.

virtual NetworkStack* get_stack (  ) [pure virtual]

Get network stack.

Returns:
network stack

Implemented in AT_CellularDevice.

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:
fhfile 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:
onset true to enable debug traces

Implemented in AT_CellularDevice.

virtual CellularInformation* open_information ( FileHandle fh ) [pure virtual]

Create new CellularInformation interface.

Parameters:
fhfile 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:
fhfile 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:
fhfile 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:
fhfile 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:
fhfile 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:
timeoutmilliseconds to wait response from modem

Implemented in AT_CellularDevice.