Skip to content

Commit 397b396

Browse files
Ari ParkkilaSeppo Takalo
authored andcommitted
Cellular: Update cellular documentation
1 parent 0619b90 commit 397b396

File tree

7 files changed

+55
-50
lines changed

7 files changed

+55
-50
lines changed

features/cellular/README.md

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,21 @@
22

33
This is the Github repo for Mbed cellular connectivity:
44

5-
easy_cellular/
6-
EasyCellularConnection Simplified cellular usage based on `CellularBase.h`
7-
CellularConnectionUtil A utility class for cellular connection
8-
95
framework/
106
API Application Programming Interface for cellular connectivity
117
AT AT implementation based on 3GPP TS 27.007 specification
128
common Common and utility sources
9+
device Implementation of cellular device and state machine
1310
targets Vendor specific cellular module adaptations
1411

1512
TESTS Cellular Greentea test
1613

17-
UNITTESTS Cellular unit test
14+
**Application developers should only use API folder.
1815

1916
## Known limitations
2017

2118
**Please note that this is a first release of Cellular framework and is subject to further development in future.**
2219

23-
Only UDP is supported when using AT commands to control sockets in an IP stack built into the cellular modem. If TCP is required, use the PPP/LWIP stack.
24-
2520
## Supported modules
2621

2722
You can find currently supported cellular modules in the `framework/targets/` folder, where we also add support for new cellular modules.
@@ -30,23 +25,6 @@ You can find currently supported cellular modules in the `framework/targets/` fo
3025

3126
You can change cellular defaults in the `mbed_lib.json` configuration file.
3227

33-
You can also override cellular defaults in the `mbed_app.json` configuration file:
34-
35-
"config": {
36-
"cellular_plmn": {
37-
"help": "PLMN selection, 0=auto",
38-
"value": 0
39-
},
40-
"apn": {
41-
"help": "Access point name, e.g. internet",
42-
"value": "\"internet\""
43-
},
44-
"cellular_sim_pin": {
45-
"help": "PIN code",
46-
"value": "\"1234\""
47-
}
48-
}
49-
5028
## Debug traces
5129

5230
You can define the debug tracing level in the `mbed_app.json` configuration file:
@@ -77,9 +55,7 @@ The `TESTS` folder contains Greentea tests for cellular specific classes. You ne
7755

7856
## Unit tests
7957

80-
The `UNITTESTS` folder contains unit tests for cellular specific classes. Unit tests are based on the stubbing method.
81-
82-
You can run those tests locally by running `./run_tests` script under the `UNITTESTS/` folder.
58+
Cellular unit tests are in Mbed OS root `UNITTESTS`. Unit tests are based on the stubbing method.
8359

8460
You need the following applications: `cpputest`, `gcov` and `lcov` (genhtml) for running the tests.
8561

features/cellular/framework/API/CellularContext.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222

