mirror of https://github.com/ARMmbed/mbed-os.git
Cellular: Remove API's empty default implemetations
parent
b08dc22e27
commit
e2048b06b2
|
@ -111,22 +111,6 @@ public:
|
||||||
virtual void set_credentials(const char *apn, const char *uname = 0, const char *pwd = 0)
|
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()
|
virtual bool is_connected()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -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 AT_CellularContext::pdp_type_t_to_cellular_property(pdp_type_t pdp_type)
|
||||||
{
|
{
|
||||||
AT_CellularDevice::CellularProperty prop = AT_CellularDevice::PROPERTY_IPV4_PDP_TYPE;
|
AT_CellularDevice::CellularProperty prop = AT_CellularDevice::PROPERTY_IPV4_PDP_TYPE;
|
||||||
|
|
|
@ -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
|
void CellularDevice::get_retry_timeout_array(uint16_t *timeout, int &array_len) const
|
||||||
{
|
{
|
||||||
array_len = CellularDevice_stub::retry_array_length;
|
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)
|
void CellularDevice::cellular_callback(nsapi_event_t ev, intptr_t ptr, CellularContext *ctx)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
nsapi_error_t CellularDevice::clear()
|
|
||||||
{
|
|
||||||
return NSAPI_ERROR_OK;
|
|
||||||
}
|
|
||||||
|
|
|
@ -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()
|
bool get_context()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -146,12 +146,6 @@ public: // from NetworkInterface
|
||||||
virtual nsapi_error_t connect(const char *sim_pin, const char *apn = 0, const char *uname = 0,
|
virtual nsapi_error_t connect(const char *sim_pin, const char *apn = 0, const char *uname = 0,
|
||||||
const char *pwd = 0) = 0;
|
const char *pwd = 0) = 0;
|
||||||
virtual void set_credentials(const char *apn, 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;
|
virtual bool is_connected() = 0;
|
||||||
|
|
||||||
/** Same as NetworkInterface::get_default_instance()
|
/** Same as NetworkInterface::get_default_instance()
|
||||||
|
|
|
@ -97,18 +97,6 @@ public:
|
||||||
|
|
||||||
public: //Virtual functions
|
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.
|
/** Shutdown cellular device to minimum functionality.
|
||||||
*
|
*
|
||||||
* Actual functionality is modem specific, for example UART may is not be responsive without
|
* 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();
|
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.
|
/** Get event queue that can be chained to main event queue.
|
||||||
* @return event queue
|
* @return event queue
|
||||||
*/
|
*/
|
||||||
|
@ -142,6 +124,25 @@ protected: //Virtual functions
|
||||||
|
|
||||||
public: //Pure 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
|
/** Sets the modem up for powering on
|
||||||
* This is equivalent to plugging in the device, i.e., attaching power and serial port.
|
* 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
|
* In general, hard_power_on and soft_power_on provides a simple hardware abstraction layer
|
||||||
|
|
|
@ -213,26 +213,6 @@ NetworkStack *AT_CellularContext::get_stack()
|
||||||
return _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)
|
nsapi_error_t AT_CellularContext::get_ip_address(SocketAddress *address)
|
||||||
{
|
{
|
||||||
if (!address) {
|
if (!address) {
|
||||||
|
|
|
@ -48,10 +48,6 @@ public:
|
||||||
virtual nsapi_error_t connect(const char *sim_pin, const char *apn = 0, const char *uname = 0,
|
virtual nsapi_error_t connect(const char *sim_pin, const char *apn = 0, const char *uname = 0,
|
||||||
const char *pwd = 0);
|
const char *pwd = 0);
|
||||||
virtual void set_credentials(const char *apn, 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
|
// from CellularContext
|
||||||
virtual nsapi_error_t get_pdpcontext_params(pdpContextList_t ¶ms_list);
|
virtual nsapi_error_t get_pdpcontext_params(pdpContextList_t ¶ms_list);
|
||||||
|
|
|
@ -74,11 +74,6 @@ events::EventQueue *CellularDevice::get_queue()
|
||||||
return &_queue;
|
return &_queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
CellularContext *CellularDevice::get_context_list() const
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CellularDevice::get_retry_timeout_array(uint16_t *timeout, int &array_len) const
|
void CellularDevice::get_retry_timeout_array(uint16_t *timeout, int &array_len) const
|
||||||
{
|
{
|
||||||
if (_state_machine && timeout) {
|
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
|
} // namespace mbed
|
||||||
|
|
|
@ -101,18 +101,6 @@ public:
|
||||||
MBED_DEPRECATED_SINCE("mbed-os-5.15", "String-based APIs are deprecated")
|
MBED_DEPRECATED_SINCE("mbed-os-5.15", "String-based APIs are deprecated")
|
||||||
virtual const char *get_ip_address() = 0;
|
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
|
/** @copydoc NetworkInterface::cellularInterface
|
||||||
*/
|
*/
|
||||||
virtual CellularInterface *cellularInterface()
|
virtual CellularInterface *cellularInterface()
|
||||||
|
|
Loading…
Reference in New Issue