18#ifndef AT_CELLULAR_NETWORK_H_
19#define AT_CELLULAR_NETWORK_H_
21#include "CellularNetwork.h"
23#include "AT_CellularDevice.h"
34#define AT_NETWORK_TRIALS 5
35#define TIMER_UNIT_LENGTH 3
36#define TWO_BYTES_HEX 4
37#define FOUR_BYTES_HEX 8
38#define ONE_BYTE_BINARY 8
53 enum RegistrationMode {
54 RegistrationModeDisable = 0,
55 RegistrationModeEnable,
78 CIoT_Preferred_UE_Opt preferred_opt,
79 Callback<
void(CIoT_Supported_Opt)> network_support_cb);
82 CIoT_Preferred_UE_Opt &preferred_opt);
131 void urc_cciotopti();
133 void read_reg_params_and_compare(RegistrationType type);
137 int calculate_active_time(
const char *active_time_string,
int active_time_length);
139 int calculate_periodic_tau(
const char *periodic_tau_string,
int periodic_tau_length);
142 void call_network_cb(nsapi_connection_status_t status);
145 Callback<void(nsapi_event_t, intptr_t)> _connection_status_cb;
146 Callback<void(CIoT_Supported_Opt)> _ciotopt_network_support_cb;
147 RadioAccessTechnology _op_act;
148 nsapi_connection_status_t _connect_status;
149 CIoT_Supported_Opt _supported_network_opt;
Class AT_CellularNetwork.
virtual nsapi_error_t set_packet_domain_event_reporting(bool on)
Sets the packet domain network reporting.
virtual nsapi_error_t clear()
Clear the network and contexts to a known default state.
virtual nsapi_error_t get_network_registering_mode(NWRegisteringMode &mode)
Get the current network registering mode.
virtual nsapi_error_t set_registration_urc(RegistrationType type, bool on)
Activate/deactivate listening of network events for the given RegistrationType.
virtual nsapi_error_t set_receive_period(int mode, EDRXAccessTechnology act_type, uint8_t edrx_value)
Set discontinuous reception time on cellular device.
virtual nsapi_error_t get_ciot_ue_optimization_config(CIoT_Supported_Opt &supported_opt, CIoT_Preferred_UE_Opt &preferred_opt)
Get UE CIoT optimizations.
virtual nsapi_error_t set_access_technology_impl(RadioAccessTechnology op_rat)
Sets access technology to be scanned.
virtual nsapi_error_t get_attach(AttachStatus &status)
Request attach status from network.
virtual void attach(Callback< void(nsapi_event_t, intptr_t)> status_cb)
Register callback for status reporting.
virtual nsapi_error_t get_operator_names(operator_names_list &op_names)
Read operator names.
virtual nsapi_error_t get_signal_quality(int &rssi, int *ber=NULL)
Get signal quality parameters.
virtual bool is_active_context(int *number_of_active_contexts=NULL, int cid=-1)
Check if there is any PDP context active.
virtual nsapi_error_t get_registration_params(registration_params_t ®_params)
Gets the latest received registration parameters from the network: type, status, access technology,...
virtual nsapi_error_t set_ciot_optimization_config(CIoT_Supported_Opt supported_opt, CIoT_Preferred_UE_Opt preferred_opt, Callback< void(CIoT_Supported_Opt)> network_support_cb)
Set CIoT optimizations.
virtual nsapi_error_t get_operator_params(int &format, operator_t&operator_params)
Get the operator parameters.
virtual nsapi_error_t get_ciot_network_optimization_config(CIoT_Supported_Opt &supported_network_opt)
Get Network CIoT optimizations.
virtual void get_context_state_command()
Sends a command to query the active state of the PDP contexts.
virtual nsapi_error_t set_access_technology(RadioAccessTechnology rat)
Sets radio access technology.
virtual nsapi_error_t scan_plmn(operList_t &operators, int &ops_count)
Scans for operators module can reach.
virtual nsapi_error_t set_attach()
Request attach to network.
virtual int get_3gpp_error()
Get the last 3GPP error code.
virtual nsapi_error_t detach()
Request detach and deregister from a network.
virtual nsapi_error_t set_registration(const char *plmn=0)
Request registering to network.
virtual nsapi_error_t get_registration_params(RegistrationType type, registration_params_t ®_params)
Gets the current network registration parameters from the network with type: status,...
Class for sending AT commands and parsing AT responses.
Callback class based on template specialization.
An abstract interface for connecting to a network and getting information from it.
NWRegisteringMode
Network registering mode.
signed int nsapi_error_t
Type used to represent error codes.
3GPP TS 27.007 - 7.3 PLMN selection +COPS
Network registration information.