GONEC_Almanah_Parser/Inc/AlmanahParser.h

56 lines
1.6 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// Created by xemon on 01.09.22.
//
#ifndef ALMANAH_PARSER_H
#define ALMANAH_PARSER_H
#include "stdint.h"
#include "ModemMain.h"
typedef struct __attribute__ ((packed)) {
uint8_t packetType; // Тип пакета
uint16_t sizeTransportPacket; // Размер транспортного служебного пакета
uint8_t numberRecipient[3]; // Номер получателя
uint8_t idArray; // Идентификатор массива
uint16_t offsetByteArray; // Смещение первого байта сегмента в массиве
uint8_t isEndSegment; // Признак последнего сегмент в массиве
uint8_t typeArray; // Тип массива
} tStructTransport_Packet;
typedef struct {
uint8_t numberKA; // Номер КА
uint16_t numberCoil; // Номер витка
struct {
uint8_t year;
uint8_t month;
uint8_t day;
} beginWorkAlmanah; // Начало работы альманаха
struct {
uint64_t seconds;
uint8_t minutes;
uint8_t hours;
} equatorTime; // Время экватора
uint64_t bigAxisOrbit; // Большая полуось орбиты
uint64_t averageValue1;
uint64_t averageValue2;
uint64_t averageValue3;
uint64_t averageValue4;
uint64_t averageValue5;
uint64_t averageValue6;
uint64_t averageValue7;
uint64_t averageValue8;
uint64_t averageValue9;
struct {
uint8_t year;
uint8_t month;
uint8_t day;
} endWorkAlmanah; // Конец работы альманаха
} tStructAlmanahTransportPacket;
#endif //ALMANAH_PARSER_H