PR review findings, updated deprecated comments.

pull/6264/head
Teppo Järvelin 2018-03-13 13:09:36 +02:00
parent 783d0c58f5
commit 16e8b77474
4 changed files with 31 additions and 31 deletions

View File

@ -29,7 +29,7 @@ class CellularInterface : public NetworkInterface
public: public:
/** CellularInterface lifetime /** CellularInterface lifetime
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.")
virtual ~CellularInterface() {}; virtual ~CellularInterface() {};
/** Set the cellular network APN and credentials /** Set the cellular network APN and credentials
@ -39,7 +39,7 @@ public:
* @param password Optional password fot the APN * @param password Optional password fot the APN
* @return 0 on success, negative error code on failure * @return 0 on success, negative error code on failure
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.")
virtual nsapi_error_t set_credentials(const char *apn, virtual nsapi_error_t set_credentials(const char *apn,
const char *username = 0, const char *password = 0) = 0; const char *username = 0, const char *password = 0) = 0;
@ -50,7 +50,7 @@ public:
* @param password Optional password for your APN * @param password Optional password for your APN
* @return 0 on success, negative error code on failure * @return 0 on success, negative error code on failure
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.")
virtual nsapi_error_t connect(const char *apn, virtual nsapi_error_t connect(const char *apn,
const char *username = 0, const char *password = 0) = 0; const char *username = 0, const char *password = 0) = 0;
@ -60,14 +60,14 @@ public:
* *
* @return 0 on success, negative error code on failure * @return 0 on success, negative error code on failure
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.")
virtual nsapi_error_t connect() = 0; virtual nsapi_error_t connect() = 0;
/** Stop the interface /** Stop the interface
* *
* @return 0 on success, negative error code on failure * @return 0 on success, negative error code on failure
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.")
virtual nsapi_error_t disconnect() = 0; virtual nsapi_error_t disconnect() = 0;
}; };

View File

@ -37,10 +37,10 @@ class OnboardCellularInterface : public UARTCellularInterface {
public: public:
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.")
OnboardCellularInterface(bool debug = false); OnboardCellularInterface(bool debug = false);
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.")
virtual ~OnboardCellularInterface(); virtual ~OnboardCellularInterface();
protected: protected:
@ -49,7 +49,7 @@ protected:
* modem_init() is equivalent to plugging in the device, for example, attaching power and serial port. * modem_init() is equivalent to plugging in the device, for example, attaching power and serial port.
* Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api.
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.")
virtual void modem_init(); virtual void modem_init();
/** Sets the modem in unplugged state /** Sets the modem in unplugged state
@ -58,7 +58,7 @@ protected:
* and serial port. This puts the modem in lowest power state. * and serial port. This puts the modem in lowest power state.
* Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api.
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.")
virtual void modem_deinit(); virtual void modem_deinit();
/** Powers up the modem /** Powers up the modem
@ -67,7 +67,7 @@ protected:
* The driver may repeat this if the modem is not responsive to AT commands. * The driver may repeat this if the modem is not responsive to AT commands.
* Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api.
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.")
virtual void modem_power_up(); virtual void modem_power_up();
/** Powers down the modem /** Powers down the modem
@ -75,7 +75,7 @@ protected:
* modem_power_down() is equivalent to turning off the modem by button press. * modem_power_down() is equivalent to turning off the modem by button press.
* Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api.
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.")
virtual void modem_power_down(); virtual void modem_power_down();
}; };

View File

@ -109,10 +109,10 @@ public:
* The file handle pointer is not accessed within the constructor, only recorded for later * The file handle pointer is not accessed within the constructor, only recorded for later
* use - this permits a derived class to pass a pointer to a not-yet-constructed member object. * use - this permits a derived class to pass a pointer to a not-yet-constructed member object.
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
PPPCellularInterface(FileHandle *fh, bool debug = false); PPPCellularInterface(FileHandle *fh, bool debug = false);
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual ~PPPCellularInterface(); virtual ~PPPCellularInterface();
/** Set the Cellular network credentials /** Set the Cellular network credentials
@ -123,7 +123,7 @@ public:
* @param uname optionally, Username * @param uname optionally, Username
* @param pwd optionally, password * @param pwd optionally, password
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual void set_credentials(const char *apn, const char *uname = 0, virtual void set_credentials(const char *apn, const char *uname = 0,
const char *pwd = 0); const char *pwd = 0);
@ -131,7 +131,7 @@ public:
* *
* @param sim_pin PIN for the SIM card * @param sim_pin PIN for the SIM card
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual void set_sim_pin(const char *sim_pin); virtual void set_sim_pin(const char *sim_pin);
/** Start the interface /** Start the interface
@ -149,7 +149,7 @@ public:
* @param pwd optionally, password * @param pwd optionally, password
* @return NSAPI_ERROR_OK on success, or negative error code on failure * @return NSAPI_ERROR_OK on success, or negative error code on failure
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual nsapi_error_t connect(const char *sim_pin, const char *apn = 0, virtual nsapi_error_t connect(const char *sim_pin, const char *apn = 0,
const char *uname = 0, const char *pwd = 0); const char *uname = 0, const char *pwd = 0);
@ -173,7 +173,7 @@ public:
* Preferred method is to setup APN using 'set_credentials()' API. * Preferred method is to setup APN using 'set_credentials()' API.
* @return 0 on success, negative error code on failure * @return 0 on success, negative error code on failure
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual nsapi_error_t connect(); virtual nsapi_error_t connect();
/** Attempt to disconnect from the network /** Attempt to disconnect from the network
@ -183,7 +183,7 @@ public:
* *
* @return 0 on success, negative error code on failure * @return 0 on success, negative error code on failure
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual nsapi_error_t disconnect(); virtual nsapi_error_t disconnect();
/** Adds or removes a SIM facility lock /** Adds or removes a SIM facility lock
@ -196,7 +196,7 @@ public:
* @param set can be set to true if the SIM pin check is supposed to be enabled * @param set can be set to true if the SIM pin check is supposed to be enabled
* and vice versa. * and vice versa.
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
void set_sim_pin_check(bool set); void set_sim_pin_check(bool set);
/** Change the pin for the SIM card /** Change the pin for the SIM card
@ -207,7 +207,7 @@ public:
* *
* @param new_pin new pin to be used in string format * @param new_pin new pin to be used in string format
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
void set_new_sim_pin(const char *new_pin); void set_new_sim_pin(const char *new_pin);
/** Check if the connection is currently established or not /** Check if the connection is currently established or not
@ -216,7 +216,7 @@ public:
* connected to an external packet data network using PPP, isConnected() * connected to an external packet data network using PPP, isConnected()
* API returns true and false otherwise. * API returns true and false otherwise.
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual bool is_connected(); virtual bool is_connected();
/** Get the local IP address /** Get the local IP address
@ -224,7 +224,7 @@ public:
* @return Null-terminated representation of the local IP address * @return Null-terminated representation of the local IP address
* or null if no IP address has been recieved * or null if no IP address has been recieved
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual const char *get_ip_address(); virtual const char *get_ip_address();
/** Get the local network mask /** Get the local network mask
@ -232,7 +232,7 @@ public:
* @return Null-terminated representation of the local network mask * @return Null-terminated representation of the local network mask
* or null if no network mask has been recieved * or null if no network mask has been recieved
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual const char *get_netmask(); virtual const char *get_netmask();
/** Get the local gateways /** Get the local gateways
@ -240,7 +240,7 @@ public:
* @return Null-terminated representation of the local gateway * @return Null-terminated representation of the local gateway
* or null if no network mask has been recieved * or null if no network mask has been recieved
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual const char *get_gateway(); virtual const char *get_gateway();
@ -248,21 +248,21 @@ public:
* *
* @param on set true to enable debug traces * @param on set true to enable debug traces
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
void modem_debug_on(bool on); void modem_debug_on(bool on);
/** Register callback for status reporting /** Register callback for status reporting
* *
* @param status_cb The callback for status changes * @param status_cb The callback for status changes
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual void attach(Callback<void(nsapi_event_t, intptr_t)> status_cb); virtual void attach(Callback<void(nsapi_event_t, intptr_t)> status_cb);
/** Get the connection status /** Get the connection status
* *
* @return The connection status according to nsapi_connection_status_t * @return The connection status according to nsapi_connection_status_t
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual nsapi_connection_status_t get_connection_status() const; virtual nsapi_connection_status_t get_connection_status() const;
/** Set blocking status of connect() which by default should be blocking /** Set blocking status of connect() which by default should be blocking
@ -270,7 +270,7 @@ public:
* @param blocking true if connect is blocking * @param blocking true if connect is blocking
* @return 0 on success, negative error code on failure * @return 0 on success, negative error code on failure
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual nsapi_error_t set_blocking(bool blocking); virtual nsapi_error_t set_blocking(bool blocking);
private: private:

View File

@ -34,13 +34,13 @@ class UARTCellularInterface : public PPPCellularInterface {
public: public:
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
UARTCellularInterface(PinName tx, PinName rx, PinName dcd = NC, PinName rts = NC, PinName cts = NC, PinName ri = NC, UARTCellularInterface(PinName tx, PinName rx, PinName dcd = NC, PinName rts = NC, PinName cts = NC, PinName ri = NC,
PinName dtr = NC, PinName dsr = NC, int baud = MBED_CONF_PPP_CELL_IFACE_BAUD_RATE, PinName dtr = NC, PinName dsr = NC, int baud = MBED_CONF_PPP_CELL_IFACE_BAUD_RATE,
bool active_high = false, bool active_high = false,
bool debug = false); bool debug = false);
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual ~UARTCellularInterface(); virtual ~UARTCellularInterface();
private: private:
@ -56,7 +56,7 @@ protected:
* signaling is not desired. enable_hup() controls whether this function should be * signaling is not desired. enable_hup() controls whether this function should be
* active. * active.
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.")
virtual void enable_hup(bool enable); virtual void enable_hup(bool enable);
}; };