|
Generalized-Core-Counter 3.20
Particle-based generalized core counter firmware
|
#include "state/State_Common.h"#include "Config.h"#include "Cloud.h"#include "DeviceInfoLedger.h"#include "MyPersistentData.h"#include "PublishQueuePosixRK.h"#include "SensorManager.h"#include "device_pinout.h"#include "SensorDefinitions.h"Go to the source code of this file.
Functions | |
| void | handleConnectingState () |
| CONNECTING_STATE: establish cloud connection using a phased, non-blocking state machine. | |
| void | handleFirmwareUpdateState () |
| bool | isRadioPoweredOn () |
| void | requestFullDisconnectAndRadioOff () |
| void | requestRadioPowerOff () |
| void handleConnectingState | ( | ) |
CONNECTING_STATE: establish cloud connection using a phased, non-blocking state machine.
Uses an internal ConnectPhase enum to break connection into small steps that each complete within a single loop() iteration:
Definition at line 68 of file State_Connect.cpp.
References connectedStartMs, current, FIRMWARE_UPDATE_STATE, firstConnectionObserved, firstConnectionQueueDrainedLogged, IDLE_STATE, Cloud::instance(), Cloud::loadConfigurationFromCloud(), maxConnectAttemptMs, measure, oldState, publishDiagnosticSafe(), publishStateTransition(), REPORTING_STATE, requestFullDisconnectAndRadioOff(), SLEEPING_STATE, state, and sysStatus.
Referenced by loop().
| void handleFirmwareUpdateState | ( | ) |
Definition at line 173 of file State_Connect.cpp.
References BUTTON_PIN, IDLE_STATE, Cloud::instance(), Cloud::loadConfigurationFromCloud(), oldState, publishStateTransition(), SLEEPING_STATE, and state.
Referenced by loop().
| bool isRadioPoweredOn | ( | ) |
Definition at line 21 of file State_Connect.cpp.
Referenced by handleSleepingState().
| void requestFullDisconnectAndRadioOff | ( | ) |
Definition at line 41 of file State_Connect.cpp.
References requestRadioPowerOff().
Referenced by handleConnectingState(), handleErrorState(), and handleSleepingState().
| void requestRadioPowerOff | ( | ) |
Definition at line 31 of file State_Connect.cpp.
Referenced by requestFullDisconnectAndRadioOff().