some more fixes
This commit is contained in:
@ -15,24 +15,17 @@ static constexpr uint8_t VERSION_BITS = 0b00100000;
|
||||
|
||||
static constexpr uint8_t CFDP_CLASS_ID = CLASS_ID::CFDP;
|
||||
|
||||
static constexpr ReturnValue_t INVALID_TLV_TYPE =
|
||||
result::makeCode(CFDP_CLASS_ID, 1);
|
||||
static constexpr ReturnValue_t INVALID_DIRECTIVE_FIELDS =
|
||||
result::makeCode(CFDP_CLASS_ID, 2);
|
||||
static constexpr ReturnValue_t INVALID_PDU_DATAFIELD_LEN =
|
||||
result::makeCode(CFDP_CLASS_ID, 3);
|
||||
static constexpr ReturnValue_t INVALID_ACK_DIRECTIVE_FIELDS =
|
||||
result::makeCode(CFDP_CLASS_ID, 4);
|
||||
static constexpr ReturnValue_t INVALID_TLV_TYPE = result::makeCode(CFDP_CLASS_ID, 1);
|
||||
static constexpr ReturnValue_t INVALID_DIRECTIVE_FIELDS = result::makeCode(CFDP_CLASS_ID, 2);
|
||||
static constexpr ReturnValue_t INVALID_PDU_DATAFIELD_LEN = result::makeCode(CFDP_CLASS_ID, 3);
|
||||
static constexpr ReturnValue_t INVALID_ACK_DIRECTIVE_FIELDS = result::makeCode(CFDP_CLASS_ID, 4);
|
||||
//! Can not parse options. This can also occur because there are options
|
||||
//! available but the user did not pass a valid options array
|
||||
static constexpr ReturnValue_t METADATA_CANT_PARSE_OPTIONS =
|
||||
result::makeCode(CFDP_CLASS_ID, 5);
|
||||
static constexpr ReturnValue_t NAK_CANT_PARSE_OPTIONS =
|
||||
result::makeCode(CFDP_CLASS_ID, 6);
|
||||
static constexpr ReturnValue_t METADATA_CANT_PARSE_OPTIONS = result::makeCode(CFDP_CLASS_ID, 5);
|
||||
static constexpr ReturnValue_t NAK_CANT_PARSE_OPTIONS = result::makeCode(CFDP_CLASS_ID, 6);
|
||||
static constexpr ReturnValue_t FINISHED_CANT_PARSE_FS_RESPONSES =
|
||||
result::makeCode(CFDP_CLASS_ID, 6);
|
||||
static constexpr ReturnValue_t FILESTORE_REQUIRES_SECOND_FILE =
|
||||
result::makeCode(CFDP_CLASS_ID, 8);
|
||||
static constexpr ReturnValue_t FILESTORE_REQUIRES_SECOND_FILE = result::makeCode(CFDP_CLASS_ID, 8);
|
||||
//! Can not parse filestore response because user did not pass a valid instance
|
||||
//! or remaining size is invalid
|
||||
static constexpr ReturnValue_t FILESTORE_RESPONSE_CANT_PARSE_FS_MESSAGE =
|
||||
|
@ -136,7 +136,7 @@ void Service2DeviceAccess::sendWiretappingTm(CommandMessage* reply, uint8_t subs
|
||||
const uint8_t* data = nullptr;
|
||||
size_t size = 0;
|
||||
ReturnValue_t result = ipcStore->getData(storeAddress, &data, &size);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
if (result != RETURN_OK) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
sif::error << "Service2DeviceAccess::sendWiretappingTm: Data Lost in "
|
||||
"handleUnrequestedReply with failure ID "
|
||||
@ -149,7 +149,7 @@ void Service2DeviceAccess::sendWiretappingTm(CommandMessage* reply, uint8_t subs
|
||||
// sending it back.
|
||||
WiretappingPacket tmPacket(DeviceHandlerMessage::getDeviceObjectId(reply), data);
|
||||
result = sendTmPacket(subservice, tmPacket.objectId, tmPacket.data, size);
|
||||
if (result != retval::OK) {
|
||||
if (result != RETURN_OK) {
|
||||
// TODO: Warning
|
||||
return;
|
||||
}
|
||||
|
@ -33,8 +33,7 @@ class HasReturnvaluesIF {
|
||||
* @param number
|
||||
* @return
|
||||
*/
|
||||
static constexpr ReturnValue_t makeReturnCode(
|
||||
uint8_t classId, uint8_t number) {
|
||||
static constexpr ReturnValue_t makeReturnCode(uint8_t classId, uint8_t number) {
|
||||
return result::makeCode(classId, number);
|
||||
}
|
||||
};
|
||||
|
@ -9,8 +9,8 @@
|
||||
class PusIF : public SpacePacketIF {
|
||||
public:
|
||||
static constexpr uint8_t INTERFACE_ID = CLASS_ID::PUS_IF;
|
||||
static constexpr ReturnValue_t INVALID_PUS_VERSION = retval::makeCode(INTERFACE_ID, 0);
|
||||
static constexpr ReturnValue_t INVALID_CRC_16 = retval::makeCode(INTERFACE_ID, 1);
|
||||
static constexpr ReturnValue_t INVALID_PUS_VERSION = result::makeCode(INTERFACE_ID, 0);
|
||||
static constexpr ReturnValue_t INVALID_CRC_16 = result::makeCode(INTERFACE_ID, 1);
|
||||
|
||||
~PusIF() override = default;
|
||||
/**
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
#include "fsfw/globalfunctions/CRC.h"
|
||||
|
||||
PusTmZeroCopyWriter::PusTmZeroCopyWriter(TimeReaderIF* timeReader, uint8_t* data, size_t size)
|
||||
: PusTmReader(timeReader, data, size) {}
|
||||
PusTmZeroCopyWriter::PusTmZeroCopyWriter(TimeReaderIF& timeReader, uint8_t* data, size_t size)
|
||||
: PusTmReader(&timeReader, data, size) {}
|
||||
|
||||
void PusTmZeroCopyWriter::setSequenceCount(uint16_t seqCount) {
|
||||
auto* spHeader =
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "PusTmReader.h"
|
||||
class PusTmZeroCopyWriter : public PusTmReader {
|
||||
public:
|
||||
PusTmZeroCopyWriter(TimeReaderIF* timeReader, uint8_t* data, size_t size);
|
||||
PusTmZeroCopyWriter(TimeReaderIF& timeReader, uint8_t* data, size_t size);
|
||||
|
||||
void setSequenceCount(uint16_t seqCount);
|
||||
void updateErrorControl();
|
||||
|
@ -309,7 +309,7 @@ void CommandingServiceBase::handleRequestQueue() {
|
||||
ReturnValue_t CommandingServiceBase::sendTmPacket(uint8_t subservice, const uint8_t* sourceData,
|
||||
size_t sourceDataLen) {
|
||||
ReturnValue_t result = tmHelper.prepareTmPacket(subservice, sourceData, sourceDataLen);
|
||||
if (result != retval::OK) {
|
||||
if (result != result::OK) {
|
||||
return result;
|
||||
}
|
||||
return tmHelper.storeAndSendTmPacket();
|
||||
@ -319,7 +319,7 @@ ReturnValue_t CommandingServiceBase::sendTmPacket(uint8_t subservice, object_id_
|
||||
const uint8_t* data, size_t dataLen) {
|
||||
telemetry::DataWithObjectIdPrefix dataWithObjId(objectId, data, dataLen);
|
||||
ReturnValue_t result = tmHelper.prepareTmPacket(subservice, dataWithObjId);
|
||||
if (result != retval::OK) {
|
||||
if (result != result::OK) {
|
||||
return result;
|
||||
}
|
||||
return tmHelper.storeAndSendTmPacket();
|
||||
@ -327,7 +327,7 @@ ReturnValue_t CommandingServiceBase::sendTmPacket(uint8_t subservice, object_id_
|
||||
|
||||
ReturnValue_t CommandingServiceBase::sendTmPacket(uint8_t subservice, SerializeIF& sourceData) {
|
||||
ReturnValue_t result = tmHelper.prepareTmPacket(subservice, sourceData);
|
||||
if (result != retval::OK) {
|
||||
if (result != result::OK) {
|
||||
return result;
|
||||
}
|
||||
return tmHelper.storeAndSendTmPacket();
|
||||
|
@ -36,7 +36,7 @@ ReturnValue_t VerificationReporter::sendFailureReport(VerifFailureParams params)
|
||||
|
||||
ReturnValue_t VerificationReporter::sendSuccessReport(VerifSuccessParams params) {
|
||||
PusVerificationMessage message(params.reportId, params.ackFlags, params.tcPacketId, params.tcPsc,
|
||||
retval::OK, params.step);
|
||||
result::OK, params.step);
|
||||
ReturnValue_t status = MessageQueueSenderIF::sendMessage(acknowledgeQueue, &message);
|
||||
if (status != HasReturnvaluesIF::RETURN_OK) {
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
|
@ -41,7 +41,7 @@ struct VerifFailureParams : public VerifParamsBase {
|
||||
VerifFailureParams(uint8_t reportId, PusTcIF& tc)
|
||||
: VerifParamsBase(reportId, tc.getPacketIdRaw(), tc.getPacketSeqCtrlRaw()) {}
|
||||
|
||||
ReturnValue_t errorCode = retval::OK;
|
||||
ReturnValue_t errorCode = result::OK;
|
||||
uint8_t step = 0;
|
||||
uint32_t errorParam1 = 0;
|
||||
uint32_t errorParam2 = 0;
|
||||
|
@ -28,16 +28,16 @@ class DataWithObjectIdPrefix : public SerializeIF {
|
||||
}
|
||||
if (dataWrapper.type != ecss::DataTypes::RAW) {
|
||||
if ((dataWrapper.dataUnion.raw.data == nullptr) and (dataWrapper.dataUnion.raw.len > 0)) {
|
||||
return retval::FAILED;
|
||||
return result::FAILED;
|
||||
}
|
||||
} else if (dataWrapper.type == ecss::DataTypes::SERIALIZABLE) {
|
||||
if (dataWrapper.dataUnion.serializable == nullptr) {
|
||||
return retval::FAILED;
|
||||
return result::FAILED;
|
||||
}
|
||||
}
|
||||
ReturnValue_t result =
|
||||
SerializeAdapter::serialize(&objectId, buffer, size, maxSize, streamEndianness);
|
||||
if (result != retval::OK) {
|
||||
if (result != result::OK) {
|
||||
return result;
|
||||
}
|
||||
if (dataWrapper.type != ecss::DataTypes::RAW) {
|
||||
@ -47,7 +47,7 @@ class DataWithObjectIdPrefix : public SerializeIF {
|
||||
} else {
|
||||
return dataWrapper.dataUnion.serializable->serialize(buffer, size, maxSize, streamEndianness);
|
||||
}
|
||||
return retval::OK;
|
||||
return result::OK;
|
||||
}
|
||||
|
||||
[[nodiscard]] size_t getSerializedSize() const override {
|
||||
@ -58,7 +58,7 @@ class DataWithObjectIdPrefix : public SerializeIF {
|
||||
Endianness streamEndianness) override {
|
||||
// As long as there is no way to know how long the expected data will be, this function
|
||||
// does not make sense
|
||||
return retval::FAILED;
|
||||
return result::FAILED;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -31,18 +31,18 @@ class CommandExecutor {
|
||||
static constexpr uint8_t CLASS_ID = CLASS_ID::LINUX_OSAL;
|
||||
|
||||
//! [EXPORT] : [COMMENT] Execution of the current command has finished
|
||||
static constexpr ReturnValue_t EXECUTION_FINISHED = retval::makeCode(CLASS_ID, 0);
|
||||
static constexpr ReturnValue_t EXECUTION_FINISHED = result::makeCode(CLASS_ID, 0);
|
||||
|
||||
//! [EXPORT] : [COMMENT] Command is pending. This will also be returned if the user tries
|
||||
//! to load another command but a command is still pending
|
||||
static constexpr ReturnValue_t COMMAND_PENDING = retval::makeCode(CLASS_ID, 1);
|
||||
static constexpr ReturnValue_t COMMAND_PENDING = result::makeCode(CLASS_ID, 1);
|
||||
//! [EXPORT] : [COMMENT] Some bytes have been read from the executing process
|
||||
static constexpr ReturnValue_t BYTES_READ = retval::makeCode(CLASS_ID, 2);
|
||||
static constexpr ReturnValue_t BYTES_READ = result::makeCode(CLASS_ID, 2);
|
||||
//! [EXPORT] : [COMMENT] Command execution failed
|
||||
static constexpr ReturnValue_t COMMAND_ERROR = retval::makeCode(CLASS_ID, 3);
|
||||
static constexpr ReturnValue_t COMMAND_ERROR = result::makeCode(CLASS_ID, 3);
|
||||
//! [EXPORT] : [COMMENT]
|
||||
static constexpr ReturnValue_t NO_COMMAND_LOADED_OR_PENDING = retval::makeCode(CLASS_ID, 4);
|
||||
static constexpr ReturnValue_t PCLOSE_CALL_ERROR = retval::makeCode(CLASS_ID, 6);
|
||||
static constexpr ReturnValue_t NO_COMMAND_LOADED_OR_PENDING = result::makeCode(CLASS_ID, 4);
|
||||
static constexpr ReturnValue_t PCLOSE_CALL_ERROR = result::makeCode(CLASS_ID, 6);
|
||||
|
||||
/**
|
||||
* Constructor. Is initialized with maximum size of internal buffer to read data from the
|
||||
|
Reference in New Issue
Block a user