@@ -31,11 +31,9 @@ class CellularDevice;
31
31
* Finite State Machine for attaching to cellular network. Used by CellularDevice.
32
32
*/
33
33
class CellularStateMachine {
34
- private:
35
- // friend of CellularDevice so that it's the only way to close/delete this class.
36
- friend class CellularDevice ;
37
- friend class AT_CellularDevice ;
34
+ public:
38
35
friend class UT_CellularStateMachine ; // for unit tests
36
+
39
37
/* * Constructor
40
38
*
41
39
* @param device reference to CellularDevice
@@ -128,8 +126,21 @@ class CellularStateMachine {
128
126
/* * Reset the state machine to init state. After reset state machine can be used again to run to wanted state.
129
127
*/
130
128
void reset ();
131
- private:
129
+
130
+ /* * Get retry timeout array
131
+ *
132
+ * @param timeout Pointer to timeout array
133
+ * @param array_len Max lenght of the array
134
+ */
132
135
void get_retry_timeout_array (uint16_t *timeout, int &array_len) const ;
136
+
137
+ /* * Change all cellular state timeouts
138
+ *
139
+ * @param timeout Timeout value (milliseconds)
140
+ */
141
+ void set_timeout (int timeout);
142
+
143
+ private:
133
144
bool power_on ();
134
145
bool open_sim ();
135
146
bool get_network_registration (CellularNetwork::RegistrationType type, CellularNetwork::RegistrationStatus &status, bool &is_registered);
@@ -188,8 +199,7 @@ class CellularStateMachine {
188
199
int _state_timeout_registration;
189
200
int _state_timeout_network;
190
201
int _state_timeout_connect; // timeout for PS attach, PDN connect and socket operations
191
- // Change all cellular state timeouts to `timeout`
192
- void set_timeout (int timeout);
202
+
193
203
cell_signal_quality_t _signal_quality;
194
204
};
195
205
0 commit comments