18 #ifndef AT_CELLULAR_DEVICE_H_    19 #define AT_CELLULAR_DEVICE_H_    22 #include "ATHandler.h"    26 class AT_CellularInformation;
    27 class AT_CellularNetwork;
    29 class AT_CellularContext;
    45     enum CellularProperty {
    49         PROPERTY_AT_CGSN_WITH_TYPE,     
    56         PROPERTY_IPV4_PDP_TYPE,         
    57         PROPERTY_IPV6_PDP_TYPE,         
    58         PROPERTY_IPV4V6_PDP_TYPE,       
    59         PROPERTY_NON_IP_PDP_TYPE,       
    61         PROPERTY_AT_COPS_FALLBACK_AUTO, 
    62         PROPERTY_SOCKET_COUNT,          
    65         PROPERTY_AT_SEND_DELAY,         
   119 #if MBED_CONF_CELLULAR_USE_SMS   164 #if MBED_CONF_CELLULAR_USE_SMS   170     virtual AT_CellularSMS *open_sms_impl(
ATHandler &at);
   171 #endif // MBED_CONF_CELLULAR_USE_SMS   174     void send_disconnect_to_context(
int cid);
   178     virtual void set_at_urcs_impl();
   181     void setup_at_handler();
   186     void urc_pdn_deact();
   192 #if MBED_CONF_CELLULAR_USE_SMS   193     AT_CellularSMS *_sms;
   194 #endif // MBED_CONF_CELLULAR_USE_SMS   200     std::chrono::duration<int, std::milli> _default_timeout;
   201     bool _modem_debug_on;
   202     const intptr_t *_property_array;
   206 #endif // AT_CELLULAR_DEVICE_H_ virtual nsapi_error_t get_sim_state(SimState &state)
Get SIM card's state. 
virtual CellularNetwork * open_network()
Create new CellularNetwork interface. 
virtual AT_CellularContext * create_context_impl(ATHandler &at, const char *apn, bool cp_req=false, bool nonip_req=false)
Creates new instance of AT_CellularContext or if overridden, modem specific implementation. 
virtual void close_information()
Closes the opened CellularInformation by deleting the CellularInformation instance. 
virtual void set_ready_cb(Callback< void()> callback)
Set callback function to listen when device is ready. 
virtual CellularInformation * open_information()
Create new CellularInformation interface. 
virtual nsapi_error_t set_baud_rate(int baud_rate)
Sets cellular modem to given baud rate. 
virtual void close_sms()=0
Closes the opened CellularSMS by deleting the CellularSMS instance. 
intptr_t get_property(CellularProperty key)
Get value for the given key. 
CellularContext is CellularInterface/NetworkInterface with extensions for cellular connectivity...
virtual nsapi_error_t is_ready()
Check whether the device is ready to accept commands. 
virtual nsapi_error_t set_pin(const char *sim_pin)
Open the SIM card by setting the pin code for SIM. 
void set_cellular_properties(const intptr_t *property_array)
Cellular module need to define an array of cellular properties which defines module supported propert...
signed int nsapi_error_t
Type used to represent error codes. 
virtual void cellular_callback(nsapi_event_t ev, intptr_t ptr, CellularContext *ctx=NULL)
Cellular callback to be attached to Network and CellularStateMachine classes. 
virtual nsapi_error_t soft_power_on()
Powers up the modem. 
virtual ATHandler * get_at_handler()
Get the current ATHandler instance in use for debug purposes etc. 
virtual nsapi_error_t soft_power_off()
Powers down the modem. 
virtual CellularContext * get_context_list() const 
Get the linked list of CellularContext instances. 
virtual nsapi_error_t shutdown()
Shutdown cellular device to minimum functionality. 
virtual void close_network()
Closes the opened CellularNetwork by deleting the CellularNetwork instance. 
virtual AT_CellularNetwork * open_network_impl(ATHandler &at)
Create new instance of AT_CellularNetwork or if overridden, modem specific implementation. 
virtual AT_CellularInformation * open_information_impl(ATHandler &at)
Create new instance of AT_CellularInformation or if overridden, modem specific implementation. 
An abstract interface for connecting to a network and getting information from it. 
virtual nsapi_error_t init()
Initialize cellular device must be called right after the module is ready. 
virtual nsapi_error_t hard_power_on()
Sets the modem up for powering on This is equivalent to plugging in the device, i.e., attaching power and serial port. 
virtual nsapi_error_t hard_power_off()
Sets the modem in unplugged state. 
virtual CellularContext * create_context(const char *apn=NULL, bool cp_req=false, bool nonip_req=false)
Creates a new CellularContext interface. 
virtual nsapi_error_t clear()
Clear modem to a default initial state. 
virtual void delete_context(CellularContext *context)
Deletes the given CellularContext instance. 
virtual void set_timeout(int timeout)
Set the default response timeout. 
virtual void modem_debug_on(bool on)
Turn modem debug traces on. 
Class AT_CellularNetwork. 
virtual CellularSMS * open_sms()=0
Create new CellularSMS interface. 
virtual nsapi_error_t set_power_save_mode(int periodic_time, int active_time=0)
Set power save mode. 
Callback class based on template specialization. 
Class for sending AT commands and parsing AT responses.