@@ -98,9 +98,8 @@ typedef struct {
98
98
* The driver will work with any generic FileHandle, and can be
99
99
* derived from in order to provide forms for specific interfaces, as well as
100
100
* 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.
103
101
*/
102
+
104
103
class PPPCellularInterface : public CellularBase {
105
104
106
105
public:
@@ -110,8 +109,10 @@ class PPPCellularInterface : public CellularBase {
110
109
* The file handle pointer is not accessed within the constructor, only recorded for later
111
110
* use - this permits a derived class to pass a pointer to a not-yet-constructed member object.
112
111
*/
112
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
113
113
PPPCellularInterface (FileHandle *fh, bool debug = false );
114
114
115
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
115
116
virtual ~PPPCellularInterface ();
116
117
117
118
/* * Set the Cellular network credentials
@@ -122,13 +123,15 @@ class PPPCellularInterface : public CellularBase {
122
123
* @param uname optionally, Username
123
124
* @param pwd optionally, password
124
125
*/
126
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
125
127
virtual void set_credentials (const char *apn, const char *uname = 0 ,
126
128
const char *pwd = 0 );
127
129
128
130
/* * Set the pin code for SIM card
129
131
*
130
132
* @param sim_pin PIN for the SIM card
131
133
*/
134
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
132
135
virtual void set_sim_pin (const char *sim_pin);
133
136
134
137
/* * Start the interface
@@ -146,6 +149,7 @@ class PPPCellularInterface : public CellularBase {
146
149
* @param pwd optionally, password
147
150
* @return NSAPI_ERROR_OK on success, or negative error code on failure
148
151
*/
152
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
149
153
virtual nsapi_error_t connect (const char *sim_pin, const char *apn = 0 ,
150
154
const char *uname = 0 , const char *pwd = 0 );
151
155
@@ -169,6 +173,7 @@ class PPPCellularInterface : public CellularBase {
169
173
* Preferred method is to setup APN using 'set_credentials()' API.
170
174
* @return 0 on success, negative error code on failure
171
175
*/
176
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
172
177
virtual nsapi_error_t connect ();
173
178
174
179
/* * Attempt to disconnect from the network
@@ -178,6 +183,7 @@ class PPPCellularInterface : public CellularBase {
178
183
*
179
184
* @return 0 on success, negative error code on failure
180
185
*/
186
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
181
187
virtual nsapi_error_t disconnect ();
182
188
183
189
/* * Adds or removes a SIM facility lock
@@ -190,6 +196,7 @@ class PPPCellularInterface : public CellularBase {
190
196
* @param set can be set to true if the SIM pin check is supposed to be enabled
191
197
* and vice versa.
192
198
*/
199
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
193
200
void set_sim_pin_check (bool set);
194
201
195
202
/* * Change the pin for the SIM card
@@ -200,6 +207,7 @@ class PPPCellularInterface : public CellularBase {
200
207
*
201
208
* @param new_pin new pin to be used in string format
202
209
*/
210
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
203
211
void set_new_sim_pin (const char *new_pin);
204
212
205
213
/* * Check if the connection is currently established or not
@@ -208,53 +216,61 @@ class PPPCellularInterface : public CellularBase {
208
216
* connected to an external packet data network using PPP, isConnected()
209
217
* API returns true and false otherwise.
210
218
*/
219
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
211
220
virtual bool is_connected ();
212
221
213
222
/* * Get the local IP address
214
223
*
215
224
* @return Null-terminated representation of the local IP address
216
225
* or null if no IP address has been recieved
217
226
*/
227
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
218
228
virtual const char *get_ip_address ();
219
229
220
230
/* * Get the local network mask
221
231
*
222
232
* @return Null-terminated representation of the local network mask
223
233
* or null if no network mask has been recieved
224
234
*/
235
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
225
236
virtual const char *get_netmask ();
226
237
227
238
/* * Get the local gateways
228
239
*
229
240
* @return Null-terminated representation of the local gateway
230
241
* or null if no network mask has been recieved
231
242
*/
243
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
232
244
virtual const char *get_gateway ();
233
245
234
246
235
247
/* * Turn modem debug traces on
236
248
*
237
249
* @param on set true to enable debug traces
238
250
*/
251
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
239
252
void modem_debug_on (bool on);
240
253
241
254
/* * Register callback for status reporting
242
255
*
243
256
* @param status_cb The callback for status changes
244
257
*/
258
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
245
259
virtual void attach (Callback<void (nsapi_event_t , intptr_t )> status_cb);
246
260
247
261
/* * Get the connection status
248
262
*
249
263
* @return The connection status according to nsapi_connection_status_t
250
264
*/
265
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
251
266
virtual nsapi_connection_status_t get_connection_status () const ;
252
267
253
268
/* * Set blocking status of connect() which by default should be blocking
254
269
*
255
270
* @param blocking true if connect is blocking
256
271
* @return 0 on success, negative error code on failure
257
272
*/
273
+ MBED_DEPRECATED_SINCE (" mbed-os-5.9" , " This API will be deprecated, use mbed-os/features/cellular/framework/API instead." )
258
274
virtual nsapi_error_t set_blocking (bool blocking);
259
275
260
276
private:
@@ -276,7 +292,7 @@ class PPPCellularInterface : public CellularBase {
276
292
nsapi_error_t initialize_sim_card ();
277
293
nsapi_error_t setup_context_and_credentials ();
278
294
bool power_up ();
279
- void power_down ();
295
+ void power_down ();
280
296
void ppp_status_cb (nsapi_event_t , intptr_t );
281
297
282
298
protected:
0 commit comments