diff --git a/UNITTESTS/features/cellular/framework/device/cellularcontext/cellularcontexttest.cpp b/UNITTESTS/features/cellular/framework/device/cellularcontext/cellularcontexttest.cpp index 7ede92ca4c..2f4ac22533 100644 --- a/UNITTESTS/features/cellular/framework/device/cellularcontext/cellularcontexttest.cpp +++ b/UNITTESTS/features/cellular/framework/device/cellularcontext/cellularcontexttest.cpp @@ -111,22 +111,6 @@ public: virtual void set_credentials(const char *apn, const char *uname = 0, const char *pwd = 0) { } - nsapi_error_t get_netmask(SocketAddress *address) - { - return NSAPI_ERROR_UNSUPPORTED; - } - virtual const char *get_netmask() - { - return NULL; - } - nsapi_error_t get_gateway(SocketAddress *address) - { - return NSAPI_ERROR_UNSUPPORTED; - } - virtual const char *get_gateway() - { - return NULL; - } virtual bool is_connected() { return false; diff --git a/UNITTESTS/stubs/AT_CellularContext_stub.cpp b/UNITTESTS/stubs/AT_CellularContext_stub.cpp index abe5a14c52..f597601fe2 100644 --- a/UNITTESTS/stubs/AT_CellularContext_stub.cpp +++ b/UNITTESTS/stubs/AT_CellularContext_stub.cpp @@ -149,26 +149,6 @@ void AT_CellularContext::set_credentials(const char *apn, const char *uname, con } -nsapi_error_t AT_CellularContext::get_netmask(SocketAddress *address) -{ - return NSAPI_ERROR_UNSUPPORTED; -} - -const char *AT_CellularContext::get_netmask() -{ - return NULL; -} - -nsapi_error_t AT_CellularContext::get_gateway(SocketAddress *address) -{ - return NSAPI_ERROR_UNSUPPORTED; -} - -const char *AT_CellularContext::get_gateway() -{ - return NULL; -} - AT_CellularDevice::CellularProperty AT_CellularContext::pdp_type_t_to_cellular_property(pdp_type_t pdp_type) { AT_CellularDevice::CellularProperty prop = AT_CellularDevice::PROPERTY_IPV4_PDP_TYPE; diff --git a/UNITTESTS/stubs/CellularDevice_stub.cpp b/UNITTESTS/stubs/CellularDevice_stub.cpp index df2e08892b..06cf8be211 100644 --- a/UNITTESTS/stubs/CellularDevice_stub.cpp +++ b/UNITTESTS/stubs/CellularDevice_stub.cpp @@ -64,11 +64,6 @@ void CellularDevice::set_sim_pin(char const *) { } -CellularContext *CellularDevice::get_context_list() const -{ - return NULL; -} - void CellularDevice::get_retry_timeout_array(uint16_t *timeout, int &array_len) const { array_len = CellularDevice_stub::retry_array_length; @@ -128,8 +123,3 @@ nsapi_error_t CellularDevice::shutdown() void CellularDevice::cellular_callback(nsapi_event_t ev, intptr_t ptr, CellularContext *ctx) { } - -nsapi_error_t CellularDevice::clear() -{ - return NSAPI_ERROR_OK; -} diff --git a/UNITTESTS/target_h/myCellularContext.h b/UNITTESTS/target_h/myCellularContext.h index eedba40982..a101dc6c41 100644 --- a/UNITTESTS/target_h/myCellularContext.h +++ b/UNITTESTS/target_h/myCellularContext.h @@ -135,26 +135,6 @@ public: }; - nsapi_error_t get_netmask(SocketAddress *address) - { - return NSAPI_ERROR_UNSUPPORTED; - } - - const char *get_netmask() - { - return NULL; - }; - - nsapi_error_t get_gateway(SocketAddress *address) - { - return NSAPI_ERROR_UNSUPPORTED; - } - - const char *get_gateway() - { - return NULL; - }; - bool get_context() { return true; diff --git a/features/cellular/framework/API/CellularContext.h b/features/cellular/framework/API/CellularContext.h index ad28d00eb8..1f3b4a7522 100644 --- a/features/cellular/framework/API/CellularContext.h +++ b/features/cellular/framework/API/CellularContext.h @@ -146,12 +146,6 @@ public: // from NetworkInterface virtual nsapi_error_t connect(const char *sim_pin, const char *apn = 0, const char *uname = 0, const char *pwd = 0) = 0; virtual void set_credentials(const char *apn, const char *uname = 0, const char *pwd = 0) = 0; - virtual nsapi_error_t get_netmask(SocketAddress *address) = 0; - MBED_DEPRECATED_SINCE("mbed-os-5.15", "String-based APIs are deprecated") - virtual const char *get_netmask() = 0; - virtual nsapi_error_t get_gateway(SocketAddress *address) = 0; - MBED_DEPRECATED_SINCE("mbed-os-5.15", "String-based APIs are deprecated") - virtual const char *get_gateway() = 0; virtual bool is_connected() = 0; /** Same as NetworkInterface::get_default_instance() diff --git a/features/cellular/framework/API/CellularDevice.h b/features/cellular/framework/API/CellularDevice.h index bbeb0ef5f8..1f9e135dc8 100644 --- a/features/cellular/framework/API/CellularDevice.h +++ b/features/cellular/framework/API/CellularDevice.h @@ -97,18 +97,6 @@ public: public: //Virtual functions - /** Clear modem to a default initial state - * - * Clear persistent user data from the modem, such as PDP contexts. - * - * @pre All open network services on modem, such as contexts and sockets, must be closed. - * @post Modem power off/on may be needed to clear modem's runtime state. - * @remark CellularStateMachine calls this on connect when `cellular.clear-on-connect: true`. - * - * @return NSAPI_ERROR_OK on success, otherwise modem may be need power cycling - */ - virtual nsapi_error_t clear(); - /** Shutdown cellular device to minimum functionality. * * Actual functionality is modem specific, for example UART may is not be responsive without @@ -121,12 +109,6 @@ public: //Virtual functions */ virtual nsapi_error_t shutdown(); - /** Get the linked list of CellularContext instances - * - * @return Pointer to first item in linked list - */ - virtual CellularContext *get_context_list() const; - /** Get event queue that can be chained to main event queue. * @return event queue */ @@ -142,6 +124,25 @@ protected: //Virtual functions public: //Pure virtual functions + /** Clear modem to a default initial state + * + * Clear persistent user data from the modem, such as PDP contexts. + * + * @pre All open network services on modem, such as contexts and sockets, must be closed. + * @post Modem power off/on may be needed to clear modem's runtime state. + * @remark CellularStateMachine calls this on connect when `cellular.clear-on-connect: true`. + * + * @return NSAPI_ERROR_OK on success, otherwise modem may be need power cycling + */ + virtual nsapi_error_t clear() = 0; + + + /** Get the linked list of CellularContext instances + * + * @return Pointer to first item in linked list + */ + virtual CellularContext *get_context_list() const = 0; + /** Sets the modem up for powering on * This is equivalent to plugging in the device, i.e., attaching power and serial port. * In general, hard_power_on and soft_power_on provides a simple hardware abstraction layer diff --git a/features/cellular/framework/AT/AT_CellularContext.cpp b/features/cellular/framework/AT/AT_CellularContext.cpp index fdb555062e..575094de16 100644 --- a/features/cellular/framework/AT/AT_CellularContext.cpp +++ b/features/cellular/framework/AT/AT_CellularContext.cpp @@ -213,26 +213,6 @@ NetworkStack *AT_CellularContext::get_stack() return _stack; } -nsapi_error_t AT_CellularContext::get_netmask(SocketAddress *address) -{ - return NSAPI_ERROR_UNSUPPORTED; -} - -const char *AT_CellularContext::get_netmask() -{ - return NULL; -} - -nsapi_error_t AT_CellularContext::get_gateway(SocketAddress *address) -{ - return NSAPI_ERROR_UNSUPPORTED; -} - -const char *AT_CellularContext::get_gateway() -{ - return NULL; -} - nsapi_error_t AT_CellularContext::get_ip_address(SocketAddress *address) { if (!address) { diff --git a/features/cellular/framework/AT/AT_CellularContext.h b/features/cellular/framework/AT/AT_CellularContext.h index d3ccac843c..49c425ca83 100644 --- a/features/cellular/framework/AT/AT_CellularContext.h +++ b/features/cellular/framework/AT/AT_CellularContext.h @@ -48,10 +48,6 @@ public: virtual nsapi_error_t connect(const char *sim_pin, const char *apn = 0, const char *uname = 0, const char *pwd = 0); virtual void set_credentials(const char *apn, const char *uname = 0, const char *pwd = 0); - virtual nsapi_error_t get_netmask(SocketAddress *address); - virtual const char *get_netmask(); - virtual nsapi_error_t get_gateway(SocketAddress *address); - virtual const char *get_gateway(); // from CellularContext virtual nsapi_error_t get_pdpcontext_params(pdpContextList_t ¶ms_list); diff --git a/features/cellular/framework/device/CellularDevice.cpp b/features/cellular/framework/device/CellularDevice.cpp index 43c356b507..12b3092589 100644 --- a/features/cellular/framework/device/CellularDevice.cpp +++ b/features/cellular/framework/device/CellularDevice.cpp @@ -74,11 +74,6 @@ events::EventQueue *CellularDevice::get_queue() return &_queue; } -CellularContext *CellularDevice::get_context_list() const -{ - return NULL; -} - void CellularDevice::get_retry_timeout_array(uint16_t *timeout, int &array_len) const { if (_state_machine && timeout) { @@ -261,10 +256,4 @@ void CellularDevice::set_retry_timeout_array(const uint16_t timeout[], int array } } -nsapi_error_t CellularDevice::clear() -{ - return NSAPI_ERROR_OK; -} - - } // namespace mbed diff --git a/features/netsocket/CellularInterface.h b/features/netsocket/CellularInterface.h index 7a47e467eb..d77c532bc7 100644 --- a/features/netsocket/CellularInterface.h +++ b/features/netsocket/CellularInterface.h @@ -101,18 +101,6 @@ public: MBED_DEPRECATED_SINCE("mbed-os-5.15", "String-based APIs are deprecated") virtual const char *get_ip_address() = 0; - /** @copydoc NetworkInterface::get_netmask */ - virtual nsapi_error_t get_netmask(SocketAddress *address) = 0; - - MBED_DEPRECATED_SINCE("mbed-os-5.15", "String-based APIs are deprecated") - virtual const char *get_netmask() = 0; - - /** @copydoc NetworkInterface::get_gateway */ - virtual nsapi_error_t get_gateway(SocketAddress *address) = 0; - - MBED_DEPRECATED_SINCE("mbed-os-5.15", "String-based APIs are deprecated") - virtual const char *get_gateway() = 0; - /** @copydoc NetworkInterface::cellularInterface */ virtual CellularInterface *cellularInterface()