21 #ifndef FLIGHT_STORAGEMANAGER_H
22 #define FLIGHT_STORAGEMANAGER_H
29 #include "configuration.h"
95 int16
command(uint16
apid, uint8* buffer, uint16 size) override;
101 int16
start()
override;
Header for generic telemetry packet struct generation and serialization.
#define SIGNAL(NAME, TYPE, INITIAL_VALUE)
Definition: appmacros.h:27
#define START_PARAMS
Definition: appmacros.h:42
#define END_PARAMS
Definition: appmacros.h:47
Base app class for derived implementation.
Definition: App.h:55
FlightExecutive & exc
Override our executive to include the FlightExecutive instead.
Definition: App.h:120
uint16 apid()
Get the apid for this app.
Definition: App.h:105
Executive derivation specifically to run flight systems.
Definition: FlightExecutive.h:46
App which manages all storage output from the flight system.
Definition: StorageManager.h:50
PacketTypeInfo _tlm_table[MAX_TLM_TABLE_SIZE]
Definition: StorageManager.h:109
int32 _findPktIndex(uint16 apid)
Find index of packet in tlm table matching apid.
Definition: StorageManager.cpp:252
int16 configureTlmPacket(const PacketTypeInfo &info)
Configure values on telemetry packet.
Definition: StorageManager.cpp:76
uint16 numRegisteredPackets()
Get the number of registered telemetry packets.
Definition: StorageManager.h:99
bool _fsys_working
Boolean to track and protect errors in file system.
Definition: StorageManager.h:118
int32 _fd_table[MAX_TLM_TABLE_SIZE]
Table of file descriptors for individual packet files.
Definition: StorageManager.h:114
char _time_str[TIME_STR_SIZE]
Variables for writing to file.
Definition: StorageManager.h:121
char _f_write_buf[CMD_TLM_STR_MAX_SIZE_BYTES]
Buffer for file write in both modes.
Definition: StorageManager.h:122
int16 start() override
Definition: StorageManager.cpp:180
char _print_buff[200]
Buffer for printing error/warning/debug statements.
Definition: StorageManager.h:112
int16 execute() override
Definition: StorageManager.cpp:210
int16 activate() override
Activate the app. The app will step when active.
Definition: StorageManager.cpp:242
int16 command(uint16 apid, uint8 *buffer, uint16 size) override
Process commands issued to the app.
Definition: StorageManager.cpp:216
int16 deactivate() override
Deactivate the app. The app will not step when deactivated.
Definition: StorageManager.cpp:247
int16 registerTlmPacket(uint16 tlm_apid)
Register a telemetry packet by adding it to the table.
Definition: StorageManager.cpp:33
uint16 _tlm_table_idx
Table of telemetry packet metadata.
Definition: StorageManager.h:110
char _default_storage_loc[1]
Default file storage location.
Definition: StorageManager.h:116
int16 storeTlm(const cmd_tlm_base &pkt)
Add a telemetry packet to the queue.
Definition: StorageManager.cpp:91
Definition: DeadReckon.cpp:20
const uint8 TIME_STR_SIZE
Constant for time string conversion.
Definition: StorageManager.h:34
Telemetry packet type metadata struct.
Definition: TelemetryManager.h:49
Base struct in definition of command and telemetry packets.
Definition: Telemetry.h:50