From 537a30a4de78bd0f86a60a4b73cb861cd38c1a7e Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Sun, 13 Jun 2021 12:34:06 +0200 Subject: [PATCH] added pus a tc --- FSFW.h | 7 ++++++ tmtcpacket/pus/CMakeLists.txt | 3 ++- tmtcpacket/pus/TcPacketBase.h | 25 --------------------- tmtcpacket/pus/TcPacketPusA.cpp | 3 +++ tmtcpacket/pus/TcPacketPusA.h | 40 +++++++++++++++++++++++++++++++++ tmtcpacket/pus/TcPacketPusC.cpp | 4 ++++ tmtcpacket/pus/TcPacketPusC.h | 8 +++++++ 7 files changed, 64 insertions(+), 26 deletions(-) create mode 100644 FSFW.h create mode 100644 tmtcpacket/pus/TcPacketPusA.cpp create mode 100644 tmtcpacket/pus/TcPacketPusA.h create mode 100644 tmtcpacket/pus/TcPacketPusC.cpp create mode 100644 tmtcpacket/pus/TcPacketPusC.h diff --git a/FSFW.h b/FSFW.h new file mode 100644 index 000000000..df06ff3df --- /dev/null +++ b/FSFW.h @@ -0,0 +1,7 @@ +#ifndef FSFW_FSFW_H_ +#define FSFW_FSFW_H_ + +#include "FSFWConfig.h" + + +#endif /* FSFW_FSFW_H_ */ diff --git a/tmtcpacket/pus/CMakeLists.txt b/tmtcpacket/pus/CMakeLists.txt index cd4f49f17..2d22cb668 100644 --- a/tmtcpacket/pus/CMakeLists.txt +++ b/tmtcpacket/pus/CMakeLists.txt @@ -1,6 +1,7 @@ target_sources(${LIB_FSFW_NAME} - PRIVATE + PRIVATE TcPacketBase.cpp + TcPacketPusA.cpp TcPacketStored.cpp TmPacketBase.cpp TmPacketMinimal.cpp diff --git a/tmtcpacket/pus/TcPacketBase.h b/tmtcpacket/pus/TcPacketBase.h index 582a22140..451f9c3aa 100644 --- a/tmtcpacket/pus/TcPacketBase.h +++ b/tmtcpacket/pus/TcPacketBase.h @@ -4,31 +4,6 @@ #include "../../tmtcpacket/SpacePacketBase.h" #include - -/** - * This struct defines a byte-wise structured PUS TC Data Field Header. - * Any optional fields in the header must be added or removed here. - * Currently, the Source Id field is present with one byte. - * @ingroup tmtcpackets - */ -struct PUSTcDataFieldHeader { - uint8_t version_type_ack; - uint8_t service_type; - uint8_t service_subtype; - uint8_t source_id; -}; - -/** - * This struct defines the data structure of a PUS Telecommand Packet when - * accessed via a pointer. - * @ingroup tmtcpackets - */ -struct TcPacketPointer { - CCSDSPrimaryHeader primary; - PUSTcDataFieldHeader dataField; - uint8_t appData; -}; - /** * This class is the basic data handler for any ECSS PUS Telecommand packet. * diff --git a/tmtcpacket/pus/TcPacketPusA.cpp b/tmtcpacket/pus/TcPacketPusA.cpp new file mode 100644 index 000000000..c9af38a63 --- /dev/null +++ b/tmtcpacket/pus/TcPacketPusA.cpp @@ -0,0 +1,3 @@ +#include "TcPacketPusA.h" + + diff --git a/tmtcpacket/pus/TcPacketPusA.h b/tmtcpacket/pus/TcPacketPusA.h new file mode 100644 index 000000000..9254ad32f --- /dev/null +++ b/tmtcpacket/pus/TcPacketPusA.h @@ -0,0 +1,40 @@ +#ifndef FSFW_TMTCPACKET_PUS_TCPACKETPUSA_H_ +#define FSFW_TMTCPACKET_PUS_TCPACKETPUSA_H_ + +#include "ccsds_header.h" +#include "TcPacketBase.h" + +#include + +/** + * This struct defines a byte-wise structured PUS TC A Data Field Header. + * Any optional fields in the header must be added or removed here. + * Currently, the Source Id field is present with one byte. + * @ingroup tmtcpackets + */ +struct PUSTcDataFieldHeader { + uint8_t version_type_ack; + uint8_t service_type; + uint8_t service_subtype; + uint8_t source_id; +}; + +/** + * This struct defines the data structure of a PUS Telecommand A packet when + * accessed via a pointer. + * @ingroup tmtcpackets + */ +struct TcPacketPointer { + CCSDSPrimaryHeader primary; + PUSTcDataFieldHeader dataField; + uint8_t appData; +}; + + +class TcPacketPusA: public TcPacketBase { +public: +private: +}; + + +#endif /* FSFW_TMTCPACKET_PUS_TCPACKETPUSA_H_ */ diff --git a/tmtcpacket/pus/TcPacketPusC.cpp b/tmtcpacket/pus/TcPacketPusC.cpp new file mode 100644 index 000000000..1f2946a85 --- /dev/null +++ b/tmtcpacket/pus/TcPacketPusC.cpp @@ -0,0 +1,4 @@ +#include "TcPacketPusC.h" + + + diff --git a/tmtcpacket/pus/TcPacketPusC.h b/tmtcpacket/pus/TcPacketPusC.h new file mode 100644 index 000000000..e965e752d --- /dev/null +++ b/tmtcpacket/pus/TcPacketPusC.h @@ -0,0 +1,8 @@ +#ifndef FSFW_TMTCPACKET_PUS_TCPACKETPUSC_H_ +#define FSFW_TMTCPACKET_PUS_TCPACKETPUSC_H_ + + + + + +#endif /* FSFW_TMTCPACKET_PUS_TCPACKETPUSC_H_ */