21#ifndef FLIGHT_STORAGEMANAGER_H
22#define FLIGHT_STORAGEMANAGER_H
29#include "configuration.h"
101 int16
command(uint16
apid, uint8* buffer, uint16 size) override;
107 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
App(FlightExecutive &executive, const char *name, uint16 apid, uint8 instance=0)
Executive-based constructor for the task.
Definition App.cpp:21
uint8 & instance()
Get the instance of this app (used to differentiate between multiple instances of the same app).
Definition App.h:109
uint16 apid()
Get the apid for this app.
Definition App.h:105
FlightExecutive & exc
Override our executive to include the FlightExecutive instead.
Definition App.h:120
Executive derivation specifically to run flight systems.
Definition FlightExecutive.h:46
int32 _fd_table_2[MAX_TLM_TABLE_SIZE]
Table of file descriptors for individual packet files for SD card 2.
Definition StorageManager.h:122
char _default_storage_loc[1]
Default file storage location.
Definition StorageManager.h:124
int16 command(uint16 apid, uint8 *buffer, uint16 size) override
Process commands issued to the app.
Definition StorageManager.cpp:240
int32 _findPktIndex(uint16 apid, uint8 instance)
Find index of packet in tlm table matching apid.
Definition StorageManager.cpp:276
int32 _fd_table_1[MAX_TLM_TABLE_SIZE]
Table of file descriptors for individual packet files for SD card 1.
Definition StorageManager.h:121
bool _fsys_working
Boolean to track and protect errors in file system.
Definition StorageManager.h:126
uint16 _tlm_table_idx
Table of telemetry packet metadata.
Definition StorageManager.h:117
StorageManager(FlightExecutive &exc)
Only available flight executive constructor.
Definition StorageManager.cpp:25
char _file_name[FILE_NAME_MAX]
Buffer to hold file names.
Definition StorageManager.h:131
char _print_buff[200]
Buffer for printing error/warning/debug statements.
Definition StorageManager.h:119
int16 start() override
Definition StorageManager.cpp:184
uint16 numRegisteredPackets()
Get the number of registered telemetry packets.
Definition StorageManager.h:105
int16 activate() override
Activate the app. The app will step when active.
Definition StorageManager.cpp:266
int16 deactivate() override
Deactivate the app. The app will not step when deactivated.
Definition StorageManager.cpp:271
int16 registerTlmPacket(uint16 tlm_apid, uint8 instance)
Register a telemetry packet by adding it to the table.
Definition StorageManager.cpp:33
PacketTypeInfo _tlm_table[MAX_TLM_TABLE_SIZE]
Definition StorageManager.h:116
int16 storeTlm(const cmd_tlm_base &pkt, uint8 instance)
Add a telemetry packet to the queue.
Definition StorageManager.cpp:92
int16 configureTlmPacket(const PacketTypeInfo &info)
Configure values on telemetry packet.
Definition StorageManager.cpp:77
char _f_write_buf[CMD_TLM_STR_MAX_SIZE_BYTES]
Buffer for file write in both modes.
Definition StorageManager.h:130
char _time_str[TIME_STR_SIZE]
Variables for writing to file.
Definition StorageManager.h:129
int16 execute() override
Definition StorageManager.cpp:235
Definition DeadReckon.cpp:20
const uint8 FILE_NAME_MAX
Constant for filenaming.
Definition StorageManager.h:35
const uint8 TIME_STR_SIZE
Constant for time string conversion.
Definition StorageManager.h:34
Base struct in definition of command and telemetry packets.
Definition Telemetry.h:48
Telemetry packet type metadata struct.
Definition TelemetryManager.h:43
clockwerk::DataIO< char * > sec_storage_loc
Definition StorageManager.h:62
clockwerk::DataIO< bool > output_to_csv
Definition StorageManager.h:56
clockwerk::DataIO< char * > pri_storage_loc
Definition StorageManager.h:59