1
0
forked from fsfw/fsfw

correct preprocessor define now used

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

View File

@ -13,21 +13,21 @@ PoolDataSetBase::~PoolDataSetBase() {}
ReturnValue_t PoolDataSetBase::registerVariable(
PoolVariableIF *variable) {
if (state != States::STATE_SET_UNINITIALISED) {
#if CPP_OSTREAM_ENABLED == 1
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DataSet::registerVariable: "
"Call made in wrong position." << std::endl;
#endif
return DataSetIF::DATA_SET_UNINITIALISED;
}
if (variable == nullptr) {
#if CPP_OSTREAM_ENABLED == 1
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DataSet::registerVariable: "
"Pool variable is nullptr." << std::endl;
#endif
return DataSetIF::POOL_VAR_NULL;
}
if (fillCount >= maxFillCount) {
#if CPP_OSTREAM_ENABLED == 1
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DataSet::registerVariable: "
"DataSet is full." << std::endl;
#endif
@ -53,7 +53,7 @@ ReturnValue_t PoolDataSetBase::read(uint32_t lockTimeout) {
unlockDataPool();
}
else {
#if CPP_OSTREAM_ENABLED == 1
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "DataSet::read(): "
"Call made in wrong position. Don't forget to commit"
" member datasets!" << std::endl;
@ -146,7 +146,7 @@ ReturnValue_t PoolDataSetBase::handleUnreadDatasetCommit(uint32_t lockTimeout) {
} else if (registeredVariables[count]->getDataPoolId()
!= PoolVariableIF::NO_PARAMETER) {
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 "
"with non write-only variable." << std::endl;
#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());
}
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"
"length! Performing zero initialization with given setLength"
<< std::endl;
@ -70,12 +70,12 @@ bool PoolEntry<T>::getValid() {
template <typename T>
void PoolEntry<T>::print() {
#if CPP_OSTREAM_ENABLED == 1
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::debug << "Pool Entry Validity: " <<
(this->valid? " (valid) " : " (invalid) ") << std::endl;
#endif
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;
#endif
}