diff --git a/src/fsfw/devicehandlers/DeviceHandlerBase.cpp b/src/fsfw/devicehandlers/DeviceHandlerBase.cpp index f5043d4c..0b6138b8 100644 --- a/src/fsfw/devicehandlers/DeviceHandlerBase.cpp +++ b/src/fsfw/devicehandlers/DeviceHandlerBase.cpp @@ -1276,7 +1276,7 @@ void DeviceHandlerBase::handleDeviceTm(const uint8_t* rawData, size_t rawDataLen handleDeviceTm(bufferWrapper, replyId, forceDirectTm); } -void DeviceHandlerBase::handleDeviceTm(SerializeIF& dataSet, DeviceCommandId_t replyId, +void DeviceHandlerBase::handleDeviceTm(const SerializeIF& dataSet, DeviceCommandId_t replyId, bool forceDirectTm) { auto iter = deviceReplyMap.find(replyId); if (iter == deviceReplyMap.end()) { @@ -1291,7 +1291,7 @@ void DeviceHandlerBase::handleDeviceTm(SerializeIF& dataSet, DeviceCommandId_t r // This may fail, but we'll ignore the fault. if (queueId != NO_COMMANDER) { // This may fail, but we'll ignore the fault. - actionHelper.reportData(queueId, replyId, &dataSet); + actionHelper.reportData(queueId, replyId, const_cast(&dataSet)); } // This check should make sure we get any TM but don't get anything doubled. @@ -1305,7 +1305,8 @@ void DeviceHandlerBase::handleDeviceTm(SerializeIF& dataSet, DeviceCommandId_t r // hiding of sender needed so the service will handle it as // unexpected Data, no matter what state (progress or completed) // it is in - actionHelper.reportData(defaultRawReceiver, replyId, &dataSet, true); + actionHelper.reportData(defaultRawReceiver, replyId, const_cast(&dataSet), + true); } } // Unrequested or aperiodic replies diff --git a/src/fsfw/devicehandlers/DeviceHandlerBase.h b/src/fsfw/devicehandlers/DeviceHandlerBase.h index 7113f504..209afaa6 100644 --- a/src/fsfw/devicehandlers/DeviceHandlerBase.h +++ b/src/fsfw/devicehandlers/DeviceHandlerBase.h @@ -1072,7 +1072,8 @@ class DeviceHandlerBase : public DeviceHandlerIF, void handleDeviceTm(const uint8_t *rawData, size_t rawDataLen, DeviceCommandId_t replyId, bool forceDirectTm = false); - void handleDeviceTm(SerializeIF &dataSet, DeviceCommandId_t replyId, bool forceDirectTm = false); + void handleDeviceTm(const SerializeIF &dataSet, DeviceCommandId_t replyId, + bool forceDirectTm = false); virtual ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode, uint32_t *msToReachTheMode);