Generalized-Core-Counter 3.20
Particle-based generalized core counter firmware
Loading...
Searching...
No Matches
State_Common.h
Go to the documentation of this file.
1#pragma once
2
3#include "Particle.h"
4#include "StateHandlers.h"
5#include "StateMachine.h"
6
7// NOTE:
8// This file was split from StateHandlers.cpp as a mechanical refactor.
9// No behavioral changes were made.
10
11// Forward declarations for helper functions shared across states
12// These are implemented in logic-specific files but exposed here.
13
14// Implemented in State_Idle.cpp
15void ensureSensorEnabled(const char* context);
16
17// Implemented in State_Connect.cpp
18bool isRadioPoweredOn();
21
22// Defined in Generalized-Core-Counter.cpp
23extern bool publishDiagnosticSafe(const char* eventName, const char* data, PublishFlags flags);
24
25// Defined in Generalized-Core-Counter.cpp
26void dailyCleanup();
27
28// Defined in Generalized-Core-Counter.cpp
29void publishData();
void ensureSensorEnabled(const char *context)
bool isRadioPoweredOn()
void requestFullDisconnectAndRadioOff()
void dailyCleanup()
Cleanup function that is run at the beginning of the day.
bool publishDiagnosticSafe(const char *eventName, const char *data, PublishFlags flags)
Publish a state transition to the log handler.
void publishData()
Publish sensor data to Ubidots webhook and device-data ledger.
void requestRadioPowerOff()