correct preprocessor define now used

This commit is contained in:
Robin Müller 2021-01-03 14:16:52 +01:00
parent 4515c0d3cd
commit 2edf158312
100 changed files with 356 additions and 356 deletions

View File

@ -47,7 +47,7 @@ ReturnValue_t SharedRingBuffer::initialize() {
DynamicFIFO<size_t>* SharedRingBuffer::getReceiveSizesFIFO() { DynamicFIFO<size_t>* SharedRingBuffer::getReceiveSizesFIFO() {
if(receiveSizesFIFO == nullptr) { if(receiveSizesFIFO == nullptr) {
// Configuration error. // Configuration error.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "SharedRingBuffer::getReceiveSizesFIFO: Ring buffer" sif::warning << "SharedRingBuffer::getReceiveSizesFIFO: Ring buffer"
<< " was not configured to have sizes FIFO, returning nullptr!" << " was not configured to have sizes FIFO, returning nullptr!"
<< std::endl; << std::endl;

View File

@ -107,7 +107,7 @@ MessageQueueId_t ExtendedControllerBase::getCommandQueue() const {
} }
LocalPoolDataSetBase* ExtendedControllerBase::getDataSetHandle(sid_t sid) { LocalPoolDataSetBase* ExtendedControllerBase::getDataSetHandle(sid_t sid) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "ExtendedControllerBase::getDataSetHandle: No child " sif::warning << "ExtendedControllerBase::getDataSetHandle: No child "
<< " implementation provided, returning nullptr!" << std::endl; << " implementation provided, returning nullptr!" << std::endl;
#endif #endif

View File

@ -55,7 +55,7 @@ void Clcw::setBitLock(bool bitLock) {
} }
void Clcw::print() { void Clcw::print() {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Clcw::print: Clcw is: " << std::hex << getAsWhole() << std::dec << std::endl; sif::debug << "Clcw::print: Clcw is: " << std::hex << getAsWhole() << std::dec << std::endl;
#endif #endif
} }

View File

@ -98,7 +98,7 @@ ReturnValue_t DataLinkLayer::processFrame(uint16_t length) {
receivedDataLength = length; receivedDataLength = length;
ReturnValue_t status = allFramesReception(); ReturnValue_t status = allFramesReception();
if (status != RETURN_OK) { if (status != RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DataLinkLayer::processFrame: frame reception failed. " sif::error << "DataLinkLayer::processFrame: frame reception failed. "
"Error code: " << std::hex << status << std::dec << std::endl; "Error code: " << std::hex << status << std::dec << std::endl;
#endif #endif
@ -126,7 +126,7 @@ ReturnValue_t DataLinkLayer::initialize() {
if ( virtualChannels.begin() != virtualChannels.end() ) { if ( virtualChannels.begin() != virtualChannels.end() ) {
clcw->setVirtualChannel( virtualChannels.begin()->second->getChannelId() ); clcw->setVirtualChannel( virtualChannels.begin()->second->getChannelId() );
} else { } else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DataLinkLayer::initialize: No VC assigned to this DLL instance! " << std::endl; sif::error << "DataLinkLayer::initialize: No VC assigned to this DLL instance! " << std::endl;
#endif #endif
return RETURN_FAILED; return RETURN_FAILED;

View File

@ -29,7 +29,7 @@ ReturnValue_t MapPacketExtraction::extractPackets(TcTransferFrame* frame) {
bufferPosition = &packetBuffer[packetLength]; bufferPosition = &packetBuffer[packetLength];
status = RETURN_OK; status = RETURN_OK;
} else { } else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error sif::error
<< "MapPacketExtraction::extractPackets. Packet too large! Size: " << "MapPacketExtraction::extractPackets. Packet too large! Size: "
<< packetLength << std::endl; << packetLength << std::endl;
@ -53,7 +53,7 @@ ReturnValue_t MapPacketExtraction::extractPackets(TcTransferFrame* frame) {
} }
status = RETURN_OK; status = RETURN_OK;
} else { } else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error sif::error
<< "MapPacketExtraction::extractPackets. Packet too large! Size: " << "MapPacketExtraction::extractPackets. Packet too large! Size: "
<< packetLength << std::endl; << packetLength << std::endl;
@ -62,7 +62,7 @@ ReturnValue_t MapPacketExtraction::extractPackets(TcTransferFrame* frame) {
status = CONTENT_TOO_LARGE; status = CONTENT_TOO_LARGE;
} }
} else { } else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error sif::error
<< "MapPacketExtraction::extractPackets. Illegal segment! Last flag: " << "MapPacketExtraction::extractPackets. Illegal segment! Last flag: "
<< (int) lastSegmentationFlag << std::endl; << (int) lastSegmentationFlag << std::endl;
@ -72,7 +72,7 @@ ReturnValue_t MapPacketExtraction::extractPackets(TcTransferFrame* frame) {
} }
break; break;
default: default:
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error sif::error
<< "MapPacketExtraction::extractPackets. Illegal segmentationFlag: " << "MapPacketExtraction::extractPackets. Illegal segmentationFlag: "
<< (int) segmentationFlag << std::endl; << (int) segmentationFlag << std::endl;
@ -143,11 +143,11 @@ ReturnValue_t MapPacketExtraction::initialize() {
} }
void MapPacketExtraction::printPacketBuffer(void) { void MapPacketExtraction::printPacketBuffer(void) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "DLL: packet_buffer contains: " << std::endl; sif::debug << "DLL: packet_buffer contains: " << std::endl;
#endif #endif
for (uint32_t i = 0; i < this->packetLength; ++i) { for (uint32_t i = 0; i < this->packetLength; ++i) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "packet_buffer[" << std::dec << i << "]: 0x" << std::hex sif::debug << "packet_buffer[" << std::dec << i << "]: 0x" << std::hex
<< (uint16_t) this->packetBuffer[i] << std::endl; << (uint16_t) this->packetBuffer[i] << std::endl;
#endif #endif

View File

@ -87,7 +87,7 @@ uint8_t* TcTransferFrame::getFullDataField() {
} }
void TcTransferFrame::print() { void TcTransferFrame::print() {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Raw Frame: " << std::hex << std::endl; sif::debug << "Raw Frame: " << std::hex << std::endl;
for (uint16_t count = 0; count < this->getFullSize(); count++ ) { for (uint16_t count = 0; count < this->getFullSize(); count++ ) {
sif::debug << (uint16_t)this->getFullFrame()[count] << " "; sif::debug << (uint16_t)this->getFullFrame()[count] << " ";

View File

@ -37,7 +37,7 @@ TcTransferFrameLocal::TcTransferFrameLocal(bool bypass, bool controlCommand, uin
this->getFullFrame()[getFullSize()-2] = (crc & 0xFF00) >> 8; this->getFullFrame()[getFullSize()-2] = (crc & 0xFF00) >> 8;
this->getFullFrame()[getFullSize()-1] = (crc & 0x00FF); this->getFullFrame()[getFullSize()-1] = (crc & 0x00FF);
} else { } else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "TcTransferFrameLocal: dataSize too large: " << dataSize << std::endl; sif::debug << "TcTransferFrameLocal: dataSize too large: " << dataSize << std::endl;
#endif #endif
} }

View File

@ -102,7 +102,7 @@ uint8_t VirtualChannelReception::getChannelId() const {
ReturnValue_t VirtualChannelReception::initialize() { ReturnValue_t VirtualChannelReception::initialize() {
ReturnValue_t returnValue = RETURN_FAILED; ReturnValue_t returnValue = RETURN_FAILED;
if ((slidingWindowWidth > 254) || (slidingWindowWidth % 2 != 0)) { if ((slidingWindowWidth > 254) || (slidingWindowWidth % 2 != 0)) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "VirtualChannelReception::initialize: Illegal sliding window width: " sif::error << "VirtualChannelReception::initialize: Illegal sliding window width: "
<< (int) slidingWindowWidth << std::endl; << (int) slidingWindowWidth << std::endl;
#endif #endif

View File

@ -13,21 +13,21 @@ PoolDataSetBase::~PoolDataSetBase() {}
ReturnValue_t PoolDataSetBase::registerVariable( ReturnValue_t PoolDataSetBase::registerVariable(
PoolVariableIF *variable) { PoolVariableIF *variable) {
if (state != States::STATE_SET_UNINITIALISED) { if (state != States::STATE_SET_UNINITIALISED) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DataSet::registerVariable: " sif::error << "DataSet::registerVariable: "
"Call made in wrong position." << std::endl; "Call made in wrong position." << std::endl;
#endif #endif
return DataSetIF::DATA_SET_UNINITIALISED; return DataSetIF::DATA_SET_UNINITIALISED;
} }
if (variable == nullptr) { if (variable == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DataSet::registerVariable: " sif::error << "DataSet::registerVariable: "
"Pool variable is nullptr." << std::endl; "Pool variable is nullptr." << std::endl;
#endif #endif
return DataSetIF::POOL_VAR_NULL; return DataSetIF::POOL_VAR_NULL;
} }
if (fillCount >= maxFillCount) { if (fillCount >= maxFillCount) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DataSet::registerVariable: " sif::error << "DataSet::registerVariable: "
"DataSet is full." << std::endl; "DataSet is full." << std::endl;
#endif #endif
@ -53,7 +53,7 @@ ReturnValue_t PoolDataSetBase::read(uint32_t lockTimeout) {
unlockDataPool(); unlockDataPool();
} }
else { else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DataSet::read(): " sif::error << "DataSet::read(): "
"Call made in wrong position. Don't forget to commit" "Call made in wrong position. Don't forget to commit"
" member datasets!" << std::endl; " member datasets!" << std::endl;
@ -146,7 +146,7 @@ ReturnValue_t PoolDataSetBase::handleUnreadDatasetCommit(uint32_t lockTimeout) {
} else if (registeredVariables[count]->getDataPoolId() } else if (registeredVariables[count]->getDataPoolId()
!= PoolVariableIF::NO_PARAMETER) { != PoolVariableIF::NO_PARAMETER) {
if (result != COMMITING_WITHOUT_READING) { if (result != COMMITING_WITHOUT_READING) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DataSet::commit(): commit-without-read call made " sif::error << "DataSet::commit(): commit-without-read call made "
"with non write-only variable." << std::endl; "with non write-only variable." << std::endl;
#endif #endif

View File

@ -13,7 +13,7 @@ PoolEntry<T>::PoolEntry(std::initializer_list<T> initValue, uint8_t setLength,
std::memset(this->address, 0, this->getByteSize()); std::memset(this->address, 0, this->getByteSize());
} }
else if (initValue.size() != setLength){ else if (initValue.size() != setLength){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "PoolEntry: setLength is not equal to initializer list" sif::warning << "PoolEntry: setLength is not equal to initializer list"
"length! Performing zero initialization with given setLength" "length! Performing zero initialization with given setLength"
<< std::endl; << std::endl;
@ -70,12 +70,12 @@ bool PoolEntry<T>::getValid() {
template <typename T> template <typename T>
void PoolEntry<T>::print() { void PoolEntry<T>::print() {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Pool Entry Validity: " << sif::debug << "Pool Entry Validity: " <<
(this->valid? " (valid) " : " (invalid) ") << std::endl; (this->valid? " (valid) " : " (invalid) ") << std::endl;
#endif #endif
arrayprinter::print(reinterpret_cast<uint8_t*>(address), length); arrayprinter::print(reinterpret_cast<uint8_t*>(address), length);
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << std::dec << std::endl; sif::debug << std::dec << std::endl;
#endif #endif
} }

View File

@ -89,7 +89,7 @@ public:
* @return * @return
*/ */
virtual LocalPoolObjectBase* getPoolObjectHandle(lp_id_t localPoolId) { virtual LocalPoolObjectBase* getPoolObjectHandle(lp_id_t localPoolId) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "HasLocalDataPoolIF::getPoolObjectHandle: Not overriden" sif::warning << "HasLocalDataPoolIF::getPoolObjectHandle: Not overriden"
<< ". Returning nullptr!" << std::endl; << ". Returning nullptr!" << std::endl;
#endif #endif

View File

@ -21,7 +21,7 @@ LocalDataPoolManager::LocalDataPoolManager(HasLocalDataPoolIF* owner,
MessageQueueIF* queueToUse, bool appendValidityBuffer): MessageQueueIF* queueToUse, bool appendValidityBuffer):
appendValidityBuffer(appendValidityBuffer) { appendValidityBuffer(appendValidityBuffer) {
if(owner == nullptr) { if(owner == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalDataPoolManager::LocalDataPoolManager: " sif::error << "LocalDataPoolManager::LocalDataPoolManager: "
<< "Invalid supplied owner!" << std::endl; << "Invalid supplied owner!" << std::endl;
#endif #endif
@ -30,7 +30,7 @@ LocalDataPoolManager::LocalDataPoolManager(HasLocalDataPoolIF* owner,
this->owner = owner; this->owner = owner;
mutex = MutexFactory::instance()->createMutex(); mutex = MutexFactory::instance()->createMutex();
if(mutex == nullptr) { if(mutex == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalDataPoolManager::LocalDataPoolManager: " sif::error << "LocalDataPoolManager::LocalDataPoolManager: "
<< "Could not create mutex." << std::endl; << "Could not create mutex." << std::endl;
#endif #endif
@ -43,7 +43,7 @@ LocalDataPoolManager::~LocalDataPoolManager() {}
ReturnValue_t LocalDataPoolManager::initialize(MessageQueueIF* queueToUse) { ReturnValue_t LocalDataPoolManager::initialize(MessageQueueIF* queueToUse) {
if(queueToUse == nullptr) { if(queueToUse == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalDataPoolManager::initialize: " sif::error << "LocalDataPoolManager::initialize: "
<< std::hex << "0x" << owner->getObjectId() << ". Supplied " << std::hex << "0x" << owner->getObjectId() << ". Supplied "
<< "queue invalid!" << std::dec << std::endl; << "queue invalid!" << std::dec << std::endl;
@ -53,7 +53,7 @@ ReturnValue_t LocalDataPoolManager::initialize(MessageQueueIF* queueToUse) {
ipcStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE); ipcStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
if(ipcStore == nullptr) { if(ipcStore == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalDataPoolManager::initialize: " sif::error << "LocalDataPoolManager::initialize: "
<< std::hex << "0x" << owner->getObjectId() << ": Could not " << std::hex << "0x" << owner->getObjectId() << ": Could not "
<< "set IPC store." <<std::dec << std::endl; << "set IPC store." <<std::dec << std::endl;
@ -69,7 +69,7 @@ ReturnValue_t LocalDataPoolManager::initialize(MessageQueueIF* queueToUse) {
hkDestinationId = hkPacketReceiver->getHkQueue(); hkDestinationId = hkPacketReceiver->getHkQueue();
} }
else { else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalDataPoolManager::LocalDataPoolManager: " sif::error << "LocalDataPoolManager::LocalDataPoolManager: "
<< "Default HK destination object is invalid!" << std::endl; << "Default HK destination object is invalid!" << std::endl;
#endif #endif
@ -95,7 +95,7 @@ ReturnValue_t LocalDataPoolManager::initializeHousekeepingPoolEntriesOnce() {
} }
return result; return result;
} }
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "HousekeepingManager: The map should only be initialized " sif::warning << "HousekeepingManager: The map should only be initialized "
<< "once!" << std::endl; << "once!" << std::endl;
#endif #endif
@ -351,7 +351,7 @@ ReturnValue_t LocalDataPoolManager::subscribeForPeriodicPacket(sid_t sid,
AcceptsHkPacketsIF* hkReceiverObject = AcceptsHkPacketsIF* hkReceiverObject =
objectManager->get<AcceptsHkPacketsIF>(packetDestination); objectManager->get<AcceptsHkPacketsIF>(packetDestination);
if(hkReceiverObject == nullptr) { if(hkReceiverObject == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalDataPoolManager::subscribeForPeriodicPacket:" sif::error << "LocalDataPoolManager::subscribeForPeriodicPacket:"
<< " Invalid receiver!"<< std::endl; << " Invalid receiver!"<< std::endl;
#endif #endif
@ -383,7 +383,7 @@ ReturnValue_t LocalDataPoolManager::subscribeForUpdatePackets(sid_t sid,
AcceptsHkPacketsIF* hkReceiverObject = AcceptsHkPacketsIF* hkReceiverObject =
objectManager->get<AcceptsHkPacketsIF>(packetDestination); objectManager->get<AcceptsHkPacketsIF>(packetDestination);
if(hkReceiverObject == nullptr) { if(hkReceiverObject == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalDataPoolManager::subscribeForPeriodicPacket:" sif::error << "LocalDataPoolManager::subscribeForPeriodicPacket:"
<< " Invalid receiver!"<< std::endl; << " Invalid receiver!"<< std::endl;
#endif #endif
@ -591,7 +591,7 @@ ReturnValue_t LocalDataPoolManager::printPoolEntry(
lp_id_t localPoolId) { lp_id_t localPoolId) {
auto poolIter = localPoolMap.find(localPoolId); auto poolIter = localPoolMap.find(localPoolId);
if (poolIter == localPoolMap.end()) { if (poolIter == localPoolMap.end()) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "HousekeepingManager::fechPoolEntry:" sif::debug << "HousekeepingManager::fechPoolEntry:"
<< " Pool entry not found." << std::endl; << " Pool entry not found." << std::endl;
#endif #endif
@ -614,7 +614,7 @@ ReturnValue_t LocalDataPoolManager::generateHousekeepingPacket(sid_t sid,
MessageQueueId_t destination) { MessageQueueId_t destination) {
if(dataSet == nullptr) { if(dataSet == nullptr) {
// Configuration error. // Configuration error.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "HousekeepingManager::generateHousekeepingPacket:" sif::warning << "HousekeepingManager::generateHousekeepingPacket:"
<< " Set ID not found or dataset not assigned!" << std::endl; << " Set ID not found or dataset not assigned!" << std::endl;
#endif #endif
@ -698,7 +698,7 @@ void LocalDataPoolManager::performPeriodicHkGeneration(HkReceiver& receiver) {
sid, dataSet, true); sid, dataSet, true);
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
// configuration error // configuration error
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "LocalDataPoolManager::performHkOperation:" sif::debug << "LocalDataPoolManager::performHkOperation:"
<< "0x" << std::hex << std::setfill('0') << std::setw(8) << "0x" << std::hex << std::setfill('0') << std::setw(8)
<< owner->getObjectId() << " Error generating " << owner->getObjectId() << " Error generating "
@ -748,7 +748,7 @@ ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid,
// Get and check dataset first. // Get and check dataset first.
LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(sid); LocalPoolDataSetBase* dataSet = owner->getDataSetHandle(sid);
if(dataSet == nullptr) { if(dataSet == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "HousekeepingManager::generateHousekeepingPacket:" sif::warning << "HousekeepingManager::generateHousekeepingPacket:"
<< " Set ID not found" << std::endl; << " Set ID not found" << std::endl;
#endif #endif
@ -776,7 +776,7 @@ ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid,
ReturnValue_t result = ipcStore->getFreeElement(&storeId, ReturnValue_t result = ipcStore->getFreeElement(&storeId,
expectedSize,&storePtr); expectedSize,&storePtr);
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "HousekeepingManager::generateHousekeepingPacket: " sif::error << "HousekeepingManager::generateHousekeepingPacket: "
<< "Could not get free element from IPC store." << std::endl; << "Could not get free element from IPC store." << std::endl;
#endif #endif
@ -788,7 +788,7 @@ ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid,
result = setPacket.serialize(&storePtr, &size, expectedSize, result = setPacket.serialize(&storePtr, &size, expectedSize,
SerializeIF::Endianness::BIG); SerializeIF::Endianness::BIG);
if(expectedSize != size) { if(expectedSize != size) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "HousekeepingManager::generateSetStructurePacket: " sif::error << "HousekeepingManager::generateSetStructurePacket: "
<< "Expected size is not equal to serialized size" << std::endl; << "Expected size is not equal to serialized size" << std::endl;
#endif #endif

View File

@ -375,7 +375,7 @@ ReturnValue_t LocalDataPoolManager::fetchPoolEntry(lp_id_t localPoolId,
PoolEntry<T> **poolEntry) { PoolEntry<T> **poolEntry) {
auto poolIter = localPoolMap.find(localPoolId); auto poolIter = localPoolMap.find(localPoolId);
if (poolIter == localPoolMap.end()) { if (poolIter == localPoolMap.end()) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "HousekeepingManager::fechPoolEntry: Pool entry " sif::warning << "HousekeepingManager::fechPoolEntry: Pool entry "
"not found." << std::endl; "not found." << std::endl;
#endif #endif
@ -384,7 +384,7 @@ ReturnValue_t LocalDataPoolManager::fetchPoolEntry(lp_id_t localPoolId,
*poolEntry = dynamic_cast< PoolEntry<T>* >(poolIter->second); *poolEntry = dynamic_cast< PoolEntry<T>* >(poolIter->second);
if(*poolEntry == nullptr) { if(*poolEntry == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "HousekeepingManager::fetchPoolEntry:" sif::debug << "HousekeepingManager::fetchPoolEntry:"
" Pool entry not found." << std::endl; " Pool entry not found." << std::endl;
#endif #endif

View File

@ -12,7 +12,7 @@ LocalPoolDataSetBase::LocalPoolDataSetBase(HasLocalDataPoolIF *hkOwner,
PoolDataSetBase(registeredVariablesArray, maxNumberOfVariables) { PoolDataSetBase(registeredVariablesArray, maxNumberOfVariables) {
if(hkOwner == nullptr) { if(hkOwner == nullptr) {
// Configuration error. // Configuration error.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalPoolDataSetBase::LocalPoolDataSetBase: Owner " sif::error << "LocalPoolDataSetBase::LocalPoolDataSetBase: Owner "
<< "invalid!" << std::endl; << "invalid!" << std::endl;
#endif #endif
@ -149,7 +149,7 @@ ReturnValue_t LocalPoolDataSetBase::serializeLocalPoolIds(uint8_t** buffer,
auto result = SerializeAdapter::serialize(&currentPoolId, buffer, auto result = SerializeAdapter::serialize(&currentPoolId, buffer,
size, maxSize, streamEndianness); size, maxSize, streamEndianness);
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "LocalDataSet::serializeLocalPoolIds: Serialization" sif::warning << "LocalDataSet::serializeLocalPoolIds: Serialization"
" error!" << std::endl; " error!" << std::endl;
#endif #endif
@ -210,7 +210,7 @@ ReturnValue_t LocalPoolDataSetBase::serialize(uint8_t **buffer, size_t *size,
void LocalPoolDataSetBase::bitSetter(uint8_t* byte, uint8_t position) const { void LocalPoolDataSetBase::bitSetter(uint8_t* byte, uint8_t position) const {
if(position > 7) { if(position > 7) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Pool Raw Access: Bit setting invalid position" sif::debug << "Pool Raw Access: Bit setting invalid position"
<< std::endl; << std::endl;
#endif #endif
@ -262,7 +262,7 @@ sid_t LocalPoolDataSetBase::getSid() const {
bool LocalPoolDataSetBase::bitGetter(const uint8_t* byte, bool LocalPoolDataSetBase::bitGetter(const uint8_t* byte,
uint8_t position) const { uint8_t position) const {
if(position > 7) { if(position > 7) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Pool Raw Access: Bit setting invalid position" sif::debug << "Pool Raw Access: Bit setting invalid position"
<< std::endl; << std::endl;
#endif #endif

View File

@ -5,13 +5,13 @@ LocalPoolObjectBase::LocalPoolObjectBase(lp_id_t poolId,
pool_rwm_t setReadWriteMode): localPoolId(poolId), pool_rwm_t setReadWriteMode): localPoolId(poolId),
readWriteMode(setReadWriteMode) { readWriteMode(setReadWriteMode) {
if(poolId == PoolVariableIF::NO_PARAMETER) { if(poolId == PoolVariableIF::NO_PARAMETER) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "LocalPoolVar<T>::LocalPoolVar: 0 passed as pool ID, " sif::warning << "LocalPoolVar<T>::LocalPoolVar: 0 passed as pool ID, "
<< "which is the NO_PARAMETER value!" << std::endl; << "which is the NO_PARAMETER value!" << std::endl;
#endif #endif
} }
if(hkOwner == nullptr) { if(hkOwner == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalPoolVar<T>::LocalPoolVar: The supplied pool " sif::error << "LocalPoolVar<T>::LocalPoolVar: The supplied pool "
<< "owner is a invalid!" << std::endl; << "owner is a invalid!" << std::endl;
#endif #endif
@ -27,7 +27,7 @@ LocalPoolObjectBase::LocalPoolObjectBase(object_id_t poolOwner, lp_id_t poolId,
DataSetIF *dataSet, pool_rwm_t setReadWriteMode): localPoolId(poolId), DataSetIF *dataSet, pool_rwm_t setReadWriteMode): localPoolId(poolId),
readWriteMode(setReadWriteMode) { readWriteMode(setReadWriteMode) {
if(poolId == PoolVariableIF::NO_PARAMETER) { if(poolId == PoolVariableIF::NO_PARAMETER) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "LocalPoolVar<T>::LocalPoolVar: 0 passed as pool ID, " sif::warning << "LocalPoolVar<T>::LocalPoolVar: 0 passed as pool ID, "
<< "which is the NO_PARAMETER value!" << std::endl; << "which is the NO_PARAMETER value!" << std::endl;
#endif #endif
@ -35,7 +35,7 @@ LocalPoolObjectBase::LocalPoolObjectBase(object_id_t poolOwner, lp_id_t poolId,
HasLocalDataPoolIF* hkOwner = HasLocalDataPoolIF* hkOwner =
objectManager->get<HasLocalDataPoolIF>(poolOwner); objectManager->get<HasLocalDataPoolIF>(poolOwner);
if(hkOwner == nullptr) { if(hkOwner == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalPoolVariable: The supplied pool owner did not " sif::error << "LocalPoolVariable: The supplied pool owner did not "
<< "implement the correct interface" << "implement the correct interface"
<< " HasLocalDataPoolIF!" << std::endl; << " HasLocalDataPoolIF!" << std::endl;

View File

@ -33,7 +33,7 @@ inline ReturnValue_t LocalPoolVariable<T>::read(dur_millis_t lockTimeout) {
template<typename T> template<typename T>
inline ReturnValue_t LocalPoolVariable<T>::readWithoutLock() { inline ReturnValue_t LocalPoolVariable<T>::readWithoutLock() {
if(readWriteMode == pool_rwm_t::VAR_WRITE) { if(readWriteMode == pool_rwm_t::VAR_WRITE) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "LocalPoolVar: Invalid read write " sif::debug << "LocalPoolVar: Invalid read write "
"mode for read() call." << std::endl; "mode for read() call." << std::endl;
#endif #endif
@ -43,7 +43,7 @@ inline ReturnValue_t LocalPoolVariable<T>::readWithoutLock() {
PoolEntry<T>* poolEntry = nullptr; PoolEntry<T>* poolEntry = nullptr;
ReturnValue_t result = hkManager->fetchPoolEntry(localPoolId, &poolEntry); ReturnValue_t result = hkManager->fetchPoolEntry(localPoolId, &poolEntry);
if(result != RETURN_OK or poolEntry == nullptr) { if(result != RETURN_OK or poolEntry == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PoolVector: Read of local pool variable of object " sif::error << "PoolVector: Read of local pool variable of object "
<< std::hex << std::setw(8) << std::setfill('0') << std::hex << std::setw(8) << std::setfill('0')
<< hkManager->getOwner() << " and lp ID " << localPoolId << hkManager->getOwner() << " and lp ID " << localPoolId
@ -66,7 +66,7 @@ inline ReturnValue_t LocalPoolVariable<T>::commit(dur_millis_t lockTimeout) {
template<typename T> template<typename T>
inline ReturnValue_t LocalPoolVariable<T>::commitWithoutLock() { inline ReturnValue_t LocalPoolVariable<T>::commitWithoutLock() {
if(readWriteMode == pool_rwm_t::VAR_READ) { if(readWriteMode == pool_rwm_t::VAR_READ) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "LocalPoolVariable: Invalid read write " sif::debug << "LocalPoolVariable: Invalid read write "
"mode for commit() call." << std::endl; "mode for commit() call." << std::endl;
#endif #endif
@ -75,7 +75,7 @@ inline ReturnValue_t LocalPoolVariable<T>::commitWithoutLock() {
PoolEntry<T>* poolEntry = nullptr; PoolEntry<T>* poolEntry = nullptr;
ReturnValue_t result = hkManager->fetchPoolEntry(localPoolId, &poolEntry); ReturnValue_t result = hkManager->fetchPoolEntry(localPoolId, &poolEntry);
if(result != RETURN_OK) { if(result != RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PoolVector: Read of local pool variable of object " sif::error << "PoolVector: Read of local pool variable of object "
"0x" << std::hex << std::setw(8) << std::setfill('0') << "0x" << std::hex << std::setw(8) << std::setfill('0') <<
hkManager->getOwner() << " and lp ID 0x" << localPoolId << hkManager->getOwner() << " and lp ID 0x" << localPoolId <<

View File

@ -32,7 +32,7 @@ inline ReturnValue_t LocalPoolVector<T, vectorSize>::read(uint32_t lockTimeout)
template<typename T, uint16_t vectorSize> template<typename T, uint16_t vectorSize>
inline ReturnValue_t LocalPoolVector<T, vectorSize>::readWithoutLock() { inline ReturnValue_t LocalPoolVector<T, vectorSize>::readWithoutLock() {
if(readWriteMode == pool_rwm_t::VAR_WRITE) { if(readWriteMode == pool_rwm_t::VAR_WRITE) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "LocalPoolVar: Invalid read write " sif::debug << "LocalPoolVar: Invalid read write "
"mode for read() call." << std::endl; "mode for read() call." << std::endl;
#endif #endif
@ -44,7 +44,7 @@ inline ReturnValue_t LocalPoolVector<T, vectorSize>::readWithoutLock() {
memset(this->value, 0, vectorSize * sizeof(T)); memset(this->value, 0, vectorSize * sizeof(T));
if(result != RETURN_OK) { if(result != RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PoolVector: Read of local pool variable of object " sif::error << "PoolVector: Read of local pool variable of object "
"0x" << std::hex << std::setw(8) << std::setfill('0') << "0x" << std::hex << std::setw(8) << std::setfill('0') <<
hkManager->getOwner() << "and lp ID 0x" << localPoolId << hkManager->getOwner() << "and lp ID 0x" << localPoolId <<
@ -68,7 +68,7 @@ inline ReturnValue_t LocalPoolVector<T, vectorSize>::commit(
template<typename T, uint16_t vectorSize> template<typename T, uint16_t vectorSize>
inline ReturnValue_t LocalPoolVector<T, vectorSize>::commitWithoutLock() { inline ReturnValue_t LocalPoolVector<T, vectorSize>::commitWithoutLock() {
if(readWriteMode == pool_rwm_t::VAR_READ) { if(readWriteMode == pool_rwm_t::VAR_READ) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "LocalPoolVar: Invalid read write " sif::debug << "LocalPoolVar: Invalid read write "
"mode for commit() call." << std::endl; "mode for commit() call." << std::endl;
#endif #endif
@ -77,7 +77,7 @@ inline ReturnValue_t LocalPoolVector<T, vectorSize>::commitWithoutLock() {
PoolEntry<T>* poolEntry = nullptr; PoolEntry<T>* poolEntry = nullptr;
ReturnValue_t result = hkManager->fetchPoolEntry(localPoolId, &poolEntry); ReturnValue_t result = hkManager->fetchPoolEntry(localPoolId, &poolEntry);
if(result != RETURN_OK) { if(result != RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PoolVector: Read of local pool variable of object " sif::error << "PoolVector: Read of local pool variable of object "
"0x" << std::hex << std::setw(8) << std::setfill('0') << "0x" << std::hex << std::setw(8) << std::setfill('0') <<
hkManager->getOwner() << " and lp ID 0x" << localPoolId << hkManager->getOwner() << " and lp ID 0x" << localPoolId <<
@ -97,7 +97,7 @@ inline T& LocalPoolVector<T, vectorSize>::operator [](int i) {
} }
// If this happens, I have to set some value. I consider this // If this happens, I have to set some value. I consider this
// a configuration error, but I wont exit here. // a configuration error, but I wont exit here.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalPoolVector: Invalid index. Setting or returning" sif::error << "LocalPoolVector: Invalid index. Setting or returning"
" last value!" << std::endl; " last value!" << std::endl;
#endif #endif
@ -111,7 +111,7 @@ inline const T& LocalPoolVector<T, vectorSize>::operator [](int i) const {
} }
// If this happens, I have to set some value. I consider this // If this happens, I have to set some value. I consider this
// a configuration error, but I wont exit here. // a configuration error, but I wont exit here.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalPoolVector: Invalid index. Setting or returning" sif::error << "LocalPoolVector: Invalid index. Setting or returning"
" last value!" << std::endl; " last value!" << std::endl;
#endif #endif

View File

@ -14,7 +14,7 @@ public:
if(readObject != nullptr) { if(readObject != nullptr) {
readResult = readObject->read(mutexTimeout); readResult = readObject->read(mutexTimeout);
#if FSFW_PRINT_VERBOSITY_LEVEL == 1 #if FSFW_PRINT_VERBOSITY_LEVEL == 1
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PoolReadHelper: Read failed!" << std::endl; sif::error << "PoolReadHelper: Read failed!" << std::endl;
#endif #endif
#endif #endif

View File

@ -15,7 +15,7 @@ ReturnValue_t pst::pollingSequenceInitDefault(
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
else { else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "pst::pollingSequenceInitDefault: Sequence invalid!" sif::error << "pst::pollingSequenceInitDefault: Sequence invalid!"
<< std::endl; << std::endl;
#endif #endif

View File

@ -39,7 +39,7 @@ DeviceHandlerBase::DeviceHandlerBase(object_id_t setObjectId,
cookieInfo.state = COOKIE_UNUSED; cookieInfo.state = COOKIE_UNUSED;
cookieInfo.pendingCommand = deviceCommandMap.end(); cookieInfo.pendingCommand = deviceCommandMap.end();
if (comCookie == nullptr) { if (comCookie == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DeviceHandlerBase: ObjectID 0x" << std::hex sif::error << "DeviceHandlerBase: ObjectID 0x" << std::hex
<< std::setw(8) << std::setfill('0') << this->getObjectId() << std::setw(8) << std::setfill('0') << this->getObjectId()
<< std::dec << ": Do not pass nullptr as a cookie, consider " << std::dec << ": Do not pass nullptr as a cookie, consider "
@ -132,7 +132,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
communicationInterface = objectManager->get<DeviceCommunicationIF>( communicationInterface = objectManager->get<DeviceCommunicationIF>(
deviceCommunicationId); deviceCommunicationId);
if (communicationInterface == nullptr) { if (communicationInterface == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DeviceHandlerBase::initialize: Communication interface " sif::error << "DeviceHandlerBase::initialize: Communication interface "
"invalid." << std::endl; "invalid." << std::endl;
sif::error << "Make sure it is set up properly and implements" sif::error << "Make sure it is set up properly and implements"
@ -143,7 +143,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
result = communicationInterface->initializeInterface(comCookie); result = communicationInterface->initializeInterface(comCookie);
if (result != RETURN_OK) { if (result != RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DeviceHandlerBase::initialize: Initializing " sif::error << "DeviceHandlerBase::initialize: Initializing "
"communication interface failed!" << std::endl; "communication interface failed!" << std::endl;
#endif #endif
@ -152,7 +152,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
IPCStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE); IPCStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
if (IPCStore == nullptr) { if (IPCStore == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DeviceHandlerBase::initialize: IPC store not set up in " sif::error << "DeviceHandlerBase::initialize: IPC store not set up in "
"factory." << std::endl; "factory." << std::endl;
#endif #endif
@ -164,7 +164,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
AcceptsDeviceResponsesIF>(rawDataReceiverId); AcceptsDeviceResponsesIF>(rawDataReceiverId);
if (rawReceiver == nullptr) { if (rawReceiver == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DeviceHandlerBase::initialize: Raw receiver object " sif::error << "DeviceHandlerBase::initialize: Raw receiver object "
"ID set but no valid object found." << std::endl; "ID set but no valid object found." << std::endl;
sif::error << "Make sure the raw receiver object is set up properly" sif::error << "Make sure the raw receiver object is set up properly"
@ -178,7 +178,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
if(powerSwitcherId != objects::NO_OBJECT) { if(powerSwitcherId != objects::NO_OBJECT) {
powerSwitcher = objectManager->get<PowerSwitchIF>(powerSwitcherId); powerSwitcher = objectManager->get<PowerSwitchIF>(powerSwitcherId);
if (powerSwitcher == nullptr) { if (powerSwitcher == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DeviceHandlerBase::initialize: Power switcher " sif::error << "DeviceHandlerBase::initialize: Power switcher "
<< "object ID set but no valid object found." << std::endl; << "object ID set but no valid object found." << std::endl;
sif::error << "Make sure the raw receiver object is set up properly" sif::error << "Make sure the raw receiver object is set up properly"
@ -720,7 +720,7 @@ void DeviceHandlerBase::parseReply(const uint8_t* receivedData,
case RETURN_OK: case RETURN_OK:
handleReply(receivedData, foundId, foundLen); handleReply(receivedData, foundId, foundLen);
if(foundLen == 0) { if(foundLen == 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "DeviceHandlerBase::parseReply: foundLen is 0!" sif::warning << "DeviceHandlerBase::parseReply: foundLen is 0!"
" Packet parsing will be stuck." << std::endl; " Packet parsing will be stuck." << std::endl;
#endif #endif
@ -734,7 +734,7 @@ void DeviceHandlerBase::parseReply(const uint8_t* receivedData,
foundId); foundId);
} }
if(foundLen == 0) { if(foundLen == 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "DeviceHandlerBase::parseReply: foundLen is 0!" sif::warning << "DeviceHandlerBase::parseReply: foundLen is 0!"
" Packet parsing will be stuck." << std::endl; " Packet parsing will be stuck." << std::endl;
#endif #endif
@ -1291,7 +1291,7 @@ void DeviceHandlerBase::buildInternalCommand(void) {
result = buildNormalDeviceCommand(&deviceCommandId); result = buildNormalDeviceCommand(&deviceCommandId);
if (result == BUSY) { if (result == BUSY) {
//so we can track misconfigurations //so we can track misconfigurations
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << std::hex << getObjectId() sif::debug << std::hex << getObjectId()
<< ": DHB::buildInternalCommand: Busy" << std::dec << ": DHB::buildInternalCommand: Busy" << std::dec
<< std::endl; << std::endl;
@ -1320,7 +1320,7 @@ void DeviceHandlerBase::buildInternalCommand(void) {
result = COMMAND_NOT_SUPPORTED; result = COMMAND_NOT_SUPPORTED;
} else if (iter->second.isExecuting) { } else if (iter->second.isExecuting) {
//so we can track misconfigurations //so we can track misconfigurations
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << std::hex << getObjectId() sif::debug << std::hex << getObjectId()
<< ": DHB::buildInternalCommand: Command " << ": DHB::buildInternalCommand: Command "
<< deviceCommandId << " isExecuting" << std::dec << deviceCommandId << " isExecuting" << std::dec

View File

@ -169,7 +169,7 @@ void DeviceHandlerFailureIsolation::clearFaultCounters() {
ReturnValue_t DeviceHandlerFailureIsolation::initialize() { ReturnValue_t DeviceHandlerFailureIsolation::initialize() {
ReturnValue_t result = FailureIsolationBase::initialize(); ReturnValue_t result = FailureIsolationBase::initialize();
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DeviceHandlerFailureIsolation::initialize: Could not" sif::error << "DeviceHandlerFailureIsolation::initialize: Could not"
" initialize FailureIsolationBase." << std::endl; " initialize FailureIsolationBase." << std::endl;
#endif #endif
@ -252,7 +252,7 @@ bool DeviceHandlerFailureIsolation::isFdirInActionOrAreWeFaulty(
if (owner == nullptr) { if (owner == nullptr) {
// Configuration error. // Configuration error.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DeviceHandlerFailureIsolation::" sif::error << "DeviceHandlerFailureIsolation::"
<< "isFdirInActionOrAreWeFaulty: Owner not set!" << std::endl; << "isFdirInActionOrAreWeFaulty: Owner not set!" << std::endl;
#endif #endif

View File

@ -122,7 +122,7 @@ void EventManager::printEvent(EventMessage* message) {
case severity::INFO: case severity::INFO:
#if DEBUG_INFO_EVENT == 1 #if DEBUG_INFO_EVENT == 1
string = translateObject(message->getReporter()); string = translateObject(message->getReporter());
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "EVENT: "; sif::info << "EVENT: ";
if (string != 0) { if (string != 0) {
sif::info << string; sif::info << string;
@ -133,12 +133,12 @@ void EventManager::printEvent(EventMessage* message) {
<< std::dec << message->getEventId() << std::hex << ") P1: 0x" << std::dec << message->getEventId() << std::hex << ") P1: 0x"
<< message->getParameter1() << " P2: 0x" << message->getParameter1() << " P2: 0x"
<< message->getParameter2() << std::dec << std::endl; << message->getParameter2() << std::dec << std::endl;
#endif /* CPP_OSTREAM_ENABLED == 1 */ #endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
#endif /* DEBUG_INFO_EVENT == 1 */ #endif /* DEBUG_INFO_EVENT == 1 */
break; break;
default: default:
string = translateObject(message->getReporter()); string = translateObject(message->getReporter());
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "EventManager: "; sif::debug << "EventManager: ";
if (string != 0) { if (string != 0) {
sif::debug << string; sif::debug << string;

View File

@ -21,7 +21,7 @@ ReturnValue_t FailureIsolationBase::initialize() {
EventManagerIF* manager = objectManager->get<EventManagerIF>( EventManagerIF* manager = objectManager->get<EventManagerIF>(
objects::EVENT_MANAGER); objects::EVENT_MANAGER);
if (manager == nullptr) { if (manager == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "FailureIsolationBase::initialize: Event Manager has not" sif::error << "FailureIsolationBase::initialize: Event Manager has not"
" been initialized!" << std::endl; " been initialized!" << std::endl;
#endif #endif
@ -38,7 +38,7 @@ ReturnValue_t FailureIsolationBase::initialize() {
} }
owner = objectManager->get<HasHealthIF>(ownerId); owner = objectManager->get<HasHealthIF>(ownerId);
if (owner == nullptr) { if (owner == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "FailureIsolationBase::intialize: Owner object " sif::error << "FailureIsolationBase::intialize: Owner object "
"invalid. Make sure it implements HasHealthIF" << std::endl; "invalid. Make sure it implements HasHealthIF" << std::endl;
#endif #endif
@ -49,11 +49,11 @@ ReturnValue_t FailureIsolationBase::initialize() {
ConfirmsFailuresIF* parentIF = objectManager->get<ConfirmsFailuresIF>( ConfirmsFailuresIF* parentIF = objectManager->get<ConfirmsFailuresIF>(
faultTreeParent); faultTreeParent);
if (parentIF == nullptr) { if (parentIF == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "FailureIsolationBase::intialize: Parent object" sif::error << "FailureIsolationBase::intialize: Parent object"
<< "invalid." << std::endl; << "invalid." << std::endl;
#endif #endif
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Make sure it implements ConfirmsFailuresIF." sif::error << "Make sure it implements ConfirmsFailuresIF."
<< std::endl; << std::endl;
#endif #endif

View File

@ -4,7 +4,7 @@
void arrayprinter::print(const uint8_t *data, size_t size, OutputType type, void arrayprinter::print(const uint8_t *data, size_t size, OutputType type,
bool printInfo, size_t maxCharPerLine) { bool printInfo, size_t maxCharPerLine) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
if(printInfo) { if(printInfo) {
sif::info << "Printing data with size " << size << ": "; sif::info << "Printing data with size " << size << ": ";
} }
@ -23,7 +23,7 @@ void arrayprinter::print(const uint8_t *data, size_t size, OutputType type,
void arrayprinter::printHex(const uint8_t *data, size_t size, void arrayprinter::printHex(const uint8_t *data, size_t size,
size_t maxCharPerLine) { size_t maxCharPerLine) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << std::hex; sif::info << std::hex;
for(size_t i = 0; i < size; i++) { for(size_t i = 0; i < size; i++) {
sif::info << "0x" << static_cast<int>(data[i]); sif::info << "0x" << static_cast<int>(data[i]);
@ -42,7 +42,7 @@ void arrayprinter::printHex(const uint8_t *data, size_t size,
void arrayprinter::printDec(const uint8_t *data, size_t size, void arrayprinter::printDec(const uint8_t *data, size_t size,
size_t maxCharPerLine) { size_t maxCharPerLine) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << std::dec; sif::info << std::dec;
for(size_t i = 0; i < size; i++) { for(size_t i = 0; i < size; i++) {
sif::info << static_cast<int>(data[i]); sif::info << static_cast<int>(data[i]);
@ -58,7 +58,7 @@ void arrayprinter::printDec(const uint8_t *data, size_t size,
} }
void arrayprinter::printBin(const uint8_t *data, size_t size) { void arrayprinter::printBin(const uint8_t *data, size_t size) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "\n" << std::flush; sif::info << "\n" << std::flush;
for(size_t i = 0; i < size; i++) { for(size_t i = 0; i < size; i++) {
sif::info << "Byte " << i + 1 << ": 0b"<< sif::info << "Byte " << i + 1 << ": 0b"<<

View File

@ -41,7 +41,7 @@ ReturnValue_t HealthHelper::initialize() {
eventSender = objectManager->get<EventReportingProxyIF>(objectId); eventSender = objectManager->get<EventReportingProxyIF>(objectId);
if (healthTable == nullptr) { if (healthTable == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "HealthHelper::initialize: Health table object needs" sif::error << "HealthHelper::initialize: Health table object needs"
"to be created in factory." << std::endl; "to be created in factory." << std::endl;
#endif #endif
@ -49,7 +49,7 @@ ReturnValue_t HealthHelper::initialize() {
} }
if(eventSender == nullptr) { if(eventSender == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "HealthHelper::initialize: Owner has to implement " sif::error << "HealthHelper::initialize: Owner has to implement "
"ReportingProxyIF." << std::endl; "ReportingProxyIF." << std::endl;
#endif #endif
@ -83,7 +83,7 @@ void HealthHelper::informParent(HasHealthIF::HealthState health,
health, oldHealth); health, oldHealth);
if (MessageQueueSenderIF::sendMessage(parentQueue, &information, if (MessageQueueSenderIF::sendMessage(parentQueue, &information,
owner->getCommandQueue()) != HasReturnvaluesIF::RETURN_OK) { owner->getCommandQueue()) != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "HealthHelper::informParent: sending health reply failed." sif::debug << "HealthHelper::informParent: sending health reply failed."
<< std::endl; << std::endl;
#endif #endif
@ -104,7 +104,7 @@ void HealthHelper::handleSetHealthCommand(CommandMessage* command) {
} }
if (MessageQueueSenderIF::sendMessage(command->getSender(), &reply, if (MessageQueueSenderIF::sendMessage(command->getSender(), &reply,
owner->getCommandQueue()) != HasReturnvaluesIF::RETURN_OK) { owner->getCommandQueue()) != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "HealthHelper::handleHealthCommand: sending health " sif::debug << "HealthHelper::handleHealthCommand: sending health "
"reply failed." << std::endl; "reply failed." << std::endl;
#endif #endif

View File

@ -32,7 +32,7 @@ ReturnValue_t InternalErrorReporter::performOperation(uint8_t opCode) {
#if FSFW_ENHANCED_PRINTOUT == 1 #if FSFW_ENHANCED_PRINTOUT == 1
if(diagnosticPrintout) { if(diagnosticPrintout) {
if((newQueueHits > 0) or (newTmHits > 0) or (newStoreHits > 0)) { if((newQueueHits > 0) or (newTmHits > 0) or (newStoreHits > 0)) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "InternalErrorReporter::performOperation: Errors " sif::debug << "InternalErrorReporter::performOperation: Errors "
<< "occured!" << std::endl; << "occured!" << std::endl;
sif::debug << "Queue errors: " << newQueueHits << std::endl; sif::debug << "Queue errors: " << newQueueHits << std::endl;

View File

@ -15,7 +15,7 @@ MessageQueueMessage::MessageQueueMessage(uint8_t* data, size_t size) :
this->messageSize = this->HEADER_SIZE + size; this->messageSize = this->HEADER_SIZE + size;
} }
else { else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "MessageQueueMessage: Passed size larger than maximum" sif::warning << "MessageQueueMessage: Passed size larger than maximum"
"allowed size! Setting content to 0" << std::endl; "allowed size! Setting content to 0" << std::endl;
#endif #endif
@ -54,7 +54,7 @@ void MessageQueueMessage::setSender(MessageQueueId_t setId) {
} }
void MessageQueueMessage::print(bool printWholeMessage) { void MessageQueueMessage::print(bool printWholeMessage) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "MessageQueueMessage content: " << std::endl; sif::debug << "MessageQueueMessage content: " << std::endl;
#endif #endif
if(printWholeMessage) { if(printWholeMessage) {

View File

@ -12,13 +12,13 @@ public:
ReturnValue_t status = mutex->lockMutex(timeoutType, ReturnValue_t status = mutex->lockMutex(timeoutType,
timeoutMs); timeoutMs);
if(status == MutexIF::MUTEX_TIMEOUT) { if(status == MutexIF::MUTEX_TIMEOUT) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MutexHelper: Lock of mutex failed with timeout of " sif::error << "MutexHelper: Lock of mutex failed with timeout of "
<< timeoutMs << " milliseconds!" << std::endl; << timeoutMs << " milliseconds!" << std::endl;
#endif #endif
} }
else if(status != HasReturnvaluesIF::RETURN_OK){ else if(status != HasReturnvaluesIF::RETURN_OK){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MutexHelper: Lock of Mutex failed with code " sif::error << "MutexHelper: Lock of Mutex failed with code "
<< status << std::endl; << status << std::endl;
#endif #endif

View File

@ -16,7 +16,7 @@ ReturnValue_t MemoryHelper::handleMemoryCommand(CommandMessage* message) {
lastSender = message->getSender(); lastSender = message->getSender();
lastCommand = message->getCommand(); lastCommand = message->getCommand();
if (busy) { if (busy) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "MemHelper: Busy!" << std::endl; sif::debug << "MemHelper: Busy!" << std::endl;
#endif #endif
} }

View File

@ -72,7 +72,7 @@ private:
if (timeStamper == nullptr) { if (timeStamper == nullptr) {
timeStamper = objectManager->get<TimeStamperIF>( timeStamperId ); timeStamper = objectManager->get<TimeStamperIF>( timeStamperId );
if ( timeStamper == nullptr ) { if ( timeStamper == nullptr ) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MonitoringReportContent::checkAndSetStamper: " sif::error << "MonitoringReportContent::checkAndSetStamper: "
"Stamper not found!" << std::endl; "Stamper not found!" << std::endl;
#endif #endif

View File

@ -1,7 +1,7 @@
#include "ObjectManager.h" #include "ObjectManager.h"
#include "../serviceinterface/ServiceInterfaceStream.h" #include "../serviceinterface/ServiceInterfaceStream.h"
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
#include <iomanip> #include <iomanip>
#endif #endif
#include <cstdlib> #include <cstdlib>
@ -21,13 +21,13 @@ ObjectManager::~ObjectManager() {
ReturnValue_t ObjectManager::insert( object_id_t id, SystemObjectIF* object) { ReturnValue_t ObjectManager::insert( object_id_t id, SystemObjectIF* object) {
auto returnPair = objectList.emplace(id, object); auto returnPair = objectList.emplace(id, object);
if (returnPair.second) { if (returnPair.second) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// sif::debug << "ObjectManager::insert: Object " << std::hex // sif::debug << "ObjectManager::insert: Object " << std::hex
// << (int)id << std::dec << " inserted." << std::endl; // << (int)id << std::dec << " inserted." << std::endl;
#endif #endif
return this->RETURN_OK; return this->RETURN_OK;
} else { } else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "ObjectManager::insert: Object id " << std::hex sif::error << "ObjectManager::insert: Object id " << std::hex
<< static_cast<uint32_t> id << std::dec << static_cast<uint32_t> id << std::dec
<< " is already in use!" << std::endl; << " is already in use!" << std::endl;
@ -41,13 +41,13 @@ ReturnValue_t ObjectManager::insert( object_id_t id, SystemObjectIF* object) {
ReturnValue_t ObjectManager::remove( object_id_t id ) { ReturnValue_t ObjectManager::remove( object_id_t id ) {
if ( this->getSystemObject(id) != NULL ) { if ( this->getSystemObject(id) != NULL ) {
this->objectList.erase( id ); this->objectList.erase( id );
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
//sif::debug << "ObjectManager::removeObject: Object " << std::hex //sif::debug << "ObjectManager::removeObject: Object " << std::hex
// << (int)id << std::dec << " removed." << std::endl; // << (int)id << std::dec << " removed." << std::endl;
#endif #endif
return RETURN_OK; return RETURN_OK;
} else { } else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "ObjectManager::removeObject: Requested object " sif::error << "ObjectManager::removeObject: Requested object "
<< std::hex << (int)id << std::dec << " not found." << std::endl; << std::hex << (int)id << std::dec << " not found." << std::endl;
#endif #endif
@ -72,7 +72,7 @@ ObjectManager::ObjectManager() : produceObjects(nullptr) {
void ObjectManager::initialize() { void ObjectManager::initialize() {
if(produceObjects == nullptr) { if(produceObjects == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "ObjectManager::initialize: Passed produceObjects " sif::error << "ObjectManager::initialize: Passed produceObjects "
"functions is nullptr!" << std::endl; "functions is nullptr!" << std::endl;
#endif #endif
@ -84,7 +84,7 @@ void ObjectManager::initialize() {
for (auto const& it : objectList) { for (auto const& it : objectList) {
result = it.second->initialize(); result = it.second->initialize();
if ( result != RETURN_OK ) { if ( result != RETURN_OK ) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
object_id_t var = it.first; object_id_t var = it.first;
sif::error << "ObjectManager::initialize: Object 0x" << std::hex << sif::error << "ObjectManager::initialize: Object 0x" << std::hex <<
std::setw(8) << std::setfill('0')<< var << " failed to " std::setw(8) << std::setfill('0')<< var << " failed to "
@ -95,7 +95,7 @@ void ObjectManager::initialize() {
} }
} }
if (errorCount > 0) { if (errorCount > 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "ObjectManager::ObjectManager: Counted " << errorCount sif::error << "ObjectManager::ObjectManager: Counted " << errorCount
<< " failed initializations." << std::endl; << " failed initializations." << std::endl;
#endif #endif
@ -105,7 +105,7 @@ void ObjectManager::initialize() {
for (auto const& it : objectList) { for (auto const& it : objectList) {
result = it.second->checkObjectConnections(); result = it.second->checkObjectConnections();
if ( result != RETURN_OK ) { if ( result != RETURN_OK ) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "ObjectManager::ObjectManager: Object " << std::hex << sif::error << "ObjectManager::ObjectManager: Object " << std::hex <<
(int) it.first << " connection check failed with code 0x" (int) it.first << " connection check failed with code 0x"
<< result << std::dec << std::endl; << result << std::dec << std::endl;
@ -114,7 +114,7 @@ void ObjectManager::initialize() {
} }
} }
if (errorCount > 0) { if (errorCount > 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "ObjectManager::ObjectManager: Counted " << errorCount sif::error << "ObjectManager::ObjectManager: Counted " << errorCount
<< " failed connection checks." << std::endl; << " failed connection checks." << std::endl;
#endif #endif
@ -122,7 +122,7 @@ void ObjectManager::initialize() {
} }
void ObjectManager::printList() { void ObjectManager::printList() {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "ObjectManager: Object List contains:" << std::endl; sif::debug << "ObjectManager: Object List contains:" << std::endl;
for (auto const& it : objectList) { for (auto const& it : objectList) {
sif::debug << std::hex << it.first << " | " << it.second << std::endl; sif::debug << std::hex << it.first << " | " << it.second << std::endl;

View File

@ -86,7 +86,7 @@ extern ObjectManagerIF *objectManager;
template <typename T> template <typename T>
T* ObjectManagerIF::get( object_id_t id ) { T* ObjectManagerIF::get( object_id_t id ) {
if(objectManager == nullptr) { if(objectManager == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "ObjectManagerIF: Global object manager has not " sif::error << "ObjectManagerIF: Global object manager has not "
"been initialized yet!" << std::endl; "been initialized yet!" << std::endl;
#endif #endif

View File

@ -8,7 +8,7 @@
BinarySemaphoreUsingTask::BinarySemaphoreUsingTask() { BinarySemaphoreUsingTask::BinarySemaphoreUsingTask() {
handle = TaskManagement::getCurrentTaskHandle(); handle = TaskManagement::getCurrentTaskHandle();
if(handle == nullptr) { if(handle == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Could not retrieve task handle. Please ensure the" sif::error << "Could not retrieve task handle. Please ensure the"
"constructor was called inside a task." << std::endl; "constructor was called inside a task." << std::endl;
#endif #endif

View File

@ -5,7 +5,7 @@
BinarySemaphore::BinarySemaphore() { BinarySemaphore::BinarySemaphore() {
handle = xSemaphoreCreateBinary(); handle = xSemaphoreCreateBinary();
if(handle == nullptr) { if(handle == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Semaphore: Binary semaph creation failure" << std::endl; sif::error << "Semaphore: Binary semaph creation failure" << std::endl;
#endif #endif
} }
@ -20,7 +20,7 @@ BinarySemaphore::~BinarySemaphore() {
BinarySemaphore::BinarySemaphore(BinarySemaphore&& s) { BinarySemaphore::BinarySemaphore(BinarySemaphore&& s) {
handle = xSemaphoreCreateBinary(); handle = xSemaphoreCreateBinary();
if(handle == nullptr) { if(handle == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Binary semaphore creation failure" << std::endl; sif::error << "Binary semaphore creation failure" << std::endl;
#endif #endif
} }
@ -32,7 +32,7 @@ BinarySemaphore& BinarySemaphore::operator =(
if(&s != this) { if(&s != this) {
handle = xSemaphoreCreateBinary(); handle = xSemaphoreCreateBinary();
if(handle == nullptr) { if(handle == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Binary semaphore creation failure" << std::endl; sif::error << "Binary semaphore creation failure" << std::endl;
#endif #endif
} }

View File

@ -9,7 +9,7 @@
CountingSemaphoreUsingTask::CountingSemaphoreUsingTask(const uint8_t maxCount, CountingSemaphoreUsingTask::CountingSemaphoreUsingTask(const uint8_t maxCount,
uint8_t initCount): maxCount(maxCount) { uint8_t initCount): maxCount(maxCount) {
if(initCount > maxCount) { if(initCount > maxCount) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CountingSemaphoreUsingTask: Max count bigger than " sif::error << "CountingSemaphoreUsingTask: Max count bigger than "
"intial cout. Setting initial count to max count." << std::endl; "intial cout. Setting initial count to max count." << std::endl;
#endif #endif
@ -18,7 +18,7 @@ CountingSemaphoreUsingTask::CountingSemaphoreUsingTask(const uint8_t maxCount,
handle = TaskManagement::getCurrentTaskHandle(); handle = TaskManagement::getCurrentTaskHandle();
if(handle == nullptr) { if(handle == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CountingSemaphoreUsingTask: Could not retrieve task " sif::error << "CountingSemaphoreUsingTask: Could not retrieve task "
"handle. Please ensure the constructor was called inside a " "handle. Please ensure the constructor was called inside a "
"task." << std::endl; "task." << std::endl;
@ -29,7 +29,7 @@ CountingSemaphoreUsingTask::CountingSemaphoreUsingTask(const uint8_t maxCount,
xTaskNotifyAndQuery(handle, 0, eSetValueWithOverwrite, xTaskNotifyAndQuery(handle, 0, eSetValueWithOverwrite,
&oldNotificationValue); &oldNotificationValue);
if(oldNotificationValue != 0) { if(oldNotificationValue != 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "CountinSemaphoreUsingTask: Semaphore initiated but " sif::warning << "CountinSemaphoreUsingTask: Semaphore initiated but "
"current notification value is not 0. Please ensure the " "current notification value is not 0. Please ensure the "
"notification value is not used for other purposes!" << std::endl; "notification value is not used for other purposes!" << std::endl;

View File

@ -10,7 +10,7 @@
CountingSemaphore::CountingSemaphore(const uint8_t maxCount, uint8_t initCount): CountingSemaphore::CountingSemaphore(const uint8_t maxCount, uint8_t initCount):
maxCount(maxCount), initCount(initCount) { maxCount(maxCount), initCount(initCount) {
if(initCount > maxCount) { if(initCount > maxCount) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CountingSemaphoreUsingTask: Max count bigger than " sif::error << "CountingSemaphoreUsingTask: Max count bigger than "
"intial cout. Setting initial count to max count." << std::endl; "intial cout. Setting initial count to max count." << std::endl;
#endif #endif
@ -19,7 +19,7 @@ CountingSemaphore::CountingSemaphore(const uint8_t maxCount, uint8_t initCount):
handle = xSemaphoreCreateCounting(maxCount, initCount); handle = xSemaphoreCreateCounting(maxCount, initCount);
if(handle == nullptr) { if(handle == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CountingSemaphore: Creation failure" << std::endl; sif::error << "CountingSemaphore: Creation failure" << std::endl;
#endif #endif
} }
@ -29,7 +29,7 @@ CountingSemaphore::CountingSemaphore(CountingSemaphore&& other):
maxCount(other.maxCount), initCount(other.initCount) { maxCount(other.maxCount), initCount(other.initCount) {
handle = xSemaphoreCreateCounting(other.maxCount, other.initCount); handle = xSemaphoreCreateCounting(other.maxCount, other.initCount);
if(handle == nullptr) { if(handle == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CountingSemaphore: Creation failure" << std::endl; sif::error << "CountingSemaphore: Creation failure" << std::endl;
#endif #endif
} }
@ -39,7 +39,7 @@ CountingSemaphore& CountingSemaphore::operator =(
CountingSemaphore&& other) { CountingSemaphore&& other) {
handle = xSemaphoreCreateCounting(other.maxCount, other.initCount); handle = xSemaphoreCreateCounting(other.maxCount, other.initCount);
if(handle == nullptr) { if(handle == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CountingSemaphore: Creation failure" << std::endl; sif::error << "CountingSemaphore: Creation failure" << std::endl;
#endif #endif
} }

View File

@ -37,7 +37,7 @@ void FixedTimeslotTask::taskEntryPoint(void* argument) {
} }
originalTask->taskFunctionality(); originalTask->taskFunctionality();
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Polling task " << originalTask->handle sif::debug << "Polling task " << originalTask->handle
<< " returned from taskFunctionality." << std::endl; << " returned from taskFunctionality." << std::endl;
#endif #endif
@ -46,7 +46,7 @@ void FixedTimeslotTask::taskEntryPoint(void* argument) {
void FixedTimeslotTask::missedDeadlineCounter() { void FixedTimeslotTask::missedDeadlineCounter() {
FixedTimeslotTask::deadlineMissedCount++; FixedTimeslotTask::deadlineMissedCount++;
if (FixedTimeslotTask::deadlineMissedCount % 10 == 0) { if (FixedTimeslotTask::deadlineMissedCount % 10 == 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PST missed " << FixedTimeslotTask::deadlineMissedCount sif::error << "PST missed " << FixedTimeslotTask::deadlineMissedCount
<< " deadlines." << std::endl; << " deadlines." << std::endl;
#endif #endif
@ -73,7 +73,7 @@ ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Component " << std::hex << componentId << sif::error << "Component " << std::hex << componentId <<
" not found, not adding it to pst" << std::endl; " not found, not adding it to pst" << std::endl;
#endif #endif

View File

@ -10,7 +10,7 @@
MessageQueue::MessageQueue(size_t messageDepth, size_t maxMessageSize): MessageQueue::MessageQueue(size_t messageDepth, size_t maxMessageSize):
maxMessageSize(maxMessageSize) { maxMessageSize(maxMessageSize) {
handle = xQueueCreate(messageDepth, maxMessageSize); handle = xQueueCreate(messageDepth, maxMessageSize);
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
if (handle == nullptr) { if (handle == nullptr) {
sif::error << "MessageQueue::MessageQueue:" sif::error << "MessageQueue::MessageQueue:"
<< " Creation failed." << std::endl; << " Creation failed." << std::endl;

View File

@ -5,7 +5,7 @@
Mutex::Mutex() { Mutex::Mutex() {
handle = xSemaphoreCreateMutex(); handle = xSemaphoreCreateMutex();
if(handle == nullptr) { if(handle == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Mutex::Mutex(FreeRTOS): Creation failure" << std::endl; sif::error << "Mutex::Mutex(FreeRTOS): Creation failure" << std::endl;
#endif #endif
} }

View File

@ -13,7 +13,7 @@ PeriodicTask::PeriodicTask(const char *name, TaskPriority setPriority,
BaseType_t status = xTaskCreate(taskEntryPoint, name, BaseType_t status = xTaskCreate(taskEntryPoint, name,
stackSize, this, setPriority, &handle); stackSize, this, setPriority, &handle);
if(status != pdPASS){ if(status != pdPASS){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "PeriodicTask Insufficient heap memory remaining. " sif::debug << "PeriodicTask Insufficient heap memory remaining. "
"Status: " << status << std::endl; "Status: " << status << std::endl;
#endif #endif
@ -43,7 +43,7 @@ void PeriodicTask::taskEntryPoint(void* argument) {
} }
originalTask->taskFunctionality(); originalTask->taskFunctionality();
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Polling task " << originalTask->handle sif::debug << "Polling task " << originalTask->handle
<< " returned from taskFunctionality." << std::endl; << " returned from taskFunctionality." << std::endl;
#endif #endif
@ -103,7 +103,7 @@ ReturnValue_t PeriodicTask::addComponent(object_id_t object) {
ExecutableObjectIF* newObject = objectManager->get<ExecutableObjectIF>( ExecutableObjectIF* newObject = objectManager->get<ExecutableObjectIF>(
object); object);
if (newObject == nullptr) { if (newObject == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PeriodicTask::addComponent: Invalid object. Make sure" sif::error << "PeriodicTask::addComponent: Invalid object. Make sure"
"it implement ExecutableObjectIF" << std::endl; "it implement ExecutableObjectIF" << std::endl;
#endif #endif

View File

@ -32,7 +32,7 @@ SemaphoreIF* SemaphoreFactory::createBinarySemaphore(uint32_t argument) {
return new BinarySemaphoreUsingTask(); return new BinarySemaphoreUsingTask();
} }
else { else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "SemaphoreFactory: Invalid argument, return regular" sif::warning << "SemaphoreFactory: Invalid argument, return regular"
"binary semaphore" << std::endl; "binary semaphore" << std::endl;
#endif #endif
@ -49,7 +49,7 @@ SemaphoreIF* SemaphoreFactory::createCountingSemaphore(uint8_t maxCount,
return new CountingSemaphoreUsingTask(maxCount, initCount); return new CountingSemaphoreUsingTask(maxCount, initCount);
} }
else { else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "SemaphoreFactory: Invalid argument, return regular" sif::warning << "SemaphoreFactory: Invalid argument, return regular"
"binary semaphore" << std::endl; "binary semaphore" << std::endl;
#endif #endif

View File

@ -14,7 +14,7 @@ MutexIF* Clock::timeMutex = NULL;
using SystemClock = std::chrono::system_clock; using SystemClock = std::chrono::system_clock;
uint32_t Clock::getTicksPerSecond(void){ uint32_t Clock::getTicksPerSecond(void){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "Clock::getTicksPerSecond: not implemented yet" << std::endl; sif::warning << "Clock::getTicksPerSecond: not implemented yet" << std::endl;
#endif #endif
return 0; return 0;
@ -25,7 +25,7 @@ uint32_t Clock::getTicksPerSecond(void){
ReturnValue_t Clock::setClock(const TimeOfDay_t* time) { ReturnValue_t Clock::setClock(const TimeOfDay_t* time) {
// do some magic with chrono // do some magic with chrono
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "Clock::setClock: not implemented yet" << std::endl; sif::warning << "Clock::setClock: not implemented yet" << std::endl;
#endif #endif
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
@ -40,7 +40,7 @@ ReturnValue_t Clock::setClock(const timeval* time) {
#else #else
#endif #endif
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "Clock::getUptime: Not implemented for found OS" << std::endl; sif::warning << "Clock::getUptime: Not implemented for found OS" << std::endl;
#endif #endif
return HasReturnvaluesIF::RETURN_FAILED; return HasReturnvaluesIF::RETURN_FAILED;
@ -66,7 +66,7 @@ ReturnValue_t Clock::getClock_timeval(timeval* time) {
time->tv_usec = timeUnix.tv_nsec / 1000.0; time->tv_usec = timeUnix.tv_nsec / 1000.0;
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
#else #else
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "Clock::getUptime: Not implemented for found OS" << std::endl; sif::warning << "Clock::getUptime: Not implemented for found OS" << std::endl;
#endif #endif
return HasReturnvaluesIF::RETURN_FAILED; return HasReturnvaluesIF::RETURN_FAILED;
@ -76,7 +76,7 @@ ReturnValue_t Clock::getClock_timeval(timeval* time) {
ReturnValue_t Clock::getClock_usecs(uint64_t* time) { ReturnValue_t Clock::getClock_usecs(uint64_t* time) {
// do some magic with chrono // do some magic with chrono
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "Clock::gerClock_usecs: not implemented yet" << std::endl; sif::warning << "Clock::gerClock_usecs: not implemented yet" << std::endl;
#endif #endif
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
@ -100,7 +100,7 @@ timeval Clock::getUptime() {
timeval.tv_usec = uptimeSeconds *(double) 1e6 - (timeval.tv_sec *1e6); timeval.tv_usec = uptimeSeconds *(double) 1e6 - (timeval.tv_sec *1e6);
} }
#else #else
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "Clock::getUptime: Not implemented for found OS" << std::endl; sif::warning << "Clock::getUptime: Not implemented for found OS" << std::endl;
#endif #endif
#endif #endif
@ -138,7 +138,7 @@ ReturnValue_t Clock::getDateAndTime(TimeOfDay_t* time) {
auto usecond = std::chrono::duration_cast<std::chrono::microseconds>(fraction); auto usecond = std::chrono::duration_cast<std::chrono::microseconds>(fraction);
time->usecond = usecond.count(); time->usecond = usecond.count();
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
//sif::warning << "Clock::getDateAndTime: not implemented yet" << std::endl; //sif::warning << "Clock::getDateAndTime: not implemented yet" << std::endl;
#endif #endif
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
@ -162,7 +162,7 @@ ReturnValue_t Clock::convertTimeOfDayToTimeval(const TimeOfDay_t* from,
to->tv_usec = from->usecond; to->tv_usec = from->usecond;
//Fails in 2038.. //Fails in 2038..
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "Clock::convertTimeBla: not implemented yet" << std::endl; sif::warning << "Clock::convertTimeBla: not implemented yet" << std::endl;
#endif #endif
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;

View File

@ -35,7 +35,7 @@ FixedTimeslotTask::FixedTimeslotTask(const char *name, TaskPriority setPriority,
reinterpret_cast<HANDLE>(mainThread.native_handle()), reinterpret_cast<HANDLE>(mainThread.native_handle()),
ABOVE_NORMAL_PRIORITY_CLASS); ABOVE_NORMAL_PRIORITY_CLASS);
if(result != 0) { if(result != 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "FixedTimeslotTask: Windows SetPriorityClass failed with code " sif::error << "FixedTimeslotTask: Windows SetPriorityClass failed with code "
<< GetLastError() << std::endl; << GetLastError() << std::endl;
#endif #endif
@ -44,7 +44,7 @@ FixedTimeslotTask::FixedTimeslotTask(const char *name, TaskPriority setPriority,
reinterpret_cast<HANDLE>(mainThread.native_handle()), reinterpret_cast<HANDLE>(mainThread.native_handle()),
THREAD_PRIORITY_NORMAL); THREAD_PRIORITY_NORMAL);
if(result != 0) { if(result != 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "FixedTimeslotTask: Windows SetPriorityClass failed with code " sif::error << "FixedTimeslotTask: Windows SetPriorityClass failed with code "
<< GetLastError() << std::endl; << GetLastError() << std::endl;
#endif #endif
@ -74,7 +74,7 @@ void FixedTimeslotTask::taskEntryPoint(void* argument) {
} }
this->taskFunctionality(); this->taskFunctionality();
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "FixedTimeslotTask::taskEntryPoint: " sif::debug << "FixedTimeslotTask::taskEntryPoint: "
"Returned from taskFunctionality." << std::endl; "Returned from taskFunctionality." << std::endl;
#endif #endif
@ -140,7 +140,7 @@ ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Component " << std::hex << componentId << sif::error << "Component " << std::hex << componentId <<
" not found, not adding it to pst" << std::endl; " not found, not adding it to pst" << std::endl;
#endif #endif

View File

@ -10,7 +10,7 @@ MessageQueue::MessageQueue(size_t messageDepth, size_t maxMessageSize):
queueLock = MutexFactory::instance()->createMutex(); queueLock = MutexFactory::instance()->createMutex();
auto result = QueueMapManager::instance()->addMessageQueue(this, &mqId); auto result = QueueMapManager::instance()->addMessageQueue(this, &mqId);
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::MessageQueue:" sif::error << "MessageQueue::MessageQueue:"
<< " Could not be created" << std::endl; << " Could not be created" << std::endl;
#endif #endif
@ -139,7 +139,7 @@ ReturnValue_t MessageQueue::sendMessageFromMessageQueue(MessageQueueId_t sendTo,
targetQueue->messageQueue.push(*mqmMessage); targetQueue->messageQueue.push(*mqmMessage);
} }
else { else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::sendMessageFromMessageQueue: Message" sif::error << "MessageQueue::sendMessageFromMessageQueue: Message"
"is not MessageQueueMessage!" << std::endl; "is not MessageQueueMessage!" << std::endl;
#endif #endif

View File

@ -33,7 +33,7 @@ PeriodicTask::PeriodicTask(const char *name, TaskPriority setPriority,
reinterpret_cast<HANDLE>(mainThread.native_handle()), reinterpret_cast<HANDLE>(mainThread.native_handle()),
ABOVE_NORMAL_PRIORITY_CLASS); ABOVE_NORMAL_PRIORITY_CLASS);
if(result != 0) { if(result != 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PeriodicTask: Windows SetPriorityClass failed with code " sif::error << "PeriodicTask: Windows SetPriorityClass failed with code "
<< GetLastError() << std::endl; << GetLastError() << std::endl;
#endif #endif
@ -42,7 +42,7 @@ PeriodicTask::PeriodicTask(const char *name, TaskPriority setPriority,
reinterpret_cast<HANDLE>(mainThread.native_handle()), reinterpret_cast<HANDLE>(mainThread.native_handle()),
THREAD_PRIORITY_NORMAL); THREAD_PRIORITY_NORMAL);
if(result != 0) { if(result != 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PeriodicTask: Windows SetPriorityClass failed with code " sif::error << "PeriodicTask: Windows SetPriorityClass failed with code "
<< GetLastError() << std::endl; << GetLastError() << std::endl;
#endif #endif
@ -73,7 +73,7 @@ void PeriodicTask::taskEntryPoint(void* argument) {
} }
this->taskFunctionality(); this->taskFunctionality();
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "PeriodicTask::taskEntryPoint: " sif::debug << "PeriodicTask::taskEntryPoint: "
"Returned from taskFunctionality." << std::endl; "Returned from taskFunctionality." << std::endl;
#endif #endif

View File

@ -26,7 +26,7 @@ ReturnValue_t QueueMapManager::addMessageQueue(
auto returnPair = queueMap.emplace(currentId, queueToInsert); auto returnPair = queueMap.emplace(currentId, queueToInsert);
if(not returnPair.second) { if(not returnPair.second) {
// this should never happen for the atomic variable. // this should never happen for the atomic variable.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "QueueMapManager: This ID is already inside the map!" sif::error << "QueueMapManager: This ID is already inside the map!"
<< std::endl; << std::endl;
#endif #endif
@ -46,7 +46,7 @@ MessageQueueIF* QueueMapManager::getMessageQueue(
return queueIter->second; return queueIter->second;
} }
else { else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "QueueMapManager::getQueueHandle: The ID " << sif::warning << "QueueMapManager::getQueueHandle: The ID " <<
messageQueueId << " does not exists in the map" << std::endl; messageQueueId << " does not exists in the map" << std::endl;
#endif #endif

View File

@ -21,7 +21,7 @@ SemaphoreFactory* SemaphoreFactory::instance() {
SemaphoreIF* SemaphoreFactory::createBinarySemaphore(uint32_t arguments) { SemaphoreIF* SemaphoreFactory::createBinarySemaphore(uint32_t arguments) {
// Just gonna wait for full C++20 for now. // Just gonna wait for full C++20 for now.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "SemaphoreFactory: Binary Semaphore not implemented yet." sif::error << "SemaphoreFactory: Binary Semaphore not implemented yet."
" Returning nullptr!\n" << std::flush; " Returning nullptr!\n" << std::flush;
#endif #endif
@ -31,7 +31,7 @@ SemaphoreIF* SemaphoreFactory::createBinarySemaphore(uint32_t arguments) {
SemaphoreIF* SemaphoreFactory::createCountingSemaphore(const uint8_t maxCount, SemaphoreIF* SemaphoreFactory::createCountingSemaphore(const uint8_t maxCount,
uint8_t initCount, uint32_t arguments) { uint8_t initCount, uint32_t arguments) {
// Just gonna wait for full C++20 for now. // Just gonna wait for full C++20 for now.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "SemaphoreFactory: Counting Semaphore not implemented yet." sif::error << "SemaphoreFactory: Counting Semaphore not implemented yet."
" Returning nullptr!\n" << std::flush; " Returning nullptr!\n" << std::flush;
#endif #endif

View File

@ -43,7 +43,7 @@ ReturnValue_t BinarySemaphore::acquire(TimeoutType timeoutType,
timeOut.tv_nsec = nseconds - timeOut.tv_sec * 1000000000; timeOut.tv_nsec = nseconds - timeOut.tv_sec * 1000000000;
result = sem_timedwait(&handle, &timeOut); result = sem_timedwait(&handle, &timeOut);
if(result != 0 and errno == EINVAL) { if(result != 0 and errno == EINVAL) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "BinarySemaphore::acquire: Invalid time value possible" sif::debug << "BinarySemaphore::acquire: Invalid time value possible"
<< std::endl; << std::endl;
#endif #endif
@ -64,7 +64,7 @@ ReturnValue_t BinarySemaphore::acquire(TimeoutType timeoutType,
return SemaphoreIF::SEMAPHORE_INVALID; return SemaphoreIF::SEMAPHORE_INVALID;
case(EINTR): case(EINTR):
// Call was interrupted by signal handler // Call was interrupted by signal handler
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "BinarySemaphore::acquire: Signal handler interrupted." sif::debug << "BinarySemaphore::acquire: Signal handler interrupted."
"Code " << strerror(errno) << std::endl; "Code " << strerror(errno) << std::endl;
#endif #endif
@ -130,7 +130,7 @@ void BinarySemaphore::initSemaphore(uint8_t initCount) {
// Value exceeds SEM_VALUE_MAX // Value exceeds SEM_VALUE_MAX
case(ENOSYS): case(ENOSYS):
// System does not support process-shared semaphores // System does not support process-shared semaphores
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "BinarySemaphore: Init failed with" << strerror(errno) sif::error << "BinarySemaphore: Init failed with" << strerror(errno)
<< std::endl; << std::endl;
#endif #endif

View File

@ -69,7 +69,7 @@ timeval Clock::getUptime() {
timeval uptime; timeval uptime;
auto result = getUptime(&uptime); auto result = getUptime(&uptime);
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Clock::getUptime: Error getting uptime" << std::endl; sif::error << "Clock::getUptime: Error getting uptime" << std::endl;
#endif #endif
} }

View File

@ -4,7 +4,7 @@
CountingSemaphore::CountingSemaphore(const uint8_t maxCount, uint8_t initCount): CountingSemaphore::CountingSemaphore(const uint8_t maxCount, uint8_t initCount):
maxCount(maxCount), initCount(initCount) { maxCount(maxCount), initCount(initCount) {
if(initCount > maxCount) { if(initCount > maxCount) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CountingSemaphoreUsingTask: Max count bigger than " sif::error << "CountingSemaphoreUsingTask: Max count bigger than "
"intial cout. Setting initial count to max count." << std::endl; "intial cout. Setting initial count to max count." << std::endl;
#endif #endif

View File

@ -47,7 +47,7 @@ ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Component " << std::hex << componentId << sif::error << "Component " << std::hex << componentId <<
" not found, not adding it to pst" << std::dec << std::endl; " not found, not adding it to pst" << std::dec << std::endl;
#endif #endif
@ -93,7 +93,7 @@ void FixedTimeslotTask::taskFunctionality() {
void FixedTimeslotTask::missedDeadlineCounter() { void FixedTimeslotTask::missedDeadlineCounter() {
FixedTimeslotTask::deadlineMissedCount++; FixedTimeslotTask::deadlineMissedCount++;
if (FixedTimeslotTask::deadlineMissedCount % 10 == 0) { if (FixedTimeslotTask::deadlineMissedCount % 10 == 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PST missed " << FixedTimeslotTask::deadlineMissedCount sif::error << "PST missed " << FixedTimeslotTask::deadlineMissedCount
<< " deadlines." << std::endl; << " deadlines." << std::endl;
#endif #endif

View File

@ -42,14 +42,14 @@ MessageQueue::MessageQueue(uint32_t messageDepth, size_t maxMessageSize):
MessageQueue::~MessageQueue() { MessageQueue::~MessageQueue() {
int status = mq_close(this->id); int status = mq_close(this->id);
if(status != 0){ if(status != 0){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::Destructor: mq_close Failed with status: " sif::error << "MessageQueue::Destructor: mq_close Failed with status: "
<< strerror(errno) <<std::endl; << strerror(errno) <<std::endl;
#endif #endif
} }
status = mq_unlink(name); status = mq_unlink(name);
if(status != 0){ if(status != 0){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::Destructor: mq_unlink Failed with status: " sif::error << "MessageQueue::Destructor: mq_unlink Failed with status: "
<< strerror(errno) << std::endl; << strerror(errno) << std::endl;
#endif #endif
@ -60,7 +60,7 @@ ReturnValue_t MessageQueue::handleError(mq_attr* attributes,
uint32_t messageDepth) { uint32_t messageDepth) {
switch(errno) { switch(errno) {
case(EINVAL): { case(EINVAL): {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::MessageQueue: Invalid name or attributes" sif::error << "MessageQueue::MessageQueue: Invalid name or attributes"
" for message size" << std::endl; " for message size" << std::endl;
#endif #endif
@ -84,7 +84,7 @@ ReturnValue_t MessageQueue::handleError(mq_attr* attributes,
Append at end: fs/mqueue/msg_max = <newMsgMaxLen> Append at end: fs/mqueue/msg_max = <newMsgMaxLen>
Apply changes with: sudo sysctl -p Apply changes with: sudo sysctl -p
*/ */
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::MessageQueue: Default MQ size " sif::error << "MessageQueue::MessageQueue: Default MQ size "
<< defaultMqMaxMsg << " is too small for requested size " << defaultMqMaxMsg << " is too small for requested size "
<< messageDepth << std::endl; << messageDepth << std::endl;
@ -102,7 +102,7 @@ ReturnValue_t MessageQueue::handleError(mq_attr* attributes,
//We unlink the other queue //We unlink the other queue
int status = mq_unlink(name); int status = mq_unlink(name);
if (status != 0) { if (status != 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "mq_unlink Failed with status: " << strerror(errno) sif::error << "mq_unlink Failed with status: " << strerror(errno)
<< std::endl; << std::endl;
#endif #endif
@ -123,7 +123,7 @@ ReturnValue_t MessageQueue::handleError(mq_attr* attributes,
default: default:
// Failed either the first time or the second time // Failed either the first time or the second time
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::MessageQueue: Creating Queue " << std::hex sif::error << "MessageQueue::MessageQueue: Creating Queue " << std::hex
<< name << std::dec << " failed with status: " << name << std::dec << " failed with status: "
<< strerror(errno) << std::endl; << strerror(errno) << std::endl;
@ -162,7 +162,7 @@ ReturnValue_t MessageQueue::receiveMessage(MessageQueueMessageIF* message,
ReturnValue_t MessageQueue::receiveMessage(MessageQueueMessageIF* message) { ReturnValue_t MessageQueue::receiveMessage(MessageQueueMessageIF* message) {
if(message == nullptr) { if(message == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::receiveMessage: Message is " sif::error << "MessageQueue::receiveMessage: Message is "
"nullptr!" << std::endl; "nullptr!" << std::endl;
#endif #endif
@ -170,7 +170,7 @@ ReturnValue_t MessageQueue::receiveMessage(MessageQueueMessageIF* message) {
} }
if(message->getMaximumMessageSize() < maxMessageSize) { if(message->getMaximumMessageSize() < maxMessageSize) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::receiveMessage: Message size " sif::error << "MessageQueue::receiveMessage: Message size "
<< message->getMaximumMessageSize() << message->getMaximumMessageSize()
<< " too small to receive data!" << std::endl; << " too small to receive data!" << std::endl;
@ -202,7 +202,7 @@ ReturnValue_t MessageQueue::receiveMessage(MessageQueueMessageIF* message) {
return MessageQueueIF::EMPTY; return MessageQueueIF::EMPTY;
case EBADF: case EBADF:
//mqdes doesn't represent a valid queue open for reading. //mqdes doesn't represent a valid queue open for reading.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::receive: configuration error " sif::error << "MessageQueue::receive: configuration error "
<< strerror(errno) << std::endl; << strerror(errno) << std::endl;
#endif #endif
@ -217,7 +217,7 @@ ReturnValue_t MessageQueue::receiveMessage(MessageQueueMessageIF* message) {
* queue, and the QNX extended option MQ_READBUF_DYNAMIC hasn't * queue, and the QNX extended option MQ_READBUF_DYNAMIC hasn't
* been set in the queue's mq_flags. * been set in the queue's mq_flags.
*/ */
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::receive: configuration error " sif::error << "MessageQueue::receive: configuration error "
<< strerror(errno) << std::endl; << strerror(errno) << std::endl;
#endif #endif
@ -232,7 +232,7 @@ ReturnValue_t MessageQueue::receiveMessage(MessageQueueMessageIF* message) {
* given msg_len is too short for the message that would have * given msg_len is too short for the message that would have
* been received. * been received.
*/ */
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::receive: configuration error " sif::error << "MessageQueue::receive: configuration error "
<< strerror(errno) << std::endl; << strerror(errno) << std::endl;
#endif #endif
@ -258,7 +258,7 @@ ReturnValue_t MessageQueue::flush(uint32_t* count) {
switch(errno){ switch(errno){
case EBADF: case EBADF:
//mqdes doesn't represent a valid message queue. //mqdes doesn't represent a valid message queue.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::flush configuration error, " sif::error << "MessageQueue::flush configuration error, "
"called flush with an invalid queue ID" << std::endl; "called flush with an invalid queue ID" << std::endl;
#endif #endif
@ -276,7 +276,7 @@ ReturnValue_t MessageQueue::flush(uint32_t* count) {
switch(errno){ switch(errno){
case EBADF: case EBADF:
//mqdes doesn't represent a valid message queue. //mqdes doesn't represent a valid message queue.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::flush configuration error, " sif::error << "MessageQueue::flush configuration error, "
"called flush with an invalid queue ID" << std::endl; "called flush with an invalid queue ID" << std::endl;
#endif #endif
@ -331,7 +331,7 @@ ReturnValue_t MessageQueue::sendMessageFromMessageQueue(MessageQueueId_t sendTo,
MessageQueueMessageIF *message, MessageQueueId_t sentFrom, MessageQueueMessageIF *message, MessageQueueId_t sentFrom,
bool ignoreFault) { bool ignoreFault) {
if(message == nullptr) { if(message == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::sendMessageFromMessageQueue: Message is " sif::error << "MessageQueue::sendMessageFromMessageQueue: Message is "
"nullptr!" << std::endl; "nullptr!" << std::endl;
#endif #endif
@ -362,7 +362,7 @@ ReturnValue_t MessageQueue::sendMessageFromMessageQueue(MessageQueueId_t sendTo,
case EBADF: { case EBADF: {
//mq_des doesn't represent a valid message queue descriptor, //mq_des doesn't represent a valid message queue descriptor,
//or mq_des wasn't opened for writing. //or mq_des wasn't opened for writing.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::sendMessage: Configuration error, MQ" sif::error << "MessageQueue::sendMessage: Configuration error, MQ"
<< " destination invalid." << std::endl; << " destination invalid." << std::endl;
sif::error << strerror(errno) << " in " sif::error << strerror(errno) << " in "
@ -383,7 +383,7 @@ ReturnValue_t MessageQueue::sendMessageFromMessageQueue(MessageQueueId_t sendTo,
* - MQ_PRIO_RESTRICT is set in the mq_attr of mq_des, and * - MQ_PRIO_RESTRICT is set in the mq_attr of mq_des, and
* msg_prio is greater than the priority of the calling process. * msg_prio is greater than the priority of the calling process.
*/ */
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::sendMessage: Configuration error " sif::error << "MessageQueue::sendMessage: Configuration error "
<< strerror(errno) << " in mq_send" << std::endl; << strerror(errno) << " in mq_send" << std::endl;
#endif #endif
@ -391,7 +391,7 @@ ReturnValue_t MessageQueue::sendMessageFromMessageQueue(MessageQueueId_t sendTo,
case EMSGSIZE: case EMSGSIZE:
// The msg_len is greater than the msgsize associated with // The msg_len is greater than the msgsize associated with
//the specified queue. //the specified queue.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::sendMessage: Size error [" << sif::error << "MessageQueue::sendMessage: Size error [" <<
strerror(errno) << "] in mq_send" << std::endl; strerror(errno) << "] in mq_send" << std::endl;
#endif #endif

View File

@ -12,20 +12,20 @@ Mutex::Mutex() {
pthread_mutexattr_t mutexAttr; pthread_mutexattr_t mutexAttr;
int status = pthread_mutexattr_init(&mutexAttr); int status = pthread_mutexattr_init(&mutexAttr);
if (status != 0) { if (status != 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Mutex: Attribute init failed with: " << strerror(status) << std::endl; sif::error << "Mutex: Attribute init failed with: " << strerror(status) << std::endl;
#endif #endif
} }
status = pthread_mutexattr_setprotocol(&mutexAttr, PTHREAD_PRIO_INHERIT); status = pthread_mutexattr_setprotocol(&mutexAttr, PTHREAD_PRIO_INHERIT);
if (status != 0) { if (status != 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Mutex: Attribute set PRIO_INHERIT failed with: " << strerror(status) sif::error << "Mutex: Attribute set PRIO_INHERIT failed with: " << strerror(status)
<< std::endl; << std::endl;
#endif #endif
} }
status = pthread_mutex_init(&mutex, &mutexAttr); status = pthread_mutex_init(&mutex, &mutexAttr);
if (status != 0) { if (status != 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Mutex: creation with name, id " << mutex.__data.__count sif::error << "Mutex: creation with name, id " << mutex.__data.__count
<< ", " << " failed with " << strerror(status) << std::endl; << ", " << " failed with " << strerror(status) << std::endl;
#endif #endif
@ -35,7 +35,7 @@ Mutex::Mutex() {
// (including destruction) shall not affect any previously initialized mutexes. // (including destruction) shall not affect any previously initialized mutexes.
status = pthread_mutexattr_destroy(&mutexAttr); status = pthread_mutexattr_destroy(&mutexAttr);
if (status != 0) { if (status != 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Mutex: Attribute destroy failed with " << strerror(status) << std::endl; sif::error << "Mutex: Attribute destroy failed with " << strerror(status) << std::endl;
#endif #endif
} }

View File

@ -25,7 +25,7 @@ ReturnValue_t PeriodicPosixTask::addComponent(object_id_t object) {
ExecutableObjectIF* newObject = objectManager->get<ExecutableObjectIF>( ExecutableObjectIF* newObject = objectManager->get<ExecutableObjectIF>(
object); object);
if (newObject == nullptr) { if (newObject == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PeriodicTask::addComponent: Invalid object. Make sure" sif::error << "PeriodicTask::addComponent: Invalid object. Make sure"
<< " it implements ExecutableObjectIF!" << std::endl; << " it implements ExecutableObjectIF!" << std::endl;
#endif #endif
@ -44,7 +44,7 @@ ReturnValue_t PeriodicPosixTask::sleepFor(uint32_t ms) {
ReturnValue_t PeriodicPosixTask::startTask(void) { ReturnValue_t PeriodicPosixTask::startTask(void) {
started = true; started = true;
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
//sif::info << stackSize << std::endl; //sif::info << stackSize << std::endl;
#endif #endif
PosixThread::createTask(&taskEntryPoint,this); PosixThread::createTask(&taskEntryPoint,this);
@ -71,13 +71,13 @@ void PeriodicPosixTask::taskFunctionality(void) {
char name[20] = {0}; char name[20] = {0};
int status = pthread_getname_np(pthread_self(), name, sizeof(name)); int status = pthread_getname_np(pthread_self(), name, sizeof(name));
if(status == 0) { if(status == 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PeriodicPosixTask " << name << ": Deadline " sif::error << "PeriodicPosixTask " << name << ": Deadline "
"missed." << std::endl; "missed." << std::endl;
#endif #endif
} }
else { else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PeriodicPosixTask X: Deadline missed. " << sif::error << "PeriodicPosixTask X: Deadline missed. " <<
status << std::endl; status << std::endl;
#endif #endif

View File

@ -48,7 +48,7 @@ void PosixThread::suspend() {
sigaddset(&waitSignal, SIGUSR1); sigaddset(&waitSignal, SIGUSR1);
sigwait(&waitSignal, &caughtSig); sigwait(&waitSignal, &caughtSig);
if (caughtSig != SIGUSR1) { if (caughtSig != SIGUSR1) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "FixedTimeslotTask: Unknown Signal received: " << sif::error << "FixedTimeslotTask: Unknown Signal received: " <<
caughtSig << std::endl; caughtSig << std::endl;
#endif #endif
@ -120,7 +120,7 @@ uint64_t PosixThread::getCurrentMonotonicTimeMs(){
void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) { void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
//sif::debug << "PosixThread::createTask" << std::endl; //sif::debug << "PosixThread::createTask" << std::endl;
#endif #endif
/* /*
@ -133,7 +133,7 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
pthread_attr_t attributes; pthread_attr_t attributes;
int status = pthread_attr_init(&attributes); int status = pthread_attr_init(&attributes);
if(status != 0){ if(status != 0){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Posix Thread attribute init failed with: " << sif::error << "Posix Thread attribute init failed with: " <<
strerror(status) << std::endl; strerror(status) << std::endl;
#endif #endif
@ -141,19 +141,19 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
void* stackPointer; void* stackPointer;
status = posix_memalign(&stackPointer, sysconf(_SC_PAGESIZE), stackSize); status = posix_memalign(&stackPointer, sysconf(_SC_PAGESIZE), stackSize);
if(status != 0){ if(status != 0){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PosixThread::createTask: Stack init failed with: " << sif::error << "PosixThread::createTask: Stack init failed with: " <<
strerror(status) << std::endl; strerror(status) << std::endl;
#endif #endif
if(errno == ENOMEM) { if(errno == ENOMEM) {
uint64_t stackMb = stackSize/10e6; uint64_t stackMb = stackSize/10e6;
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PosixThread::createTask: Insufficient memory for" sif::error << "PosixThread::createTask: Insufficient memory for"
" the requested " << stackMb << " MB" << std::endl; " the requested " << stackMb << " MB" << std::endl;
#endif #endif
} }
else if(errno == EINVAL) { else if(errno == EINVAL) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PosixThread::createTask: Wrong alignment argument!" sif::error << "PosixThread::createTask: Wrong alignment argument!"
<< std::endl; << std::endl;
#endif #endif
@ -163,7 +163,7 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
status = pthread_attr_setstack(&attributes, stackPointer, stackSize); status = pthread_attr_setstack(&attributes, stackPointer, stackSize);
if(status != 0){ if(status != 0){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PosixThread::createTask: pthread_attr_setstack " sif::error << "PosixThread::createTask: pthread_attr_setstack "
" failed with: " << strerror(status) << std::endl; " failed with: " << strerror(status) << std::endl;
sif::error << "Make sure the specified stack size is valid and is " sif::error << "Make sure the specified stack size is valid and is "
@ -173,7 +173,7 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
status = pthread_attr_setinheritsched(&attributes, PTHREAD_EXPLICIT_SCHED); status = pthread_attr_setinheritsched(&attributes, PTHREAD_EXPLICIT_SCHED);
if(status != 0){ if(status != 0){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Posix Thread attribute setinheritsched failed with: " << sif::error << "Posix Thread attribute setinheritsched failed with: " <<
strerror(status) << std::endl; strerror(status) << std::endl;
#endif #endif
@ -182,7 +182,7 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
// TODO FIFO -> This needs root privileges for the process // TODO FIFO -> This needs root privileges for the process
status = pthread_attr_setschedpolicy(&attributes,SCHED_FIFO); status = pthread_attr_setschedpolicy(&attributes,SCHED_FIFO);
if(status != 0){ if(status != 0){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Posix Thread attribute schedule policy failed with: " << sif::error << "Posix Thread attribute schedule policy failed with: " <<
strerror(status) << std::endl; strerror(status) << std::endl;
#endif #endif
@ -192,7 +192,7 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
scheduleParams.__sched_priority = priority; scheduleParams.__sched_priority = priority;
status = pthread_attr_setschedparam(&attributes, &scheduleParams); status = pthread_attr_setschedparam(&attributes, &scheduleParams);
if(status != 0){ if(status != 0){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Posix Thread attribute schedule params failed with: " << sif::error << "Posix Thread attribute schedule params failed with: " <<
strerror(status) << std::endl; strerror(status) << std::endl;
#endif #endif
@ -204,7 +204,7 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
sigaddset(&waitSignal, SIGUSR1); sigaddset(&waitSignal, SIGUSR1);
status = pthread_sigmask(SIG_BLOCK, &waitSignal, NULL); status = pthread_sigmask(SIG_BLOCK, &waitSignal, NULL);
if(status != 0){ if(status != 0){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Posix Thread sigmask failed failed with: " << sif::error << "Posix Thread sigmask failed failed with: " <<
strerror(status) << " errno: " << strerror(errno) << std::endl; strerror(status) << " errno: " << strerror(errno) << std::endl;
#endif #endif
@ -213,7 +213,7 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
status = pthread_create(&thread,&attributes,fnc_,arg_); status = pthread_create(&thread,&attributes,fnc_,arg_);
if(status != 0){ if(status != 0){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Posix Thread create failed with: " << sif::error << "Posix Thread create failed with: " <<
strerror(status) << std::endl; strerror(status) << std::endl;
#endif #endif
@ -221,19 +221,19 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
status = pthread_setname_np(thread,name); status = pthread_setname_np(thread,name);
if(status != 0){ if(status != 0){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PosixThread::createTask: setname failed with: " << sif::error << "PosixThread::createTask: setname failed with: " <<
strerror(status) << std::endl; strerror(status) << std::endl;
#endif #endif
if(status == ERANGE) { if(status == ERANGE) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PosixThread::createTask: Task name length longer" sif::error << "PosixThread::createTask: Task name length longer"
" than 16 chars. Truncating.." << std::endl; " than 16 chars. Truncating.." << std::endl;
#endif #endif
name[15] = '\0'; name[15] = '\0';
status = pthread_setname_np(thread,name); status = pthread_setname_np(thread,name);
if(status != 0){ if(status != 0){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PosixThread::createTask: Setting name" sif::error << "PosixThread::createTask: Setting name"
" did not work.." << std::endl; " did not work.." << std::endl;
#endif #endif
@ -243,7 +243,7 @@ void PosixThread::createTask(void* (*fnc_)(void*), void* arg_) {
status = pthread_attr_destroy(&attributes); status = pthread_attr_destroy(&attributes);
if(status!=0){ if(status!=0){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Posix Thread attribute destroy failed with: " << sif::error << "Posix Thread attribute destroy failed with: " <<
strerror(status) << std::endl; strerror(status) << std::endl;
#endif #endif

View File

@ -39,7 +39,7 @@ ReturnValue_t TcUnixUdpPollingTask::performOperation(uint8_t opCode) {
reinterpret_cast<sockaddr*>(&senderAddress), &senderSockLen); reinterpret_cast<sockaddr*>(&senderAddress), &senderSockLen);
if(bytesReceived < 0) { if(bytesReceived < 0) {
// handle error // handle error
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TcSocketPollingTask::performOperation: Reception" sif::error << "TcSocketPollingTask::performOperation: Reception"
"error." << std::endl; "error." << std::endl;
#endif #endif
@ -47,7 +47,7 @@ ReturnValue_t TcUnixUdpPollingTask::performOperation(uint8_t opCode) {
continue; continue;
} }
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// sif::debug << "TcSocketPollingTask::performOperation: " << bytesReceived // sif::debug << "TcSocketPollingTask::performOperation: " << bytesReceived
// << " bytes received" << std::endl; // << " bytes received" << std::endl;
#endif #endif
@ -69,7 +69,7 @@ ReturnValue_t TcUnixUdpPollingTask::handleSuccessfullTcRead(size_t bytesRead) {
receptionBuffer.data(), bytesRead); receptionBuffer.data(), bytesRead);
// arrayprinter::print(receptionBuffer.data(), bytesRead); // arrayprinter::print(receptionBuffer.data(), bytesRead);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TcSerialPollingTask::transferPusToSoftwareBus: Data " sif::error << "TcSerialPollingTask::transferPusToSoftwareBus: Data "
"storage failed" << std::endl; "storage failed" << std::endl;
sif::error << "Packet size: " << bytesRead << std::endl; sif::error << "Packet size: " << bytesRead << std::endl;
@ -81,7 +81,7 @@ ReturnValue_t TcUnixUdpPollingTask::handleSuccessfullTcRead(size_t bytesRead) {
result = MessageQueueSenderIF::sendMessage(targetTcDestination, &message); result = MessageQueueSenderIF::sendMessage(targetTcDestination, &message);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Serial Polling: Sending message to queue failed" sif::error << "Serial Polling: Sending message to queue failed"
<< std::endl; << std::endl;
#endif #endif
@ -93,7 +93,7 @@ ReturnValue_t TcUnixUdpPollingTask::handleSuccessfullTcRead(size_t bytesRead) {
ReturnValue_t TcUnixUdpPollingTask::initialize() { ReturnValue_t TcUnixUdpPollingTask::initialize() {
tcStore = objectManager->get<StorageManagerIF>(objects::TC_STORE); tcStore = objectManager->get<StorageManagerIF>(objects::TC_STORE);
if (tcStore == nullptr) { if (tcStore == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TcSerialPollingTask::initialize: TC Store uninitialized!" sif::error << "TcSerialPollingTask::initialize: TC Store uninitialized!"
<< std::endl; << std::endl;
#endif #endif
@ -102,7 +102,7 @@ ReturnValue_t TcUnixUdpPollingTask::initialize() {
tmtcBridge = objectManager->get<TmTcUnixUdpBridge>(tmtcBridgeId); tmtcBridge = objectManager->get<TmTcUnixUdpBridge>(tmtcBridgeId);
if(tmtcBridge == nullptr) { if(tmtcBridge == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TcSocketPollingTask::TcSocketPollingTask: Invalid" sif::error << "TcSocketPollingTask::TcSocketPollingTask: Invalid"
" TMTC bridge object!" << std::endl; " TMTC bridge object!" << std::endl;
#endif #endif
@ -127,7 +127,7 @@ void TcUnixUdpPollingTask::setTimeout(double timeoutSeconds) {
int result = setsockopt(serverUdpSocket, SOL_SOCKET, SO_RCVTIMEO, int result = setsockopt(serverUdpSocket, SOL_SOCKET, SO_RCVTIMEO,
&tval, sizeof(receptionTimeout)); &tval, sizeof(receptionTimeout));
if(result == -1) { if(result == -1) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TcSocketPollingTask::TcSocketPollingTask: Setting " sif::error << "TcSocketPollingTask::TcSocketPollingTask: Setting "
"receive timeout failed with " << strerror(errno) << std::endl; "receive timeout failed with " << strerror(errno) << std::endl;
#endif #endif
@ -140,14 +140,14 @@ void TcUnixUdpPollingTask::handleReadError() {
case(EAGAIN): { case(EAGAIN): {
// todo: When working in timeout mode, this will occur more often // todo: When working in timeout mode, this will occur more often
// and is not an error. // and is not an error.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TcUnixUdpPollingTask::handleReadError: Timeout." sif::error << "TcUnixUdpPollingTask::handleReadError: Timeout."
<< std::endl; << std::endl;
#endif #endif
break; break;
} }
default: { default: {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TcUnixUdpPollingTask::handleReadError: " sif::error << "TcUnixUdpPollingTask::handleReadError: "
<< strerror(errno) << std::endl; << strerror(errno) << std::endl;
#endif #endif

View File

@ -10,7 +10,7 @@ Timer::Timer() {
sigEvent.sigev_value.sival_ptr = &timerId; sigEvent.sigev_value.sival_ptr = &timerId;
int status = timer_create(CLOCK_MONOTONIC, &sigEvent, &timerId); int status = timer_create(CLOCK_MONOTONIC, &sigEvent, &timerId);
if(status!=0){ if(status!=0){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Timer creation failed with: " << status << sif::error << "Timer creation failed with: " << status <<
" errno: " << errno << std::endl; " errno: " << errno << std::endl;
#endif #endif

View File

@ -26,7 +26,7 @@ TmTcUnixUdpBridge::TmTcUnixUdpBridge(object_id_t objectId,
//clientSocket = socket(AF_INET, SOCK_DGRAM, 0); //clientSocket = socket(AF_INET, SOCK_DGRAM, 0);
serverSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); serverSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if(serverSocket < 0) { if(serverSocket < 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcUnixUdpBridge::TmTcUnixUdpBridge: Could not open" sif::error << "TmTcUnixUdpBridge::TmTcUnixUdpBridge: Could not open"
" UDP socket!" << std::endl; " UDP socket!" << std::endl;
#endif #endif
@ -53,7 +53,7 @@ TmTcUnixUdpBridge::TmTcUnixUdpBridge(object_id_t objectId,
reinterpret_cast<struct sockaddr*>(&serverAddress), reinterpret_cast<struct sockaddr*>(&serverAddress),
serverAddressLen); serverAddressLen);
if(result == -1) { if(result == -1) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcUnixUdpBridge::TmTcUnixUdpBridge: Could not bind " sif::error << "TmTcUnixUdpBridge::TmTcUnixUdpBridge: Could not bind "
"local port " << setServerPort << " to server socket!" "local port " << setServerPort << " to server socket!"
<< std::endl; << std::endl;
@ -78,7 +78,7 @@ ReturnValue_t TmTcUnixUdpBridge::sendTm(const uint8_t *data, size_t dataLen) {
} }
// char ipAddress [15]; // char ipAddress [15];
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// sif::debug << "IP Address Sender: "<< inet_ntop(AF_INET, // sif::debug << "IP Address Sender: "<< inet_ntop(AF_INET,
// &clientAddress.sin_addr.s_addr, ipAddress, 15) << std::endl; // &clientAddress.sin_addr.s_addr, ipAddress, 15) << std::endl;
#endif #endif
@ -86,13 +86,13 @@ ReturnValue_t TmTcUnixUdpBridge::sendTm(const uint8_t *data, size_t dataLen) {
ssize_t bytesSent = sendto(serverSocket, data, dataLen, flags, ssize_t bytesSent = sendto(serverSocket, data, dataLen, flags,
reinterpret_cast<sockaddr*>(&clientAddress), clientAddressLen); reinterpret_cast<sockaddr*>(&clientAddress), clientAddressLen);
if(bytesSent < 0) { if(bytesSent < 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcUnixUdpBridge::sendTm: Send operation failed." sif::error << "TmTcUnixUdpBridge::sendTm: Send operation failed."
<< std::endl; << std::endl;
#endif #endif
handleSendError(); handleSendError();
} }
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// sif::debug << "TmTcUnixUdpBridge::sendTm: " << bytesSent << " bytes were" // sif::debug << "TmTcUnixUdpBridge::sendTm: " << bytesSent << " bytes were"
// " sent." << std::endl; // " sent." << std::endl;
#endif #endif
@ -103,7 +103,7 @@ void TmTcUnixUdpBridge::checkAndSetClientAddress(sockaddr_in& newAddress) {
MutexHelper lock(mutex, MutexIF::TimeoutType::WAITING, 10); MutexHelper lock(mutex, MutexIF::TimeoutType::WAITING, 10);
// char ipAddress [15]; // char ipAddress [15];
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// sif::debug << "IP Address Sender: "<< inet_ntop(AF_INET, // sif::debug << "IP Address Sender: "<< inet_ntop(AF_INET,
// &newAddress.sin_addr.s_addr, ipAddress, 15) << std::endl; // &newAddress.sin_addr.s_addr, ipAddress, 15) << std::endl;
// sif::debug << "IP Address Old: " << inet_ntop(AF_INET, // sif::debug << "IP Address Old: " << inet_ntop(AF_INET,
@ -129,13 +129,13 @@ void TmTcUnixUdpBridge::handleSocketError() {
case(ENOBUFS): case(ENOBUFS):
case(ENOMEM): case(ENOMEM):
case(EPROTONOSUPPORT): case(EPROTONOSUPPORT):
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcUnixBridge::handleSocketError: Socket creation failed" sif::error << "TmTcUnixBridge::handleSocketError: Socket creation failed"
<< " with " << strerror(errno) << std::endl; << " with " << strerror(errno) << std::endl;
#endif #endif
break; break;
default: default:
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcUnixBridge::handleSocketError: Unknown error" sif::error << "TmTcUnixBridge::handleSocketError: Unknown error"
<< std::endl; << std::endl;
#endif #endif
@ -151,7 +151,7 @@ void TmTcUnixUdpBridge::handleBindError() {
Ephermeral ports can be shown with following command: Ephermeral ports can be shown with following command:
sysctl -A | grep ip_local_port_range sysctl -A | grep ip_local_port_range
*/ */
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcUnixBridge::handleBindError: Port access issue." sif::error << "TmTcUnixBridge::handleBindError: Port access issue."
"Ports 1-1024 are reserved on UNIX systems and require root " "Ports 1-1024 are reserved on UNIX systems and require root "
"rights while ephermeral ports should not be used as well." "rights while ephermeral ports should not be used as well."
@ -171,14 +171,14 @@ void TmTcUnixUdpBridge::handleBindError() {
case(ENOMEM): case(ENOMEM):
case(ENOTDIR): case(ENOTDIR):
case(EROFS): { case(EROFS): {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcUnixBridge::handleBindError: Socket creation failed" sif::error << "TmTcUnixBridge::handleBindError: Socket creation failed"
<< " with " << strerror(errno) << std::endl; << " with " << strerror(errno) << std::endl;
#endif #endif
break; break;
} }
default: default:
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcUnixBridge::handleBindError: Unknown error" sif::error << "TmTcUnixBridge::handleBindError: Unknown error"
<< std::endl; << std::endl;
#endif #endif
@ -189,7 +189,7 @@ void TmTcUnixUdpBridge::handleBindError() {
void TmTcUnixUdpBridge::handleSendError() { void TmTcUnixUdpBridge::handleSendError() {
switch(errno) { switch(errno) {
default: default:
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcUnixBridge::handleSendError: " sif::error << "TmTcUnixBridge::handleSendError: "
<< strerror(errno) << std::endl; << strerror(errno) << std::endl;
#endif #endif

View File

@ -9,7 +9,7 @@ MessageQueue::MessageQueue(size_t message_depth, size_t max_message_size) :
rtems_status_code status = rtems_message_queue_create(name, message_depth, rtems_status_code status = rtems_message_queue_create(name, message_depth,
max_message_size, 0, &(this->id)); max_message_size, 0, &(this->id));
if (status != RTEMS_SUCCESSFUL) { if (status != RTEMS_SUCCESSFUL) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "MessageQueue::MessageQueue: Creating Queue " << std::hex sif::error << "MessageQueue::MessageQueue: Creating Queue " << std::hex
<< name << std::dec << " failed with status:" << name << std::dec << " failed with status:"
<< (uint32_t) status << std::endl; << (uint32_t) status << std::endl;

View File

@ -30,7 +30,7 @@ ReturnValue_t MultiObjectTask::startTask() {
rtems_status_code status = rtems_task_start(id, MultiObjectTask::taskEntryPoint, rtems_status_code status = rtems_task_start(id, MultiObjectTask::taskEntryPoint,
rtems_task_argument((void *) this)); rtems_task_argument((void *) this));
if (status != RTEMS_SUCCESSFUL) { if (status != RTEMS_SUCCESSFUL) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "ObjectTask::startTask for " << std::hex << this->getId() sif::error << "ObjectTask::startTask for " << std::hex << this->getId()
<< std::dec << " failed." << std::endl; << std::dec << " failed." << std::endl;
#endif #endif
@ -65,7 +65,7 @@ void MultiObjectTask::taskFunctionality() {
char nameSpace[8] = { 0 }; char nameSpace[8] = { 0 };
char* ptr = rtems_object_get_name(getId(), sizeof(nameSpace), char* ptr = rtems_object_get_name(getId(), sizeof(nameSpace),
nameSpace); nameSpace);
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "ObjectTask: " << ptr << " Deadline missed." << std::endl; sif::error << "ObjectTask: " << ptr << " Deadline missed." << std::endl;
#endif #endif
if (this->deadlineMissedFunc != nullptr) { if (this->deadlineMissedFunc != nullptr) {

View File

@ -10,7 +10,7 @@ Mutex::Mutex() :
RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_INHERIT_PRIORITY, 0, RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_INHERIT_PRIORITY, 0,
&mutexId); &mutexId);
if (status != RTEMS_SUCCESSFUL) { if (status != RTEMS_SUCCESSFUL) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Mutex: creation with name, id " << mutexName << ", " << mutexId sif::error << "Mutex: creation with name, id " << mutexName << ", " << mutexId
<< " failed with " << status << std::endl; << " failed with " << status << std::endl;
#endif #endif
@ -20,7 +20,7 @@ Mutex::Mutex() :
Mutex::~Mutex() { Mutex::~Mutex() {
rtems_status_code status = rtems_semaphore_delete(mutexId); rtems_status_code status = rtems_semaphore_delete(mutexId);
if (status != RTEMS_SUCCESSFUL) { if (status != RTEMS_SUCCESSFUL) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Mutex: deletion for id " << mutexId sif::error << "Mutex: deletion for id " << mutexId
<< " failed with " << status << std::endl; << " failed with " << status << std::endl;
#endif #endif

View File

@ -35,7 +35,7 @@ rtems_task PollingTask::taskEntryPoint(rtems_task_argument argument) {
PollingTask *originalTask(reinterpret_cast<PollingTask*>(argument)); PollingTask *originalTask(reinterpret_cast<PollingTask*>(argument));
//The task's functionality is called. //The task's functionality is called.
originalTask->taskFunctionality(); originalTask->taskFunctionality();
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Polling task " << originalTask->getId() sif::debug << "Polling task " << originalTask->getId()
<< " returned from taskFunctionality." << std::endl; << " returned from taskFunctionality." << std::endl;
#endif #endif
@ -44,7 +44,7 @@ rtems_task PollingTask::taskEntryPoint(rtems_task_argument argument) {
void PollingTask::missedDeadlineCounter() { void PollingTask::missedDeadlineCounter() {
PollingTask::deadlineMissedCount++; PollingTask::deadlineMissedCount++;
if (PollingTask::deadlineMissedCount % 10 == 0) { if (PollingTask::deadlineMissedCount % 10 == 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PST missed " << PollingTask::deadlineMissedCount sif::error << "PST missed " << PollingTask::deadlineMissedCount
<< " deadlines." << std::endl; << " deadlines." << std::endl;
#endif #endif
@ -55,7 +55,7 @@ ReturnValue_t PollingTask::startTask() {
rtems_status_code status = rtems_task_start(id, PollingTask::taskEntryPoint, rtems_status_code status = rtems_task_start(id, PollingTask::taskEntryPoint,
rtems_task_argument((void *) this)); rtems_task_argument((void *) this));
if (status != RTEMS_SUCCESSFUL) { if (status != RTEMS_SUCCESSFUL) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PollingTask::startTask for " << std::hex << this->getId() sif::error << "PollingTask::startTask for " << std::hex << this->getId()
<< std::dec << " failed." << std::endl; << std::dec << " failed." << std::endl;
#endif #endif
@ -81,7 +81,7 @@ ReturnValue_t PollingTask::addSlot(object_id_t componentId,
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Component " << std::hex << componentId << sif::error << "Component " << std::hex << componentId <<
" not found, not adding it to pst" << std::endl; " not found, not adding it to pst" << std::endl;
#endif #endif

View File

@ -22,7 +22,7 @@ TaskBase::TaskBase(rtems_task_priority set_priority, size_t stack_size,
} }
ReturnValue_t result = convertReturnCode(status); ReturnValue_t result = convertReturnCode(status);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TaskBase::TaskBase: createTask with name " << std::hex sif::error << "TaskBase::TaskBase: createTask with name " << std::hex
<< osalName << std::dec << " failed with return code " << osalName << std::dec << " failed with return code "
<< (uint32_t) status << std::endl; << (uint32_t) status << std::endl;

View File

@ -43,14 +43,14 @@ ReturnValue_t TcWinUdpPollingTask::performOperation(uint8_t opCode) {
&senderAddressSize); &senderAddressSize);
if(bytesReceived == SOCKET_ERROR) { if(bytesReceived == SOCKET_ERROR) {
// handle error // handle error
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TcWinUdpPollingTask::performOperation: Reception" sif::error << "TcWinUdpPollingTask::performOperation: Reception"
" error." << std::endl; " error." << std::endl;
#endif #endif
handleReadError(); handleReadError();
continue; continue;
} }
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
//sif::debug << "TcWinUdpPollingTask::performOperation: " << bytesReceived //sif::debug << "TcWinUdpPollingTask::performOperation: " << bytesReceived
// << " bytes received" << std::endl; // << " bytes received" << std::endl;
#endif #endif
@ -72,7 +72,7 @@ ReturnValue_t TcWinUdpPollingTask::handleSuccessfullTcRead(size_t bytesRead) {
receptionBuffer.data(), bytesRead); receptionBuffer.data(), bytesRead);
// arrayprinter::print(receptionBuffer.data(), bytesRead); // arrayprinter::print(receptionBuffer.data(), bytesRead);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TcSerialPollingTask::transferPusToSoftwareBus: Data " sif::error << "TcSerialPollingTask::transferPusToSoftwareBus: Data "
"storage failed" << std::endl; "storage failed" << std::endl;
sif::error << "Packet size: " << bytesRead << std::endl; sif::error << "Packet size: " << bytesRead << std::endl;
@ -84,7 +84,7 @@ ReturnValue_t TcWinUdpPollingTask::handleSuccessfullTcRead(size_t bytesRead) {
result = MessageQueueSenderIF::sendMessage(targetTcDestination, &message); result = MessageQueueSenderIF::sendMessage(targetTcDestination, &message);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Serial Polling: Sending message to queue failed" sif::error << "Serial Polling: Sending message to queue failed"
<< std::endl; << std::endl;
#endif #endif
@ -96,7 +96,7 @@ ReturnValue_t TcWinUdpPollingTask::handleSuccessfullTcRead(size_t bytesRead) {
ReturnValue_t TcWinUdpPollingTask::initialize() { ReturnValue_t TcWinUdpPollingTask::initialize() {
tcStore = objectManager->get<StorageManagerIF>(objects::TC_STORE); tcStore = objectManager->get<StorageManagerIF>(objects::TC_STORE);
if (tcStore == nullptr) { if (tcStore == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TcSerialPollingTask::initialize: TC Store uninitialized!" sif::error << "TcSerialPollingTask::initialize: TC Store uninitialized!"
<< std::endl; << std::endl;
#endif #endif
@ -105,7 +105,7 @@ ReturnValue_t TcWinUdpPollingTask::initialize() {
tmtcBridge = objectManager->get<TmTcWinUdpBridge>(tmtcBridgeId); tmtcBridge = objectManager->get<TmTcWinUdpBridge>(tmtcBridgeId);
if(tmtcBridge == nullptr) { if(tmtcBridge == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TcSocketPollingTask::TcSocketPollingTask: Invalid" sif::error << "TcSocketPollingTask::TcSocketPollingTask: Invalid"
" TMTC bridge object!" << std::endl; " TMTC bridge object!" << std::endl;
#endif #endif
@ -113,7 +113,7 @@ ReturnValue_t TcWinUdpPollingTask::initialize() {
} }
serverUdpSocket = tmtcBridge->serverSocket; serverUdpSocket = tmtcBridge->serverSocket;
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
//sif::info << "TcWinUdpPollingTask::initialize: Server UDP socket " //sif::info << "TcWinUdpPollingTask::initialize: Server UDP socket "
// << serverUdpSocket << std::endl; // << serverUdpSocket << std::endl;
#endif #endif
@ -133,7 +133,7 @@ void TcWinUdpPollingTask::setTimeout(double timeoutSeconds) {
int result = setsockopt(serverUdpSocket, SOL_SOCKET, SO_RCVTIMEO, int result = setsockopt(serverUdpSocket, SOL_SOCKET, SO_RCVTIMEO,
reinterpret_cast<const char*>(&timeoutMs), sizeof(DWORD)); reinterpret_cast<const char*>(&timeoutMs), sizeof(DWORD));
if(result == -1) { if(result == -1) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TcWinUdpPollingTask::TcSocketPollingTask: Setting " sif::error << "TcWinUdpPollingTask::TcSocketPollingTask: Setting "
"receive timeout failed with " << strerror(errno) << std::endl; "receive timeout failed with " << strerror(errno) << std::endl;
#endif #endif
@ -144,28 +144,28 @@ void TcWinUdpPollingTask::handleReadError() {
int error = WSAGetLastError(); int error = WSAGetLastError();
switch(error) { switch(error) {
case(WSANOTINITIALISED): { case(WSANOTINITIALISED): {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "TcWinUdpPollingTask::handleReadError: WSANOTINITIALISED: " sif::info << "TcWinUdpPollingTask::handleReadError: WSANOTINITIALISED: "
<< "WSAStartup(...) call " << "necessary" << std::endl; << "WSAStartup(...) call " << "necessary" << std::endl;
#endif #endif
break; break;
} }
case(WSAEFAULT): { case(WSAEFAULT): {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "TcWinUdpPollingTask::handleReadError: WSADEFAULT: " sif::info << "TcWinUdpPollingTask::handleReadError: WSADEFAULT: "
<< "Bad address " << std::endl; << "Bad address " << std::endl;
#endif #endif
break; break;
} }
case(WSAEINVAL): { case(WSAEINVAL): {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "TcWinUdpPollingTask::handleReadError: WSAEINVAL: " sif::info << "TcWinUdpPollingTask::handleReadError: WSAEINVAL: "
<< "Invalid input parameters. " << std::endl; << "Invalid input parameters. " << std::endl;
#endif #endif
break; break;
} }
default: { default: {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "TcWinUdpPollingTask::handleReadError: Error code: " sif::info << "TcWinUdpPollingTask::handleReadError: Error code: "
<< error << std::endl; << error << std::endl;
#endif #endif

View File

@ -15,7 +15,7 @@ TmTcWinUdpBridge::TmTcWinUdpBridge(object_id_t objectId,
if (err != 0) { if (err != 0) {
/* Tell the user that we could not find a usable */ /* Tell the user that we could not find a usable */
/* Winsock DLL. */ /* Winsock DLL. */
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcWinUdpBridge::TmTcWinUdpBridge:" sif::error << "TmTcWinUdpBridge::TmTcWinUdpBridge:"
"WSAStartup failed with error: " << err << std::endl; "WSAStartup failed with error: " << err << std::endl;
#endif #endif
@ -36,7 +36,7 @@ TmTcWinUdpBridge::TmTcWinUdpBridge(object_id_t objectId,
//clientSocket = socket(AF_INET, SOCK_DGRAM, 0); //clientSocket = socket(AF_INET, SOCK_DGRAM, 0);
serverSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); serverSocket = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
if(serverSocket == INVALID_SOCKET) { if(serverSocket == INVALID_SOCKET) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcWinUdpBridge::TmTcWinUdpBridge: Could not open" sif::error << "TmTcWinUdpBridge::TmTcWinUdpBridge: Could not open"
" UDP socket!" << std::endl; " UDP socket!" << std::endl;
#endif #endif
@ -63,7 +63,7 @@ TmTcWinUdpBridge::TmTcWinUdpBridge(object_id_t objectId,
reinterpret_cast<struct sockaddr*>(&serverAddress), reinterpret_cast<struct sockaddr*>(&serverAddress),
serverAddressLen); serverAddressLen);
if(result != 0) { if(result != 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcWinUdpBridge::TmTcWinUdpBridge: Could not bind " sif::error << "TmTcWinUdpBridge::TmTcWinUdpBridge: Could not bind "
"local port " << setServerPort << " to server socket!" "local port " << setServerPort << " to server socket!"
<< std::endl; << std::endl;
@ -83,7 +83,7 @@ ReturnValue_t TmTcWinUdpBridge::sendTm(const uint8_t *data, size_t dataLen) {
//clientAddressLen = sizeof(serverAddress); //clientAddressLen = sizeof(serverAddress);
// char ipAddress [15]; // char ipAddress [15];
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// sif::debug << "IP Address Sender: "<< inet_ntop(AF_INET, // sif::debug << "IP Address Sender: "<< inet_ntop(AF_INET,
// &clientAddress.sin_addr.s_addr, ipAddress, 15) << std::endl; // &clientAddress.sin_addr.s_addr, ipAddress, 15) << std::endl;
#endif #endif
@ -92,13 +92,13 @@ ReturnValue_t TmTcWinUdpBridge::sendTm(const uint8_t *data, size_t dataLen) {
reinterpret_cast<const char*>(data), dataLen, flags, reinterpret_cast<const char*>(data), dataLen, flags,
reinterpret_cast<sockaddr*>(&clientAddress), clientAddressLen); reinterpret_cast<sockaddr*>(&clientAddress), clientAddressLen);
if(bytesSent == SOCKET_ERROR) { if(bytesSent == SOCKET_ERROR) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcWinUdpBridge::sendTm: Send operation failed." sif::error << "TmTcWinUdpBridge::sendTm: Send operation failed."
<< std::endl; << std::endl;
#endif #endif
handleSendError(); handleSendError();
} }
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// sif::debug << "TmTcUnixUdpBridge::sendTm: " << bytesSent << " bytes were" // sif::debug << "TmTcUnixUdpBridge::sendTm: " << bytesSent << " bytes were"
// " sent." << std::endl; // " sent." << std::endl;
#endif #endif
@ -109,7 +109,7 @@ void TmTcWinUdpBridge::checkAndSetClientAddress(sockaddr_in newAddress) {
MutexHelper lock(mutex, MutexIF::TimeoutType::WAITING, 10); MutexHelper lock(mutex, MutexIF::TimeoutType::WAITING, 10);
// char ipAddress [15]; // char ipAddress [15];
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// sif::debug << "IP Address Sender: "<< inet_ntop(AF_INET, // sif::debug << "IP Address Sender: "<< inet_ntop(AF_INET,
// &newAddress.sin_addr.s_addr, ipAddress, 15) << std::endl; // &newAddress.sin_addr.s_addr, ipAddress, 15) << std::endl;
// sif::debug << "IP Address Old: " << inet_ntop(AF_INET, // sif::debug << "IP Address Old: " << inet_ntop(AF_INET,
@ -128,7 +128,7 @@ void TmTcWinUdpBridge::handleSocketError() {
int errCode = WSAGetLastError(); int errCode = WSAGetLastError();
switch(errCode) { switch(errCode) {
case(WSANOTINITIALISED): { case(WSANOTINITIALISED): {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "TmTcWinUdpBridge::handleSocketError: WSANOTINITIALISED: " sif::info << "TmTcWinUdpBridge::handleSocketError: WSANOTINITIALISED: "
<< "WSAStartup(...) call necessary" << std::endl; << "WSAStartup(...) call necessary" << std::endl;
#endif #endif
@ -139,7 +139,7 @@ void TmTcWinUdpBridge::handleSocketError() {
https://docs.microsoft.com/en-us/windows/win32/winsock/ https://docs.microsoft.com/en-us/windows/win32/winsock/
windows-sockets-error-codes-2 windows-sockets-error-codes-2
*/ */
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "TmTcWinUdpBridge::handleSocketError: Error code: " sif::info << "TmTcWinUdpBridge::handleSocketError: Error code: "
<< errCode << std::endl; << errCode << std::endl;
#endif #endif
@ -152,14 +152,14 @@ void TmTcWinUdpBridge::handleBindError() {
int errCode = WSAGetLastError(); int errCode = WSAGetLastError();
switch(errCode) { switch(errCode) {
case(WSANOTINITIALISED): { case(WSANOTINITIALISED): {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "TmTcWinUdpBridge::handleBindError: WSANOTINITIALISED: " sif::info << "TmTcWinUdpBridge::handleBindError: WSANOTINITIALISED: "
<< "WSAStartup(...) call " << "necessary" << std::endl; << "WSAStartup(...) call " << "necessary" << std::endl;
#endif #endif
break; break;
} }
case(WSAEADDRINUSE): { case(WSAEADDRINUSE): {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "TmTcWinUdpBridge::handleBindError: WSAEADDRINUSE: " sif::warning << "TmTcWinUdpBridge::handleBindError: WSAEADDRINUSE: "
<< "Port is already in use!" << std::endl; << "Port is already in use!" << std::endl;
#endif #endif
@ -170,7 +170,7 @@ void TmTcWinUdpBridge::handleBindError() {
https://docs.microsoft.com/en-us/windows/win32/winsock/ https://docs.microsoft.com/en-us/windows/win32/winsock/
windows-sockets-error-codes-2 windows-sockets-error-codes-2
*/ */
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "TmTcWinUdpBridge::handleBindError: Error code: " sif::info << "TmTcWinUdpBridge::handleBindError: Error code: "
<< errCode << std::endl; << errCode << std::endl;
#endif #endif
@ -183,14 +183,14 @@ void TmTcWinUdpBridge::handleSendError() {
int errCode = WSAGetLastError(); int errCode = WSAGetLastError();
switch(errCode) { switch(errCode) {
case(WSANOTINITIALISED): { case(WSANOTINITIALISED): {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "TmTcWinUdpBridge::handleSendError: WSANOTINITIALISED: " sif::info << "TmTcWinUdpBridge::handleSendError: WSANOTINITIALISED: "
<< "WSAStartup(...) call necessary" << std::endl; << "WSAStartup(...) call necessary" << std::endl;
#endif #endif
break; break;
} }
case(WSAEADDRNOTAVAIL): { case(WSAEADDRNOTAVAIL): {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "TmTcWinUdpBridge::handleSendError: WSAEADDRNOTAVAIL: " sif::info << "TmTcWinUdpBridge::handleSendError: WSAEADDRNOTAVAIL: "
<< "Check target address. " << std::endl; << "Check target address. " << std::endl;
#endif #endif
@ -201,7 +201,7 @@ void TmTcWinUdpBridge::handleSendError() {
https://docs.microsoft.com/en-us/windows/win32/winsock/ https://docs.microsoft.com/en-us/windows/win32/winsock/
windows-sockets-error-codes-2 windows-sockets-error-codes-2
*/ */
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "TmTcWinUdpBridge::handleSendError: Error code: " sif::info << "TmTcWinUdpBridge::handleSendError: Error code: "
<< errCode << std::endl; << errCode << std::endl;
#endif #endif

View File

@ -48,7 +48,7 @@ ReturnValue_t ParameterHelper::handleParameterMessage(CommandMessage *message) {
ConstStorageAccessor accessor(storeId); ConstStorageAccessor accessor(storeId);
result = storage->getData(storeId, accessor); result = storage->getData(storeId, accessor);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "ParameterHelper::handleParameterMessage: Getting" sif::error << "ParameterHelper::handleParameterMessage: Getting"
<< " store data failed for load command." << std::endl; << " store data failed for load command." << std::endl;
#endif #endif

View File

@ -22,7 +22,7 @@ ReturnValue_t CService201HealthCommanding::isValidSubservice(uint8_t subservice)
case(Subservice::COMMAND_ANNOUNCE_HEALTH_ALL): case(Subservice::COMMAND_ANNOUNCE_HEALTH_ALL):
return RETURN_OK; return RETURN_OK;
default: default:
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Invalid Subservice" << std::endl; sif::error << "Invalid Subservice" << std::endl;
#endif #endif
return AcceptsTelecommandsIF::INVALID_SUBSERVICE; return AcceptsTelecommandsIF::INVALID_SUBSERVICE;

View File

@ -51,7 +51,7 @@ ReturnValue_t Service1TelecommandVerification::sendVerificationReport(
result = generateSuccessReport(message); result = generateSuccessReport(message);
} }
if(result != HasReturnvaluesIF::RETURN_OK){ if(result != HasReturnvaluesIF::RETURN_OK){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Service1TelecommandVerification::sendVerificationReport: " sif::error << "Service1TelecommandVerification::sendVerificationReport: "
"Sending verification packet failed !" << std::endl; "Sending verification packet failed !" << std::endl;
#endif #endif
@ -90,7 +90,7 @@ ReturnValue_t Service1TelecommandVerification::initialize() {
AcceptsTelemetryIF* funnel = objectManager-> AcceptsTelemetryIF* funnel = objectManager->
get<AcceptsTelemetryIF>(targetDestination); get<AcceptsTelemetryIF>(targetDestination);
if(funnel == nullptr){ if(funnel == nullptr){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Service1TelecommandVerification::initialize: Specified" sif::error << "Service1TelecommandVerification::initialize: Specified"
" TM funnel invalid. Make sure it is set up and implements" " TM funnel invalid. Make sure it is set up and implements"
" AcceptsTelemetryIF." << std::endl; " AcceptsTelemetryIF." << std::endl;

View File

@ -25,7 +25,7 @@ ReturnValue_t Service2DeviceAccess::isValidSubservice(uint8_t subservice) {
case Subservice::COMMAND_TOGGLE_WIRETAPPING: case Subservice::COMMAND_TOGGLE_WIRETAPPING:
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
default: default:
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Invalid Subservice" << std::endl; sif::error << "Invalid Subservice" << std::endl;
#endif #endif
return AcceptsTelecommandsIF::INVALID_SUBSERVICE; return AcceptsTelecommandsIF::INVALID_SUBSERVICE;
@ -127,7 +127,7 @@ void Service2DeviceAccess::handleUnrequestedReply(CommandMessage* reply) {
static_cast<uint8_t>(Subservice::REPLY_RAW)); static_cast<uint8_t>(Subservice::REPLY_RAW));
break; break;
default: default:
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Unknown message in Service2DeviceAccess::" sif::error << "Unknown message in Service2DeviceAccess::"
"handleUnrequestedReply with command ID " << "handleUnrequestedReply with command ID " <<
reply->getCommand() << std::endl; reply->getCommand() << std::endl;
@ -147,7 +147,7 @@ void Service2DeviceAccess::sendWiretappingTm(CommandMessage *reply,
size_t size = 0; size_t size = 0;
ReturnValue_t result = IPCStore->getData(storeAddress, &data, &size); ReturnValue_t result = IPCStore->getData(storeAddress, &data, &size);
if(result != HasReturnvaluesIF::RETURN_OK){ if(result != HasReturnvaluesIF::RETURN_OK){
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Service2DeviceAccess::sendWiretappingTm: Data Lost in " sif::error << "Service2DeviceAccess::sendWiretappingTm: Data Lost in "
"handleUnrequestedReply with failure ID "<< result "handleUnrequestedReply with failure ID "<< result
<< std::endl; << std::endl;

View File

@ -222,7 +222,7 @@ ReturnValue_t Service3Housekeeping::handleReply(const CommandMessage* reply,
} }
default: default:
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Service3Housekeeping::handleReply: Invalid reply with " sif::error << "Service3Housekeeping::handleReply: Invalid reply with "
<< "reply command " << command << "!" << std::endl; << "reply command " << command << "!" << std::endl;
#endif #endif
@ -251,7 +251,7 @@ void Service3Housekeeping::handleUnrequestedReply(
} }
default: default:
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Service3Housekeeping::handleUnrequestedReply: Invalid " sif::error << "Service3Housekeeping::handleUnrequestedReply: Invalid "
<< "reply with " << "reply command " << command << "!" << "reply with " << "reply command " << command << "!"
<< std::endl; << std::endl;
@ -261,7 +261,7 @@ void Service3Housekeeping::handleUnrequestedReply(
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
// Configuration error // Configuration error
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Service3Housekeeping::handleUnrequestedReply:" sif::debug << "Service3Housekeeping::handleUnrequestedReply:"
<< "Could not generate reply!" << std::endl; << "Could not generate reply!" << std::endl;
#endif #endif

View File

@ -37,7 +37,7 @@ ReturnValue_t Service5EventReporting::performService() {
} }
} }
} }
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Service5EventReporting::generateEventReport:" sif::debug << "Service5EventReporting::generateEventReport:"
" Too many events" << std::endl; " Too many events" << std::endl;
#endif #endif
@ -55,7 +55,7 @@ ReturnValue_t Service5EventReporting::generateEventReport(
ReturnValue_t result = tmPacket.sendPacket( ReturnValue_t result = tmPacket.sendPacket(
requestQueue->getDefaultDestination(),requestQueue->getId()); requestQueue->getDefaultDestination(),requestQueue->getId());
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Service5EventReporting::generateEventReport:" sif::debug << "Service5EventReporting::generateEventReport:"
" Could not send TM packet" << std::endl; " Could not send TM packet" << std::endl;
#endif #endif

View File

@ -60,7 +60,7 @@ ReturnValue_t Service8FunctionManagement::prepareCommand(
ReturnValue_t Service8FunctionManagement::prepareDirectCommand( ReturnValue_t Service8FunctionManagement::prepareDirectCommand(
CommandMessage *message, const uint8_t *tcData, size_t tcDataLen) { CommandMessage *message, const uint8_t *tcData, size_t tcDataLen) {
if(tcDataLen < sizeof(object_id_t) + sizeof(ActionId_t)) { if(tcDataLen < sizeof(object_id_t) + sizeof(ActionId_t)) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Service8FunctionManagement::prepareDirectCommand:" sif::debug << "Service8FunctionManagement::prepareDirectCommand:"
<< " TC size smaller thant minimum size of direct command." << " TC size smaller thant minimum size of direct command."
<< std::endl; << std::endl;
@ -127,7 +127,7 @@ ReturnValue_t Service8FunctionManagement::handleDataReply(
const uint8_t * buffer = nullptr; const uint8_t * buffer = nullptr;
ReturnValue_t result = IPCStore->getData(storeId, &buffer, &size); ReturnValue_t result = IPCStore->getData(storeId, &buffer, &size);
if(result != RETURN_OK) { if(result != RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Service 8: Could not retrieve data for data reply" sif::error << "Service 8: Could not retrieve data for data reply"
<< std::endl; << std::endl;
#endif #endif
@ -139,7 +139,7 @@ ReturnValue_t Service8FunctionManagement::handleDataReply(
auto deletionResult = IPCStore->deleteData(storeId); auto deletionResult = IPCStore->deleteData(storeId);
if(deletionResult != HasReturnvaluesIF::RETURN_OK) { if(deletionResult != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "Service8FunctionManagement::handleReply: Deletion" sif::warning << "Service8FunctionManagement::handleReply: Deletion"
<< " of data in pool failed." << std::endl; << " of data in pool failed." << std::endl;
#endif #endif

View File

@ -95,7 +95,7 @@ ReturnValue_t SerialBufferAdapter<count_t>::deSerialize(const uint8_t** buffer,
template<typename count_t> template<typename count_t>
uint8_t * SerialBufferAdapter<count_t>::getBuffer() { uint8_t * SerialBufferAdapter<count_t>::getBuffer() {
if(buffer == nullptr) { if(buffer == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Wrong access function for stored type !" sif::error << "Wrong access function for stored type !"
" Use getConstBuffer()." << std::endl; " Use getConstBuffer()." << std::endl;
#endif #endif
@ -107,7 +107,7 @@ uint8_t * SerialBufferAdapter<count_t>::getBuffer() {
template<typename count_t> template<typename count_t>
const uint8_t * SerialBufferAdapter<count_t>::getConstBuffer() { const uint8_t * SerialBufferAdapter<count_t>::getConstBuffer() {
if(constBuffer == nullptr) { if(constBuffer == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "SerialBufferAdapter::getConstBuffer:" sif::error << "SerialBufferAdapter::getConstBuffer:"
" Buffers are unitialized!" << std::endl; " Buffers are unitialized!" << std::endl;
#endif #endif

View File

@ -1,6 +1,6 @@
#include "ServiceInterfaceBuffer.h" #include "ServiceInterfaceBuffer.h"
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
#include "../timemanager/Clock.h" #include "../timemanager/Clock.h"
@ -256,4 +256,4 @@ void ServiceInterfaceBuffer::initSocket() {
#endif //ML505 #endif //ML505
#endif /* CPP_OSTREAM_ENABLED == 1 */ #endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */

View File

@ -4,7 +4,7 @@
#include "../returnvalues/HasReturnvaluesIF.h" #include "../returnvalues/HasReturnvaluesIF.h"
#include <FSFWConfig.h> #include <FSFWConfig.h>
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
#include <iostream> #include <iostream>
#include <sstream> #include <sstream>
@ -150,6 +150,6 @@ private:
}; };
#endif //ML505 #endif //ML505
#endif /* CPP_OSTREAM_ENABLED == 1 */ #endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
#endif /* FRAMEWORK_SERVICEINTERFACE_SERVICEINTERFACEBUFFER_H_ */ #endif /* FRAMEWORK_SERVICEINTERFACE_SERVICEINTERFACEBUFFER_H_ */

View File

@ -1,6 +1,6 @@
#include "ServiceInterfaceStream.h" #include "ServiceInterfaceStream.h"
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
ServiceInterfaceStream::ServiceInterfaceStream(std::string setMessage, ServiceInterfaceStream::ServiceInterfaceStream(std::string setMessage,
bool addCrToPreamble, bool buffered, bool errStream, uint16_t port) : bool addCrToPreamble, bool buffered, bool errStream, uint16_t port) :

View File

@ -3,7 +3,7 @@
#include "ServiceInterfaceBuffer.h" #include "ServiceInterfaceBuffer.h"
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
#include <iostream> #include <iostream>
#include <cstdio> #include <cstdio>
@ -51,6 +51,6 @@ extern ServiceInterfaceStream warning;
extern ServiceInterfaceStream error; extern ServiceInterfaceStream error;
} }
#endif /* CPP_OSTREAM_ENABLED == 1 */ #endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
#endif /* FRAMEWORK_SERVICEINTERFACE_SERVICEINTERFACESTREAM_H_ */ #endif /* FRAMEWORK_SERVICEINTERFACE_SERVICEINTERFACESTREAM_H_ */

View File

@ -46,7 +46,7 @@ const uint8_t* ConstStorageAccessor::data() const {
size_t ConstStorageAccessor::size() const { size_t ConstStorageAccessor::size() const {
if(internalState == AccessState::UNINIT) { if(internalState == AccessState::UNINIT) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "StorageAccessor: Not initialized!" << std::endl; sif::warning << "StorageAccessor: Not initialized!" << std::endl;
#endif #endif
} }
@ -56,13 +56,13 @@ size_t ConstStorageAccessor::size() const {
ReturnValue_t ConstStorageAccessor::getDataCopy(uint8_t *pointer, ReturnValue_t ConstStorageAccessor::getDataCopy(uint8_t *pointer,
size_t maxSize) { size_t maxSize) {
if(internalState == AccessState::UNINIT) { if(internalState == AccessState::UNINIT) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "StorageAccessor: Not initialized!" << std::endl; sif::warning << "StorageAccessor: Not initialized!" << std::endl;
#endif #endif
return HasReturnvaluesIF::RETURN_FAILED; return HasReturnvaluesIF::RETURN_FAILED;
} }
if(size_ > maxSize) { if(size_ > maxSize) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "StorageAccessor: Supplied buffer not large enough" sif::error << "StorageAccessor: Supplied buffer not large enough"
<< std::endl; << std::endl;
#endif #endif
@ -82,7 +82,7 @@ store_address_t ConstStorageAccessor::getId() const {
void ConstStorageAccessor::print() const { void ConstStorageAccessor::print() const {
if(internalState == AccessState::UNINIT or constDataPointer == nullptr) { if(internalState == AccessState::UNINIT or constDataPointer == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "StorageAccessor: Not initialized!" << std::endl; sif::warning << "StorageAccessor: Not initialized!" << std::endl;
#endif #endif
return; return;

View File

@ -8,7 +8,7 @@ LocalPool::LocalPool(object_id_t setObjectId, const LocalPoolConfig& poolConfig,
NUMBER_OF_POOLS(poolConfig.size()), NUMBER_OF_POOLS(poolConfig.size()),
spillsToHigherPools(spillsToHigherPools) { spillsToHigherPools(spillsToHigherPools) {
if(NUMBER_OF_POOLS == 0) { if(NUMBER_OF_POOLS == 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalPool::LocalPool: Passed pool configuration is " sif::error << "LocalPool::LocalPool: Passed pool configuration is "
<< " invalid!" << std::endl; << " invalid!" << std::endl;
#endif #endif
@ -120,7 +120,7 @@ ReturnValue_t LocalPool::modifyData(store_address_t storeId,
ReturnValue_t LocalPool::deleteData(store_address_t storeId) { ReturnValue_t LocalPool::deleteData(store_address_t storeId) {
#if FSFW_VERBOSE_PRINTOUT == 2 #if FSFW_VERBOSE_PRINTOUT == 2
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Delete: Pool: " << std::dec << storeId.poolIndex sif::debug << "Delete: Pool: " << std::dec << storeId.poolIndex
<< " Index: " << storeId.packetIndex << std::endl; << " Index: " << storeId.packetIndex << std::endl;
#endif #endif
@ -138,7 +138,7 @@ ReturnValue_t LocalPool::deleteData(store_address_t storeId) {
} }
else { else {
//pool_index or packet_index is too large //pool_index or packet_index is too large
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalPool::deleteData: Illegal store ID, no deletion!" sif::error << "LocalPool::deleteData: Illegal store ID, no deletion!"
<< std::endl; << std::endl;
#endif #endif
@ -164,7 +164,7 @@ ReturnValue_t LocalPool::deleteData(uint8_t *ptr, size_t size,
result = deleteData(localId); result = deleteData(localId);
#if FSFW_VERBOSE_PRINTOUT == 2 #if FSFW_VERBOSE_PRINTOUT == 2
if (deltaAddress % elementSizes[n] != 0) { if (deltaAddress % elementSizes[n] != 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalPool::deleteData: Address not aligned!" sif::error << "LocalPool::deleteData: Address not aligned!"
<< std::endl; << std::endl;
#endif #endif
@ -194,7 +194,7 @@ ReturnValue_t LocalPool::initialize() {
//Check if any pool size is large than the maximum allowed. //Check if any pool size is large than the maximum allowed.
for (uint8_t count = 0; count < NUMBER_OF_POOLS; count++) { for (uint8_t count = 0; count < NUMBER_OF_POOLS; count++) {
if (elementSizes[count] >= STORAGE_FREE) { if (elementSizes[count] >= STORAGE_FREE) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalPool::initialize: Pool is too large! " sif::error << "LocalPool::initialize: Pool is too large! "
"Max. allowed size is: " << (STORAGE_FREE - 1) << std::endl; "Max. allowed size is: " << (STORAGE_FREE - 1) << std::endl;
#endif #endif
@ -219,7 +219,7 @@ ReturnValue_t LocalPool::reserveSpace(const size_t size,
store_address_t *storeId, bool ignoreFault) { store_address_t *storeId, bool ignoreFault) {
ReturnValue_t status = getPoolIndex(size, &storeId->poolIndex); ReturnValue_t status = getPoolIndex(size, &storeId->poolIndex);
if (status != RETURN_OK) { if (status != RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalPool( " << std::hex << getObjectId() << std::dec sif::error << "LocalPool( " << std::hex << getObjectId() << std::dec
<< " )::reserveSpace: Packet too large." << std::endl; << " )::reserveSpace: Packet too large." << std::endl;
#endif #endif
@ -236,7 +236,7 @@ ReturnValue_t LocalPool::reserveSpace(const size_t size,
} }
if (status == RETURN_OK) { if (status == RETURN_OK) {
#if FSFW_VERBOSE_PRINTOUT == 2 #if FSFW_VERBOSE_PRINTOUT == 2
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Reserve: Pool: " << std::dec sif::debug << "Reserve: Pool: " << std::dec
<< storeId->poolIndex << " Index: " << storeId->packetIndex << storeId->poolIndex << " Index: " << storeId->packetIndex
<< std::endl; << std::endl;
@ -280,7 +280,7 @@ ReturnValue_t LocalPool::getPoolIndex(size_t packetSize, uint16_t *poolIndex,
uint16_t startAtIndex) { uint16_t startAtIndex) {
for (uint16_t n = startAtIndex; n < NUMBER_OF_POOLS; n++) { for (uint16_t n = startAtIndex; n < NUMBER_OF_POOLS; n++) {
#if FSFW_VERBOSE_PRINTOUT == 2 #if FSFW_VERBOSE_PRINTOUT == 2
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "LocalPool " << getObjectId() << "::getPoolIndex: Pool: " sif::debug << "LocalPool " << getObjectId() << "::getPoolIndex: Pool: "
<< n << ", Element Size: " << elementSizes[n] << std::endl; << n << ", Element Size: " << elementSizes[n] << std::endl;
#endif #endif

View File

@ -26,7 +26,7 @@ ReturnValue_t PoolManager::reserveSpace(const size_t size,
ReturnValue_t PoolManager::deleteData( ReturnValue_t PoolManager::deleteData(
store_address_t storeId) { store_address_t storeId) {
#if FSFW_VERBOSE_PRINTOUT == 2 #if FSFW_VERBOSE_PRINTOUT == 2
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "PoolManager( " << translateObject(getObjectId()) << sif::debug << "PoolManager( " << translateObject(getObjectId()) <<
" )::deleteData from store " << storeId.poolIndex << " )::deleteData from store " << storeId.poolIndex <<
". id is "<< storeId.packetIndex << std::endl; ". id is "<< storeId.packetIndex << std::endl;

View File

@ -26,13 +26,13 @@ StorageAccessor::StorageAccessor(StorageAccessor&& other):
ReturnValue_t StorageAccessor::getDataCopy(uint8_t *pointer, size_t maxSize) { ReturnValue_t StorageAccessor::getDataCopy(uint8_t *pointer, size_t maxSize) {
if(internalState == AccessState::UNINIT) { if(internalState == AccessState::UNINIT) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "StorageAccessor: Not initialized!" << std::endl; sif::warning << "StorageAccessor: Not initialized!" << std::endl;
#endif #endif
return HasReturnvaluesIF::RETURN_FAILED; return HasReturnvaluesIF::RETURN_FAILED;
} }
if(size_ > maxSize) { if(size_ > maxSize) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "StorageAccessor: Supplied buffer not large " sif::error << "StorageAccessor: Supplied buffer not large "
"enough" << std::endl; "enough" << std::endl;
#endif #endif
@ -44,7 +44,7 @@ ReturnValue_t StorageAccessor::getDataCopy(uint8_t *pointer, size_t maxSize) {
uint8_t* StorageAccessor::data() { uint8_t* StorageAccessor::data() {
if(internalState == AccessState::UNINIT) { if(internalState == AccessState::UNINIT) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "StorageAccessor: Not initialized!" << std::endl; sif::warning << "StorageAccessor: Not initialized!" << std::endl;
#endif #endif
} }
@ -54,13 +54,13 @@ uint8_t* StorageAccessor::data() {
ReturnValue_t StorageAccessor::write(uint8_t *data, size_t size, ReturnValue_t StorageAccessor::write(uint8_t *data, size_t size,
uint16_t offset) { uint16_t offset) {
if(internalState == AccessState::UNINIT) { if(internalState == AccessState::UNINIT) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "StorageAccessor: Not initialized!" << std::endl; sif::warning << "StorageAccessor: Not initialized!" << std::endl;
#endif #endif
return HasReturnvaluesIF::RETURN_FAILED; return HasReturnvaluesIF::RETURN_FAILED;
} }
if(offset + size > size_) { if(offset + size > size_) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "StorageAccessor: Data too large for pool " sif::error << "StorageAccessor: Data too large for pool "
"entry!" << std::endl; "entry!" << std::endl;
#endif #endif

View File

@ -86,7 +86,7 @@ void SubsystemBase::executeTable(HybridIterator<ModeListEntry> tableIter,
object_id_t object = tableIter.value->getObject(); object_id_t object = tableIter.value->getObject();
if ((iter = childrenMap.find(object)) == childrenMap.end()) { if ((iter = childrenMap.find(object)) == childrenMap.end()) {
//illegal table entry, should only happen due to misconfigured mode table //illegal table entry, should only happen due to misconfigured mode table
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << std::hex << getObjectId() << ": invalid mode table entry" sif::debug << std::hex << getObjectId() << ": invalid mode table entry"
<< std::endl; << std::endl;
#endif #endif

View File

@ -91,7 +91,7 @@ void FixedSlotSequence::addSlot(object_id_t componentId, uint32_t slotTimeMs,
ReturnValue_t FixedSlotSequence::checkSequence() const { ReturnValue_t FixedSlotSequence::checkSequence() const {
if(slotList.empty()) { if(slotList.empty()) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "FixedSlotSequence::checkSequence:" sif::error << "FixedSlotSequence::checkSequence:"
<< " Slot list is empty!" << std::endl; << " Slot list is empty!" << std::endl;
#endif #endif
@ -102,7 +102,7 @@ ReturnValue_t FixedSlotSequence::checkSequence() const {
ReturnValue_t result = customCheckFunction(slotList); ReturnValue_t result = customCheckFunction(slotList);
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
// Continue for now but print error output. // Continue for now but print error output.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "FixedSlotSequence::checkSequence:" sif::error << "FixedSlotSequence::checkSequence:"
<< " Custom check failed!" << std::endl; << " Custom check failed!" << std::endl;
#endif #endif
@ -116,7 +116,7 @@ ReturnValue_t FixedSlotSequence::checkSequence() const {
errorCount++; errorCount++;
} }
else if (slot.pollingTimeMs < time) { else if (slot.pollingTimeMs < time) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "FixedSlotSequence::checkSequence: Time: " sif::error << "FixedSlotSequence::checkSequence: Time: "
<< slot.pollingTimeMs << " is smaller than previous with " << slot.pollingTimeMs << " is smaller than previous with "
<< time << std::endl; << time << std::endl;
@ -125,7 +125,7 @@ ReturnValue_t FixedSlotSequence::checkSequence() const {
} }
else { else {
// All ok, print slot. // All ok, print slot.
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
//sif::info << "Current slot polling time: " << std::endl; //sif::info << "Current slot polling time: " << std::endl;
//sif::info << std::dec << slotIt->pollingTimeMs << std::endl; //sif::info << std::dec << slotIt->pollingTimeMs << std::endl;
#endif #endif
@ -133,7 +133,7 @@ ReturnValue_t FixedSlotSequence::checkSequence() const {
time = slot.pollingTimeMs; time = slot.pollingTimeMs;
} }
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
//sif::info << "Number of elements in slot list: " //sif::info << "Number of elements in slot list: "
// << slotList.size() << std::endl; // << slotList.size() << std::endl;
#endif #endif
@ -159,7 +159,7 @@ ReturnValue_t FixedSlotSequence::intializeSequenceAfterTaskCreation() const {
} }
} }
if (count > 0) { if (count > 0) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "FixedSlotSequence::intializeSequenceAfterTaskCreation:" sif::error << "FixedSlotSequence::intializeSequenceAfterTaskCreation:"
"Counted " << count << " failed initializations!" << std::endl; "Counted " << count << " failed initializations!" << std::endl;
#endif #endif

View File

@ -11,7 +11,7 @@ CCSDSDistributor::CCSDSDistributor(uint16_t setDefaultApid,
CCSDSDistributor::~CCSDSDistributor() {} CCSDSDistributor::~CCSDSDistributor() {}
TcDistributor::TcMqMapIter CCSDSDistributor::selectDestination() { TcDistributor::TcMqMapIter CCSDSDistributor::selectDestination() {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// sif::debug << "CCSDSDistributor::selectDestination received: " << // sif::debug << "CCSDSDistributor::selectDestination received: " <<
// this->currentMessage.getStorageId().pool_index << ", " << // this->currentMessage.getStorageId().pool_index << ", " <<
// this->currentMessage.getStorageId().packet_index << std::endl; // this->currentMessage.getStorageId().packet_index << std::endl;
@ -21,14 +21,14 @@ TcDistributor::TcMqMapIter CCSDSDistributor::selectDestination() {
ReturnValue_t result = this->tcStore->getData(currentMessage.getStorageId(), ReturnValue_t result = this->tcStore->getData(currentMessage.getStorageId(),
&packet, &size ); &packet, &size );
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CCSDSDistributor::selectDestination: Getting data from" sif::error << "CCSDSDistributor::selectDestination: Getting data from"
" store failed!" << std::endl; " store failed!" << std::endl;
#endif #endif
} }
SpacePacketBase currentPacket(packet); SpacePacketBase currentPacket(packet);
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// sif:: info << "CCSDSDistributor::selectDestination has packet with APID " // sif:: info << "CCSDSDistributor::selectDestination has packet with APID "
// << std::hex << currentPacket.getAPID() << std::dec << std::endl; // << std::hex << currentPacket.getAPID() << std::dec << std::endl;
#endif #endif
@ -76,7 +76,7 @@ ReturnValue_t CCSDSDistributor::initialize() {
ReturnValue_t status = this->TcDistributor::initialize(); ReturnValue_t status = this->TcDistributor::initialize();
this->tcStore = objectManager->get<StorageManagerIF>( objects::TC_STORE ); this->tcStore = objectManager->get<StorageManagerIF>( objects::TC_STORE );
if (this->tcStore == nullptr) { if (this->tcStore == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CCSDSDistributor::initialize: Could not initialize" sif::error << "CCSDSDistributor::initialize: Could not initialize"
" TC store!" << std::endl; " TC store!" << std::endl;
#endif #endif

View File

@ -13,7 +13,7 @@ PUSDistributor::PUSDistributor(uint16_t setApid, object_id_t setObjectId,
PUSDistributor::~PUSDistributor() {} PUSDistributor::~PUSDistributor() {}
PUSDistributor::TcMqMapIter PUSDistributor::selectDestination() { PUSDistributor::TcMqMapIter PUSDistributor::selectDestination() {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// sif:: debug << "PUSDistributor::handlePacket received: " // sif:: debug << "PUSDistributor::handlePacket received: "
// << this->current_packet_id.store_index << ", " // << this->current_packet_id.store_index << ", "
// << this->current_packet_id.packet_index << std::endl; // << this->current_packet_id.packet_index << std::endl;
@ -27,7 +27,7 @@ PUSDistributor::TcMqMapIter PUSDistributor::selectDestination() {
tcStatus = checker.checkPacket(currentPacket); tcStatus = checker.checkPacket(currentPacket);
#ifdef DEBUG #ifdef DEBUG
if(tcStatus != HasReturnvaluesIF::RETURN_OK) { if(tcStatus != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "PUSDistributor::handlePacket: Packet format " sif::debug << "PUSDistributor::handlePacket: Packet format "
<< "invalid, code "<< static_cast<int>(tcStatus) << "invalid, code "<< static_cast<int>(tcStatus)
<< std::endl; << std::endl;
@ -44,7 +44,7 @@ PUSDistributor::TcMqMapIter PUSDistributor::selectDestination() {
if (queueMapIt == this->queueMap.end()) { if (queueMapIt == this->queueMap.end()) {
tcStatus = DESTINATION_NOT_FOUND; tcStatus = DESTINATION_NOT_FOUND;
#ifdef DEBUG #ifdef DEBUG
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "PUSDistributor::handlePacket: Destination not found, " sif::debug << "PUSDistributor::handlePacket: Destination not found, "
<< "code "<< static_cast<int>(tcStatus) << std::endl; << "code "<< static_cast<int>(tcStatus) << std::endl;
#endif #endif
@ -63,13 +63,13 @@ PUSDistributor::TcMqMapIter PUSDistributor::selectDestination() {
ReturnValue_t PUSDistributor::registerService(AcceptsTelecommandsIF* service) { ReturnValue_t PUSDistributor::registerService(AcceptsTelecommandsIF* service) {
uint16_t serviceId = service->getIdentifier(); uint16_t serviceId = service->getIdentifier();
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// sif::info << "Service ID: " << (int)serviceId << std::endl; // sif::info << "Service ID: " << (int)serviceId << std::endl;
#endif #endif
MessageQueueId_t queue = service->getRequestQueue(); MessageQueueId_t queue = service->getRequestQueue();
auto returnPair = queueMap.emplace(serviceId, queue); auto returnPair = queueMap.emplace(serviceId, queue);
if (not returnPair.second) { if (not returnPair.second) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PUSDistributor::registerService: Service ID already" sif::error << "PUSDistributor::registerService: Service ID already"
" exists in map." << std::endl; " exists in map." << std::endl;
#endif #endif
@ -114,7 +114,7 @@ ReturnValue_t PUSDistributor::initialize() {
CCSDSDistributorIF* ccsdsDistributor = CCSDSDistributorIF* ccsdsDistributor =
objectManager->get<CCSDSDistributorIF>(packetSource); objectManager->get<CCSDSDistributorIF>(packetSource);
if (ccsdsDistributor == nullptr) { if (ccsdsDistributor == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PUSDistributor::initialize: Packet source invalid." sif::error << "PUSDistributor::initialize: Packet source invalid."
<< " Make sure it exists and implements CCSDSDistributorIF!" << " Make sure it exists and implements CCSDSDistributorIF!"
<< std::endl; << std::endl;

View File

@ -39,7 +39,7 @@ ReturnValue_t TcDistributor::handlePacket() {
} }
void TcDistributor::print() { void TcDistributor::print() {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Distributor content is: " << std::endl sif::debug << "Distributor content is: " << std::endl
<< "ID\t| Message Queue ID" << std::endl; << "ID\t| Message Queue ID" << std::endl;
sif::debug << std::setfill('0') << std::setw(8) << std::hex; sif::debug << std::setfill('0') << std::setw(8) << std::hex;

View File

@ -28,13 +28,13 @@ double Stopwatch::stopSeconds() {
void Stopwatch::display() { void Stopwatch::display() {
if(displayMode == StopwatchDisplayMode::MILLIS) { if(displayMode == StopwatchDisplayMode::MILLIS) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Stopwatch: Operation took " << (elapsedTime.tv_sec * 1000 + sif::info << "Stopwatch: Operation took " << (elapsedTime.tv_sec * 1000 +
elapsedTime.tv_usec / 1000) << " milliseconds" << std::endl; elapsedTime.tv_usec / 1000) << " milliseconds" << std::endl;
#endif #endif
} }
else if(displayMode == StopwatchDisplayMode::SECONDS) { else if(displayMode == StopwatchDisplayMode::SECONDS) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info <<"Stopwatch: Operation took " << std::setprecision(3) sif::info <<"Stopwatch: Operation took " << std::setprecision(3)
<< std::fixed << timevalOperations::toDouble(elapsedTime) << std::fixed << timevalOperations::toDouble(elapsedTime)
<< " seconds" << std::endl; << " seconds" << std::endl;

View File

@ -63,7 +63,7 @@ uint8_t TcPacketBase::getPusVersionNumber() {
} }
void TcPacketBase::print() { void TcPacketBase::print() {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "TcPacketBase::print: " << std::endl; sif::debug << "TcPacketBase::print: " << std::endl;
#endif #endif
arrayprinter::print(getWholeData(), getFullSize()); arrayprinter::print(getWholeData(), getFullSize());

View File

@ -23,7 +23,7 @@ TcPacketStored::TcPacketStored(uint16_t apid, uint8_t service,
ReturnValue_t returnValue = this->store->getFreeElement(&this->storeAddress, ReturnValue_t returnValue = this->store->getFreeElement(&this->storeAddress,
(TC_PACKET_MIN_SIZE + size), &pData); (TC_PACKET_MIN_SIZE + size), &pData);
if (returnValue != this->store->RETURN_OK) { if (returnValue != this->store->RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "TcPacketStored: Could not get free element from store!" sif::warning << "TcPacketStored: Could not get free element from store!"
<< std::endl; << std::endl;
#endif #endif
@ -41,7 +41,7 @@ ReturnValue_t TcPacketStored::getData(const uint8_t ** dataPtr,
size_t* dataSize) { size_t* dataSize) {
auto result = this->store->getData(storeAddress, dataPtr, dataSize); auto result = this->store->getData(storeAddress, dataPtr, dataSize);
if(result != HasReturnvaluesIF::RETURN_OK) { if(result != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "TcPacketStored: Could not get data!" << std::endl; sif::warning << "TcPacketStored: Could not get data!" << std::endl;
#endif #endif
} }
@ -65,7 +65,7 @@ bool TcPacketStored::checkAndSetStore() {
if (this->store == nullptr) { if (this->store == nullptr) {
this->store = objectManager->get<StorageManagerIF>(objects::TC_STORE); this->store = objectManager->get<StorageManagerIF>(objects::TC_STORE);
if (this->store == nullptr) { if (this->store == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TcPacketStored::TcPacketStored: TC Store not found!" sif::error << "TcPacketStored::TcPacketStored: TC Store not found!"
<< std::endl; << std::endl;
#endif #endif

View File

@ -57,7 +57,7 @@ void TmPacketBase::setData(const uint8_t* p_Data) {
} }
void TmPacketBase::print() { void TmPacketBase::print() {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "TmPacketBase::print: " << std::endl; sif::debug << "TmPacketBase::print: " << std::endl;
#endif #endif
arrayprinter::print(getWholeData(), getFullSize()); arrayprinter::print(getWholeData(), getFullSize());
@ -67,7 +67,7 @@ bool TmPacketBase::checkAndSetStamper() {
if (timeStamper == NULL) { if (timeStamper == NULL) {
timeStamper = objectManager->get<TimeStamperIF>(timeStamperId); timeStamper = objectManager->get<TimeStamperIF>(timeStamperId);
if (timeStamper == NULL) { if (timeStamper == NULL) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmPacketBase::checkAndSetStamper: Stamper not found!" sif::error << "TmPacketBase::checkAndSetStamper: Stamper not found!"
<< std::endl; << std::endl;
#endif #endif

View File

@ -105,7 +105,7 @@ bool TmPacketStored::checkAndSetStore() {
if (store == nullptr) { if (store == nullptr) {
store = objectManager->get<StorageManagerIF>(objects::TM_STORE); store = objectManager->get<StorageManagerIF>(objects::TM_STORE);
if (store == nullptr) { if (store == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmPacketStored::TmPacketStored: TM Store not found!" sif::error << "TmPacketStored::TmPacketStored: TM Store not found!"
<< std::endl; << std::endl;
#endif #endif

View File

@ -75,7 +75,7 @@ ReturnValue_t CommandingServiceBase::initialize() {
packetSource); packetSource);
if (packetForwarding == nullptr or distributor == nullptr) { if (packetForwarding == nullptr or distributor == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CommandingServiceBase::intialize: Packet source or " sif::error << "CommandingServiceBase::intialize: Packet source or "
"packet destination invalid!" << std::endl; "packet destination invalid!" << std::endl;
#endif #endif
@ -90,7 +90,7 @@ ReturnValue_t CommandingServiceBase::initialize() {
TCStore = objectManager->get<StorageManagerIF>(objects::TC_STORE); TCStore = objectManager->get<StorageManagerIF>(objects::TC_STORE);
if (IPCStore == nullptr or TCStore == nullptr) { if (IPCStore == nullptr or TCStore == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "CommandingServiceBase::intialize: IPC store or TC store " sif::error << "CommandingServiceBase::intialize: IPC store or TC store "
"not initialized yet!" << std::endl; "not initialized yet!" << std::endl;
#endif #endif

View File

@ -25,7 +25,7 @@ ReturnValue_t PusServiceBase::performOperation(uint8_t opCode) {
handleRequestQueue(); handleRequestQueue();
ReturnValue_t result = this->performService(); ReturnValue_t result = this->performService();
if (result != RETURN_OK) { if (result != RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PusService " << (uint16_t) this->serviceId sif::error << "PusService " << (uint16_t) this->serviceId
<< ": performService returned with " << (int16_t) result << ": performService returned with " << (int16_t) result
<< std::endl; << std::endl;
@ -45,7 +45,7 @@ void PusServiceBase::handleRequestQueue() {
for (uint8_t count = 0; count < PUS_SERVICE_MAX_RECEPTION; count++) { for (uint8_t count = 0; count < PUS_SERVICE_MAX_RECEPTION; count++) {
ReturnValue_t status = this->requestQueue->receiveMessage(&message); ReturnValue_t status = this->requestQueue->receiveMessage(&message);
// if(status != MessageQueueIF::EMPTY) { // if(status != MessageQueueIF::EMPTY) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// sif::debug << "PusServiceBase::performOperation: Receiving from " // sif::debug << "PusServiceBase::performOperation: Receiving from "
// << "MQ ID: " << std::hex << "0x" << std::setw(8) // << "MQ ID: " << std::hex << "0x" << std::setw(8)
// << std::setfill('0') << this->requestQueue->getId() // << std::setfill('0') << this->requestQueue->getId()
@ -83,7 +83,7 @@ void PusServiceBase::handleRequestQueue() {
break; break;
} }
else { else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PusServiceBase::performOperation: Service " sif::error << "PusServiceBase::performOperation: Service "
<< this->serviceId << ": Error receiving packet. Code: " << this->serviceId << ": Error receiving packet. Code: "
<< std::hex << status << std::dec << std::endl; << std::hex << status << std::dec << std::endl;
@ -110,7 +110,7 @@ ReturnValue_t PusServiceBase::initialize() {
PUSDistributorIF* distributor = objectManager->get<PUSDistributorIF>( PUSDistributorIF* distributor = objectManager->get<PUSDistributorIF>(
packetSource); packetSource);
if (destService == nullptr or distributor == nullptr) { if (destService == nullptr or distributor == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "PusServiceBase::PusServiceBase: Service " sif::error << "PusServiceBase::PusServiceBase: Service "
<< this->serviceId << ": Configuration error. Make sure " << this->serviceId << ": Configuration error. Make sure "
<< "packetSource and packetDestination are defined correctly" << "packetSource and packetDestination are defined correctly"

View File

@ -23,7 +23,7 @@ ReturnValue_t TmTcBridge::setNumberOfSentPacketsPerCycle(
return RETURN_OK; return RETURN_OK;
} }
else { else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "TmTcBridge::setNumberOfSentPacketsPerCycle: Number of " sif::warning << "TmTcBridge::setNumberOfSentPacketsPerCycle: Number of "
<< "packets sent per cycle exceeds limits. " << "packets sent per cycle exceeds limits. "
<< "Keeping default value." << std::endl; << "Keeping default value." << std::endl;
@ -39,7 +39,7 @@ ReturnValue_t TmTcBridge::setMaxNumberOfPacketsStored(
return RETURN_OK; return RETURN_OK;
} }
else { else {
#if 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. " << "packets stored exceeds limits. "
<< "Keeping default value." << std::endl; << "Keeping default value." << std::endl;
@ -51,7 +51,7 @@ ReturnValue_t TmTcBridge::setMaxNumberOfPacketsStored(
ReturnValue_t TmTcBridge::initialize() { ReturnValue_t TmTcBridge::initialize() {
tcStore = objectManager->get<StorageManagerIF>(tcStoreId); tcStore = objectManager->get<StorageManagerIF>(tcStoreId);
if (tcStore == nullptr) { if (tcStore == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcBridge::initialize: TC store invalid. Make sure" sif::error << "TmTcBridge::initialize: TC store invalid. Make sure"
"it is created and set up properly." << std::endl; "it is created and set up properly." << std::endl;
#endif #endif
@ -59,7 +59,7 @@ ReturnValue_t TmTcBridge::initialize() {
} }
tmStore = objectManager->get<StorageManagerIF>(tmStoreId); tmStore = objectManager->get<StorageManagerIF>(tmStoreId);
if (tmStore == nullptr) { if (tmStore == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcBridge::initialize: TM store invalid. Make sure" sif::error << "TmTcBridge::initialize: TM store invalid. Make sure"
"it is created and set up properly." << std::endl; "it is created and set up properly." << std::endl;
#endif #endif
@ -68,7 +68,7 @@ ReturnValue_t TmTcBridge::initialize() {
AcceptsTelecommandsIF* tcDistributor = AcceptsTelecommandsIF* tcDistributor =
objectManager->get<AcceptsTelecommandsIF>(tcDestination); objectManager->get<AcceptsTelecommandsIF>(tcDestination);
if (tcDistributor == nullptr) { if (tcDistributor == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcBridge::initialize: TC Distributor invalid" sif::error << "TmTcBridge::initialize: TC Distributor invalid"
<< std::endl; << std::endl;
#endif #endif
@ -85,14 +85,14 @@ ReturnValue_t TmTcBridge::performOperation(uint8_t operationCode) {
ReturnValue_t result; ReturnValue_t result;
result = handleTc(); result = handleTc();
if(result != RETURN_OK) { if(result != RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "TmTcBridge::performOperation: " sif::debug << "TmTcBridge::performOperation: "
<< "Error handling TCs" << std::endl; << "Error handling TCs" << std::endl;
#endif #endif
} }
result = handleTm(); result = handleTm();
if (result != RETURN_OK) { if (result != RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "TmTcBridge::performOperation: " sif::debug << "TmTcBridge::performOperation: "
<< "Error handling TMs" << std::endl; << "Error handling TMs" << std::endl;
#endif #endif
@ -108,7 +108,7 @@ ReturnValue_t TmTcBridge::handleTm() {
ReturnValue_t status = HasReturnvaluesIF::RETURN_OK; ReturnValue_t status = HasReturnvaluesIF::RETURN_OK;
ReturnValue_t result = handleTmQueue(); ReturnValue_t result = handleTmQueue();
if(result != RETURN_OK) { if(result != RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcBridge::handleTm: Error handling TM queue with " sif::error << "TmTcBridge::handleTm: Error handling TM queue with "
<< "error code 0x" << std::hex << result << std::dec << "error code 0x" << std::hex << result << std::dec
<< "!" << std::endl; << "!" << std::endl;
@ -120,7 +120,7 @@ ReturnValue_t TmTcBridge::handleTm() {
(packetSentCounter < sentPacketsPerCycle)) { (packetSentCounter < sentPacketsPerCycle)) {
result = handleStoredTm(); result = handleStoredTm();
if(result != RETURN_OK) { if(result != RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmTcBridge::handleTm: Error handling stored TMs!" sif::error << "TmTcBridge::handleTm: Error handling stored TMs!"
<< std::endl; << std::endl;
#endif #endif
@ -140,7 +140,7 @@ ReturnValue_t TmTcBridge::handleTmQueue() {
result == HasReturnvaluesIF::RETURN_OK; result == HasReturnvaluesIF::RETURN_OK;
result = tmTcReceptionQueue->receiveMessage(&message)) result = tmTcReceptionQueue->receiveMessage(&message))
{ {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
//sif::info << (int) packetSentCounter << std::endl; //sif::info << (int) packetSentCounter << std::endl;
#endif #endif
if(communicationLinkUp == false or if(communicationLinkUp == false or
@ -171,7 +171,7 @@ ReturnValue_t TmTcBridge::storeDownlinkData(TmTcMessage *message) {
store_address_t storeId = 0; store_address_t storeId = 0;
if(tmFifo->full()) { if(tmFifo->full()) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "TmTcBridge::storeDownlinkData: TM downlink max. number " sif::debug << "TmTcBridge::storeDownlinkData: TM downlink max. number "
<< "of stored packet IDs reached! " << std::endl; << "of stored packet IDs reached! " << std::endl;
#endif #endif
@ -193,7 +193,7 @@ ReturnValue_t TmTcBridge::storeDownlinkData(TmTcMessage *message) {
ReturnValue_t TmTcBridge::handleStoredTm() { ReturnValue_t TmTcBridge::handleStoredTm() {
ReturnValue_t status = RETURN_OK; ReturnValue_t status = RETURN_OK;
while(not tmFifo->empty() and packetSentCounter < sentPacketsPerCycle) { while(not tmFifo->empty() and packetSentCounter < sentPacketsPerCycle) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
//sif::info << "TMTC Bridge: Sending stored TM data. There are " //sif::info << "TMTC Bridge: Sending stored TM data. There are "
// << (int) tmFifo->size() << " left to send\r\n" << std::flush; // << (int) tmFifo->size() << " left to send\r\n" << std::flush;
#endif #endif
@ -209,7 +209,7 @@ ReturnValue_t TmTcBridge::handleStoredTm() {
result = sendTm(data,size); result = sendTm(data,size);
if(result != RETURN_OK) { if(result != RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TMTC Bridge: Could not send stored downlink data" sif::error << "TMTC Bridge: Could not send stored downlink data"
<< std::endl; << std::endl;
#endif #endif
@ -227,7 +227,7 @@ ReturnValue_t TmTcBridge::handleStoredTm() {
void TmTcBridge::registerCommConnect() { void TmTcBridge::registerCommConnect() {
if(not communicationLinkUp) { if(not communicationLinkUp) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
//sif::info << "TMTC Bridge: Registered Comm Link Connect" << std::endl; //sif::info << "TMTC Bridge: Registered Comm Link Connect" << std::endl;
#endif #endif
communicationLinkUp = true; communicationLinkUp = true;
@ -235,7 +235,7 @@ void TmTcBridge::registerCommConnect() {
} }
void TmTcBridge::registerCommDisconnect() { void TmTcBridge::registerCommDisconnect() {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
//sif::info << "TMTC Bridge: Registered Comm Link Disconnect" << std::endl; //sif::info << "TMTC Bridge: Registered Comm Link Disconnect" << std::endl;
#endif #endif
if(communicationLinkUp) { if(communicationLinkUp) {

View File

@ -27,7 +27,7 @@ void VerificationReporter::sendSuccessReport(uint8_t set_report_id,
ReturnValue_t status = MessageQueueSenderIF::sendMessage(acknowledgeQueue, ReturnValue_t status = MessageQueueSenderIF::sendMessage(acknowledgeQueue,
&message); &message);
if (status != HasReturnvaluesIF::RETURN_OK) { if (status != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "VerificationReporter::sendSuccessReport: Error writing " sif::error << "VerificationReporter::sendSuccessReport: Error writing "
<< "to queue. Code: " << std::hex << status << std::dec << "to queue. Code: " << std::hex << status << std::dec
<< std::endl; << std::endl;
@ -46,7 +46,7 @@ void VerificationReporter::sendSuccessReport(uint8_t set_report_id,
ReturnValue_t status = MessageQueueSenderIF::sendMessage(acknowledgeQueue, ReturnValue_t status = MessageQueueSenderIF::sendMessage(acknowledgeQueue,
&message); &message);
if (status != HasReturnvaluesIF::RETURN_OK) { if (status != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "VerificationReporter::sendSuccessReport: Error writing " sif::error << "VerificationReporter::sendSuccessReport: Error writing "
<< "to queue. Code: " << std::hex << status << std::dec << "to queue. Code: " << std::hex << status << std::dec
<< std::endl; << std::endl;
@ -68,7 +68,7 @@ void VerificationReporter::sendFailureReport(uint8_t report_id,
ReturnValue_t status = MessageQueueSenderIF::sendMessage(acknowledgeQueue, ReturnValue_t status = MessageQueueSenderIF::sendMessage(acknowledgeQueue,
&message); &message);
if (status != HasReturnvaluesIF::RETURN_OK) { if (status != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "VerificationReporter::sendFailureReport: Error writing " sif::error << "VerificationReporter::sendFailureReport: Error writing "
<< "to queue. Code: " << std::hex << "0x" << status << std::dec << "to queue. Code: " << std::hex << "0x" << status << std::dec
<< std::endl; << std::endl;
@ -88,7 +88,7 @@ void VerificationReporter::sendFailureReport(uint8_t report_id,
ReturnValue_t status = MessageQueueSenderIF::sendMessage(acknowledgeQueue, ReturnValue_t status = MessageQueueSenderIF::sendMessage(acknowledgeQueue,
&message); &message);
if (status != HasReturnvaluesIF::RETURN_OK) { if (status != HasReturnvaluesIF::RETURN_OK) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "VerificationReporter::sendFailureReport: Error writing " sif::error << "VerificationReporter::sendFailureReport: Error writing "
<< "to queue. Code: " << std::hex << "0x" << status << std::dec << "to queue. Code: " << std::hex << "0x" << status << std::dec
<< std::endl; << std::endl;
@ -98,7 +98,7 @@ void VerificationReporter::sendFailureReport(uint8_t report_id,
void VerificationReporter::initialize() { void VerificationReporter::initialize() {
if(messageReceiver == objects::NO_OBJECT) { if(messageReceiver == objects::NO_OBJECT) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "VerificationReporter::initialize: Verification message" sif::warning << "VerificationReporter::initialize: Verification message"
" receiver object ID not set yet in Factory!" << std::endl; " receiver object ID not set yet in Factory!" << std::endl;
#endif #endif
@ -107,7 +107,7 @@ void VerificationReporter::initialize() {
AcceptsVerifyMessageIF* temp = objectManager->get<AcceptsVerifyMessageIF>( AcceptsVerifyMessageIF* temp = objectManager->get<AcceptsVerifyMessageIF>(
messageReceiver); messageReceiver);
if (temp == nullptr) { if (temp == nullptr) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "VerificationReporter::initialize: Message " sif::error << "VerificationReporter::initialize: Message "
<< "receiver invalid. Make sure it is set up properly and " << "receiver invalid. Make sure it is set up properly and "
<< "implementsAcceptsVerifyMessageIF" << std::endl; << "implementsAcceptsVerifyMessageIF" << std::endl;

View File

@ -13,7 +13,7 @@ InternalUnitTester::InternalUnitTester() {}
InternalUnitTester::~InternalUnitTester() {} InternalUnitTester::~InternalUnitTester() {}
ReturnValue_t InternalUnitTester::performTests() { ReturnValue_t InternalUnitTester::performTests() {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Running internal unit tests.." << std::endl; sif::info << "Running internal unit tests.." << std::endl;
#endif #endif
testserialize::test_serialization(); testserialize::test_serialization();
@ -21,7 +21,7 @@ ReturnValue_t InternalUnitTester::performTests() {
testsemaph::testBinSemaph(); testsemaph::testBinSemaph();
testsemaph::testCountingSemaph(); testsemaph::testCountingSemaph();
testmutex::testMutex(); testmutex::testMutex();
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Internal unit tests finished." << std::endl; sif::info << "Internal unit tests finished." << std::endl;
#endif #endif
return RETURN_OK; return RETURN_OK;

View File

@ -1,7 +1,7 @@
#include "UnittDefinitions.h" #include "UnittDefinitions.h"
ReturnValue_t unitt::put_error(std::string errorId) { ReturnValue_t unitt::put_error(std::string errorId) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Unit Tester error: Failed at test ID " sif::error << "Unit Tester error: Failed at test ID "
<< errorId << "\n" << std::flush; << errorId << "\n" << std::flush;
#endif #endif

View File

@ -94,7 +94,7 @@ void testsemaph::testBinSemaphoreImplementation(SemaphoreIF* binSemaph,
result = binSemaph->acquire(SemaphoreIF::TimeoutType::WAITING, 10); result = binSemaph->acquire(SemaphoreIF::TimeoutType::WAITING, 10);
//dur_millis_t time = stopwatch.stop(); //dur_millis_t time = stopwatch.stop();
// if(abs(time - 10) > 2) { // if(abs(time - 10) > 2) {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
// sif::error << "UnitTester: Semaphore timeout measured incorrect." // sif::error << "UnitTester: Semaphore timeout measured incorrect."
// << std::endl; // << std::endl;
#endif #endif

View File

@ -15,7 +15,7 @@ ReturnValue_t pst::pollingSequenceInitDefault(
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
else { else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "pst::pollingSequenceInitDefault: Sequence invalid!" sif::error << "pst::pollingSequenceInitDefault: Sequence invalid!"
<< std::endl; << std::endl;
#endif #endif

View File

@ -5,7 +5,7 @@ StorageManagerIF* tglob::getIpcStoreHandle() {
if(objectManager != nullptr) { if(objectManager != nullptr) {
return objectManager->get<StorageManagerIF>(objects::IPC_STORE); return objectManager->get<StorageManagerIF>(objects::IPC_STORE);
} else { } else {
#if CPP_OSTREAM_ENABLED == 1 #if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "Global object manager uninitialized" << std::endl; sif::error << "Global object manager uninitialized" << std::endl;
#endif #endif
return nullptr; return nullptr;