2323
namespace mbed {
2424

25+
/**
26+
* @addtogroup cellular
27+
* @{
28+
*/
29+
30+
/// CellularContext is CellularBase/NetworkInterface with extensions for cellular connectivity
2531
class CellularContext : public CellularBase {
2632

2733
public:
@@ -50,7 +56,7 @@ class CellularContext : public CellularBase {
5056
Week
5157
};
5258

53-
/* PDP Context information */
59+
/// PDP Context information
5460
struct pdpcontext_params_t {
5561
char apn[MAX_ACCESSPOINT_NAME_LENGTH + 1];
5662
char local_addr[MAX_IPV6_ADDR_IN_IPV4LIKE_DOTTED_FORMAT + 1];
@@ -255,6 +261,10 @@ class CellularContext : public CellularBase {
255261
const char *_pwd;
256262
};
257263

264+
/**
265+
* @}
266+
*/
267+
258268
} // namespace mbed
259269

260270

features/cellular/framework/API/CellularDevice.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ class FileHandle;
3636
const int MAX_PIN_SIZE = 8;
3737
const int MAX_PLMN_SIZE = 16;
3838

39+
/**
40+
* @addtogroup cellular
41+
* @{
42+
*/
43+
3944
/**
4045
* Class CellularDevice
4146
*
@@ -294,6 +299,10 @@ class CellularDevice {
294299
Callback<void(nsapi_event_t, intptr_t)> _status_cb;
295300
};
296301

302+
/**
303+
* @}
304+
*/
305+
297306
} // namespace mbed
298307

299308
#endif // CELLULAR_DEVICE_H_

features/cellular/framework/API/CellularInformation.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323

2424
namespace mbed {
2525

26+
/**
27+
* @addtogroup cellular
28+
* @{
29+
*/
30+
2631
/**
2732
* Class CellularInformation
2833
*
@@ -83,6 +88,10 @@ class CellularInformation {
8388
virtual nsapi_error_t get_serial_number(char *buf, size_t buf_size, SerialNumberType type = SN) = 0;
8489
};
8590

91+
/**
92+
* @}
93+
*/
94+
8695
} // namespace mbed
8796

8897
#endif // CELLULAR_INFORMATION_H_

features/cellular/framework/API/CellularNetwork.h

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
/*
2-
* Copyright (c) 2017, Arm Limited and affiliates.
3-
* SPDX-License-Identifier: Apache-2.0
4-
*
5-
* Licensed under the Apache License, Version 2.0 (the "License");
6-
* you may not use this file except in compliance with the License.
7-
* You may obtain a copy of the License at
8-
*
91
* http://www.apache.org/licenses/LICENSE-2.0
102
*
113
* Unless required by applicable law or agreed to in writing, software
@@ -32,18 +24,16 @@ const int MAX_OPERATOR_NAME_LONG = 16;
3224
const int MAX_OPERATOR_NAME_SHORT = 8;
3325

3426
/**
35-
* Class CellularNetwork
36-
*
37-
* An abstract interface for connecting to a network and getting information from it.
27+
* @addtogroup cellular
28+
* @{
3829
*/
30+
31+
/// An abstract interface for connecting to a network and getting information from it.
3932
class CellularNetwork {
4033
protected:
4134
// friend of CellularDevice so that it's the only way to close/delete this class.
4235
friend class CellularDevice;
4336

44-
/**
45-
* virtual Destructor
46-
*/
4737
virtual ~CellularNetwork() {}
4838

4939
public:
@@ -112,7 +102,7 @@ class CellularNetwork {
112102
RAT_MAX = 11 // to reserve string array
113103
};
114104

115-
// 3GPP TS 27.007 - 7.3 PLMN selection +COPS
105+
/// 3GPP TS 27.007 - 7.3 PLMN selection +COPS
116106
struct operator_t {
117107
enum Status {
118108
Unknown,
@@ -141,6 +131,7 @@ class CellularNetwork {
141131

142132
typedef CellularList<operator_t> operList_t;
143133

134+
/// Cellular operator names in numeric and alpha format
144135
struct operator_names_t {
145136
char numeric[MAX_OPERATOR_NAME_SHORT + 1];
146137
char alpha[MAX_OPERATOR_NAME_LONG + 1];
@@ -154,7 +145,7 @@ class CellularNetwork {
154145
};
155146
typedef CellularList<operator_names_t> operator_names_list;
156147

157-
/* Network registering mode */
148+
/// Network registering mode
158149
enum NWRegisteringMode {
159150
NWModeAutomatic = 0, // automatic registering
160151
NWModeManual, // manual registering with plmn
@@ -163,7 +154,7 @@ class CellularNetwork {
163154
NWModeManualAutomatic // if manual fails, fallback to automatic
164155
};
165156

166-
/* Network registration information */
157+
/// Network registration information
167158
struct registration_params_t {
168159
RegistrationType _type;
169160
RegistrationStatus _status;
@@ -365,6 +356,10 @@ class CellularNetwork {
365356
virtual nsapi_error_t get_registration_params(RegistrationType type, registration_params_t &reg_params) = 0;
366357
};
367358

359+
/**
360+
* @}
361+
*/
362+
368363
} // namespace mbed
369364

370365
#endif // CELLULAR_NETWORK_H_

features/cellular/framework/API/CellularSMS.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ const uint16_t SMS_SIM_WAIT_TIME_MILLISECONDS = 200;
3535

3636
const int SMS_ERROR_MULTIPART_ALL_PARTS_NOT_READ = -5001;
3737

38+
/**
39+
* @addtogroup cellular
40+
* @{
41+
*/
42+
3843
/**
3944
* Class CellularSMS
4045
*
@@ -162,6 +167,10 @@ class CellularSMS {
162167
virtual void set_extra_sim_wait_time(int sim_wait_time) = 0;
163168
};
164169

170+
/**
171+
* @}
172+
*/
173+
165174
} // namespace mbed
166175

167176
#endif // CELLULAR_SMS_H_

features/cellular/framework/AT/ATHandler.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,13 @@ enum DeviceErrorType {
5353
DeviceErrorTypeErrorCME // AT ERROR CME
5454
};
5555

56-
/* struct used when getting at response error. Defines error code and type */
56+
/** AT response error with error code and type */
5757
struct device_err_t {
5858
DeviceErrorType errType;
5959
int errCode;
6060
};
6161

62-
/** Class ATHandler
63-
*
64-
* Class for sending AT commands and parsing AT responses.
65-
*/
62+
/// Class for sending AT commands and parsing AT responses.
6663
class ATHandler {
6764

6865
public:

0 commit comments

Comments
 (0)