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