it compiles again
This commit is contained in:
@ -281,7 +281,7 @@ static const uint32_t UPDATE_STATUS_REPORT = 70000;
|
||||
/**
|
||||
* @brief This class creates a space packet containing only the header data and the CRC.
|
||||
*/
|
||||
class ApidOnlyPacket : public SpacePacketBase {
|
||||
class ApidOnlyPacket : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -290,7 +290,7 @@ class ApidOnlyPacket : public SpacePacketBase {
|
||||
*
|
||||
* @note Sequence count of empty packet is always 1.
|
||||
*/
|
||||
ApidOnlyPacket(SpBaseParams params, uint16_t apid) : SpacePacketBase(params) {
|
||||
ApidOnlyPacket(ploc::SpTcParams params, uint16_t apid) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(LENGTH_EMPTY_TC);
|
||||
spParams.creator.setApid(apid);
|
||||
}
|
||||
@ -310,7 +310,7 @@ class ApidOnlyPacket : public SpacePacketBase {
|
||||
* @brief This class can be used to generate the space packet selecting the boot image of
|
||||
* of the MPSoC.
|
||||
*/
|
||||
class MPSoCBootSelect : public SpacePacketBase {
|
||||
class MPSoCBootSelect : public ploc::SpTcBase {
|
||||
public:
|
||||
static const uint8_t NVM0 = 0;
|
||||
static const uint8_t NVM1 = 1;
|
||||
@ -325,7 +325,7 @@ class MPSoCBootSelect : public SpacePacketBase {
|
||||
*
|
||||
* @note Selection of partitions is currently not supported.
|
||||
*/
|
||||
MPSoCBootSelect(SpBaseParams params) : SpacePacketBase(params) {
|
||||
MPSoCBootSelect(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setApid(APID_SEL_MPSOC_BOOT_IMAGE);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -361,7 +361,7 @@ class MPSoCBootSelect : public SpacePacketBase {
|
||||
* @brief This class creates the command to enable or disable the NVMs connected to the
|
||||
* supervisor.
|
||||
*/
|
||||
class EnableNvms : public SpacePacketBase {
|
||||
class EnableNvms : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -371,7 +371,7 @@ class EnableNvms : public SpacePacketBase {
|
||||
* @param bp1 Partition pin 1
|
||||
* @param bp2 Partition pin 2
|
||||
*/
|
||||
EnableNvms(SpBaseParams params) : SpacePacketBase(params) {
|
||||
EnableNvms(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setApid(APID_ENABLE_NVMS);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -399,9 +399,9 @@ class EnableNvms : public SpacePacketBase {
|
||||
/**
|
||||
* @brief This class generates the space packet to update the time of the PLOC supervisor.
|
||||
*/
|
||||
class SetTimeRef : public SpacePacketBase {
|
||||
class SetTimeRef : public ploc::SpTcBase {
|
||||
public:
|
||||
SetTimeRef(SpBaseParams params) : SpacePacketBase(params) {
|
||||
SetTimeRef(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setApid(APID_SET_TIME_REF);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -457,14 +457,14 @@ class SetTimeRef : public SpacePacketBase {
|
||||
/**
|
||||
* @brief This class can be used to generate the set boot timout command.
|
||||
*/
|
||||
class SetBootTimeout : public SpacePacketBase {
|
||||
class SetBootTimeout : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
*
|
||||
* @param timeout The boot timeout in milliseconds.
|
||||
*/
|
||||
SetBootTimeout(SpBaseParams params) : SpacePacketBase(params) {
|
||||
SetBootTimeout(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setApid(APID_SET_BOOT_TIMEOUT);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -494,14 +494,14 @@ class SetBootTimeout : public SpacePacketBase {
|
||||
/**
|
||||
* @brief This class can be used to generate the space packet to set the maximum boot tries.
|
||||
*/
|
||||
class SetRestartTries : public SpacePacketBase {
|
||||
class SetRestartTries : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
*
|
||||
* @param restartTries Maximum restart tries to set.
|
||||
*/
|
||||
SetRestartTries(SpBaseParams params) : SpacePacketBase(params) {
|
||||
SetRestartTries(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setApid(APID_SET_MAX_RESTART_TRIES);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -530,12 +530,12 @@ class SetRestartTries : public SpacePacketBase {
|
||||
* of housekeeping data. Normally, this will be disabled by default. However, adding this
|
||||
* command can be useful for debugging.
|
||||
*/
|
||||
class DisablePeriodicHkTransmission : public SpacePacketBase {
|
||||
class DisablePeriodicHkTransmission : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
*/
|
||||
DisablePeriodicHkTransmission(SpBaseParams params) : SpacePacketBase(params) {
|
||||
DisablePeriodicHkTransmission(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setApid(APID_DISABLE_HK);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -562,7 +562,7 @@ class DisablePeriodicHkTransmission : public SpacePacketBase {
|
||||
*
|
||||
* @details There are 7 different latchup alerts.
|
||||
*/
|
||||
class LatchupAlert : public SpacePacketBase {
|
||||
class LatchupAlert : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -571,7 +571,7 @@ class LatchupAlert : public SpacePacketBase {
|
||||
* @param latchupId Identifies the latchup to enable/disable (0 - 0.85V, 1 - 1.8V, 2 - MISC,
|
||||
* 3 - 3.3V, 4 - NVM_4XO, 5 - MISSION, 6 - SAFECOTS)
|
||||
*/
|
||||
LatchupAlert(SpBaseParams params) : SpacePacketBase(params) {
|
||||
LatchupAlert(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
}
|
||||
@ -600,7 +600,7 @@ class LatchupAlert : public SpacePacketBase {
|
||||
void initPacket(uint8_t latchupId) { payloadStart[0] = latchupId; }
|
||||
};
|
||||
|
||||
class SetAlertlimit : public SpacePacketBase {
|
||||
class SetAlertlimit : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -609,7 +609,7 @@ class SetAlertlimit : public SpacePacketBase {
|
||||
* 3 - 3.3V, 4 - NVM_4XO, 5 - MISSION, 6 - SAFECOTS)
|
||||
* @param dutycycle
|
||||
*/
|
||||
SetAlertlimit(SpBaseParams params) : SpacePacketBase(params) {
|
||||
SetAlertlimit(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setApid(APID_SET_ALERT_LIMIT);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -645,14 +645,14 @@ class SetAlertlimit : public SpacePacketBase {
|
||||
/**
|
||||
* @brief This class packages the space packet to enable or disable ADC channels.
|
||||
*/
|
||||
class SetAdcEnabledChannels : public SpacePacketBase {
|
||||
class SetAdcEnabledChannels : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
*
|
||||
* @param ch Defines channels to be enabled or disabled.
|
||||
*/
|
||||
SetAdcEnabledChannels(SpBaseParams params) : SpacePacketBase(params) {
|
||||
SetAdcEnabledChannels(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setApid(APID_SET_ADC_ENABLED_CHANNELS);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -683,7 +683,7 @@ class SetAdcEnabledChannels : public SpacePacketBase {
|
||||
* @brief This class packages the space packet to configures the window size and striding step of
|
||||
* the moving average filter applied to the ADC readings.
|
||||
*/
|
||||
class SetAdcWindowAndStride : public SpacePacketBase {
|
||||
class SetAdcWindowAndStride : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -691,7 +691,7 @@ class SetAdcWindowAndStride : public SpacePacketBase {
|
||||
* @param windowSize
|
||||
* @param stridingStepSize
|
||||
*/
|
||||
SetAdcWindowAndStride(SpBaseParams params) : SpacePacketBase(params) {
|
||||
SetAdcWindowAndStride(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setApid(APID_SET_ADC_WINDOW_AND_STRIDE);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -724,14 +724,14 @@ class SetAdcWindowAndStride : public SpacePacketBase {
|
||||
/**
|
||||
* @brief This class packages the space packet to set the ADC trigger threshold.
|
||||
*/
|
||||
class SetAdcThreshold : public SpacePacketBase {
|
||||
class SetAdcThreshold : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
*
|
||||
* @param threshold
|
||||
*/
|
||||
SetAdcThreshold(SpBaseParams params) : SpacePacketBase(params) {
|
||||
SetAdcThreshold(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setApid(APID_SET_ADC_THRESHOLD);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -762,14 +762,14 @@ class SetAdcThreshold : public SpacePacketBase {
|
||||
/**
|
||||
* @brief This class packages the space packet to run auto EM tests.
|
||||
*/
|
||||
class RunAutoEmTests : public SpacePacketBase {
|
||||
class RunAutoEmTests : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
*
|
||||
* @param test 1 - complete EM test, 2 - Short test (only memory readback NVM0,1,3)
|
||||
*/
|
||||
RunAutoEmTests(SpBaseParams params) : SpacePacketBase(params) {
|
||||
RunAutoEmTests(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setApid(APID_RUN_AUTO_EM_TESTS);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -798,7 +798,7 @@ class RunAutoEmTests : public SpacePacketBase {
|
||||
/**
|
||||
* @brief This class packages the space packet to wipe or dump parts of the MRAM.
|
||||
*/
|
||||
class MramCmd : public SpacePacketBase {
|
||||
class MramCmd : public ploc::SpTcBase {
|
||||
public:
|
||||
enum class MramAction { WIPE, DUMP };
|
||||
|
||||
@ -811,7 +811,7 @@ class MramCmd : public SpacePacketBase {
|
||||
*
|
||||
* @note The content at the stop address is excluded from the dump or wipe operation.
|
||||
*/
|
||||
MramCmd(SpBaseParams params) : SpacePacketBase(params) {
|
||||
MramCmd(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
}
|
||||
@ -856,7 +856,7 @@ class MramCmd : public SpacePacketBase {
|
||||
* @brief This class packages the space packet change the state of a GPIO. This command is only
|
||||
* required for ground testing.
|
||||
*/
|
||||
class SetGpio : public SpacePacketBase {
|
||||
class SetGpio : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -865,7 +865,7 @@ class SetGpio : public SpacePacketBase {
|
||||
* @param pin
|
||||
* @param val
|
||||
*/
|
||||
SetGpio(SpBaseParams params) : SpacePacketBase(params) {
|
||||
SetGpio(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setApid(APID_SET_GPIO);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -901,7 +901,7 @@ class SetGpio : public SpacePacketBase {
|
||||
* @brief This class packages the space packet causing the supervisor print the state of a GPIO
|
||||
* to the debug output.
|
||||
*/
|
||||
class ReadGpio : public SpacePacketBase {
|
||||
class ReadGpio : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -909,7 +909,7 @@ class ReadGpio : public SpacePacketBase {
|
||||
* @param port
|
||||
* @param pin
|
||||
*/
|
||||
ReadGpio(SpBaseParams params) : SpacePacketBase(params) {
|
||||
ReadGpio(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setDataFieldLen(DATA_FIELD_LENGTH);
|
||||
spParams.creator.setApid(APID_READ_GPIO);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -947,7 +947,7 @@ class ReadGpio : public SpacePacketBase {
|
||||
* OP = 0x01: Only the mirror entries will be wiped.
|
||||
* OP = 0x02: Only the circular entries will be wiped.
|
||||
*/
|
||||
class FactoryReset : public SpacePacketBase {
|
||||
class FactoryReset : public ploc::SpTcBase {
|
||||
public:
|
||||
enum class Op { CLEAR_ALL, MIRROR_ENTRIES, CIRCULAR_ENTRIES };
|
||||
|
||||
@ -956,7 +956,7 @@ class FactoryReset : public SpacePacketBase {
|
||||
*
|
||||
* @param op
|
||||
*/
|
||||
FactoryReset(SpBaseParams params) : SpacePacketBase(params) {
|
||||
FactoryReset(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.creator.setApid(APID_FACTORY_RESET);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
}
|
||||
@ -991,38 +991,9 @@ class FactoryReset : public SpacePacketBase {
|
||||
}
|
||||
};
|
||||
|
||||
// class SupvTcSpacePacket : public SpacePacketBase {
|
||||
// public:
|
||||
// /**
|
||||
// * @brief Constructor
|
||||
// *
|
||||
// * @param payloadDataLen Length of data field without CRC
|
||||
// */
|
||||
// SupvTcSpacePacket(SpBaseParams params): SpacePacketBase(params) {
|
||||
// spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
// }
|
||||
//
|
||||
// ReturnValue_t buildPacket(uint16_t payloadDataLenWithoutCrc, uint16_t apid) {
|
||||
// spParams.setPayloadLen(payloadDataLenWithoutCrc + 2);
|
||||
// spParams.creator.setApid(apid);
|
||||
// auto res = checkSizeAndSerializeHeader();
|
||||
// if(res != result::OK) {
|
||||
// return res;
|
||||
// }
|
||||
// return calcCrc();
|
||||
// }
|
||||
//
|
||||
// private:
|
||||
// // The sequence count of most of the TC packets for the supervisor is 1.
|
||||
// static const uint16_t DEFAULT_SEQUENCE_COUNT = 1;
|
||||
//
|
||||
// // The size of the payload data (data field without crc size)
|
||||
// size_t payloadDataLen = 0;
|
||||
// };
|
||||
|
||||
class SetShutdownTimeout : public SpacePacketBase {
|
||||
class SetShutdownTimeout : public ploc::SpTcBase {
|
||||
public:
|
||||
SetShutdownTimeout(SpBaseParams params) : SpacePacketBase(params) {
|
||||
SetShutdownTimeout(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setPayloadLen(PAYLOAD_LEN);
|
||||
spParams.creator.setApid(APID_SET_SHUTDOWN_TIMEOUT);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -1052,7 +1023,7 @@ class SetShutdownTimeout : public SpacePacketBase {
|
||||
/**
|
||||
* @brief Command to request CRC over memory region of the supervisor.
|
||||
*/
|
||||
class CheckMemory : public SpacePacketBase {
|
||||
class CheckMemory : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -1061,7 +1032,7 @@ class CheckMemory : public SpacePacketBase {
|
||||
* @param startAddress Start address of CRC calculation
|
||||
* @param length Length in bytes of memory region
|
||||
*/
|
||||
CheckMemory(SpBaseParams params) : SpacePacketBase(params) {
|
||||
CheckMemory(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setPayloadLen(PAYLOAD_LENGTH);
|
||||
spParams.creator.setApid(APID_CHECK_MEMORY);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -1100,7 +1071,7 @@ class CheckMemory : public SpacePacketBase {
|
||||
/**
|
||||
* @brief This class packages the space packet transporting a part of an MPSoC update.
|
||||
*/
|
||||
class WriteMemory : public SpacePacketBase {
|
||||
class WriteMemory : public ploc::SpTcBase {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
@ -1109,7 +1080,7 @@ class WriteMemory : public SpacePacketBase {
|
||||
* @param sequenceCount Sequence count (first update packet expects 1 as sequence count)
|
||||
* @param updateData Pointer to buffer containing update data
|
||||
*/
|
||||
WriteMemory(SpBaseParams params) : SpacePacketBase(params) {
|
||||
WriteMemory(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.creator.setApid(APID_WRITE_MEMORY);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
}
|
||||
@ -1164,9 +1135,9 @@ class WriteMemory : public SpacePacketBase {
|
||||
/**
|
||||
* @brief This class can be used to package the update available or update verify command.
|
||||
*/
|
||||
class EraseMemory : public SpacePacketBase {
|
||||
class EraseMemory : public ploc::SpTcBase {
|
||||
public:
|
||||
EraseMemory(SpBaseParams params) : SpacePacketBase(params) {
|
||||
EraseMemory(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setPayloadLen(PAYLOAD_LENGTH);
|
||||
spParams.creator.setApid(APID_ERASE_MEMORY);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -1208,9 +1179,9 @@ class EraseMemory : public SpacePacketBase {
|
||||
/**
|
||||
* @brief This class creates the space packet to enable the auto TM generation
|
||||
*/
|
||||
class EnableAutoTm : public SpacePacketBase {
|
||||
class EnableAutoTm : public ploc::SpTcBase {
|
||||
public:
|
||||
EnableAutoTm(SpBaseParams params) : SpacePacketBase(params) {
|
||||
EnableAutoTm(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setPayloadLen(PAYLOAD_LENGTH);
|
||||
spParams.creator.setApid(APID_AUTO_TM);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -1233,9 +1204,9 @@ class EnableAutoTm : public SpacePacketBase {
|
||||
/**
|
||||
* @brief This class creates the space packet to disable the auto TM generation
|
||||
*/
|
||||
class DisableAutoTm : public SpacePacketBase {
|
||||
class DisableAutoTm : public ploc::SpTcBase {
|
||||
public:
|
||||
DisableAutoTm(SpBaseParams params) : SpacePacketBase(params) {
|
||||
DisableAutoTm(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setPayloadLen(PAYLOAD_LENGTH);
|
||||
spParams.creator.setApid(APID_AUTO_TM);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -1258,7 +1229,7 @@ class DisableAutoTm : public SpacePacketBase {
|
||||
/**
|
||||
* @brief This class creates the space packet to request the logging data from the supervisor
|
||||
*/
|
||||
class RequestLoggingData : public SpacePacketBase {
|
||||
class RequestLoggingData : public ploc::SpTcBase {
|
||||
public:
|
||||
enum class Sa : uint8_t {
|
||||
REQUEST_COUNTERS = 1,
|
||||
@ -1267,7 +1238,7 @@ class RequestLoggingData : public SpacePacketBase {
|
||||
SET_LOGGING_TOPIC = 4
|
||||
};
|
||||
|
||||
RequestLoggingData(SpBaseParams params) : SpacePacketBase(params) {
|
||||
RequestLoggingData(ploc::SpTcParams params) : ploc::SpTcBase(params) {
|
||||
spParams.setPayloadLen(PAYLOAD_LENGTH);
|
||||
spParams.creator.setApid(APID_REQUEST_LOGGING_DATA);
|
||||
spParams.creator.setSeqCount(DEFAULT_SEQUENCE_COUNT);
|
||||
@ -1288,47 +1259,9 @@ class RequestLoggingData : public SpacePacketBase {
|
||||
static const uint8_t TPC_OFFSET = 1;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Class for handling tm replies of the supervisor.
|
||||
*/
|
||||
class TmPacket : public SpacePacketReader {
|
||||
class VerificationReport : public ploc::SpTmReader {
|
||||
public:
|
||||
TmPacket() = default;
|
||||
/**
|
||||
* @brief Constructor creates idle packet and sets length field to maximum allowed size.
|
||||
*/
|
||||
TmPacket(const uint8_t* buf, size_t maxSize) : SpacePacketReader(buf, maxSize) {}
|
||||
|
||||
ReturnValue_t setData(const uint8_t* buf, size_t maxSize) {
|
||||
return setReadOnlyData(buf, maxSize);
|
||||
}
|
||||
|
||||
ReturnValue_t check() {
|
||||
if (isNull()) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
return checkSize();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Returns the payload data length (data field length without CRC)
|
||||
*/
|
||||
uint16_t getPayloadDataLength() { return getPacketDataLen() - 2; }
|
||||
|
||||
ReturnValue_t checkCrc() {
|
||||
const uint8_t* crcPtr = getFullData() + getFullPacketLen() - CRC_SIZE;
|
||||
uint16_t receivedCrc = *(crcPtr) << 8 | *(crcPtr + 1);
|
||||
uint16_t recalculatedCrc = CRC::crc16ccitt(getFullData(), getFullPacketLen() - CRC_SIZE);
|
||||
if (recalculatedCrc != receivedCrc) {
|
||||
return SupvReturnValuesIF::CRC_FAILURE;
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
};
|
||||
|
||||
class VerificationReport : public TmPacket {
|
||||
public:
|
||||
VerificationReport(const uint8_t* buf, size_t maxSize) : TmPacket(buf, maxSize) {}
|
||||
VerificationReport(const uint8_t* buf, size_t maxSize) : ploc::SpTmReader(buf, maxSize) {}
|
||||
|
||||
/**
|
||||
* @brief Gets the APID of command which caused the transmission of this verification report.
|
||||
@ -1870,10 +1803,10 @@ class LoggingReport : public StaticLocalDataSet<LOGGING_RPT_SET_ENTRIES> {
|
||||
}
|
||||
};
|
||||
|
||||
class UpdateStatusReport : public TmPacket {
|
||||
class UpdateStatusReport : public ploc::SpTmReader {
|
||||
public:
|
||||
UpdateStatusReport() = default;
|
||||
UpdateStatusReport(const uint8_t* buf, size_t maxSize) : TmPacket(buf, maxSize) {}
|
||||
UpdateStatusReport(const uint8_t* buf, size_t maxSize) : ploc::SpTmReader(buf, maxSize) {}
|
||||
|
||||
ReturnValue_t parseDataField() {
|
||||
ReturnValue_t result = lengthCheck();
|
||||
|
Reference in New Issue
Block a user