cleaned up a bit

This commit is contained in:
Robin Müller 2021-06-14 10:19:01 +02:00
parent dadba69272
commit 56d2af9d25
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
49 changed files with 173 additions and 196 deletions

View File

@ -3,7 +3,7 @@
#include "../serviceinterface/ServiceInterface.h"
#include "../objectmanager/SystemObject.h"
#include "../tmtcpacket/pus/TmPacketStored.h"
#include "../tmtcpacket/pus/tm/TmPacketStored.h"
Service17Test::Service17Test(object_id_t objectId,

View File

@ -4,7 +4,7 @@
#include "../ipc/QueueFactory.h"
#include "../objectmanager/ObjectManager.h"
#include "../tmtcservices/PusVerificationReport.h"
#include "../tmtcpacket/pus/TmPacketStored.h"
#include "../tmtcpacket/pus/tm/TmPacketStored.h"
#include "../serviceinterface/ServiceInterfaceStream.h"
#include "../tmtcservices/AcceptsTelemetryIF.h"

View File

@ -5,7 +5,7 @@
#include "../objectmanager/ObjectManager.h"
#include "../events/EventManagerIF.h"
#include "../ipc/QueueFactory.h"
#include "../tmtcpacket/pus/TmPacketStored.h"
#include "../tmtcpacket/pus/tm/TmPacketStored.h"
Service5EventReporting::Service5EventReporting(object_id_t objectId,

View File

@ -118,11 +118,7 @@ uint16_t PUSDistributor::getIdentifier() {
}
ReturnValue_t PUSDistributor::initialize() {
#if FSFW_USE_PUS_C_TELECOMMANDS == 1
currentPacket = new TcPacketStoredPusC();
#else
currentPacket = new TcPacketStoredPusA();
#endif
currentPacket = new TcPacketStoredPus();
if(currentPacket == nullptr) {
// Should not happen, memory allocation failed!
return ObjectManagerIF::CHILD_INIT_FAILED;

View File

@ -5,7 +5,7 @@
#include "TcDistributor.h"
#include "TcPacketCheck.h"
#include "../tmtcpacket/pus/TcPacketStored.h"
#include "../tmtcpacket/pus/tc.h"
#include "../returnvalues/HasReturnvaluesIF.h"
#include "../tmtcservices/AcceptsTelecommandsIF.h"
#include "../tmtcservices/VerificationReporter.h"
@ -52,11 +52,7 @@ protected:
/**
* The currently handled packet is stored here.
*/
#if FSFW_USE_PUS_C_TELECOMMANDS == 1
TcPacketStoredPusC* currentPacket = nullptr;
#else
TcPacketStoredPusA* currentPacket = nullptr;
#endif
TcPacketStoredPus* currentPacket = nullptr;
/**
* With this variable, the current check status is stored to generate

View File

@ -1,8 +1,8 @@
#include "TcPacketCheck.h"
#include "../globalfunctions/CRC.h"
#include "../tmtcpacket/pus/TcPacketBase.h"
#include "../tmtcpacket/pus/TcPacketStoredBase.h"
#include "../tmtcpacket/pus/tc/TcPacketBase.h"
#include "../tmtcpacket/pus/tc/TcPacketStoredBase.h"
#include "../serviceinterface/ServiceInterface.h"
#include "../storagemanager/StorageManagerIF.h"
#include "../tmtcservices/VerificationCodes.h"

View File

@ -5,7 +5,7 @@
#include "../serialize/SerializeElement.h"
#include "../serialize/SerialLinkedListAdapter.h"
#include "../serialize/SerialBufferAdapter.h"
#include "../tmtcpacket/pus/TmPacketMinimal.h"
#include "../tmtcpacket/pus/tm/TmPacketMinimal.h"
#include "../timemanager/TimeStamperIF.h"
#include "../timemanager/CCSDSTime.h"
#include "../globalfunctions/timevalOperations.h"

View File

@ -3,7 +3,7 @@
#include "../../globalfunctions/matching/SerializeableMatcherIF.h"
#include "../../serialize/SerializeAdapter.h"
#include "../../tmtcpacket/pus/TmPacketMinimal.h"
#include "../../tmtcpacket/pus/tm/TmPacketMinimal.h"
class ApidMatcher: public SerializeableMatcherIF<TmPacketMinimal*> {
private:

View File

@ -4,7 +4,7 @@
#include "../../container/PlacementFactory.h"
#include "../../globalfunctions/matching/MatchTree.h"
#include "../../storagemanager/LocalPool.h"
#include "../../tmtcpacket/pus/TmPacketMinimal.h"
#include "../../tmtcpacket/pus/tm/TmPacketMinimal.h"
class PacketMatchTree: public MatchTree<TmPacketMinimal*>, public HasReturnvaluesIF {
public:

View File

@ -3,7 +3,7 @@
#include "../../globalfunctions/matching/SerializeableMatcherIF.h"
#include "../../serialize/SerializeAdapter.h"
#include "../../tmtcpacket/pus/TmPacketMinimal.h"
#include "../pus/tm/TmPacketMinimal.h"
class ServiceMatcher: public SerializeableMatcherIF<TmPacketMinimal*> {
private:

View File

@ -3,7 +3,7 @@
#include "../../globalfunctions/matching/SerializeableMatcherIF.h"
#include "../../serialize/SerializeAdapter.h"
#include "../../tmtcpacket/pus/TmPacketMinimal.h"
#include "../pus/tm/TmPacketMinimal.h"
class SubServiceMatcher: public SerializeableMatcherIF<TmPacketMinimal*> {
public:

View File

@ -1,14 +1,2 @@
target_sources(${LIB_FSFW_NAME} PRIVATE
TcPacketBase.cpp
TcPacketPusA.cpp
TcPacketStoredBase.cpp
TcPacketStoredPusA.cpp
TmPacketBase.cpp
TmPacketMinimal.cpp
TmPacketStoredPusA.cpp
TmPacketStoredPusC.cpp
TmPacketPusA.cpp
TmPacketPusC.cpp
TmPacketStoredBase.cpp
)
add_subdirectory(tm)
add_subdirectory(tc)

View File

@ -1,4 +0,0 @@
#include "TcPacketPusC.h"

View File

@ -1,8 +0,0 @@
#ifndef FSFW_TMTCPACKET_PUS_TCPACKETPUSC_H_
#define FSFW_TMTCPACKET_PUS_TCPACKETPUSC_H_
#endif /* FSFW_TMTCPACKET_PUS_TCPACKETPUSC_H_ */

View File

@ -1,13 +0,0 @@
#ifndef FSFW_TMTCPACKET_PUS_TCPACKETSTORED_H_
#define FSFW_TMTCPACKET_PUS_TCPACKETSTORED_H_
#include <FSFWConfig.h>
#if FSFW_USE_PUS_C_TELECOMMANDS == 1
#include "TcPacketStoredPusC.h"
#else
#include "TcPacketStoredPusA.h"
#endif
#endif /* FSFW_TMTCPACKET_PUS_TCPACKETSTORED_H_ */

View File

@ -1,2 +0,0 @@
#include "TcPacketStoredPusC.h"

View File

@ -1,8 +0,0 @@
#ifndef FSFW_TMTCPACKET_PUS_TCPACKETSTOREDPUSC_H_
#define FSFW_TMTCPACKET_PUS_TCPACKETSTOREDPUSC_H_
#endif /* FSFW_TMTCPACKET_PUS_TCPACKETSTOREDPUSC_H_ */

7
tmtcpacket/pus/tc.h Normal file
View File

@ -0,0 +1,7 @@
#ifndef FSFW_TMTCPACKET_PUS_TC_H_
#define FSFW_TMTCPACKET_PUS_TC_H_
#include "tc/TcPacketStoredPus.h"
#include "tc/TcPacketPus.h"
#endif /* FSFW_TMTCPACKET_PUS_TC_H_ */

View File

@ -0,0 +1,6 @@
target_sources(${LIB_FSFW_NAME} PRIVATE
TcPacketBase.cpp
TcPacketPus.cpp
TcPacketStoredBase.cpp
TcPacketStoredPus.cpp
)

View File

@ -1,8 +1,8 @@
#include "TcPacketBase.h"
#include "../../globalfunctions/CRC.h"
#include "../../globalfunctions/arrayprinter.h"
#include "../../serviceinterface/ServiceInterface.h"
#include "../../../globalfunctions/CRC.h"
#include "../../../globalfunctions/arrayprinter.h"
#include "../../../serviceinterface/ServiceInterface.h"
#include <cstring>

View File

@ -1,7 +1,7 @@
#ifndef TMTCPACKET_PUS_TCPACKETBASE_H_
#define TMTCPACKET_PUS_TCPACKETBASE_H_
#include "../../tmtcpacket/SpacePacketBase.h"
#include "../../../tmtcpacket/SpacePacketBase.h"
#include <cstddef>
/**

View File

@ -1,39 +1,39 @@
#include "TcPacketPusA.h"
#include "../../globalfunctions/CRC.h"
#include "TcPacketPus.h"
#include "../../../globalfunctions/CRC.h"
#include <cstring>
TcPacketPusA::TcPacketPusA(const uint8_t *setData): TcPacketBase(setData) {
TcPacketPus::TcPacketPus(const uint8_t *setData): TcPacketBase(setData) {
tcData = reinterpret_cast<TcPacketPointer*>(const_cast<uint8_t*>(setData));
}
uint8_t TcPacketPusA::getService() const {
return tcData->dataField.service_type;
uint8_t TcPacketPus::getService() const {
return tcData->dataField.serviceType;
}
uint8_t TcPacketPusA::getSubService() {
return tcData->dataField.service_subtype;
uint8_t TcPacketPus::getSubService() {
return tcData->dataField.serviceSubtype;
}
uint8_t TcPacketPusA::getAcknowledgeFlags() {
return tcData->dataField.version_type_ack & 0b00001111;
uint8_t TcPacketPus::getAcknowledgeFlags() {
return tcData->dataField.versionTypeAck & 0b00001111;
}
const uint8_t* TcPacketPusA::getApplicationData() const {
const uint8_t* TcPacketPus::getApplicationData() const {
return &tcData->appData;
}
uint16_t TcPacketPusA::getApplicationDataSize() {
uint16_t TcPacketPus::getApplicationDataSize() {
return getPacketDataLength() - sizeof(tcData->dataField) - CRC_SIZE + 1;
}
uint16_t TcPacketPusA::getErrorControl() {
uint16_t TcPacketPus::getErrorControl() {
uint16_t size = getApplicationDataSize() + CRC_SIZE;
uint8_t* p_to_buffer = &tcData->appData;
return (p_to_buffer[size - 2] << 8) + p_to_buffer[size - 1];
}
void TcPacketPusA::setErrorControl() {
void TcPacketPus::setErrorControl() {
uint32_t full_size = getFullSize();
uint16_t crc = CRC::crc16ccitt(getWholeData(), full_size - CRC_SIZE);
uint32_t size = getApplicationDataSize();
@ -41,35 +41,35 @@ void TcPacketPusA::setErrorControl() {
(&tcData->appData)[size + 1] = (crc) & 0X00FF; // CRCL
}
void TcPacketPusA::setData(const uint8_t* pData) {
void TcPacketPus::setData(const uint8_t* pData) {
SpacePacketBase::setData(pData);
// This function is const-correct, but it was decided to keep the pointer non-const
// for convenience. Therefore, cast aways constness here and then cast to packet type.
tcData = reinterpret_cast<TcPacketPointer*>(const_cast<uint8_t*>(pData));
}
uint8_t TcPacketPusA::getSecondaryHeaderFlag() {
return (tcData->dataField.version_type_ack & 0b10000000) >> 7;
uint8_t TcPacketPus::getSecondaryHeaderFlag() {
return (tcData->dataField.versionTypeAck & 0b10000000) >> 7;
}
uint8_t TcPacketPusA::getPusVersionNumber() {
return (tcData->dataField.version_type_ack & 0b01110000) >> 4;
uint8_t TcPacketPus::getPusVersionNumber() {
return (tcData->dataField.versionTypeAck & 0b01110000) >> 4;
}
void TcPacketPusA::initializeTcPacket(uint16_t apid, uint16_t sequenceCount,
void TcPacketPus::initializeTcPacket(uint16_t apid, uint16_t sequenceCount,
uint8_t ack, uint8_t service, uint8_t subservice) {
initSpacePacketHeader(true, true, apid, sequenceCount);
std::memset(&tcData->dataField, 0, sizeof(tcData->dataField));
setPacketDataLength(sizeof(PUSTcDataFieldHeader) + CRC_SIZE - 1);
// Data Field Header:
// Set CCSDS_secondary_header_flag to 0 and version number to 001
tcData->dataField.version_type_ack = 0b00010000;
tcData->dataField.version_type_ack |= (ack & 0x0F);
tcData->dataField.service_type = service;
tcData->dataField.service_subtype = subservice;
tcData->dataField.versionTypeAck = 0b00010000;
tcData->dataField.versionTypeAck |= (ack & 0x0F);
tcData->dataField.serviceType = service;
tcData->dataField.serviceSubtype = subservice;
}
size_t TcPacketPusA::calculateFullPacketLength(size_t appDataLen) {
size_t TcPacketPus::calculateFullPacketLength(size_t appDataLen) {
return sizeof(CCSDSPrimaryHeader) + sizeof(PUSTcDataFieldHeader) +
appDataLen + TcPacketBase::CRC_SIZE;
}

View File

@ -1,7 +1,8 @@
#ifndef FSFW_TMTCPACKET_PUS_TCPACKETPUSA_H_
#define FSFW_TMTCPACKET_PUS_TCPACKETPUSA_H_
#include "../ccsds_header.h"
#include "../../../FSFW.h"
#include "../../ccsds_header.h"
#include "TcPacketBase.h"
#include <cstdint>
@ -13,10 +14,14 @@
* @ingroup tmtcpackets
*/
struct PUSTcDataFieldHeader {
uint8_t version_type_ack;
uint8_t service_type;
uint8_t service_subtype;
uint8_t source_id;
uint8_t versionTypeAck;
uint8_t serviceType;
uint8_t serviceSubtype;
#if FSFW_USE_PUS_C_TELECOMMANDS == 1
uint16_t sourceId;
#else
uint8_t sourceId;
#endif
};
/**
@ -31,7 +36,7 @@ struct TcPacketPointer {
};
class TcPacketPusA: public TcPacketBase {
class TcPacketPus: public TcPacketBase {
public:
static const uint16_t TC_PACKET_MIN_SIZE = (sizeof(CCSDSPrimaryHeader) +
sizeof(PUSTcDataFieldHeader) + 2);
@ -41,7 +46,7 @@ public:
* create an empty (invalid) object by passing nullptr as the data pointer
* @param setData
*/
TcPacketPusA(const uint8_t* setData);
TcPacketPus(const uint8_t* setData);
// Base class overrides
virtual uint8_t getSecondaryHeaderFlag() override;

View File

@ -1,8 +1,8 @@
#include "TcPacketStoredBase.h"
#include "../../objectmanager/ObjectManager.h"
#include "../../serviceinterface/ServiceInterface.h"
#include "../../objectmanager/frameworkObjects.h"
#include "../../../objectmanager/ObjectManager.h"
#include "../../../serviceinterface/ServiceInterface.h"
#include "../../../objectmanager/frameworkObjects.h"
#include <cstring>

View File

@ -1,8 +1,8 @@
#ifndef TMTCPACKET_PUS_TCPACKETSTORED_H_
#define TMTCPACKET_PUS_TCPACKETSTORED_H_
#include <fsfw/tmtcpacket/pus/TcPacketStoredIF.h>
#include "../../storagemanager/StorageManagerIF.h"
#include "TcPacketStoredIF.h"
#include "../../../storagemanager/StorageManagerIF.h"
/**
* This class generates a ECSS PUS Telecommand packet within a given

View File

@ -1,9 +1,9 @@
#ifndef FSFW_TMTCPACKET_PUS_TCPACKETSTOREDIF_H_
#define FSFW_TMTCPACKET_PUS_TCPACKETSTOREDIF_H_
#include "../../tmtcpacket/pus/TcPacketBase.h"
#include "../../storagemanager/storeAddress.h"
#include "../../returnvalues/HasReturnvaluesIF.h"
#include "TcPacketBase.h"
#include "../../../storagemanager/storeAddress.h"
#include "../../../returnvalues/HasReturnvaluesIF.h"
class TcPacketStoredIF {
public:

View File

@ -1,11 +1,11 @@
#include "TcPacketStoredPusA.h"
#include "TcPacketStoredPus.h"
#include <cstring>
TcPacketStoredPusA::TcPacketStoredPusA(uint16_t apid, uint8_t service,
TcPacketStoredPus::TcPacketStoredPus(uint16_t apid, uint8_t service,
uint8_t subservice, uint8_t sequenceCount, const uint8_t* data,
size_t size, uint8_t ack) :
TcPacketPusA(nullptr) {
TcPacketPus(nullptr) {
this->storeAddress.raw = StorageManagerIF::INVALID_ADDRESS;
if (not this->checkAndSetStore()) {
return;
@ -28,14 +28,14 @@ TcPacketStoredPusA::TcPacketStoredPusA(uint16_t apid, uint8_t service,
this->setErrorControl();
}
TcPacketStoredPusA::TcPacketStoredPusA(): TcPacketStoredBase(), TcPacketPusA(nullptr) {
TcPacketStoredPus::TcPacketStoredPus(): TcPacketStoredBase(), TcPacketPus(nullptr) {
}
TcPacketStoredPusA::TcPacketStoredPusA(store_address_t setAddress): TcPacketPusA(nullptr) {
TcPacketStoredPus::TcPacketStoredPus(store_address_t setAddress): TcPacketPus(nullptr) {
TcPacketStoredBase::setStoreAddress(setAddress);
}
TcPacketStoredPusA::TcPacketStoredPusA(const uint8_t* data, size_t size): TcPacketPusA(data) {
TcPacketStoredPus::TcPacketStoredPus(const uint8_t* data, size_t size): TcPacketPus(data) {
if (this->getFullSize() != size) {
return;
}
@ -51,19 +51,19 @@ TcPacketStoredPusA::TcPacketStoredPusA(const uint8_t* data, size_t size): TcPack
}
}
ReturnValue_t TcPacketStoredPusA::deletePacket() {
ReturnValue_t TcPacketStoredPus::deletePacket() {
ReturnValue_t result = this->store->deleteData(this->storeAddress);
this->storeAddress.raw = StorageManagerIF::INVALID_ADDRESS;
this->setData(nullptr);
return result;
}
TcPacketBase* TcPacketStoredPusA::getPacketBase() {
TcPacketBase* TcPacketStoredPus::getPacketBase() {
return this;
}
bool TcPacketStoredPusA::isSizeCorrect() {
bool TcPacketStoredPus::isSizeCorrect() {
const uint8_t* temp_data = nullptr;
size_t temp_size;
ReturnValue_t status = this->store->getData(this->storeAddress, &temp_data,

View File

@ -2,11 +2,11 @@
#define FSFW_TMTCPACKET_PUS_TCPACKETSTOREDPUSA_H_
#include "TcPacketStoredBase.h"
#include "TcPacketPusA.h"
#include "TcPacketPus.h"
class TcPacketStoredPusA:
class TcPacketStoredPus:
public TcPacketStoredBase,
public TcPacketPusA {
public TcPacketPus {
public:
/**
* With this constructor, new space is allocated in the packet store and
@ -24,7 +24,7 @@ public:
* number of verification packets returned
* for this command.
*/
TcPacketStoredPusA(uint16_t apid, uint8_t service, uint8_t subservice,
TcPacketStoredPus(uint16_t apid, uint8_t service, uint8_t subservice,
uint8_t sequence_count = 0, const uint8_t* data = nullptr,
size_t size = 0, uint8_t ack = TcPacketBase::ACK_ALL);
/**
@ -32,13 +32,13 @@ public:
* @param data
* @param size
*/
TcPacketStoredPusA(const uint8_t* data, size_t size);
TcPacketStoredPus(const uint8_t* data, size_t size);
/**
* Create stored packet from existing packet in store
* @param setAddress
*/
TcPacketStoredPusA(store_address_t setAddress);
TcPacketStoredPusA();
TcPacketStoredPus(store_address_t setAddress);
TcPacketStoredPus();
ReturnValue_t deletePacket() override;
TcPacketBase* getPacketBase() override;

16
tmtcpacket/pus/tm.h Normal file
View File

@ -0,0 +1,16 @@
#ifndef FSFW_TMTCPACKET_PUS_TM_H_
#define FSFW_TMTCPACKET_PUS_TM_H_
#include "../../FSFW.h"
#if FSFW_USE_PUS_C_TELEMETRY == 1
#include "tm/TmPacketPusC.h"
#include "tm/TmPacketStoredPusC.h"
#else
#include "tm/TmPacketPusA.h"
#include "tm/TmPacketStoredPusA.h"
#endif
#include "tm/TmPacketMinimal.h"
#endif /* FSFW_TMTCPACKET_PUS_TM_H_ */

View File

@ -0,0 +1,9 @@
target_sources(${LIB_FSFW_NAME} PRIVATE
TmPacketStoredPusA.cpp
TmPacketStoredPusC.cpp
TmPacketPusA.cpp
TmPacketPusC.cpp
TmPacketStoredBase.cpp
TmPacketBase.cpp
TmPacketMinimal.cpp
)

View File

@ -1,10 +1,10 @@
#include "TmPacketBase.h"
#include "../../globalfunctions/CRC.h"
#include "../../globalfunctions/arrayprinter.h"
#include "../../objectmanager/ObjectManager.h"
#include "../../serviceinterface/ServiceInterface.h"
#include "../../timemanager/CCSDSTime.h"
#include "../../../globalfunctions/CRC.h"
#include "../../../globalfunctions/arrayprinter.h"
#include "../../../objectmanager/ObjectManager.h"
#include "../../../serviceinterface/ServiceInterface.h"
#include "../../../timemanager/CCSDSTime.h"
#include <cstring>

View File

@ -1,10 +1,10 @@
#ifndef TMTCPACKET_PUS_TMPACKETBASE_H_
#define TMTCPACKET_PUS_TMPACKETBASE_H_
#include "../SpacePacketBase.h"
#include "../../timemanager/TimeStamperIF.h"
#include "../../timemanager/Clock.h"
#include "../../objectmanager/SystemObjectIF.h"
#include "../../SpacePacketBase.h"
#include "../../../timemanager/TimeStamperIF.h"
#include "../../../timemanager/Clock.h"
#include "../../../objectmanager/SystemObjectIF.h"
namespace Factory{
void setStaticFrameworkObjectIds();

View File

@ -1,7 +1,8 @@
#include "TmPacketMinimal.h"
#include <stddef.h>
#include <time.h>
#include "PacketTimestampInterpreterIF.h"
#include "../PacketTimestampInterpreterIF.h"
#include <cstddef>
#include <ctime>
TmPacketMinimal::TmPacketMinimal(const uint8_t* set_data) : SpacePacketBase( set_data ) {
this->tm_data = (TmPacketMinimalPointer*)set_data;

View File

@ -2,8 +2,8 @@
#define FRAMEWORK_TMTCPACKET_PUS_TMPACKETMINIMAL_H_
#include "../../tmtcpacket/SpacePacketBase.h"
#include "../../returnvalues/HasReturnvaluesIF.h"
#include "../../SpacePacketBase.h"
#include "../../../returnvalues/HasReturnvaluesIF.h"
struct timeval;
class PacketTimestampInterpreterIF;

View File

@ -1,11 +1,11 @@
#include "TmPacketPusA.h"
#include "TmPacketBase.h"
#include "../../globalfunctions/CRC.h"
#include "../../globalfunctions/arrayprinter.h"
#include "../../objectmanager/ObjectManagerIF.h"
#include "../../serviceinterface/ServiceInterfaceStream.h"
#include "../../timemanager/CCSDSTime.h"
#include "../../../globalfunctions/CRC.h"
#include "../../../globalfunctions/arrayprinter.h"
#include "../../../objectmanager/ObjectManagerIF.h"
#include "../../../serviceinterface/ServiceInterfaceStream.h"
#include "../../../timemanager/CCSDSTime.h"
#include <cstring>

View File

@ -2,10 +2,10 @@
#define FSFW_TMTCPACKET_PUS_TMPACKETPUSA_H_
#include "TmPacketBase.h"
#include "../SpacePacketBase.h"
#include "../../timemanager/TimeStamperIF.h"
#include "../../timemanager/Clock.h"
#include "../../objectmanager/SystemObjectIF.h"
#include "../../SpacePacketBase.h"
#include "../../../timemanager/TimeStamperIF.h"
#include "../../../timemanager/Clock.h"
#include "../../../objectmanager/SystemObjectIF.h"
namespace Factory{
void setStaticFrameworkObjectIds();

View File

@ -1,11 +1,11 @@
#include "TmPacketPusC.h"
#include "TmPacketBase.h"
#include "../../globalfunctions/CRC.h"
#include "../../globalfunctions/arrayprinter.h"
#include "../../objectmanager/ObjectManagerIF.h"
#include "../../serviceinterface/ServiceInterfaceStream.h"
#include "../../timemanager/CCSDSTime.h"
#include "../../../globalfunctions/CRC.h"
#include "../../../globalfunctions/arrayprinter.h"
#include "../../../objectmanager/ObjectManagerIF.h"
#include "../../../serviceinterface/ServiceInterfaceStream.h"
#include "../../../timemanager/CCSDSTime.h"
#include <cstring>

View File

@ -2,10 +2,10 @@
#define FSFW_TMTCPACKET_PUS_TMPACKETPUSC_H_
#include "TmPacketBase.h"
#include "../SpacePacketBase.h"
#include "../../timemanager/TimeStamperIF.h"
#include "../../timemanager/Clock.h"
#include "../../objectmanager/SystemObjectIF.h"
#include "../../SpacePacketBase.h"
#include "../../../timemanager/TimeStamperIF.h"
#include "../../../timemanager/Clock.h"
#include "../../../objectmanager/SystemObjectIF.h"
namespace Factory{
void setStaticFrameworkObjectIds();

View File

@ -1,8 +1,8 @@
#include "TmPacketStoredBase.h"
#include "../../objectmanager/ObjectManager.h"
#include "../../serviceinterface/ServiceInterface.h"
#include "../../tmtcservices/TmTcMessage.h"
#include "../../../objectmanager/ObjectManager.h"
#include "../../../serviceinterface/ServiceInterface.h"
#include "../../../tmtcservices/TmTcMessage.h"
#include <cstring>

View File

@ -1,15 +1,15 @@
#ifndef FSFW_TMTCPACKET_PUS_TMPACKETSTOREDBASE_H_
#define FSFW_TMTCPACKET_PUS_TMPACKETSTOREDBASE_H_
#include "../../../FSFW.h"
#include "TmPacketBase.h"
#include "TmPacketStoredBase.h"
#include <FSFWConfig.h>
#include "TmPacketPusA.h"
#include "../../tmtcpacket/pus/TmPacketPusA.h"
#include "../../serialize/SerializeIF.h"
#include "../../storagemanager/StorageManagerIF.h"
#include "../../internalError/InternalErrorReporterIF.h"
#include "../../ipc/MessageQueueSenderIF.h"
#include "../../../serialize/SerializeIF.h"
#include "../../../storagemanager/StorageManagerIF.h"
#include "../../../internalError/InternalErrorReporterIF.h"
#include "../../../ipc/MessageQueueSenderIF.h"
/**
* This class generates a ECSS PUS Telemetry packet within a given

View File

@ -1,7 +1,7 @@
#include "TmPacketStoredPusA.h"
#include "../../serviceinterface/ServiceInterface.h"
#include "../../tmtcservices/TmTcMessage.h"
#include "../../../serviceinterface/ServiceInterface.h"
#include "../../../tmtcservices/TmTcMessage.h"
#include <cstring>

View File

@ -1,7 +1,7 @@
#include "TmPacketStoredPusC.h"
#include "../../serviceinterface/ServiceInterface.h"
#include "../../tmtcservices/TmTcMessage.h"
#include "../../../serviceinterface/ServiceInterface.h"
#include "../../../tmtcservices/TmTcMessage.h"
#include <cstring>

View File

@ -1,8 +1,8 @@
#ifndef FSFW_TMTCPACKET_PUS_TMPACKETSTOREDPUSC_H_
#define FSFW_TMTCPACKET_PUS_TMPACKETSTOREDPUSC_H_
#include <fsfw/tmtcpacket/pus/TmPacketPusC.h>
#include <fsfw/tmtcpacket/pus/TmPacketStoredBase.h>
#include "TmPacketPusC.h"
#include "TmPacketStoredBase.h"
/**
* This class generates a ECSS PUS C Telemetry packet within a given

View File

@ -6,8 +6,8 @@
#include "../tcdistribution/PUSDistributorIF.h"
#include "../objectmanager/ObjectManager.h"
#include "../ipc/QueueFactory.h"
#include "../tmtcpacket/pus/TcPacketStored.h"
#include "../tmtcpacket/pus/TmPacketStored.h"
#include "../tmtcpacket/pus/tc.h"
#include "../tmtcpacket/pus/tm.h"
#include "../serviceinterface/ServiceInterface.h"
object_id_t CommandingServiceBase::defaultPacketSource = objects::NO_OBJECT;
@ -246,11 +246,7 @@ void CommandingServiceBase::handleRequestQueue() {
TmTcMessage message;
ReturnValue_t result;
store_address_t address;
#if FSFW_USE_PUS_C_TELECOMMANDS == 1
TcPacketStoredPusC packet;
#else
TcPacketStoredPusA packet;
#endif
TcPacketStoredPus packet;
MessageQueueId_t queue;
object_id_t objectId;
for (result = requestQueue->receiveMessage(&message); result == RETURN_OK;
@ -436,11 +432,7 @@ void CommandingServiceBase::checkAndExecuteFifo(CommandMapIter& iter) {
if (iter->second.fifo.retrieve(&address) != RETURN_OK) {
commandMap.erase(&iter);
} else {
#if FSFW_USE_PUS_C_TELECOMMANDS == 1
TcPacketStoredPusC newPacket(address);
#else
TcPacketStoredPusA newPacket(address);
#endif
TcPacketStoredPus newPacket(address);
startExecution(&newPacket, iter);
}
}

View File

@ -1,7 +1,6 @@
#ifndef FSFW_TMTCSERVICES_COMMANDINGSERVICEBASE_H_
#define FSFW_TMTCSERVICES_COMMANDINGSERVICEBASE_H_
#include <fsfw/tmtcpacket/pus/TcPacketStoredBase.h>
#include "AcceptsTelecommandsIF.h"
#include "VerificationReporter.h"
@ -17,6 +16,7 @@
#include <FSFWConfig.h>
class TcPacketStored;
class TcPacketStoredBase;
namespace Factory{
void setStaticFrameworkObjectIds();

View File

@ -9,7 +9,7 @@
#include "../objectmanager/SystemObject.h"
#include "../returnvalues/HasReturnvaluesIF.h"
#include "../tasks/ExecutableObjectIF.h"
#include "../tmtcpacket/pus/TcPacketStored.h"
#include "../tmtcpacket/pus/tc.h"
#include "../ipc/MessageQueueIF.h"
namespace Factory{
@ -141,11 +141,7 @@ protected:
* The current Telecommand to be processed.
* It is deleted after handleRequest was executed.
*/
#if FSFW_USE_PUS_C_TELECOMMANDS == 1
TcPacketStoredPusC currentPacket;
#else
TcPacketStoredPusA currentPacket;
#endif
TcPacketStoredPus currentPacket;
static object_id_t packetSource;

View File

@ -4,7 +4,7 @@
#include "VerificationCodes.h"
#include "../ipc/MessageQueueMessage.h"
#include "../tmtcpacket/pus/TcPacketBase.h"
#include "../tmtcpacket/pus/tc/TcPacketBase.h"
#include "../returnvalues/HasReturnvaluesIF.h"
class PusVerificationMessage: public MessageQueueMessage {