Nakuja Flight Computer Testing and Simulation Engine (NaFCTSE) 1.0
A testing and verification tool for the Nakuja Rocket Project flight computers
Loading...
Searching...
No Matches
serialparser.h
1#ifndef SERIALPARSER_H
2#define SERIALPARSER_H
3
4#include <QObject>
5#include <QVector>
6
7#define DEBUG_STATES 0 // set this to 1 to print the state names
8
9// default state is the HANDSHAKE state, so that we initialize XMODEM communication with the hardware
10// the hardware will send a NAK code to us, if we receive this code, we respond with a SOH then
11// switch the state to NOMINAL and proceed
12// uint8_t current_app_state = APP_STATES::HANDSHAKE;
13
14class SerialParser : public QObject
15{
16 Q_OBJECT
17public:
18 explicit SerialParser(QObject *parent = nullptr);
19
20 QVector<QString> packet_vector; // store parsed csv packet
21 quint8 flight_state;
22
23 void parseAll(const QString data);
24 void decodeStates(const QString s);
25 quint8 getCurrentFlightState();
26 void testParse();
27
28signals:
29};
30
31#endif // SERIALPARSER_H
void parseAll(const QString data)
SerialParser::parseAll.
Definition serialparser.cpp:26
quint8 getCurrentFlightState()
SerialParser::getCurrentState.
Definition serialparser.cpp:113
void testParse()
SerialParser::testParse A test function.
Definition serialparser.cpp:15
void decodeStates(const QString s)
decodeStates
Definition serialparser.cpp:59