Consts and references
This commit is contained in:
+12
-21
@@ -3,12 +3,14 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#pragma pack(push) /* push current alignment to stack */
|
||||
#pragma pack(1) /* set alignment to 1 byte boundary */
|
||||
|
||||
namespace germanairlinesva_websocket
|
||||
{
|
||||
#pragma pack(push) /* push current alignment to stack */
|
||||
#pragma pack(1) /* set alignment to 1 byte boundary */
|
||||
|
||||
/* Structures and enums */
|
||||
typedef struct data {
|
||||
struct data {
|
||||
std::int32_t pause = 0;
|
||||
float pBrake = 0;
|
||||
std::int32_t onGrnd = 0;
|
||||
@@ -27,30 +29,19 @@ namespace germanairlinesva_websocket
|
||||
float magHeading = 0;
|
||||
float payloadKg = 0;
|
||||
float totalWeightKg = 0;
|
||||
} data;
|
||||
};
|
||||
|
||||
typedef enum commands {
|
||||
PROCESS,
|
||||
SAVE,
|
||||
LOAD,
|
||||
TEXT,
|
||||
TIME,
|
||||
UNPAUSE,
|
||||
PAUSE,
|
||||
PORT,
|
||||
END
|
||||
} commands;
|
||||
enum commands { PROCESS, SAVE, LOAD, TEXT, TIME, UNPAUSE, PAUSE, PORT, END };
|
||||
|
||||
typedef struct command_base {
|
||||
commands type;
|
||||
} command_base;
|
||||
struct command_base {
|
||||
enum commands type;
|
||||
};
|
||||
|
||||
|
||||
typedef struct command_port {
|
||||
struct command_port {
|
||||
double latitude;
|
||||
double longitude;
|
||||
float trueHeading;
|
||||
} command_port;
|
||||
};
|
||||
|
||||
#pragma pack(pop) /* restore original alignment from stack */
|
||||
} // namespace germanairlinesva_websocket
|
||||
|
||||
Reference in New Issue
Block a user