Skip to content

Commit 783d0c5

Browse files
Antti KauppilaTeppo Järvelin
authored andcommitted
MBED_DEPRECATED_SINCE taken into use
1 parent 7fd6b71 commit 783d0c5

File tree

7 files changed

+37
-18
lines changed

7 files changed

+37
-18
lines changed

features/netsocket/CellularInterface.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,17 @@
1919

2020
#include "netsocket/NetworkInterface.h"
2121

22-
2322
/** CellularInterface class
2423
*
2524
* Common interface that is shared between ethernet hardware
2625
* @addtogroup netsocket
27-
*
28-
* @attention CellularInterface API will be deprecated, use mbed-os/features/cellular/framework/API instead.
2926
*/
3027
class CellularInterface : public NetworkInterface
3128
{
3229
public:
3330
/** CellularInterface lifetime
3431
*/
32+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
3533
virtual ~CellularInterface() {};
3634

3735
/** Set the cellular network APN and credentials
@@ -41,6 +39,7 @@ class CellularInterface : public NetworkInterface
4139
* @param password Optional password fot the APN
4240
* @return 0 on success, negative error code on failure
4341
*/
42+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
4443
virtual nsapi_error_t set_credentials(const char *apn,
4544
const char *username = 0, const char *password = 0) = 0;
4645

@@ -51,6 +50,7 @@ class CellularInterface : public NetworkInterface
5150
* @param password Optional password for your APN
5251
* @return 0 on success, negative error code on failure
5352
*/
53+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
5454
virtual nsapi_error_t connect(const char *apn,
5555
const char *username = 0, const char *password = 0) = 0;
5656

@@ -60,12 +60,14 @@ class CellularInterface : public NetworkInterface
6060
*
6161
* @return 0 on success, negative error code on failure
6262
*/
63+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
6364
virtual nsapi_error_t connect() = 0;
6465

6566
/** Stop the interface
6667
*
6768
* @return 0 on success, negative error code on failure
6869
*/
70+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
6971
virtual nsapi_error_t disconnect() = 0;
7072
};
7173

