Space Packet Parser CRC Check #41
@ -17,7 +17,8 @@ LocalPoolDataSetBase::LocalPoolDataSetBase(HasLocalDataPoolIF *hkOwner, uint32_t
|
|||||||
if (hkOwner == nullptr) {
|
if (hkOwner == nullptr) {
|
||||||
// Configuration error.
|
// Configuration error.
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "LocalPoolDataSetBase::LocalPoolDataSetBase: Owner " << "invalid!" << std::endl;
|
sif::error << "LocalPoolDataSetBase::LocalPoolDataSetBase: Owner "
|
||||||
|
<< "invalid!" << std::endl;
|
||||||
#else
|
#else
|
||||||
sif::printError(
|
sif::printError(
|
||||||
"LocalPoolDataSetBase::LocalPoolDataSetBase: Owner "
|
"LocalPoolDataSetBase::LocalPoolDataSetBase: Owner "
|
||||||
@ -186,8 +187,8 @@ ReturnValue_t LocalPoolDataSetBase::serializeLocalPoolIds(uint8_t **buffer, size
|
|||||||
SerializeAdapter::serialize(¤tPoolId, buffer, size, maxSize, streamEndianness);
|
SerializeAdapter::serialize(¤tPoolId, buffer, size, maxSize, streamEndianness);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning << "LocalPoolDataSetBase::serializeLocalPoolIds: " << "Serialization error!"
|
sif::warning << "LocalPoolDataSetBase::serializeLocalPoolIds: "
|
||||||
<< std::endl;
|
<< "Serialization error!" << std::endl;
|
||||||
#else
|
#else
|
||||||
sif::printWarning(
|
sif::printWarning(
|
||||||
"LocalPoolDataSetBase::serializeLocalPoolIds: "
|
"LocalPoolDataSetBase::serializeLocalPoolIds: "
|
||||||
|
@ -17,8 +17,8 @@ LocalPoolObjectBase::LocalPoolObjectBase(lp_id_t poolId, HasLocalDataPoolIF* hkO
|
|||||||
}
|
}
|
||||||
if (hkOwner == nullptr) {
|
if (hkOwner == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "LocalPoolVar<T>::LocalPoolVar: The supplied pool " << "owner is a invalid!"
|
sif::error << "LocalPoolVar<T>::LocalPoolVar: The supplied pool "
|
||||||
<< std::endl;
|
<< "owner is a invalid!" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -243,8 +243,8 @@ bool DeviceHandlerFailureIsolation::isFdirInActionOrAreWeFaulty(EventMessage* ev
|
|||||||
if (owner == nullptr) {
|
if (owner == nullptr) {
|
||||||
// Configuration error.
|
// Configuration error.
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "DeviceHandlerFailureIsolation::" << "isFdirInActionOrAreWeFaulty: Owner not set!"
|
sif::error << "DeviceHandlerFailureIsolation::"
|
||||||
<< std::endl;
|
<< "isFdirInActionOrAreWeFaulty: Owner not set!" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,8 @@ ReturnValue_t FailureIsolationBase::initialize() {
|
|||||||
ObjectManager::instance()->get<ConfirmsFailuresIF>(faultTreeParent);
|
ObjectManager::instance()->get<ConfirmsFailuresIF>(faultTreeParent);
|
||||||
if (parentIF == nullptr) {
|
if (parentIF == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "FailureIsolationBase::intialize: Parent object " << "invalid" << std::endl;
|
sif::error << "FailureIsolationBase::intialize: Parent object "
|
||||||
|
<< "invalid" << std::endl;
|
||||||
sif::error << "Make sure it implements ConfirmsFailuresIF" << std::endl;
|
sif::error << "Make sure it implements ConfirmsFailuresIF" << std::endl;
|
||||||
#else
|
#else
|
||||||
sif::printError("FailureIsolationBase::intialize: Parent object invalid\n");
|
sif::printError("FailureIsolationBase::intialize: Parent object invalid\n");
|
||||||
|
@ -321,8 +321,8 @@ ReturnValue_t TcpTmTcServer::handleTcRingBufferData(size_t availableReadData) {
|
|||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
// Possible configuration error, too much data or/and data coming in too fast,
|
// Possible configuration error, too much data or/and data coming in too fast,
|
||||||
// requiring larger buffers
|
// requiring larger buffers
|
||||||
sif::warning << "TcpTmTcServer::handleServerOperation: Ring buffer reached " << "fill count"
|
sif::warning << "TcpTmTcServer::handleServerOperation: Ring buffer reached "
|
||||||
<< std::endl;
|
<< "fill count" << std::endl;
|
||||||
#else
|
#else
|
||||||
sif::printWarning(
|
sif::printWarning(
|
||||||
"TcpTmTcServer::handleServerOperation: Ring buffer reached "
|
"TcpTmTcServer::handleServerOperation: Ring buffer reached "
|
||||||
|
@ -49,8 +49,8 @@ ReturnValue_t Service20ParameterManagement::checkAndAcquireTargetID(object_id_t*
|
|||||||
if (SerializeAdapter::deSerialize(objectIdToSet, &tcData, &tcDataLen,
|
if (SerializeAdapter::deSerialize(objectIdToSet, &tcData, &tcDataLen,
|
||||||
SerializeIF::Endianness::BIG) != returnvalue::OK) {
|
SerializeIF::Endianness::BIG) != returnvalue::OK) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "Service20ParameterManagement::checkAndAcquireTargetID: " << "Invalid data."
|
sif::error << "Service20ParameterManagement::checkAndAcquireTargetID: "
|
||||||
<< std::endl;
|
<< "Invalid data." << std::endl;
|
||||||
#else
|
#else
|
||||||
sif::printError(
|
sif::printError(
|
||||||
"Service20ParameterManagement::"
|
"Service20ParameterManagement::"
|
||||||
|
@ -196,8 +196,8 @@ ReturnValue_t Service3Housekeeping::handleReply(const CommandMessage* reply,
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning << "Service3Housekeeping::handleReply: Invalid reply with " << "reply command "
|
sif::warning << "Service3Housekeeping::handleReply: Invalid reply with "
|
||||||
<< command << std::endl;
|
<< "reply command " << command << std::endl;
|
||||||
#else
|
#else
|
||||||
sif::printWarning(
|
sif::printWarning(
|
||||||
"Service3Housekeeping::handleReply: Invalid reply with "
|
"Service3Housekeeping::handleReply: Invalid reply with "
|
||||||
|
@ -12,7 +12,8 @@ LocalPool::LocalPool(object_id_t setObjectId, const LocalPoolConfig& poolConfig,
|
|||||||
spillsToHigherPools(spillsToHigherPools) {
|
spillsToHigherPools(spillsToHigherPools) {
|
||||||
if (NUMBER_OF_SUBPOOLS == 0) {
|
if (NUMBER_OF_SUBPOOLS == 0) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "LocalPool::LocalPool: Passed pool configuration is " << " invalid!" << std::endl;
|
sif::error << "LocalPool::LocalPool: Passed pool configuration is "
|
||||||
|
<< " invalid!" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
max_subpools_t index = 0;
|
max_subpools_t index = 0;
|
||||||
|
@ -38,9 +38,10 @@ ReturnValue_t Subsystem::checkSequence(HybridIterator<ModeListEntry> iter,
|
|||||||
if (!existsModeTable(iter->getTableId())) {
|
if (!existsModeTable(iter->getTableId())) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
using namespace std;
|
using namespace std;
|
||||||
sif::warning << "Subsystem::checkSequence: " << "Object " << setfill('0') << hex << "0x"
|
sif::warning << "Subsystem::checkSequence: "
|
||||||
<< setw(8) << getObjectId() << setw(0) << ": Mode table for mode ID " << "0x"
|
<< "Object " << setfill('0') << hex << "0x" << setw(8) << getObjectId()
|
||||||
<< setw(8) << iter->getTableId() << " does not exist" << dec << endl;
|
<< setw(0) << ": Mode table for mode ID "
|
||||||
|
<< "0x" << setw(8) << iter->getTableId() << " does not exist" << dec << endl;
|
||||||
#endif
|
#endif
|
||||||
return TABLE_DOES_NOT_EXIST;
|
return TABLE_DOES_NOT_EXIST;
|
||||||
} else {
|
} else {
|
||||||
|
@ -101,7 +101,8 @@ ReturnValue_t FixedSlotSequence::checkSequence() const {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
// Continue for now but print error output.
|
// Continue for now but print error output.
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "FixedSlotSequence::checkSequence:" << " Custom check failed!" << std::endl;
|
sif::error << "FixedSlotSequence::checkSequence:"
|
||||||
|
<< " Custom check failed!" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,13 @@
|
|||||||
|
#include <fsfw/globalfunctions/CRC.h>
|
||||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||||
#include <fsfw/tmtcservices/SpacePacketParser.h>
|
#include <fsfw/tmtcservices/SpacePacketParser.h>
|
||||||
#include <fsfw/globalfunctions/CRC.h>
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
SpacePacketParser::SpacePacketParser(std::vector<uint16_t> validPacketIds)
|
SpacePacketParser::SpacePacketParser(std::vector<uint16_t> validPacketIds)
|
||||||
: validPacketIds(validPacketIds) {}
|
: validPacketIds(validPacketIds) {}
|
||||||
|
|
||||||
void SpacePacketParser::enableCrcCheck() {
|
void SpacePacketParser::enableCrcCheck() { checkCrc = true; }
|
||||||
checkCrc = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t SpacePacketParser::parseSpacePackets(const uint8_t** buffer, const size_t maxSize,
|
ReturnValue_t SpacePacketParser::parseSpacePackets(const uint8_t** buffer, const size_t maxSize,
|
||||||
FoundPacketInfo& packetInfo) {
|
FoundPacketInfo& packetInfo) {
|
||||||
|
@ -34,7 +34,8 @@ ReturnValue_t TmTcBridge::setMaxNumberOfPacketsStored(unsigned int maxNumberOfPa
|
|||||||
} else {
|
} else {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning << "TmTcBridge::setMaxNumberOfPacketsStored: Number of "
|
sif::warning << "TmTcBridge::setMaxNumberOfPacketsStored: Number of "
|
||||||
<< "packets stored exceeds limits. " << "Keeping default value." << std::endl;
|
<< "packets stored exceeds limits. "
|
||||||
|
<< "Keeping default value." << std::endl;
|
||||||
#endif
|
#endif
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
@ -78,13 +79,15 @@ ReturnValue_t TmTcBridge::performOperation(uint8_t operationCode) {
|
|||||||
result = handleTc();
|
result = handleTc();
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::debug << "TmTcBridge::performOperation: " << "Error handling TCs" << std::endl;
|
sif::debug << "TmTcBridge::performOperation: "
|
||||||
|
<< "Error handling TCs" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
result = handleTm();
|
result = handleTm();
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::debug << "TmTcBridge::performOperation: " << "Error handling TMs" << std::endl;
|
sif::debug << "TmTcBridge::performOperation: "
|
||||||
|
<< "Error handling TMs" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -418,8 +418,8 @@ ReturnValue_t LinuxLibgpioIF::checkForConflictsById(gpioId_t gpioIdToCheck,
|
|||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning << "LinuxLibgpioIF::checkForConflictsRegularGpio: Duplicate GPIO "
|
sif::warning << "LinuxLibgpioIF::checkForConflictsRegularGpio: Duplicate GPIO "
|
||||||
"definition with ID "
|
"definition with ID "
|
||||||
<< gpioIdToCheck << " detected. " << "Duplicate will be removed from map to add"
|
<< gpioIdToCheck << " detected. "
|
||||||
<< std::endl;
|
<< "Duplicate will be removed from map to add" << std::endl;
|
||||||
#else
|
#else
|
||||||
sif::printWarning(
|
sif::printWarning(
|
||||||
"LinuxLibgpioIF::checkForConflictsRegularGpio: Duplicate GPIO definition "
|
"LinuxLibgpioIF::checkForConflictsRegularGpio: Duplicate GPIO definition "
|
||||||
|
@ -49,7 +49,8 @@ ReturnValue_t I2cComIF::initializeInterface(CookieIF* cookie) {
|
|||||||
if (not statusPair.second) {
|
if (not statusPair.second) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "I2cComIF::initializeInterface: Failed to insert device with address "
|
sif::error << "I2cComIF::initializeInterface: Failed to insert device with address "
|
||||||
<< i2cAddress << "to I2C device " << "map" << std::endl;
|
<< i2cAddress << "to I2C device "
|
||||||
|
<< "map" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
@ -90,8 +91,8 @@ ReturnValue_t I2cComIF::sendMessage(CookieIF* cookie, const uint8_t* sendData, s
|
|||||||
auto i2cDeviceMapIter = i2cDeviceMap.find(i2cAddress);
|
auto i2cDeviceMapIter = i2cDeviceMap.find(i2cAddress);
|
||||||
if (i2cDeviceMapIter == i2cDeviceMap.end()) {
|
if (i2cDeviceMapIter == i2cDeviceMap.end()) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "I2cComIF::sendMessage: i2cAddress of Cookie not " << "registered in i2cDeviceMap"
|
sif::error << "I2cComIF::sendMessage: i2cAddress of Cookie not "
|
||||||
<< std::endl;
|
<< "registered in i2cDeviceMap" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
|
@ -197,8 +197,9 @@ ReturnValue_t SpiComIF::performRegularSendOperation(SpiCookie* spiCookie, const
|
|||||||
if (result == MutexIF::MUTEX_TIMEOUT) {
|
if (result == MutexIF::MUTEX_TIMEOUT) {
|
||||||
sif::error << "SpiComIF::sendMessage: Lock timeout" << std::endl;
|
sif::error << "SpiComIF::sendMessage: Lock timeout" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
sif::error << "SpiComIF::sendMessage: Failed to lock mutex with code " << "0x" << std::hex
|
sif::error << "SpiComIF::sendMessage: Failed to lock mutex with code "
|
||||||
<< std::setfill('0') << std::setw(4) << result << std::dec << std::endl;
|
<< "0x" << std::hex << std::setfill('0') << std::setw(4) << result << std::dec
|
||||||
|
<< std::endl;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
sif::printError("SpiComIF::sendMessage: Failed to lock mutex with code %d\n", result);
|
sif::printError("SpiComIF::sendMessage: Failed to lock mutex with code %d\n", result);
|
||||||
@ -306,8 +307,9 @@ ReturnValue_t SpiComIF::performHalfDuplexReception(SpiCookie* spiCookie) {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
#if FSFW_VERBOSE_LEVEL >= 1
|
#if FSFW_VERBOSE_LEVEL >= 1
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "SpiComIF::sendMessage: Failed to lock mutex with code " << "0x" << std::hex
|
sif::error << "SpiComIF::sendMessage: Failed to lock mutex with code "
|
||||||
<< std::setfill('0') << std::setw(4) << result << std::dec << std::endl;
|
<< "0x" << std::hex << std::setfill('0') << std::setw(4) << result << std::dec
|
||||||
|
<< std::endl;
|
||||||
#else
|
#else
|
||||||
sif::printError("SpiComIF::sendMessage: Failed to lock mutex with code %d\n", result);
|
sif::printError("SpiComIF::sendMessage: Failed to lock mutex with code %d\n", result);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user