ccsds.h
57 lines
| 1.8 KiB
| text/x-c
|
CLexer
/ rmapplugin / ccsds.h
r0 | #ifndef CCSDS_H | |||
#define CCSDS_H | ||||
r11 | #define CCSDS_MAX_PACKET_LENGTH 4412 // in bytes, specified in the LFR Software Requirements Specification | |||
struct ccsdsPacketToProcess_str | ||||
{ | ||||
unsigned int size; | ||||
unsigned char data[CCSDS_MAX_PACKET_LENGTH]; | ||||
}; | ||||
typedef ccsdsPacketToProcess_str ccsdsPacketToProcess_t; | ||||
r0 | struct ccsds_telecommand_source_packet_hdr_str | |||
{ | ||||
unsigned char packetId1; | ||||
unsigned char packetId0; | ||||
unsigned char packetSequenceControl1; | ||||
unsigned char packetSequenceControl0; | ||||
unsigned char packetLength1; | ||||
unsigned char packetLength0; | ||||
unsigned char dataFieldHeader3; | ||||
unsigned char dataFieldHeader2; | ||||
unsigned char dataFieldHeader1; | ||||
unsigned char dataFieldHeader0; | ||||
}; | ||||
typedef ccsds_telecommand_source_packet_hdr_str ccsds_telecommand_source_packet_hdr_t; | ||||
struct ccsdsSourcePacket_pachetHeader_str | ||||
{ | ||||
unsigned char packetId1; | ||||
unsigned char packetId0; | ||||
unsigned char packetSequenceControl1; | ||||
unsigned char packetSequenceControl0; | ||||
unsigned char packetLength1; | ||||
unsigned char packetLength0; | ||||
}; | ||||
typedef ccsdsSourcePacket_pachetHeader_str ccsdsSourcePacket_pachetHeader_t; | ||||
struct ccsdsTelemetrySourcePacket_dataFieldHeader_str | ||||
{ | ||||
unsigned char spare_PUS_spare; | ||||
unsigned char serviceType; | ||||
unsigned char serviceSubtype; | ||||
unsigned char destinationID; | ||||
unsigned char SCTime[6]; | ||||
}; | ||||
typedef ccsdsTelemetrySourcePacket_dataFieldHeader_str ccsdsTelemetrySourcePacket_dataFieldHeader_t; | ||||
class ccsds | ||||
{ | ||||
public: | ||||
ccsds(unsigned char data_field_header, unsigned char processID, unsigned int sequence_count, unsigned int packet_length, unsigned char acceptance, unsigned int completion, | ||||
unsigned char service_type, unsigned char service_subtype, unsigned char sourceID); | ||||
ccsds_telecommand_source_packet_hdr_t *ccsds_header; | ||||
}; | ||||
#endif // CCSDS_H | ||||