features/netsocket/cellular/generic_modem_driver/OnboardCellularInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
/**
2525
* OnboardCellularInterface is an on-board specific implementation.
2626
*
27-
* @attention This API will be deprecated, use mbed-os/features/cellular/framework/API instead.
2827
*/
28+
2929
OnboardCellularInterface::OnboardCellularInterface(bool debug) :
3030
UARTCellularInterface(MDMTXD, MDMRXD, MDMDCD, MDMRTS,
3131
MDMCTS, MDMRI, MDMDTR, MDMDSR,

features/netsocket/cellular/generic_modem_driver/OnboardCellularInterface.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,16 @@ typedef mbed::EasyCellularConnection OnboardCellularInterface;
3131
* Depending on the type of on-board modem, OnboardCellularInterface
3232
* could be derived from different implementation classes.
3333
* Portable applications should only rely on it being a CellularBase.
34-
*
35-
* @attention This API will be deprecated, use mbed-os/features/cellular/framework/API instead.
3634
*/
35+
3736
class OnboardCellularInterface : public UARTCellularInterface {
3837

3938
public:
4039

40+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
4141
OnboardCellularInterface(bool debug = false);
4242

43+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
4344
virtual ~OnboardCellularInterface();
4445

4546
protected:
@@ -48,6 +49,7 @@ class OnboardCellularInterface : public UARTCellularInterface {
4849
* modem_init() is equivalent to plugging in the device, for example, attaching power and serial port.
4950
* Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api.
5051
*/
52+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
5153
virtual void modem_init();
5254

5355
/** Sets the modem in unplugged state
@@ -56,6 +58,7 @@ class OnboardCellularInterface : public UARTCellularInterface {
5658
* and serial port. This puts the modem in lowest power state.
5759
* Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api.
5860
*/
61+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
5962
virtual void modem_deinit();
6063

6164
/** Powers up the modem
@@ -64,13 +67,15 @@ class OnboardCellularInterface : public UARTCellularInterface {
6467
* The driver may repeat this if the modem is not responsive to AT commands.
6568
* Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api.
6669
*/
70+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
6771
virtual void modem_power_up();
6872

6973
/** Powers down the modem
7074
*
7175
* modem_power_down() is equivalent to turning off the modem by button press.
7276
* Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api.
7377
*/
78+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
7479
virtual void modem_power_down();
7580
};
7681

features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
*/
1515
#include "PPPCellularInterface.h"
1616

17-
/**
18-
* @attention This API will be deprecated, use mbed-os/features/cellular/framework/API instead.
19-
*/
20-
2117
#if NSAPI_PPP_AVAILABLE
2218

2319
#include <string.h>

features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.h

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ typedef struct {
9898
* The driver will work with any generic FileHandle, and can be
9999
* derived from in order to provide forms for specific interfaces, as well as
100100
* adding extra power and reset controls alongside the FileHandle.
101-
*
102-
* @attention This API will be deprecated, use mbed-os/features/cellular/framework/API instead.
103101
*/
102+
104103
class PPPCellularInterface : public CellularBase {
105104

106105
public:
@@ -110,8 +109,10 @@ class PPPCellularInterface : public CellularBase {
110109
* The file handle pointer is not accessed within the constructor, only recorded for later
111110
* use - this permits a derived class to pass a pointer to a not-yet-constructed member object.
112111
*/
112+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
113113
PPPCellularInterface(FileHandle *fh, bool debug = false);
114114

115+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
115116
virtual ~PPPCellularInterface();
116117

117118
/** Set the Cellular network credentials
@@ -122,13 +123,15 @@ class PPPCellularInterface : public CellularBase {
122123
* @param uname optionally, Username
123124
* @param pwd optionally, password
124125
*/
126+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
125127
virtual void set_credentials(const char *apn, const char *uname = 0,
126128
const char *pwd = 0);
127129

128130
/** Set the pin code for SIM card
129131
*
130132
* @param sim_pin PIN for the SIM card
131133
*/
134+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
132135
virtual void set_sim_pin(const char *sim_pin);
133136

134137
/** Start the interface
@@ -146,6 +149,7 @@ class PPPCellularInterface : public CellularBase {
146149
* @param pwd optionally, password
147150
* @return NSAPI_ERROR_OK on success, or negative error code on failure
148151
*/
152+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
149153
virtual nsapi_error_t connect(const char *sim_pin, const char *apn = 0,
150154
const char *uname = 0, const char *pwd = 0);
151155

@@ -169,6 +173,7 @@ class PPPCellularInterface : public CellularBase {
169173
* Preferred method is to setup APN using 'set_credentials()' API.
170174
* @return 0 on success, negative error code on failure
171175
*/
176+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
172177
virtual nsapi_error_t connect();
173178

174179
/** Attempt to disconnect from the network
@@ -178,6 +183,7 @@ class PPPCellularInterface : public CellularBase {
178183
*
179184
* @return 0 on success, negative error code on failure
180185
*/
186+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
181187
virtual nsapi_error_t disconnect();
182188

183189
/** Adds or removes a SIM facility lock
@@ -190,6 +196,7 @@ class PPPCellularInterface : public CellularBase {
190196
* @param set can be set to true if the SIM pin check is supposed to be enabled
191197
* and vice versa.
192198
*/
199+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
193200
void set_sim_pin_check(bool set);
194201

195202
/** Change the pin for the SIM card
@@ -200,6 +207,7 @@ class PPPCellularInterface : public CellularBase {
200207
*
201208
* @param new_pin new pin to be used in string format
202209
*/
210+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
203211
void set_new_sim_pin(const char *new_pin);
204212

205213
/** Check if the connection is currently established or not
@@ -208,53 +216,61 @@ class PPPCellularInterface : public CellularBase {
208216
* connected to an external packet data network using PPP, isConnected()
209217
* API returns true and false otherwise.
210218
*/
219+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
211220
virtual bool is_connected();
212221

213222
/** Get the local IP address
214223
*
215224
* @return Null-terminated representation of the local IP address
216225
* or null if no IP address has been recieved
217226
*/
227+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
218228
virtual const char *get_ip_address();
219229

220230
/** Get the local network mask
221231
*
222232
* @return Null-terminated representation of the local network mask
223233
* or null if no network mask has been recieved
224234
*/
235+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
225236
virtual const char *get_netmask();
226237

227238
/** Get the local gateways
228239
*
229240
* @return Null-terminated representation of the local gateway
230241
* or null if no network mask has been recieved
231242
*/
243+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
232244
virtual const char *get_gateway();
233245

234246

235247
/** Turn modem debug traces on
236248
*
237249
* @param on set true to enable debug traces
238250
*/
251+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
239252
void modem_debug_on(bool on);
240253

241254
/** Register callback for status reporting
242255
*
243256
* @param status_cb The callback for status changes
244257
*/
258+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
245259
virtual void attach(Callback<void(nsapi_event_t, intptr_t)> status_cb);
246260

247261
/** Get the connection status
248262
*
249263
* @return The connection status according to nsapi_connection_status_t
250264
*/
265+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
251266
virtual nsapi_connection_status_t get_connection_status() const;
252267

253268
/** Set blocking status of connect() which by default should be blocking
254269
*
255270
* @param blocking true if connect is blocking
256271
* @return 0 on success, negative error code on failure
257272
*/
273+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
258274
virtual nsapi_error_t set_blocking(bool blocking);
259275

260276
private:
@@ -276,7 +292,7 @@ class PPPCellularInterface : public CellularBase {
276292
nsapi_error_t initialize_sim_card();
277293
nsapi_error_t setup_context_and_credentials();
278294
bool power_up();
279-
void power_down();
295+
void power_down();
280296
void ppp_status_cb(nsapi_event_t, intptr_t);
281297

282298
protected:

features/netsocket/cellular/generic_modem_driver/UARTCellularInterface.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
*/
1515
#include "UARTCellularInterface.h"
1616

17-
/**
18-
* @attention UARTCellularInterface API will be deprecated, use mbed-os/features/cellular/framework/API instead.
19-
*/
17+
2018
#if NSAPI_PPP_AVAILABLE
2119

2220
UARTCellularInterface::UARTCellularInterface(PinName txd, PinName rxd, PinName dcd, PinName rts, PinName cts, PinName ri,

features/netsocket/cellular/generic_modem_driver/UARTCellularInterface.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,19 @@
2828
*
2929
* It constructs a FileHandle and passes it back to its base class as well as overrides
3030
* enable_hup() in the base class.
31-
*
32-
* @attention UARTCellularInterface API will be deprecated, use mbed-os/features/cellular/framework/API instead.
3331
*/
32+
3433
class UARTCellularInterface : public PPPCellularInterface {
3534

3635
public:
3736

37+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
3838
UARTCellularInterface(PinName tx, PinName rx, PinName dcd = NC, PinName rts = NC, PinName cts = NC, PinName ri = NC,
3939
PinName dtr = NC, PinName dsr = NC, int baud = MBED_CONF_PPP_CELL_IFACE_BAUD_RATE,
4040
bool active_high = false,
4141
bool debug = false);
4242

43+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
4344
virtual ~UARTCellularInterface();
4445

4546
private:
@@ -55,6 +56,7 @@ class UARTCellularInterface : public PPPCellularInterface {
5556
* signaling is not desired. enable_hup() controls whether this function should be
5657
* active.
5758
*/
59+
MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.")
5860
virtual void enable_hup(bool enable);
5961
};
6062

0 commit comments

Comments
 (0)