|
STAR
Cal STAR — firmware, DAQ server, and engine design
|
#include <Arduino.h>#include <Ethernet.h>#include <EthernetUdp.h>#include <SPI.h>#include <STAR_EthernetOTA.h>#include <daq-protocol.h>#include <esp_mac.h>#include <cstring>#include "board_net.h"#include "firmware_hash.h"#include "hotfire_log.h"Go to the source code of this file.
Classes | |
| struct | SensorHotfire::StoredSensorConfig |
| struct | SensorHotfire::Config |
| struct | SensorHotfire::CoreState |
Namespaces | |
| namespace | SensorHotfire |
Macros | |
| #define | SENSOR_HOTFIRE_MAX_PACKET_SIZE 512 |
| Shared sensor hotfire state machine core — PT / TC / LC boards. | |
| #define | SENSOR_HOTFIRE_NO_CONN_ABORT_TYPE 11 |
| #define | SENSOR_UDP_LISTEN_PORT 5005 |
Enumerations | |
| enum class | SensorHotfire::State : uint8_t { SensorHotfire::WaitingForServer = 1 , SensorHotfire::Active = 2 , SensorHotfire::StandaloneAbort = 9 , SensorHotfire::SelfTest = 10 } |
| enum class | SensorHotfire::IncomingPacketKind { SensorHotfire::None , SensorHotfire::ServerHeartbeat , SensorHotfire::SensorConfig , SensorHotfire::ClearAbort , SensorHotfire::NoConnAbort } |
Functions | |
| void | SensorHotfire::otaFreezeAddress (void *user_data, uint32_t image_bytes) |
| Freeze the board's address before a single byte reaches flash. | |
| bool | SensorHotfire::readPacketHeader (const uint8_t *buffer, size_t len, daq::PacketHeader &hdr_out) |
| const char * | SensorHotfire::packetTypeName (uint8_t type) |
| IncomingPacketKind | SensorHotfire::processIncomingPacket (CoreState &s, const Config &cfg, const uint8_t *buffer, size_t len, IPAddress remote_ip, int remote_port) |
| void | SensorHotfire::applyPacketTransition (CoreState &s, const Config &cfg, IncomingPacketKind kind) |
| void | SensorHotfire::sendBoardHeartbeat (CoreState &s, const Config &cfg, daq::BoardState board_state, IPAddress dest_ip, int dest_port) |
| void | SensorHotfire::updateStateLed (CoreState &s, const Config &cfg, int state_num) |
| void | SensorHotfire::flushLogs (CoreState &s) |
| void | SensorHotfire::setup (CoreState &s, const Config &cfg) |
| void | SensorHotfire::loop (CoreState &s, const Config &cfg) |
Variables | |
| StarOTA::Server | SensorHotfire::g_ota_server {HOTFIRE_OTA_PORT} |
| #define SENSOR_HOTFIRE_MAX_PACKET_SIZE 512 |
Shared sensor hotfire state machine core — PT / TC / LC boards.
Single implementation of: UDP rx, packet processing, 3-state machine, state LED, board heartbeat, Ethernet init. Board-specific: ADC init, collect_chunk(), send_chunks_to() via callbacks.
Include after: Arduino.h, Ethernet, DAQv2-Comms, main.h, sense_board_pins.h Define before include (or use defaults): SENSOR_HOTFIRE_MAX_PACKET_SIZE (default 512) SENSOR_HOTFIRE_NO_CONN_ABORT_TYPE (default 11)
Definition at line 30 of file SensorHotfireCore.h.
Referenced by SensorHotfire::loop(), send_chunks_to_impl(), and SensorHotfire::sendBoardHeartbeat().
| #define SENSOR_HOTFIRE_NO_CONN_ABORT_TYPE 11 |
Definition at line 33 of file SensorHotfireCore.h.
Referenced by SensorHotfire::packetTypeName().
| #define SENSOR_UDP_LISTEN_PORT 5005 |
Definition at line 36 of file SensorHotfireCore.h.
Referenced by SensorHotfire::setup(), and setup().