mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #12251 from kivaisan/remove_friends_from_statemachine
Cellular: Remove friend definitions from cellular state machinepull/12377/head
commit
96861107f5
|
@ -31,11 +31,9 @@ class CellularDevice;
|
|||
* Finite State Machine for attaching to cellular network. Used by CellularDevice.
|
||||
*/
|
||||
class CellularStateMachine {
|
||||
private:
|
||||
// friend of CellularDevice so that it's the only way to close/delete this class.
|
||||
friend class CellularDevice;
|
||||
friend class AT_CellularDevice;
|
||||
public:
|
||||
friend class UT_CellularStateMachine; // for unit tests
|
||||
|
||||
/** Constructor
|
||||
*
|
||||
* @param device reference to CellularDevice
|
||||
|
@ -128,8 +126,21 @@ private:
|
|||
/** Reset the state machine to init state. After reset state machine can be used again to run to wanted state.
|
||||
*/
|
||||
void reset();
|
||||
private:
|
||||
|
||||
/** Get retry timeout array
|
||||
*
|
||||
* @param timeout Pointer to timeout array
|
||||
* @param array_len Max lenght of the array
|
||||
*/
|
||||
void get_retry_timeout_array(uint16_t *timeout, int &array_len) const;
|
||||
|
||||
/** Change all cellular state timeouts
|
||||
*
|
||||
* @param timeout Timeout value (milliseconds)
|
||||
*/
|
||||
void set_timeout(int timeout);
|
||||
|
||||
private:
|
||||
bool power_on();
|
||||
bool open_sim();
|
||||
bool get_network_registration(CellularNetwork::RegistrationType type, CellularNetwork::RegistrationStatus &status, bool &is_registered);
|
||||
|
@ -188,8 +199,7 @@ private:
|
|||
int _state_timeout_registration;
|
||||
int _state_timeout_network;
|
||||
int _state_timeout_connect; // timeout for PS attach, PDN connect and socket operations
|
||||
// Change all cellular state timeouts to `timeout`
|
||||
void set_timeout(int timeout);
|
||||
|
||||
cell_signal_quality_t _signal_quality;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue