better name for preproc define
This commit is contained in:
parent
f357de21c9
commit
e323c69f20
@ -8,12 +8,12 @@
|
|||||||
//! Those can lead to code bloat.
|
//! Those can lead to code bloat.
|
||||||
#define FSFW_CPP_OSTREAM_ENABLED 1
|
#define FSFW_CPP_OSTREAM_ENABLED 1
|
||||||
|
|
||||||
//! Reduced printout to further decrese code size
|
//! Reduced printout to further decrease code size
|
||||||
//! Be careful, this also turns off most diagnostic prinouts!
|
//! Be careful, this also turns off most diagnostic prinouts!
|
||||||
#define FSFW_REDUCED_PRINTOUT 0
|
#define FSFW_ENHANCED_PRINTOUT 0
|
||||||
|
|
||||||
//! Can be used to enable debugging printouts for developing the FSFW
|
//! Can be used to enable additional debugging printouts for developing the FSFW
|
||||||
#define FSFW_DEBUGGING 0
|
#define FSFW_PRINT_VERBOSITY_LEVEL 0
|
||||||
|
|
||||||
//! Defines the FIFO depth of each commanding service base which
|
//! Defines the FIFO depth of each commanding service base which
|
||||||
//! also determines how many commands a CSB service can handle in one cycle
|
//! also determines how many commands a CSB service can handle in one cycle
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "LocalPool.h"
|
#include "LocalPool.h"
|
||||||
|
#include <FSFWConfig.h>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
LocalPool::LocalPool(object_id_t setObjectId, const LocalPoolConfig& poolConfig,
|
LocalPool::LocalPool(object_id_t setObjectId, const LocalPoolConfig& poolConfig,
|
||||||
@ -116,7 +117,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_DEBUGGING == 1
|
#if FSFW_VERBOSE_PRINTOUT == 2
|
||||||
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;
|
||||||
|
|
||||||
@ -155,7 +156,7 @@ ReturnValue_t LocalPool::deleteData(uint8_t *ptr, size_t size,
|
|||||||
// element of an object.
|
// element of an object.
|
||||||
localId.packetIndex = deltaAddress / elementSizes[n];
|
localId.packetIndex = deltaAddress / elementSizes[n];
|
||||||
result = deleteData(localId);
|
result = deleteData(localId);
|
||||||
#if FSFW_DEBUGGING == 1
|
#if FSFW_VERBOSE_PRINTOUT == 2
|
||||||
if (deltaAddress % elementSizes[n] != 0) {
|
if (deltaAddress % elementSizes[n] != 0) {
|
||||||
sif::error << "LocalPool::deleteData: Address not aligned!"
|
sif::error << "LocalPool::deleteData: Address not aligned!"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
@ -222,7 +223,7 @@ ReturnValue_t LocalPool::reserveSpace(const size_t size,
|
|||||||
status = findEmpty(storeId->poolIndex, &storeId->packetIndex);
|
status = findEmpty(storeId->poolIndex, &storeId->packetIndex);
|
||||||
}
|
}
|
||||||
if (status == RETURN_OK) {
|
if (status == RETURN_OK) {
|
||||||
#if FSFW_DEBUGGING == 1
|
#if FSFW_VERBOSE_PRINTOUT == 2
|
||||||
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;
|
||||||
@ -264,7 +265,7 @@ void LocalPool::setToSpillToHigherPools(bool enable) {
|
|||||||
ReturnValue_t LocalPool::getPoolIndex(size_t packetSize, uint16_t *poolIndex,
|
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_DEBUGGING == 1
|
#if FSFW_VERBOSE_PRINTOUT == 2
|
||||||
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
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "PoolManager.h"
|
#include "PoolManager.h"
|
||||||
|
#include <FSFWConfig.h>
|
||||||
|
|
||||||
PoolManager::PoolManager(object_id_t setObjectId,
|
PoolManager::PoolManager(object_id_t setObjectId,
|
||||||
const LocalPoolConfig& localPoolConfig):
|
const LocalPoolConfig& localPoolConfig):
|
||||||
@ -24,7 +25,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_DEBUGGING == 1
|
#if FSFW_VERBOSE_PRINTOUT == 2
|
||||||
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;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#define FSFW_REDUCED_PRINTOUT 0
|
#define FSFW_REDUCED_PRINTOUT 0
|
||||||
|
|
||||||
//! Can be used to enable debugging printouts for developing the FSFW
|
//! Can be used to enable debugging printouts for developing the FSFW
|
||||||
#define FSFW_DEBUGGING 0
|
#define FSFW_VERBOSE_PRINTOUT 0
|
||||||
|
|
||||||
//! Defines the FIFO depth of each commanding service base which
|
//! Defines the FIFO depth of each commanding service base which
|
||||||
//! also determines how many commands a CSB service can handle in one cycle
|
//! also determines how many commands a CSB service can handle in one cycle
|
||||||
|
Loading…
Reference in New Issue
Block a user