Compare commits

...

2 Commits

Author SHA1 Message Date
f518bc53db moved old loggers to archive 2022-05-09 01:14:23 +02:00
b45b6b3758 replace FLOG with LOG variants 2022-05-09 00:25:48 +02:00
100 changed files with 315 additions and 377 deletions

View File

@@ -199,7 +199,7 @@ ReturnValue_t MgmLIS3MDLHandler::scanForReply(const uint8_t *start, size_t len,
*foundId = getPendingCommand();
if (*foundId == MGMLIS3MDL::IDENTIFY_DEVICE) {
if (start[1] != MGMLIS3MDL::DEVICE_ID) {
FSFW_FLOGW(
FSFW_LOGW(
"scanForReply: Device identification failed, found ID {} not equal to expected {}\n",
start[1], MGMLIS3MDL::DEVICE_ID);
return DeviceHandlerIF::INVALID_DATA;

View File

@@ -61,7 +61,7 @@ ReturnValue_t CommandExecutor::close() {
void CommandExecutor::printLastError(const std::string& funcName) const {
if (lastError != 0) {
FSFW_FLOGW("{} | pclose failed with code {} | {}\n", funcName, lastError, strerror(lastError));
FSFW_LOGW("{} | pclose failed with code {} | {}\n", funcName, lastError, strerror(lastError));
}
}

View File

@@ -26,7 +26,7 @@ ReturnValue_t I2cComIF::initializeInterface(CookieIF* cookie) {
std::string deviceFile;
if (cookie == nullptr) {
FSFW_FLOGE("{}", "initializeInterface: Invalid cookie\n");
FSFW_LOGE("{}", "initializeInterface: Invalid cookie\n");
return NULLPOINTER;
}
auto* i2cCookie = dynamic_cast<I2cCookie*>(cookie);
@@ -38,14 +38,14 @@ ReturnValue_t I2cComIF::initializeInterface(CookieIF* cookie) {
I2cInstance i2cInstance = {std::vector<uint8_t>(maxReplyLen), 0};
auto statusPair = i2cDeviceMap.emplace(i2cAddress, i2cInstance);
if (not statusPair.second) {
FSFW_FLOGW("initializeInterface: Failed to insert device with address {} to I2C device map\n",
i2cAddress);
FSFW_LOGW("initializeInterface: Failed to insert device with address {} to I2C device map\n",
i2cAddress);
return HasReturnvaluesIF::RETURN_FAILED;
}
return HasReturnvaluesIF::RETURN_OK;
}
FSFW_FLOGE("initializeInterface: Device with address {} already in use\n", i2cAddress);
FSFW_LOGE("initializeInterface: Device with address {} already in use\n", i2cAddress);
return HasReturnvaluesIF::RETURN_FAILED;
}
@@ -55,7 +55,7 @@ ReturnValue_t I2cComIF::sendMessage(CookieIF* cookie, const uint8_t* sendData, s
std::string deviceFile;
if (sendData == nullptr) {
FSFW_FLOGW("{}", "sendMessage: Send Data is nullptr\n");
FSFW_LOGW("{}", "sendMessage: Send Data is nullptr\n");
return HasReturnvaluesIF::RETURN_FAILED;
}
@@ -65,14 +65,14 @@ ReturnValue_t I2cComIF::sendMessage(CookieIF* cookie, const uint8_t* sendData, s
auto* i2cCookie = dynamic_cast<I2cCookie*>(cookie);
if (i2cCookie == nullptr) {
FSFW_FLOGWT("{}", "sendMessage: Invalid I2C Cookie\n");
FSFW_LOGWT("{}", "sendMessage: Invalid I2C Cookie\n");
return NULLPOINTER;
}
address_t i2cAddress = i2cCookie->getAddress();
i2cDeviceMapIter = i2cDeviceMap.find(i2cAddress);
if (i2cDeviceMapIter == i2cDeviceMap.end()) {
FSFW_FLOGWT("{}", "sendMessage: I2C address of cookie not registered in I2C device map\n");
FSFW_LOGWT("{}", "sendMessage: I2C address of cookie not registered in I2C device map\n");
return HasReturnvaluesIF::RETURN_FAILED;
}
@@ -87,8 +87,8 @@ ReturnValue_t I2cComIF::sendMessage(CookieIF* cookie, const uint8_t* sendData, s
}
if (write(fd, sendData, sendLen) != static_cast<int>(sendLen)) {
FSFW_FLOGE("sendMessage: Failed to send data to I2C device with error code {} | {}\n", errno,
strerror(errno));
FSFW_LOGE("sendMessage: Failed to send data to I2C device with error code {} | {}\n", errno,
strerror(errno));
return HasReturnvaluesIF::RETURN_FAILED;
}
@@ -112,7 +112,7 @@ ReturnValue_t I2cComIF::requestReceiveMessage(CookieIF* cookie, size_t requestLe
auto* i2cCookie = dynamic_cast<I2cCookie*>(cookie);
if (i2cCookie == nullptr) {
FSFW_FLOGWT("{}", "requestReceiveMessage: Invalid I2C Cookie\n");
FSFW_LOGWT("{}", "requestReceiveMessage: Invalid I2C Cookie\n");
i2cDeviceMapIter->second.replyLen = 0;
return NULLPOINTER;
}
@@ -120,8 +120,8 @@ ReturnValue_t I2cComIF::requestReceiveMessage(CookieIF* cookie, size_t requestLe
address_t i2cAddress = i2cCookie->getAddress();
i2cDeviceMapIter = i2cDeviceMap.find(i2cAddress);
if (i2cDeviceMapIter == i2cDeviceMap.end()) {
FSFW_FLOGW("requestReceiveMessage: I2C address {} of Cookie not registered in i2cDeviceMap",
i2cAddress);
FSFW_LOGW("requestReceiveMessage: I2C address {} of Cookie not registered in i2cDeviceMap",
i2cAddress);
i2cDeviceMapIter->second.replyLen = 0;
return HasReturnvaluesIF::RETURN_FAILED;
}
@@ -141,7 +141,7 @@ ReturnValue_t I2cComIF::requestReceiveMessage(CookieIF* cookie, size_t requestLe
ssize_t readLen = read(fd, replyBuffer, requestLen);
if (readLen != static_cast<int>(requestLen)) {
FSFW_FLOGWT(
FSFW_LOGWT(
"requestReceiveMessage: Reading from I2C device failed with error code "
"{} | {}\nRead only {} from {} bytes\n",
errno, strerror(errno), readLen, requestLen);
@@ -161,15 +161,15 @@ ReturnValue_t I2cComIF::requestReceiveMessage(CookieIF* cookie, size_t requestLe
ReturnValue_t I2cComIF::readReceivedMessage(CookieIF* cookie, uint8_t** buffer, size_t* size) {
auto* i2cCookie = dynamic_cast<I2cCookie*>(cookie);
if (i2cCookie == nullptr) {
FSFW_FLOGW("{}", "readReceivedMessage: Invalid I2C Cookie\n");
FSFW_LOGW("{}", "readReceivedMessage: Invalid I2C Cookie\n");
return NULLPOINTER;
}
address_t i2cAddress = i2cCookie->getAddress();
i2cDeviceMapIter = i2cDeviceMap.find(i2cAddress);
if (i2cDeviceMapIter == i2cDeviceMap.end()) {
FSFW_FLOGE("readReceivedMessage: I2C address {} of cookie not found in I2C device map\n",
i2cAddress);
FSFW_LOGE("readReceivedMessage: I2C address {} of cookie not found in I2C device map\n",
i2cAddress);
return HasReturnvaluesIF::RETURN_FAILED;
}
*buffer = i2cDeviceMapIter->second.replyBuffer.data();
@@ -181,8 +181,8 @@ ReturnValue_t I2cComIF::readReceivedMessage(CookieIF* cookie, uint8_t** buffer,
ReturnValue_t I2cComIF::openDevice(std::string deviceFile, address_t i2cAddress,
int* fileDescriptor) {
if (ioctl(*fileDescriptor, I2C_SLAVE, i2cAddress) < 0) {
FSFW_FLOGWT("openDevice: Specifying target device failed with error code {} | {}\n", errno,
strerror(errno));
FSFW_LOGWT("openDevice: Specifying target device failed with error code {} | {}\n", errno,
strerror(errno));
return HasReturnvaluesIF::RETURN_FAILED;
}
return HasReturnvaluesIF::RETURN_OK;

View File

@@ -19,7 +19,7 @@
SpiComIF::SpiComIF(object_id_t objectId, GpioIF* gpioComIF)
: SystemObject(objectId), gpioComIF(gpioComIF) {
if (gpioComIF == nullptr) {
FSFW_FLOGET("{}", "SpiComIF::SpiComIF: GPIO communication interface invalid\n");
FSFW_LOGET("{}", "SpiComIF::SpiComIF: GPIO communication interface invalid\n");
}
spiMutex = MutexFactory::instance()->createMutex();
@@ -40,7 +40,7 @@ ReturnValue_t SpiComIF::initializeInterface(CookieIF* cookie) {
SpiInstance spiInstance(bufferSize);
auto statusPair = spiDeviceMap.emplace(spiAddress, spiInstance);
if (not statusPair.second) {
FSFW_FLOGWT(
FSFW_LOGWT(
"SpiComIF::initializeInterface: Failed to insert device with address {} to SPI device "
"map\n",
spiAddress);
@@ -50,7 +50,7 @@ ReturnValue_t SpiComIF::initializeInterface(CookieIF* cookie) {
to the SPI driver transfer struct */
spiCookie->assignReadBuffer(statusPair.first->second.replyBuffer.data());
} else {
FSFW_FLOGWT("{}", "initializeInterface: SPI address already exists\n");
FSFW_LOGWT("{}", "initializeInterface: SPI address already exists\n");
return HasReturnvaluesIF::RETURN_FAILED;
}
@@ -123,7 +123,7 @@ ReturnValue_t SpiComIF::sendMessage(CookieIF* cookie, const uint8_t* sendData, s
}
if (sendLen > spiCookie->getMaxBufferSize()) {
FSFW_FLOGW(
FSFW_LOGW(
"sendMessage: Too much data sent, send length {} larger than maximum buffer length {}\n",
spiCookie->getMaxBufferSize(), sendLen);
return DeviceCommunicationIF::TOO_MUCH_DATA;
@@ -173,12 +173,12 @@ ReturnValue_t SpiComIF::performRegularSendOperation(SpiCookie* spiCookie, const
if (gpioId != gpio::NO_GPIO) {
result = spiMutex->lockMutex(timeoutType, timeoutMs);
if (result != RETURN_OK) {
FSFW_FLOGET("{}", "sendMessage: Failed to lock mutex\n");
FSFW_LOGET("{}", "sendMessage: Failed to lock mutex\n");
return result;
}
result = gpioComIF->pullLow(gpioId);
if (result != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGW("{}", "sendMessage: Pulling low CS pin failed\n");
FSFW_LOGW("{}", "sendMessage: Pulling low CS pin failed\n");
return result;
}
}
@@ -197,7 +197,7 @@ ReturnValue_t SpiComIF::performRegularSendOperation(SpiCookie* spiCookie, const
} else {
/* We write with a blocking half-duplex transfer here */
if (write(fileDescriptor, sendData, sendLen) != static_cast<ssize_t>(sendLen)) {
FSFW_FLOGET("{}", "sendMessage: Half-Duplex write operation failed\n");
FSFW_LOGET("{}", "sendMessage: Half-Duplex write operation failed\n");
result = HALF_DUPLEX_TRANSFER_FAILED;
}
}
@@ -206,7 +206,7 @@ ReturnValue_t SpiComIF::performRegularSendOperation(SpiCookie* spiCookie, const
gpioComIF->pullHigh(gpioId);
result = spiMutex->unlockMutex();
if (result != RETURN_OK) {
FSFW_FLOGWT("{}", "sendMessage: Failed to unlock mutex\n");
FSFW_LOGWT("{}", "sendMessage: Failed to unlock mutex\n");
return result;
}
}
@@ -248,14 +248,14 @@ ReturnValue_t SpiComIF::performHalfDuplexReception(SpiCookie* spiCookie) {
if (gpioId != gpio::NO_GPIO) {
result = spiMutex->lockMutex(timeoutType, timeoutMs);
if (result != RETURN_OK) {
FSFW_FLOGW("{}", "getSendSuccess: Failed to lock mutex\n");
FSFW_LOGW("{}", "getSendSuccess: Failed to lock mutex\n");
return result;
}
gpioComIF->pullLow(gpioId);
}
if (read(fileDescriptor, rxBuf, readSize) != static_cast<ssize_t>(readSize)) {
FSFW_FLOGW("{}", "sendMessage: Half-Duplex read operation failed\n");
FSFW_LOGW("{}", "sendMessage: Half-Duplex read operation failed\n");
result = HALF_DUPLEX_TRANSFER_FAILED;
}
@@ -263,7 +263,7 @@ ReturnValue_t SpiComIF::performHalfDuplexReception(SpiCookie* spiCookie) {
gpioComIF->pullHigh(gpioId);
result = spiMutex->unlockMutex();
if (result != RETURN_OK) {
FSFW_FLOGW("{}", "getSendSuccess: Failed to unlock mutex\n");
FSFW_LOGW("{}", "getSendSuccess: Failed to unlock mutex\n");
return result;
}
}

View File

@@ -25,7 +25,7 @@ ReturnValue_t UartComIF::initializeInterface(CookieIF* cookie) {
auto* uartCookie = dynamic_cast<UartCookie*>(cookie);
if (uartCookie == nullptr) {
FSFW_FLOGE("{}", "initializeInterface: Invalid UART Cookie\n");
FSFW_LOGE("{}", "initializeInterface: Invalid UART Cookie\n");
return NULLPOINTER;
}
@@ -41,12 +41,11 @@ ReturnValue_t UartComIF::initializeInterface(CookieIF* cookie) {
UartElements uartElements = {fileDescriptor, std::vector<uint8_t>(maxReplyLen), 0};
auto status = uartDeviceMap.emplace(deviceFile, uartElements);
if (!status.second) {
FSFW_FLOGW("initializeInterface: Failed to insert device {} to UART device map\n",
deviceFile);
FSFW_LOGW("initializeInterface: Failed to insert device {} to UART device map\n", deviceFile);
return RETURN_FAILED;
}
} else {
FSFW_FLOGW("initializeInterface: UART device {} already in use\n", deviceFile);
FSFW_LOGW("initializeInterface: UART device {} already in use\n", deviceFile);
return RETURN_FAILED;
}
@@ -66,14 +65,14 @@ int UartComIF::configureUartPort(UartCookie* uartCookie) {
int fd = open(deviceFile.c_str(), flags);
if (fd < 0) {
FSFW_FLOGW("configureUartPort: Failed to open UART {} with error code {} | {}\n", deviceFile,
errno, strerror(errno));
FSFW_LOGW("configureUartPort: Failed to open UART {} with error code {} | {}\n", deviceFile,
errno, strerror(errno));
return fd;
}
/* Read in existing settings */
if (tcgetattr(fd, &options) != 0) {
FSFW_FLOGW("configureUartPort: Error {} from tcgetattr: {}\n", errno, strerror(errno));
FSFW_LOGW("configureUartPort: Error {} from tcgetattr: {}\n", errno, strerror(errno));
return fd;
}
@@ -94,8 +93,8 @@ int UartComIF::configureUartPort(UartCookie* uartCookie) {
/* Save option settings */
if (tcsetattr(fd, TCSANOW, &options) != 0) {
FSFW_FLOGW("configureUartPort: Failed to set options with error {} | {}\n", errno,
strerror(errno));
FSFW_LOGW("configureUartPort: Failed to set options with error {} | {}\n", errno,
strerror(errno));
return fd;
}
return fd;
@@ -147,8 +146,8 @@ void UartComIF::setDatasizeOptions(struct termios* options, UartCookie* uartCook
options->c_cflag |= CS8;
break;
default:
FSFW_FLOGW("setDatasizeOptions: Invalid size {} specified\n",
static_cast<unsigned int>(uartCookie->getBitsPerWord()));
FSFW_LOGW("setDatasizeOptions: Invalid size {} specified\n",
static_cast<unsigned int>(uartCookie->getBitsPerWord()));
break;
}
}
@@ -301,7 +300,7 @@ void UartComIF::configureBaudrate(struct termios* options, UartCookie* uartCooki
break;
#endif // ! __APPLE__
default:
FSFW_FLOGW("{}", "UartComIF::configureBaudrate: Baudrate not supported\n");
FSFW_LOGW("{}", "UartComIF::configureBaudrate: Baudrate not supported\n");
break;
}
}
@@ -316,27 +315,27 @@ ReturnValue_t UartComIF::sendMessage(CookieIF* cookie, const uint8_t* sendData,
}
if (sendData == nullptr) {
FSFW_FLOGWT("{}", "sendMessage: Send data is nullptr");
FSFW_LOGWT("{}", "sendMessage: Send data is nullptr");
return RETURN_FAILED;
}
auto* uartCookie = dynamic_cast<UartCookie*>(cookie);
if (uartCookie == nullptr) {
FSFW_FLOGWT("{}", "sendMessage: Invalid UART Cookie\n");
FSFW_LOGWT("{}", "sendMessage: Invalid UART Cookie\n");
return NULLPOINTER;
}
deviceFile = uartCookie->getDeviceFile();
uartDeviceMapIter = uartDeviceMap.find(deviceFile);
if (uartDeviceMapIter == uartDeviceMap.end()) {
FSFW_FLOGWT("{}", "sendMessage: Device file {} not in UART map\n", deviceFile);
FSFW_LOGWT("{}", "sendMessage: Device file {} not in UART map\n", deviceFile);
return RETURN_FAILED;
}
fd = uartDeviceMapIter->second.fileDescriptor;
if (write(fd, sendData, sendLen) != static_cast<int>(sendLen)) {
FSFW_FLOGE("sendMessage: Failed to send data with error code {} | {}", errno, strerror(errno));
FSFW_LOGE("sendMessage: Failed to send data with error code {} | {}", errno, strerror(errno));
return RETURN_FAILED;
}
@@ -351,7 +350,7 @@ ReturnValue_t UartComIF::requestReceiveMessage(CookieIF* cookie, size_t requestL
auto* uartCookie = dynamic_cast<UartCookie*>(cookie);
if (uartCookie == nullptr) {
FSFW_FLOGWT("{}", "requestReceiveMessage: Invalid UART Cookie\n");
FSFW_LOGWT("{}", "requestReceiveMessage: Invalid UART Cookie\n");
return NULLPOINTER;
}
@@ -364,7 +363,7 @@ ReturnValue_t UartComIF::requestReceiveMessage(CookieIF* cookie, size_t requestL
}
if (uartDeviceMapIter == uartDeviceMap.end()) {
FSFW_FLOGW("requestReceiveMessage: Device file {} not in UART map\n", deviceFile);
FSFW_LOGW("requestReceiveMessage: Device file {} not in UART map\n", deviceFile);
return RETURN_FAILED;
}
@@ -393,7 +392,7 @@ ReturnValue_t UartComIF::handleCanonicalRead(UartCookie& uartCookie, UartDeviceM
if (currentBytesRead >= maxReplySize) {
// Overflow risk. Emit warning, trigger event and break. If this happens,
// the reception buffer is not large enough or data is not polled often enough.
FSFW_FLOGWT("{}", "requestReceiveMessage: Next read would cause overflow\n");
FSFW_LOGWT("{}", "requestReceiveMessage: Next read would cause overflow\n");
result = UART_RX_BUFFER_TOO_SMALL;
break;
} else {
@@ -404,7 +403,7 @@ ReturnValue_t UartComIF::handleCanonicalRead(UartCookie& uartCookie, UartDeviceM
if (bytesRead < 0) {
// EAGAIN: No data available in non-blocking mode
if (errno != EAGAIN) {
FSFW_FLOGWT("handleCanonicalRead: read failed with code {} | {}\n", errno, strerror(errno));
FSFW_LOGWT("handleCanonicalRead: read failed with code {} | {}\n", errno, strerror(errno));
return RETURN_FAILED;
}
@@ -424,7 +423,7 @@ ReturnValue_t UartComIF::handleNoncanonicalRead(UartCookie& uartCookie, UartDevi
auto bufferPtr = iter->second.replyBuffer.data();
// Size check to prevent buffer overflow
if (requestLen > uartCookie.getMaxReplyLen()) {
FSFW_FLOGW("{}", "requestReceiveMessage: Next read would cause overflow\n");
FSFW_LOGW("{}", "requestReceiveMessage: Next read would cause overflow\n");
return UART_RX_BUFFER_TOO_SMALL;
}
ssize_t bytesRead = read(fd, bufferPtr, requestLen);
@@ -432,8 +431,8 @@ ReturnValue_t UartComIF::handleNoncanonicalRead(UartCookie& uartCookie, UartDevi
return RETURN_FAILED;
} else if (bytesRead != static_cast<int>(requestLen)) {
if (uartCookie.isReplySizeFixed()) {
FSFW_FLOGWT("UartComIF::requestReceiveMessage: Only read {} of {} bytes\n", bytesRead,
requestLen);
FSFW_LOGWT("UartComIF::requestReceiveMessage: Only read {} of {} bytes\n", bytesRead,
requestLen);
return RETURN_FAILED;
}
}
@@ -447,14 +446,14 @@ ReturnValue_t UartComIF::readReceivedMessage(CookieIF* cookie, uint8_t** buffer,
auto* uartCookie = dynamic_cast<UartCookie*>(cookie);
if (uartCookie == nullptr) {
FSFW_FLOGWT("{}", "readReceivedMessage: Invalid uart cookie");
FSFW_LOGWT("{}", "readReceivedMessage: Invalid uart cookie");
return NULLPOINTER;
}
deviceFile = uartCookie->getDeviceFile();
uartDeviceMapIter = uartDeviceMap.find(deviceFile);
if (uartDeviceMapIter == uartDeviceMap.end()) {
FSFW_FLOGW("UartComIF::readReceivedMessage: Device file {} not in UART map\n", deviceFile);
FSFW_LOGW("UartComIF::readReceivedMessage: Device file {} not in UART map\n", deviceFile);
return RETURN_FAILED;
}
@@ -472,7 +471,7 @@ ReturnValue_t UartComIF::flushUartRxBuffer(CookieIF* cookie) {
UartDeviceMapIter uartDeviceMapIter;
auto* uartCookie = dynamic_cast<UartCookie*>(cookie);
if (uartCookie == nullptr) {
FSFW_FLOGWT("{}", "flushUartRxBuffer: Invalid UART cookie\n");
FSFW_LOGWT("{}", "flushUartRxBuffer: Invalid UART cookie\n");
return NULLPOINTER;
}
deviceFile = uartCookie->getDeviceFile();
@@ -490,7 +489,7 @@ ReturnValue_t UartComIF::flushUartTxBuffer(CookieIF* cookie) {
UartDeviceMapIter uartDeviceMapIter;
auto* uartCookie = dynamic_cast<UartCookie*>(cookie);
if (uartCookie == nullptr) {
FSFW_FLOGWT("{}", "flushUartTxBuffer: Invalid uart cookie\n");
FSFW_LOGWT("{}", "flushUartTxBuffer: Invalid uart cookie\n");
return NULLPOINTER;
}
deviceFile = uartCookie->getDeviceFile();
@@ -508,7 +507,7 @@ ReturnValue_t UartComIF::flushUartTxAndRxBuf(CookieIF* cookie) {
UartDeviceMapIter uartDeviceMapIter;
auto* uartCookie = dynamic_cast<UartCookie*>(cookie);
if (uartCookie == nullptr) {
FSFW_FLOGWT("{}", "flushUartTxAndRxBuf: Invalid UART cookie\n");
FSFW_LOGWT("{}", "flushUartTxAndRxBuf: Invalid UART cookie\n");
return NULLPOINTER;
}
deviceFile = uartCookie->getDeviceFile();

View File

@@ -28,7 +28,7 @@ ReturnValue_t ActionHelper::initialize(MessageQueueIF* queueToUse_) {
}
if (queueToUse == nullptr) {
FSFW_FLOGW("{}", "initialize: No queue set\n");
FSFW_LOGW("{}", "initialize: No queue set\n");
return HasReturnvaluesIF::RETURN_FAILED;
}
@@ -90,7 +90,7 @@ ReturnValue_t ActionHelper::reportData(MessageQueueId_t reportTo, ActionId_t rep
size_t size = 0;
ReturnValue_t result = ipcStore->getFreeElement(&storeAddress, maxSize, &dataPtr);
if (result != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGWT("{}", "reportData: Getting free element from IPC store failed\n");
FSFW_LOGWT("{}", "reportData: Getting free element from IPC store failed\n");
return result;
}
result = data->serialize(&dataPtr, &size, maxSize, SerializeIF::Endianness::BIG);
@@ -125,7 +125,7 @@ ReturnValue_t ActionHelper::reportData(MessageQueueId_t reportTo, ActionId_t rep
store_address_t storeAddress;
ReturnValue_t result = ipcStore->addData(&storeAddress, data, dataSize);
if (result != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGWT("{}", "reportData: Adding data to IPC store failed\n");
FSFW_LOGWT("{}", "reportData: Adding data to IPC store failed\n");
return result;
}

View File

@@ -29,7 +29,7 @@ ReturnValue_t CFDPHandler::initialize() {
}
ReturnValue_t CFDPHandler::handleRequest(store_address_t storeId) {
FSFW_FLOGDT("{}", "CFDPHandler::handleRequest\n");
FSFW_LOGDT("{}", "CFDPHandler::handleRequest\n");
// TODO read out packet from store using storeId

View File

@@ -50,9 +50,9 @@ ReturnValue_t EofPduDeserializer::parseData() {
if (info.getConditionCode() != cfdp::ConditionCode::NO_ERROR) {
EntityIdTlv* tlvPtr = info.getFaultLoc();
if (tlvPtr == nullptr) {
FSFW_FLOGW("{}",
"parseData: Ca not deserialize fault location,"
" given TLV pointer invalid\n");
FSFW_LOGW("{}",
"parseData: Ca not deserialize fault location,"
" given TLV pointer invalid\n");
return HasReturnvaluesIF::RETURN_FAILED;
}
result = tlvPtr->deSerialize(&bufPtr, &deserLen, endianness);

View File

@@ -7,7 +7,7 @@
cfdp::VarLenField::VarLenField(cfdp::WidthInBytes width, size_t value) : VarLenField() {
ReturnValue_t result = this->setValue(width, value);
if (result != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGW("{}", "cfdp::VarLenField: Setting value failed\n");
FSFW_LOGW("{}", "cfdp::VarLenField: Setting value failed\n");
}
}

View File

@@ -128,7 +128,7 @@ class FilestoreTlvBase : public TlvIF {
}
void secondFileNameMissing() const {
FSFW_FLOGWT("{}", "secondFileNameMissing: Second file name required but TLV pointer not set\n");
FSFW_LOGWT("{}", "secondFileNameMissing: Second file name required but TLV pointer not set\n");
}
FilestoreActionCode getActionCode() const { return actionCode; }

View File

@@ -17,15 +17,15 @@ ReturnValue_t PoolDataSetBase::registerVariable(PoolVariableIF* variable) {
return HasReturnvaluesIF::RETURN_FAILED;
}
if (state != States::STATE_SET_UNINITIALISED) {
FSFW_FLOGW("{}", "registerVariable: Call made in wrong position\n");
FSFW_LOGW("{}", "registerVariable: Call made in wrong position\n");
return DataSetIF::DATA_SET_UNINITIALISED;
}
if (variable == nullptr) {
FSFW_FLOGW("{}", "registerVariable: Pool variable is nullptr\n");
FSFW_LOGW("{}", "registerVariable: Pool variable is nullptr\n");
return DataSetIF::POOL_VAR_NULL;
}
if (fillCount >= maxFillCount) {
FSFW_FLOGW("{}", "registerVariable: DataSet is full\n");
FSFW_LOGW("{}", "registerVariable: DataSet is full\n");
return DataSetIF::DATA_SET_FULL;
}
registeredVariables[fillCount] = variable;
@@ -47,7 +47,7 @@ ReturnValue_t PoolDataSetBase::read(MutexIF::TimeoutType timeoutType, uint32_t l
state = States::STATE_SET_WAS_READ;
unlockDataPool();
} else {
FSFW_FLOGWT("{}", "read: Call made in wrong position. commit call might be missing\n");
FSFW_LOGWT("{}", "read: Call made in wrong position. commit call might be missing\n");
result = SET_WAS_ALREADY_READ;
}

View File

@@ -68,7 +68,7 @@ void PoolEntry<T>::print() {
} else {
validString = "Invalid";
}
FSFW_FLOGI("PoolEntry Info. Validity {}\n", validString);
FSFW_LOGI("PoolEntry Info. Validity {}\n", validString);
arrayprinter::print(reinterpret_cast<uint8_t*>(address), getByteSize());
}

View File

@@ -17,7 +17,7 @@ class PoolReadGuard {
if (readObject != nullptr) {
readResult = readObject->read(timeoutType, mutexTimeout);
if (readResult != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGW("{}", "ctor: Read failed\n");
FSFW_LOGW("{}", "ctor: Read failed\n");
}
}
}

View File

@@ -6,8 +6,8 @@
#include "../datapool/PoolEntryIF.h"
#include "../housekeeping/HousekeepingMessage.h"
#include "../ipc/MessageQueueSenderIF.h"
#include "../serviceinterface/ServiceInterface.h"
#include "LocalDataPoolManager.h"
#include "fsfw/serviceinterface.h"
#include "localPoolDefinitions.h"
class AccessPoolManagerIF;
@@ -166,7 +166,7 @@ class HasLocalDataPoolIF {
* @return
*/
virtual LocalPoolObjectBase* getPoolObjectHandle(lp_id_t localPoolId) {
FSFW_FLOGW("{}", "HasLocalDataPoolIF::getPoolObjectHandle: Not overriden. Returning nullptr\n");
FSFW_LOGW("{}", "HasLocalDataPoolIF::getPoolObjectHandle: Not overriden. Returning nullptr\n");
return nullptr;
}
};

View File

@@ -3,6 +3,7 @@
#include <array>
#include <cmath>
#include "fsfw/FSFW.h"
#include "fsfw/datapoollocal.h"
#include "fsfw/housekeeping/AcceptsHkPacketsIF.h"
#include "fsfw/housekeeping/HousekeepingSetPacket.h"
@@ -21,15 +22,15 @@ LocalDataPoolManager::LocalDataPoolManager(HasLocalDataPoolIF* owner, MessageQue
bool appendValidityBuffer)
: appendValidityBuffer(appendValidityBuffer) {
if (owner == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "LocalDataPoolManager",
HasReturnvaluesIF::RETURN_FAILED, "Invalid supplied owner");
printWarningOrError(sif::LogLevel::WARNING, "ctor", HasReturnvaluesIF::RETURN_FAILED,
"Invalid supplied owner");
return;
}
this->owner = owner;
mutex = MutexFactory::instance()->createMutex();
if (mutex == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_ERROR, "LocalDataPoolManager",
HasReturnvaluesIF::RETURN_FAILED, "Could not create mutex");
printWarningOrError(sif::LogLevel::ERROR, "ctor", HasReturnvaluesIF::RETURN_FAILED,
"Could not create mutex");
}
hkQueue = queueToUse;
@@ -44,25 +45,25 @@ LocalDataPoolManager::~LocalDataPoolManager() {
ReturnValue_t LocalDataPoolManager::initialize(MessageQueueIF* queueToUse) {
if (queueToUse == nullptr) {
/* Error, all destinations invalid */
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize", QUEUE_OR_DESTINATION_INVALID);
printWarningOrError(sif::LogLevel::ERROR, "initialize", QUEUE_OR_DESTINATION_INVALID);
}
hkQueue = queueToUse;
ipcStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
if (ipcStore == nullptr) {
/* Error, all destinations invalid */
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize", HasReturnvaluesIF::RETURN_FAILED,
printWarningOrError(sif::LogLevel::ERROR, "initialize", HasReturnvaluesIF::RETURN_FAILED,
"Could not set IPC store.");
return HasReturnvaluesIF::RETURN_FAILED;
}
if (defaultHkDestination != objects::NO_OBJECT) {
AcceptsHkPacketsIF* hkPacketReceiver =
auto* hkPacketReceiver =
ObjectManager::instance()->get<AcceptsHkPacketsIF>(defaultHkDestination);
if (hkPacketReceiver != nullptr) {
hkDestinationId = hkPacketReceiver->getHkQueue();
} else {
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize", QUEUE_OR_DESTINATION_INVALID);
printWarningOrError(sif::LogLevel::ERROR, "initialize", QUEUE_OR_DESTINATION_INVALID);
return QUEUE_OR_DESTINATION_INVALID;
}
}
@@ -84,7 +85,7 @@ ReturnValue_t LocalDataPoolManager::initializeHousekeepingPoolEntriesOnce() {
return result;
}
printWarningOrError(sif::OutputTypes::OUT_WARNING, "initializeHousekeepingPoolEntriesOnce",
printWarningOrError(sif::LogLevel::WARNING, "initializeHousekeepingPoolEntriesOnce",
HasReturnvaluesIF::RETURN_FAILED, "The map should only be initialized once");
return HasReturnvaluesIF::RETURN_OK;
}
@@ -150,8 +151,7 @@ ReturnValue_t LocalDataPoolManager::handleNotificationUpdate(HkReceiver& receive
LocalPoolObjectBase* poolObj =
HasLocalDpIFManagerAttorney::getPoolObjectHandle(owner, receiver.dataId.localPoolId);
if (poolObj == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "handleNotificationUpdate",
POOLOBJECT_NOT_FOUND);
printWarningOrError(sif::LogLevel::WARNING, "handleNotificationUpdate", POOLOBJECT_NOT_FOUND);
return POOLOBJECT_NOT_FOUND;
}
if (poolObj->hasChanged()) {
@@ -170,8 +170,7 @@ ReturnValue_t LocalDataPoolManager::handleNotificationUpdate(HkReceiver& receive
LocalPoolDataSetBase* dataSet =
HasLocalDpIFManagerAttorney::getDataSetHandle(owner, receiver.dataId.sid);
if (dataSet == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "handleNotificationUpdate",
DATASET_NOT_FOUND);
printWarningOrError(sif::LogLevel::WARNING, "handleNotificationUpdate", DATASET_NOT_FOUND);
return DATASET_NOT_FOUND;
}
if (dataSet->hasChanged()) {
@@ -199,7 +198,7 @@ ReturnValue_t LocalDataPoolManager::handleNotificationSnapshot(HkReceiver& recei
LocalPoolObjectBase* poolObj =
HasLocalDpIFManagerAttorney::getPoolObjectHandle(owner, receiver.dataId.localPoolId);
if (poolObj == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "handleNotificationSnapshot",
printWarningOrError(sif::LogLevel::WARNING, "handleNotificationSnapshot",
POOLOBJECT_NOT_FOUND);
return POOLOBJECT_NOT_FOUND;
}
@@ -235,8 +234,7 @@ ReturnValue_t LocalDataPoolManager::handleNotificationSnapshot(HkReceiver& recei
LocalPoolDataSetBase* dataSet =
HasLocalDpIFManagerAttorney::getDataSetHandle(owner, receiver.dataId.sid);
if (dataSet == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "handleNotificationSnapshot",
DATASET_NOT_FOUND);
printWarningOrError(sif::LogLevel::WARNING, "handleNotificationSnapshot", DATASET_NOT_FOUND);
return DATASET_NOT_FOUND;
}
@@ -245,9 +243,9 @@ ReturnValue_t LocalDataPoolManager::handleNotificationSnapshot(HkReceiver& recei
}
/* Prepare and send update snapshot */
timeval now;
timeval now{};
Clock::getClock_timeval(&now);
CCSDSTime::CDS_short cds;
CCSDSTime::CDS_short cds{};
CCSDSTime::convertToCcsds(&cds, &now);
HousekeepingSnapshot updatePacket(
reinterpret_cast<uint8_t*>(&cds), sizeof(cds),
@@ -342,7 +340,7 @@ ReturnValue_t LocalDataPoolManager::subscribeForPeriodicPacket(sid_t sid, bool e
AcceptsHkPacketsIF* hkReceiverObject =
ObjectManager::instance()->get<AcceptsHkPacketsIF>(packetDestination);
if (hkReceiverObject == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "subscribeForPeriodicPacket",
printWarningOrError(sif::LogLevel::WARNING, "subscribeForPeriodicPacket",
QUEUE_OR_DESTINATION_INVALID);
return QUEUE_OR_DESTINATION_INVALID;
}
@@ -368,10 +366,9 @@ ReturnValue_t LocalDataPoolManager::subscribeForPeriodicPacket(sid_t sid, bool e
ReturnValue_t LocalDataPoolManager::subscribeForUpdatePacket(sid_t sid, bool isDiagnostics,
bool reportingEnabled,
object_id_t packetDestination) {
AcceptsHkPacketsIF* hkReceiverObject =
ObjectManager::instance()->get<AcceptsHkPacketsIF>(packetDestination);
auto* hkReceiverObject = ObjectManager::instance()->get<AcceptsHkPacketsIF>(packetDestination);
if (hkReceiverObject == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "subscribeForPeriodicPacket",
printWarningOrError(sif::LogLevel::WARNING, "subscribeForPeriodicPacket",
QUEUE_OR_DESTINATION_INVALID);
return QUEUE_OR_DESTINATION_INVALID;
}
@@ -524,8 +521,7 @@ ReturnValue_t LocalDataPoolManager::handleHousekeepingMessage(CommandMessage* me
case (HousekeepingMessage::GENERATE_ONE_DIAGNOSTICS_REPORT): {
LocalPoolDataSetBase* dataSet = HasLocalDpIFManagerAttorney::getDataSetHandle(owner, sid);
if (dataSet == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "handleHousekeepingMessage",
DATASET_NOT_FOUND);
printWarningOrError(sif::LogLevel::WARNING, "handleHousekeepingMessage", DATASET_NOT_FOUND);
return DATASET_NOT_FOUND;
}
if (command == HousekeepingMessage::GENERATE_ONE_PARAMETER_REPORT and
@@ -588,8 +584,7 @@ ReturnValue_t LocalDataPoolManager::handleHousekeepingMessage(CommandMessage* me
ReturnValue_t LocalDataPoolManager::printPoolEntry(lp_id_t localPoolId) {
auto poolIter = localPoolMap.find(localPoolId);
if (poolIter == localPoolMap.end()) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "printPoolEntry",
localpool::POOL_ENTRY_NOT_FOUND);
printWarningOrError(sif::LogLevel::WARNING, "printPoolEntry", localpool::POOL_ENTRY_NOT_FOUND);
return localpool::POOL_ENTRY_NOT_FOUND;
}
poolIter->second->print();
@@ -606,8 +601,7 @@ ReturnValue_t LocalDataPoolManager::generateHousekeepingPacket(sid_t sid,
MessageQueueId_t destination) {
if (dataSet == nullptr) {
/* Configuration error. */
printWarningOrError(sif::OutputTypes::OUT_WARNING, "generateHousekeepingPacket",
DATASET_NOT_FOUND);
printWarningOrError(sif::LogLevel::WARNING, "generateHousekeepingPacket", DATASET_NOT_FOUND);
return DATASET_NOT_FOUND;
}
@@ -630,14 +624,14 @@ ReturnValue_t LocalDataPoolManager::generateHousekeepingPacket(sid_t sid,
if (hkQueue == nullptr) {
/* Error, no queue available to send packet with. */
printWarningOrError(sif::OutputTypes::OUT_WARNING, "generateHousekeepingPacket",
printWarningOrError(sif::LogLevel::WARNING, "generateHousekeepingPacket",
QUEUE_OR_DESTINATION_INVALID);
return QUEUE_OR_DESTINATION_INVALID;
}
if (destination == MessageQueueIF::NO_QUEUE) {
if (hkDestinationId == MessageQueueIF::NO_QUEUE) {
/* Error, all destinations invalid */
printWarningOrError(sif::OutputTypes::OUT_WARNING, "generateHousekeepingPacket",
printWarningOrError(sif::LogLevel::WARNING, "generateHousekeepingPacket",
QUEUE_OR_DESTINATION_INVALID);
}
destination = hkDestinationId;
@@ -671,8 +665,7 @@ void LocalDataPoolManager::performPeriodicHkGeneration(HkReceiver& receiver) {
sid_t sid = receiver.dataId.sid;
LocalPoolDataSetBase* dataSet = HasLocalDpIFManagerAttorney::getDataSetHandle(owner, sid);
if (dataSet == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "performPeriodicHkGeneration",
DATASET_NOT_FOUND);
printWarningOrError(sif::LogLevel::WARNING, "performPeriodicHkGeneration", DATASET_NOT_FOUND);
return;
}
@@ -695,7 +688,7 @@ void LocalDataPoolManager::performPeriodicHkGeneration(HkReceiver& receiver) {
ReturnValue_t result = generateHousekeepingPacket(sid, dataSet, true);
if (result != HasReturnvaluesIF::RETURN_OK) {
/* Configuration error */
FSFW_FLOGWT("{}", "performHkOperation: HK generation failed");
FSFW_LOGWT("{}", "performHkOperation: HK generation failed");
}
}
@@ -703,8 +696,7 @@ ReturnValue_t LocalDataPoolManager::togglePeriodicGeneration(sid_t sid, bool ena
bool isDiagnostics) {
LocalPoolDataSetBase* dataSet = HasLocalDpIFManagerAttorney::getDataSetHandle(owner, sid);
if (dataSet == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "togglePeriodicGeneration",
DATASET_NOT_FOUND);
printWarningOrError(sif::LogLevel::WARNING, "togglePeriodicGeneration", DATASET_NOT_FOUND);
return DATASET_NOT_FOUND;
}
@@ -726,8 +718,7 @@ ReturnValue_t LocalDataPoolManager::changeCollectionInterval(sid_t sid, float ne
bool isDiagnostics) {
LocalPoolDataSetBase* dataSet = HasLocalDpIFManagerAttorney::getDataSetHandle(owner, sid);
if (dataSet == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "changeCollectionInterval",
DATASET_NOT_FOUND);
printWarningOrError(sif::LogLevel::WARNING, "changeCollectionInterval", DATASET_NOT_FOUND);
return DATASET_NOT_FOUND;
}
@@ -752,8 +743,7 @@ ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid, bool i
/* Get and check dataset first. */
LocalPoolDataSetBase* dataSet = HasLocalDpIFManagerAttorney::getDataSetHandle(owner, sid);
if (dataSet == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "performPeriodicHkGeneration",
DATASET_NOT_FOUND);
printWarningOrError(sif::LogLevel::WARNING, "performPeriodicHkGeneration", DATASET_NOT_FOUND);
return DATASET_NOT_FOUND;
}
@@ -774,7 +764,7 @@ ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid, bool i
store_address_t storeId;
ReturnValue_t result = ipcStore->getFreeElement(&storeId, expectedSize, &storePtr);
if (result != HasReturnvaluesIF::RETURN_OK) {
printWarningOrError(sif::OutputTypes::OUT_ERROR, "generateSetStructurePacket",
printWarningOrError(sif::LogLevel::ERROR, "generateSetStructurePacket",
HasReturnvaluesIF::RETURN_FAILED,
"Could not get free element from IPC store.");
return result;
@@ -788,7 +778,7 @@ ReturnValue_t LocalDataPoolManager::generateSetStructurePacket(sid_t sid, bool i
return result;
}
if (expectedSize != size) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "generateSetStructurePacket",
printWarningOrError(sif::LogLevel::WARNING, "generateSetStructurePacket",
HasReturnvaluesIF::RETURN_FAILED,
"Expected size is not equal to serialized size");
}
@@ -821,9 +811,8 @@ MutexIF* LocalDataPoolManager::getLocalPoolMutex() { return this->mutex; }
object_id_t LocalDataPoolManager::getCreatorObjectId() const { return owner->getObjectId(); }
void LocalDataPoolManager::printWarningOrError(sif::OutputTypes outputType,
const char* functionName, ReturnValue_t error,
const char* errorPrint) {
void LocalDataPoolManager::printWarningOrError(sif::LogLevel outputType, const char* functionName,
ReturnValue_t error, const char* errorPrint) {
#if FSFW_VERBOSE_LEVEL >= 1
if (errorPrint == nullptr) {
if (error == DATASET_NOT_FOUND) {
@@ -831,7 +820,7 @@ void LocalDataPoolManager::printWarningOrError(sif::OutputTypes outputType,
} else if (error == POOLOBJECT_NOT_FOUND) {
errorPrint = "Pool Object not found";
} else if (error == HasReturnvaluesIF::RETURN_FAILED) {
if (outputType == sif::OutputTypes::OUT_WARNING) {
if (outputType == sif::LogLevel::WARNING) {
errorPrint = "Generic Warning";
} else {
errorPrint = "Generic error";
@@ -851,10 +840,10 @@ void LocalDataPoolManager::printWarningOrError(sif::OutputTypes outputType,
objectId = owner->getObjectId();
}
if (outputType == sif::OutputTypes::OUT_WARNING) {
FSFW_FLOGWT("{} | Object ID {} | {}\n", functionName, objectId, errorPrint);
} else if (outputType == sif::OutputTypes::OUT_ERROR) {
FSFW_FLOGET("{} | Object ID {} | {}\n", functionName, objectId, errorPrint);
if (outputType == sif::LogLevel::WARNING) {
FSFW_LOGWT("{} | Object ID {} | {}\n", functionName, objectId, errorPrint);
} else if (outputType == sif::LogLevel::ERROR) {
FSFW_LOGET("{} | Object ID {} | {}\n", functionName, objectId, errorPrint);
}
#endif /* #if FSFW_VERBOSE_LEVEL >= 1 */
}

View File

@@ -16,7 +16,7 @@
#include "fsfw/ipc/MutexGuard.h"
#include "fsfw/ipc/MutexIF.h"
#include "fsfw/objectmanager/SystemObjectIF.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
namespace Factory {
void setStaticFrameworkObjectIds();
@@ -375,7 +375,7 @@ class LocalDataPoolManager : public ProvidesDataPoolSubscriptionIF, public Acces
ReturnValue_t handleNotificationSnapshot(HkReceiver& hkReceiver, ReturnValue_t& status);
ReturnValue_t addUpdateToStore(HousekeepingSnapshot& updatePacket, store_address_t& storeId);
void printWarningOrError(sif::OutputTypes outputType, const char* functionName,
void printWarningOrError(sif::LogLevel outputType, const char* functionName,
ReturnValue_t errorCode = HasReturnvaluesIF::RETURN_FAILED,
const char* errorPrint = nullptr);
};
@@ -389,14 +389,13 @@ inline ReturnValue_t LocalDataPoolManager::fetchPoolEntry(lp_id_t localPoolId,
auto poolIter = localPoolMap.find(localPoolId);
if (poolIter == localPoolMap.end()) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "fetchPoolEntry",
localpool::POOL_ENTRY_NOT_FOUND);
printWarningOrError(sif::LogLevel::WARNING, "fetchPoolEntry", localpool::POOL_ENTRY_NOT_FOUND);
return localpool::POOL_ENTRY_NOT_FOUND;
}
*poolEntry = dynamic_cast<PoolEntry<T>*>(poolIter->second);
if (*poolEntry == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "fetchPoolEntry",
printWarningOrError(sif::LogLevel::WARNING, "fetchPoolEntry",
localpool::POOL_ENTRY_TYPE_CONFLICT);
return localpool::POOL_ENTRY_TYPE_CONFLICT;
}

View File

@@ -16,7 +16,7 @@ LocalPoolDataSetBase::LocalPoolDataSetBase(HasLocalDataPoolIF *hkOwner, uint32_t
: PoolDataSetBase(registeredVariablesArray, maxNumberOfVariables) {
if (hkOwner == nullptr) {
// Configuration error.
FSFW_FLOGW("{}", "LocalPoolDataSetBase::LocalPoolDataSetBase: Owner invalid\n");
FSFW_LOGW("{}", "LocalPoolDataSetBase::LocalPoolDataSetBase: Owner invalid\n");
return;
}
AccessPoolManagerIF *accessor = HasLocalDpIFUserAttorney::getAccessorHandle(hkOwner);
@@ -179,7 +179,7 @@ ReturnValue_t LocalPoolDataSetBase::serializeLocalPoolIds(uint8_t **buffer, size
auto result =
SerializeAdapter::serialize(&currentPoolId, buffer, size, maxSize, streamEndianness);
if (result != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGW("{}", "serializeLocalPoolIds: Serialization error\n");
FSFW_LOGW("{}", "serializeLocalPoolIds: Serialization error\n");
return result;
}
}

View File

@@ -11,10 +11,10 @@ LocalPoolObjectBase::LocalPoolObjectBase(lp_id_t poolId, HasLocalDataPoolIF* hkO
DataSetIF* dataSet, pool_rwm_t setReadWriteMode)
: localPoolId(poolId), readWriteMode(setReadWriteMode) {
if (poolId == PoolVariableIF::NO_PARAMETER) {
FSFW_FLOGWT("{}", "ctor: Invalid pool ID, has NO_PARAMETER value\n");
FSFW_LOGWT("{}", "ctor: Invalid pool ID, has NO_PARAMETER value\n");
}
if (hkOwner == nullptr) {
FSFW_FLOGET("{}", "ctor: Supplied pool owner is a invalid\n");
FSFW_LOGET("{}", "ctor: Supplied pool owner is a invalid\n");
return;
}
AccessPoolManagerIF* poolManAccessor = HasLocalDpIFUserAttorney::getAccessorHandle(hkOwner);
@@ -29,11 +29,11 @@ LocalPoolObjectBase::LocalPoolObjectBase(object_id_t poolOwner, lp_id_t poolId,
pool_rwm_t setReadWriteMode)
: localPoolId(poolId), readWriteMode(setReadWriteMode) {
if (poolId == PoolVariableIF::NO_PARAMETER) {
FSFW_FLOGWT("{}", "ctor: Invalid pool ID, has NO_PARAMETER value\n");
FSFW_LOGWT("{}", "ctor: Invalid pool ID, has NO_PARAMETER value\n");
}
auto* hkOwner = ObjectManager::instance()->get<HasLocalDataPoolIF>(poolOwner);
if (hkOwner == nullptr) {
FSFW_FLOGWT(
FSFW_LOGWT(
"ctor: The supplied pool owner {:#08x} did not implement the correct interface "
"HasLocalDataPoolIF\n",
poolOwner);
@@ -94,6 +94,6 @@ void LocalPoolObjectBase::reportReadCommitError(const char* variableType, Return
errMsg = "Unknown error code";
}
FSFW_FLOGW("{}: {} call | {} | Owner: {:#08x} | LPID: \n", variablePrintout, type, errMsg,
objectId, lpId);
FSFW_LOGW("{}: {} call | {} | Owner: {:#08x} | LPID: \n", variablePrintout, type, errMsg,
objectId, lpId);
}

View File

@@ -5,11 +5,11 @@
#include "../datapool/PoolVariableIF.h"
#include "../objectmanager/ObjectManagerIF.h"
#include "../serialize/SerializeAdapter.h"
#include "../serviceinterface/ServiceInterface.h"
#include "AccessLocalPoolF.h"
#include "HasLocalDataPoolIF.h"
#include "LocalDataPoolManager.h"
#include "LocalPoolObjectBase.h"
#include "fsfw/serviceinterface.h"
#include "internal/LocalDpManagerAttorney.h"
/**

View File

@@ -6,8 +6,8 @@
#include "../datapool/PoolVariableIF.h"
#include "../datapoollocal/LocalDataPoolManager.h"
#include "../serialize/SerializeAdapter.h"
#include "../serviceinterface/ServiceInterface.h"
#include "LocalPoolObjectBase.h"
#include "fsfw/serviceinterface.h"
#include "internal/LocalDpManagerAttorney.h"
/**

View File

@@ -98,7 +98,7 @@ inline T& LocalPoolVector<T, vectorSize>::operator [](size_t i) {
}
// If this happens, I have to set some value. I consider this
// a configuration error, but I wont exit here.
FSFW_FLOGWT("{}", "operator[]: Invalid index. Setting or returning last value\n");
FSFW_LOGWT("{}", "operator[]: Invalid index. Setting or returning last value\n");
return value[vectorSize - 1];
}
@@ -109,7 +109,7 @@ inline const T& LocalPoolVector<T, vectorSize>::operator [](size_t i) const {
}
// If this happens, I have to set some value. I consider this
// a configuration error, but I wont exit here.
FSFW_FLOGWT("{}", "operator[]: Invalid index. Setting or returning last value\n");
FSFW_LOGWT("{}", "operator[]: Invalid index. Setting or returning last value\n");
return value[vectorSize - 1];
}

View File

@@ -8,7 +8,7 @@
#include "fsfw/ipc/MessageQueueMessage.h"
#include "fsfw/ipc/QueueFactory.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
#include "fsfw/storagemanager/StorageManagerIF.h"
#include "fsfw/subsystem/SubsystemBase.h"
#include "fsfw/thermal/ThermalComponentIF.h"
@@ -45,16 +45,16 @@ DeviceHandlerBase::DeviceHandlerBase(object_id_t setObjectId, object_id_t device
cookieInfo.state = COOKIE_UNUSED;
cookieInfo.pendingCommand = deviceCommandMap.end();
if (comCookie == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_ERROR, "DeviceHandlerBase",
HasReturnvaluesIF::RETURN_FAILED, "Invalid cookie");
printWarningOrError(sif::LogLevel::ERROR, "DeviceHandlerBase", HasReturnvaluesIF::RETURN_FAILED,
"Invalid cookie");
}
if (this->fdirInstance == nullptr) {
this->fdirInstance = new DeviceHandlerFailureIsolation(setObjectId, defaultFdirParentId);
}
}
void DeviceHandlerBase::setHkDestination(object_id_t hkDestination) {
this->hkDestination = hkDestination;
void DeviceHandlerBase::setHkDestination(object_id_t hkDestination_) {
this->hkDestination = hkDestination_;
}
void DeviceHandlerBase::setThermalStateRequestPoolIds(lp_id_t thermalStatePoolId,
@@ -130,22 +130,22 @@ ReturnValue_t DeviceHandlerBase::initialize() {
communicationInterface =
ObjectManager::instance()->get<DeviceCommunicationIF>(deviceCommunicationId);
if (communicationInterface == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
ObjectManagerIF::CHILD_INIT_FAILED, "Passed communication IF invalid");
printWarningOrError(sif::LogLevel::ERROR, "initialize", ObjectManagerIF::CHILD_INIT_FAILED,
"Passed communication IF invalid");
return ObjectManagerIF::CHILD_INIT_FAILED;
}
result = communicationInterface->initializeInterface(comCookie);
if (result != RETURN_OK) {
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
ObjectManagerIF::CHILD_INIT_FAILED, "ComIF initialization failed");
printWarningOrError(sif::LogLevel::ERROR, "initialize", ObjectManagerIF::CHILD_INIT_FAILED,
"ComIF initialization failed");
return result;
}
IPCStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
if (IPCStore == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
ObjectManagerIF::CHILD_INIT_FAILED, "IPC Store not set up");
printWarningOrError(sif::LogLevel::ERROR, "initialize", ObjectManagerIF::CHILD_INIT_FAILED,
"IPC Store not set up");
return ObjectManagerIF::CHILD_INIT_FAILED;
}
@@ -153,12 +153,11 @@ ReturnValue_t DeviceHandlerBase::initialize() {
auto* rawReceiver = ObjectManager::instance()->get<AcceptsDeviceResponsesIF>(rawDataReceiverId);
if (rawReceiver == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
ObjectManagerIF::CHILD_INIT_FAILED,
printWarningOrError(sif::LogLevel::ERROR, "initialize", ObjectManagerIF::CHILD_INIT_FAILED,
"Raw receiver object ID set but no valid object found.");
FSFW_FLOGE("{}",
"Make sure the raw receiver object is set up properly "
"and implements AcceptsDeviceResponsesIF");
FSFW_LOGE("{}",
"Make sure the raw receiver object is set up properly "
"and implements AcceptsDeviceResponsesIF");
return ObjectManagerIF::CHILD_INIT_FAILED;
}
defaultRawReceiver = rawReceiver->getDeviceQueue();
@@ -167,12 +166,11 @@ ReturnValue_t DeviceHandlerBase::initialize() {
if (powerSwitcherId != objects::NO_OBJECT) {
powerSwitcher = ObjectManager::instance()->get<PowerSwitchIF>(powerSwitcherId);
if (powerSwitcher == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
ObjectManagerIF::CHILD_INIT_FAILED,
printWarningOrError(sif::LogLevel::ERROR, "initialize", ObjectManagerIF::CHILD_INIT_FAILED,
"Power switcher set but no valid object found.");
FSFW_FLOGE("{}",
"Make sure the power switcher object is set up "
"properly and implements PowerSwitchIF\n");
FSFW_LOGE("{}",
"Make sure the power switcher object is set up "
"properly and implements PowerSwitchIF\n");
return ObjectManagerIF::CHILD_INIT_FAILED;
}
}
@@ -305,8 +303,7 @@ void DeviceHandlerBase::doStateMachine() {
sprintf(printout, "Transition timeout (%lu) occured !",
static_cast<unsigned long>(childTransitionDelay));
/* Common configuration error for development, so print it */
printWarningOrError(sif::OutputTypes::OUT_WARNING, "doStateMachine", RETURN_FAILED,
printout);
printWarningOrError(sif::LogLevel::WARNING, "doStateMachine", RETURN_FAILED, printout);
#endif
triggerEvent(MODE_TRANSITION_FAILED, childTransitionFailure, 0);
setMode(transitionSourceMode, transitionSourceSubMode);
@@ -598,8 +595,8 @@ void DeviceHandlerBase::replyToReply(const DeviceCommandId_t command, DeviceRepl
}
DeviceCommandInfo* info = &replyInfo.command->second;
if (info == nullptr) {
printWarningOrError(sif::OutputTypes::OUT_ERROR, "replyToReply",
HasReturnvaluesIF::RETURN_FAILED, "Command pointer not found");
printWarningOrError(sif::LogLevel::ERROR, "replyToReply", HasReturnvaluesIF::RETURN_FAILED,
"Command pointer not found");
return;
}
@@ -740,7 +737,7 @@ void DeviceHandlerBase::parseReply(const uint8_t* receivedData, size_t receivedD
case RETURN_OK:
handleReply(receivedData, foundId, foundLen);
if (foundLen == 0) {
printWarningOrError(sif::OutputTypes::OUT_WARNING, "parseReply",
printWarningOrError(sif::LogLevel::WARNING, "parseReply",
ObjectManagerIF::CHILD_INIT_FAILED,
"Found length is one, parsing might be stuck");
}
@@ -752,12 +749,12 @@ void DeviceHandlerBase::parseReply(const uint8_t* receivedData, size_t receivedD
triggerEvent(DEVICE_INTERPRETING_REPLY_FAILED, result, foundId);
}
if (foundLen == 0) {
printWarningOrError(sif::OutputTypes::OUT_ERROR, "parseReply",
printWarningOrError(sif::LogLevel::ERROR, "parseReply",
ObjectManagerIF::CHILD_INIT_FAILED,
"Power switcher set but no valid object found.");
FSFW_FLOGW("{}",
"DeviceHandlerBase::parseReply: foundLen is 0! "
"Packet parsing will be stuck\n");
FSFW_LOGW("{}",
"DeviceHandlerBase::parseReply: foundLen is 0! "
"Packet parsing will be stuck\n");
}
break;
}
@@ -1272,7 +1269,7 @@ ReturnValue_t DeviceHandlerBase::executeAction(ActionId_t actionId, MessageQueue
return result;
}
void DeviceHandlerBase::buildInternalCommand(void) {
void DeviceHandlerBase::buildInternalCommand() {
/* Neither raw nor direct could build a command */
ReturnValue_t result = NOTHING_TO_SEND;
DeviceCommandId_t deviceCommandId = NO_COMMAND_ID;
@@ -1280,7 +1277,7 @@ void DeviceHandlerBase::buildInternalCommand(void) {
result = buildNormalDeviceCommand(&deviceCommandId);
if (result == BUSY) {
/* So we can track misconfigurations */
printWarningOrError(sif::OutputTypes::OUT_WARNING, "buildInternalCommand",
printWarningOrError(sif::LogLevel::WARNING, "buildInternalCommand",
HasReturnvaluesIF::RETURN_FAILED, "Busy.");
/* No need to report this */
result = NOTHING_TO_SEND;
@@ -1298,14 +1295,14 @@ void DeviceHandlerBase::buildInternalCommand(void) {
return;
}
if (result == RETURN_OK) {
DeviceCommandMap::iterator iter = deviceCommandMap.find(deviceCommandId);
auto iter = deviceCommandMap.find(deviceCommandId);
if (iter == deviceCommandMap.end()) {
#if FSFW_VERBOSE_LEVEL >= 1
char output[36];
sprintf(output, "Command 0x%08x unknown", static_cast<unsigned int>(deviceCommandId));
// so we can track misconfigurations
printWarningOrError(sif::OutputTypes::OUT_WARNING, "buildInternalCommand",
COMMAND_NOT_SUPPORTED, output);
printWarningOrError(sif::LogLevel::WARNING, "buildInternalCommand", COMMAND_NOT_SUPPORTED,
output);
#endif
result = COMMAND_NOT_SUPPORTED;
} else if (iter->second.isExecuting) {
@@ -1313,7 +1310,7 @@ void DeviceHandlerBase::buildInternalCommand(void) {
char output[36];
sprintf(output, "Command 0x%08x is executing", static_cast<unsigned int>(deviceCommandId));
// so we can track misconfigurations
printWarningOrError(sif::OutputTypes::OUT_WARNING, "buildInternalCommand",
printWarningOrError(sif::LogLevel::WARNING, "buildInternalCommand",
HasReturnvaluesIF::RETURN_FAILED, output);
#endif
// this is an internal command, no need to report a failure here,
@@ -1334,7 +1331,7 @@ void DeviceHandlerBase::buildInternalCommand(void) {
ReturnValue_t DeviceHandlerBase::buildChildRawCommand() { return NOTHING_TO_SEND; }
uint8_t DeviceHandlerBase::getReplyDelayCycles(DeviceCommandId_t deviceCommand) {
DeviceReplyMap::iterator iter = deviceReplyMap.find(deviceCommand);
auto iter = deviceReplyMap.find(deviceCommand);
if (iter == deviceReplyMap.end()) {
return 0;
}
@@ -1442,13 +1439,13 @@ void DeviceHandlerBase::setNormalDatapoolEntriesInvalid() {
}
}
void DeviceHandlerBase::printWarningOrError(sif::OutputTypes errorType, const char* functionName,
void DeviceHandlerBase::printWarningOrError(sif::LogLevel errorType, const char* functionName,
ReturnValue_t errorCode, const char* errorPrint) {
if (errorPrint == nullptr) {
if (errorCode == ObjectManagerIF::CHILD_INIT_FAILED) {
errorPrint = "Initialization error";
} else if (errorCode == HasReturnvaluesIF::RETURN_FAILED) {
if (errorType == sif::OutputTypes::OUT_WARNING) {
if (errorType == sif::LogLevel::WARNING) {
errorPrint = "Generic Warning";
} else {
errorPrint = "Generic Error";
@@ -1461,12 +1458,12 @@ void DeviceHandlerBase::printWarningOrError(sif::OutputTypes errorType, const ch
functionName = "unknown function";
}
if (errorType == sif::OutputTypes::OUT_WARNING) {
FSFW_FLOGWT("{} | Object ID {:#08x} | {}", functionName, SystemObject::getObjectId(),
errorPrint);
} else if (errorType == sif::OutputTypes::OUT_ERROR) {
FSFW_FLOGET("{} | Object ID {:#08x} | {}", functionName, SystemObject::getObjectId(),
errorPrint);
if (errorType == sif::LogLevel::WARNING) {
FSFW_LOGWT("{} | Object ID {:#08x} | {}", functionName, SystemObject::getObjectId(),
errorPrint);
} else if (errorType == sif::LogLevel::ERROR) {
FSFW_LOGET("{} | Object ID {:#08x} | {}", functionName, SystemObject::getObjectId(),
errorPrint);
}
}

View File

@@ -19,8 +19,7 @@
#include "fsfw/parameters/ParameterHelper.h"
#include "fsfw/power/PowerSwitchIF.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface/serviceInterfaceDefintions.h"
#include "fsfw/serviceinterface.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/tasks/PeriodicTaskIF.h"
@@ -1282,7 +1281,7 @@ class DeviceHandlerBase : public DeviceHandlerIF,
* @param errorCode
* @param errorPrint
*/
void printWarningOrError(sif::OutputTypes errorType, const char *functionName,
void printWarningOrError(sif::LogLevel errorType, const char *functionName,
ReturnValue_t errorCode = HasReturnvaluesIF::RETURN_FAILED,
const char *errorPrint = nullptr);
};

View File

@@ -163,7 +163,7 @@ void DeviceHandlerFailureIsolation::clearFaultCounters() {
ReturnValue_t DeviceHandlerFailureIsolation::initialize() {
ReturnValue_t result = FailureIsolationBase::initialize();
if (result != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGE("{}", "initialize: Could not initialize FailureIsolationBase\n");
FSFW_LOGE("{}", "initialize: Could not initialize FailureIsolationBase\n");
return result;
}
auto* power = ObjectManager::instance()->get<ConfirmsFailuresIF>(powerConfirmationId);

View File

@@ -6,12 +6,12 @@
#include "../ipc/MessageQueueIF.h"
#include "../ipc/MutexIF.h"
#include "../objectmanager/SystemObject.h"
#include "../serviceinterface/ServiceInterface.h"
#include "../storagemanager/LocalPool.h"
#include "../tasks/ExecutableObjectIF.h"
#include "EventManagerIF.h"
#include "FSFWConfig.h"
#include "eventmatching/EventMatchTree.h"
#include "fsfw/serviceinterface.h"
#if FSFW_OBJ_EVENT_TRANSLATION == 1
// forward declaration, should be implemented by mission

View File

@@ -41,7 +41,7 @@ class EventManagerIF {
if (eventmanagerQueue == MessageQueueIF::NO_QUEUE) {
auto* eventmanager = ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER);
if (eventmanager == nullptr) {
FSFW_FLOGW("{}", "EventManagerIF::triggerEvent: EventManager invalid or not found\n");
FSFW_LOGW("{}", "EventManagerIF::triggerEvent: EventManager invalid or not found\n");
return;
}
eventmanagerQueue = eventmanager->getEventReportQueue();

View File

@@ -20,7 +20,7 @@ FailureIsolationBase::~FailureIsolationBase() {
ReturnValue_t FailureIsolationBase::initialize() {
auto* manager = ObjectManager::instance()->get<EventManagerIF>(objects::EVENT_MANAGER);
if (manager == nullptr) {
FSFW_FLOGE("{}", "initialize: Event Manager has not been initialized\n");
FSFW_LOGE("{}", "initialize: Event Manager has not been initialized\n");
return RETURN_FAILED;
}
ReturnValue_t result = manager->registerListener(eventQueue->getId());
@@ -34,7 +34,7 @@ ReturnValue_t FailureIsolationBase::initialize() {
}
owner = ObjectManager::instance()->get<HasHealthIF>(ownerId);
if (owner == nullptr) {
FSFW_FLOGE(
FSFW_LOGE(
"FailureIsolationBase::intialize: Owner object {:#08x} invalid. "
"Does it implement HasHealthIF?\n",
ownerId);
@@ -44,9 +44,8 @@ ReturnValue_t FailureIsolationBase::initialize() {
if (faultTreeParent != objects::NO_OBJECT) {
auto* parentIF = ObjectManager::instance()->get<ConfirmsFailuresIF>(faultTreeParent);
if (parentIF == nullptr) {
FSFW_FLOGW(
"intialize: Parent object {:#08x} invalid. Does it implement ConfirmsFailuresIF?\n",
faultTreeParent);
FSFW_LOGW("intialize: Parent object {:#08x} invalid. Does it implement ConfirmsFailuresIF?\n",
faultTreeParent);
return ObjectManagerIF::CHILD_INIT_FAILED;
}
eventQueue->setDefaultDestination(parentIF->getEventReceptionQueue());

View File

@@ -8,11 +8,11 @@
void arrayprinter::print(const uint8_t *data, size_t size, OutputType type, bool printInfo,
size_t maxCharPerLine) {
if (size == 0) {
FSFW_FLOGI("{}", "Size is zero, nothing to print\n");
FSFW_LOGI("{}", "Size is zero, nothing to print\n");
return;
}
FSFW_FLOGI("Printing data with size {}:\n", size);
FSFW_LOGI("Printing data with size {}:\n", size);
if (type == OutputType::HEX) {
arrayprinter::printHex(data, size, maxCharPerLine);
} else if (type == OutputType::DEC) {

View File

@@ -1,6 +1,6 @@
#include "fsfw/health/HealthHelper.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
HealthHelper::HealthHelper(HasHealthIF* owner, object_id_t objectId)
: objectId(objectId), owner(owner) {}
@@ -35,12 +35,12 @@ ReturnValue_t HealthHelper::initialize() {
eventSender = ObjectManager::instance()->get<EventReportingProxyIF>(objectId);
if (healthTable == nullptr) {
FSFW_FLOGE("{}", "initialize: Health table object needs to be created in factory\n");
FSFW_LOGE("{}", "initialize: Health table object needs to be created in factory\n");
return ObjectManagerIF::CHILD_INIT_FAILED;
}
if (eventSender == nullptr) {
FSFW_FLOGE("{}", "initialize: Owner has to implement ReportingProxyIF\n");
FSFW_LOGE("{}", "initialize: Owner has to implement ReportingProxyIF\n");
return ObjectManagerIF::CHILD_INIT_FAILED;
}
@@ -69,7 +69,7 @@ void HealthHelper::informParent(HasHealthIF::HealthState health,
HealthMessage::setHealthMessage(&information, HealthMessage::HEALTH_INFO, health, oldHealth);
if (MessageQueueSenderIF::sendMessage(parentQueue, &information, owner->getCommandQueue()) !=
HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGWT("informParent: Object ID {:#08x} | Sending health reply failed\n", objectId);
FSFW_LOGWT("informParent: Object ID {:#08x} | Sending health reply failed\n", objectId);
}
}
@@ -86,7 +86,7 @@ void HealthHelper::handleSetHealthCommand(CommandMessage* command) {
}
if (MessageQueueSenderIF::sendMessage(command->getSender(), &reply, owner->getCommandQueue()) !=
HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGWT("handleSetHealthCommand: Object ID {:#08x} | Sending health reply failed\n",
objectId);
FSFW_LOGWT("handleSetHealthCommand: Object ID {:#08x} | Sending health reply failed\n",
objectId);
}
}

View File

@@ -69,7 +69,7 @@ void HealthTable::printAll(uint8_t* pointer, size_t maxSize) {
ReturnValue_t result =
SerializeAdapter::serialize(&count, &pointer, &size, maxSize, SerializeIF::Endianness::BIG);
if (result != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGW("{}", "printAll: Serialization of health table failed\n");
FSFW_LOGW("{}", "printAll: Serialization of health table failed\n");
return;
}
for (const auto& health : healthMap) {

View File

@@ -3,7 +3,7 @@
#include "fsfw/datapool/PoolReadGuard.h"
#include "fsfw/ipc/MutexFactory.h"
#include "fsfw/ipc/QueueFactory.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
InternalErrorReporter::InternalErrorReporter(object_id_t setObjectId, uint32_t messageQueueDepth)
: SystemObject(setObjectId),

View File

@@ -15,7 +15,7 @@ MessageQueueMessage::MessageQueueMessage(uint8_t* data, size_t size)
memcpy(this->getData(), data, size);
this->messageSize = this->HEADER_SIZE + size;
} else {
FSFW_FLOGW("{}", "ctor: Passed size larger than maximum allowed size! Setting content to 0\n");
FSFW_LOGW("{}", "ctor: Passed size larger than maximum allowed size! Setting content to 0\n");
memset(this->internalBuffer, 0, sizeof(this->internalBuffer));
this->messageSize = this->HEADER_SIZE;
}

View File

@@ -17,7 +17,7 @@ ReturnValue_t MemoryHelper::handleMemoryCommand(CommandMessage* message) {
lastSender = message->getSender();
lastCommand = message->getCommand();
if (busy) {
FSFW_FLOGW("{}", "MemoryHelper: Busy\n");
FSFW_LOGW("{}", "MemoryHelper: Busy\n");
}
switch (lastCommand) {
case MemoryMessage::CMD_MEMORY_DUMP:

View File

@@ -2,7 +2,7 @@
#include "fsfw/ipc/MessageQueueSenderIF.h"
#include "fsfw/modes/HasModesIF.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
ModeHelper::ModeHelper(HasModesIF* owner)
: commandedMode(HasModesIF::MODE_OFF),

View File

@@ -7,10 +7,10 @@
#include "../serialize/SerialFixedArrayListAdapter.h"
#include "../serialize/SerialLinkedListAdapter.h"
#include "../serialize/SerializeElement.h"
#include "../serviceinterface/ServiceInterface.h"
#include "../timemanager/TimeStamperIF.h"
#include "HasMonitorsIF.h"
#include "MonitoringIF.h"
#include "fsfw/serviceinterface.h"
#include "monitoringConf.h"
namespace Factory {
@@ -81,7 +81,7 @@ class MonitoringReportContent : public SerialLinkedListAdapter<SerializeIF> {
if (timeStamper == nullptr) {
timeStamper = ObjectManager::instance()->get<TimeStamperIF>(timeStamperId);
if (timeStamper == nullptr) {
FSFW_FLOGET("{}", "checkAndSetStamper: Stamper not found\n");
FSFW_LOGET("{}", "checkAndSetStamper: Stamper not found\n");
return false;
}
}

View File

@@ -36,10 +36,10 @@ ReturnValue_t ObjectManager::insert(object_id_t id, SystemObjectIF* object) {
// sif::debug << "ObjectManager::insert: Object " << std::hex
// << (int)id << std::dec << " inserted." << std::endl;
#endif
return this->RETURN_OK;
return ObjectManager::RETURN_OK;
} else {
FSFW_FLOGET("ObjectManager::insert: Object ID {:#08x} is already in use\nTerminating program\n",
static_cast<uint32_t>(id));
FSFW_LOGET("ObjectManager::insert: Object ID {:#08x} is already in use\nTerminating program\n",
static_cast<uint32_t>(id));
// This is very severe and difficult to handle in other places.
std::exit(INSERTION_FAILED);
}
@@ -54,7 +54,7 @@ ReturnValue_t ObjectManager::remove(object_id_t id) {
#endif
return RETURN_OK;
} else {
FSFW_FLOGW("removeObject: Requested object {:#08x} not found\n", id);
FSFW_LOGW("removeObject: Requested object {:#08x} not found\n", id);
return NOT_FOUND;
}
}
@@ -78,27 +78,27 @@ void ObjectManager::initialize() {
result = it.second->initialize();
if (result != RETURN_OK) {
object_id_t var = it.first;
FSFW_FLOGWT("initialize: Object {:#08x} failed to initialize with code {:#04x}\n", var,
result);
FSFW_LOGWT("initialize: Object {:#08x} failed to initialize with code {:#04x}\n", var,
result);
errorCount++;
}
}
if (errorCount > 0) {
FSFW_FLOGWT("{}", "initialize: Counted failed initializations\n");
FSFW_LOGWT("{}", "initialize: Counted failed initializations\n");
}
// Init was successful. Now check successful interconnections.
errorCount = 0;
for (auto const& it : objectList) {
result = it.second->checkObjectConnections();
if (result != RETURN_OK) {
FSFW_FLOGE("initialize: Object {:#08x} connection check failed with code {:#04x}\n", it.first,
result);
FSFW_LOGE("initialize: Object {:#08x} connection check failed with code {:#04x}\n", it.first,
result);
errorCount++;
}
}
if (errorCount > 0) {
FSFW_FLOGE("{}", "ObjectManager::ObjectManager: Counted {} failed connection checks\n",
errorCount);
FSFW_LOGE("{}", "ObjectManager::ObjectManager: Counted {} failed connection checks\n",
errorCount);
}
}

View File

@@ -2,9 +2,9 @@
#define FSFW_OBJECTMANAGER_OBJECTMANAGERIF_H_
#include "../returnvalues/HasReturnvaluesIF.h"
#include "../serviceinterface/ServiceInterface.h"
#include "SystemObjectIF.h"
#include "frameworkObjects.h"
#include "fsfw/serviceinterface.h"
/**
* @brief This class provides an interface to the global object manager.

View File

@@ -3,7 +3,7 @@
#include "fsfw/ipc/MutexGuard.h"
#include "fsfw/osal/common/TcpTmTcBridge.h"
#include "fsfw/platform.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
#ifdef PLATFORM_WIN

View File

@@ -210,7 +210,7 @@ ReturnValue_t TcpTmTcServer::handleTcReception(uint8_t* spacePacket, size_t pack
store_address_t storeId;
ReturnValue_t result = tcStore->addData(&storeId, spacePacket, packetSize);
if (result != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGWT("handleTcReception: Data storage with packet size {} failed\n", packetSize);
FSFW_LOGWT("handleTcReception: Data storage with packet size {} failed\n", packetSize);
return result;
}

View File

@@ -3,7 +3,7 @@
#include "fsfw/ipc/MutexGuard.h"
#include "fsfw/osal/common/tcpipHelpers.h"
#include "fsfw/platform.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
#ifdef PLATFORM_WIN
#include <ws2tcpip.h>

View File

@@ -61,9 +61,9 @@ void tcpip::printAddress(struct sockaddr *addr) {
}
}
if (stringPtr == nullptr) {
FSFW_FLOGDT("Could not convert IP address to text representation, error code {} | {}", errno,
strerror(errno));
FSFW_LOGDT("Could not convert IP address to text representation, error code {} | {}", errno,
strerror(errno));
} else {
FSFW_FLOGDT("IP Address Sender {}\n", ipAddress);
FSFW_LOGDT("IP Address Sender {}\n", ipAddress);
}
}

View File

@@ -4,7 +4,7 @@
#include "fsfw/ipc/MutexGuard.h"
#include "fsfw/platform.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
#if defined(PLATFORM_WIN)
#include <sysinfoapi.h>

View File

@@ -116,7 +116,7 @@ ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId, uint32_t slotT
return HasReturnvaluesIF::RETURN_OK;
}
FSFW_FLOGE("addSlot: Component {:#08x} not found, not adding it to PST\n", componentId);
FSFW_LOGE("addSlot: Component {:#08x} not found, not adding it to PST\n", componentId);
return HasReturnvaluesIF::RETURN_FAILED;
}

View File

@@ -6,7 +6,7 @@
#include "fsfw/ipc/MutexGuard.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/osal/host/QueueMapManager.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
MessageQueue::MessageQueue(size_t messageDepth, size_t maxMessageSize, MqArgs* args)
: MessageQueueBase(MessageQueueIF::NO_QUEUE, MessageQueueIF::NO_QUEUE, args),

View File

@@ -1,8 +1,8 @@
#include "fsfw/osal/host/Mutex.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
Mutex::Mutex() {}
Mutex::Mutex() = default;
ReturnValue_t Mutex::lockMutex(TimeoutType timeoutType, uint32_t timeoutMs) {
if (timeoutType == TimeoutType::BLOCKING) {

View File

@@ -5,7 +5,7 @@
#include "fsfw/ipc/MessageQueueMessageIF.h"
#include "fsfw/ipc/MessageQueueSenderIF.h"
#include "fsfw/osal/host/MessageQueue.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
QueueFactory* QueueFactory::factoryInstance = nullptr;

View File

@@ -2,7 +2,7 @@
#include "fsfw/ipc/MutexFactory.h"
#include "fsfw/ipc/MutexGuard.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
QueueMapManager* QueueMapManager::mqManagerInstance = nullptr;

View File

@@ -95,12 +95,7 @@ void tcpip::handleError(Protocol protocol, ErrorSources errorSrc, dur_millis_t s
}
}
#if FSFW_CPP_OSTREAM_ENABLED == 1
FSFW_FLOGWT("tcpip::handleError: {} | {} | {}\n", protocolString, errorSrcString, infoString);
#else
sif::printWarning("tcpip::handleError: %s | %s | %s\n", protocolString.c_str(),
errorSrcString.c_str(), infoString.c_str());
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
FSFW_LOGWT("tcpip::handleError: {} | {} | {}\n", protocolString, errorSrcString, infoString);
if (sleepDuration > 0) {
TaskFactory::delayTask(sleepDuration);

View File

@@ -44,9 +44,9 @@ ReturnValue_t ParameterHelper::handleParameterMessage(CommandMessage* message) {
ConstStorageAccessor accessor(storeId);
result = storage->getData(storeId, accessor);
if (result != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGE("{}",
"ParameterHelper::handleParameterMessage: Getting store data failed for "
"load command\n");
FSFW_LOGE("{}",
"ParameterHelper::handleParameterMessage: Getting store data failed for "
"load command\n");
break;
}

View File

@@ -209,23 +209,23 @@ ReturnValue_t ParameterWrapper::set(const uint8_t *stream, size_t streamSize,
ReturnValue_t ParameterWrapper::copyFrom(const ParameterWrapper *from,
uint16_t startWritingAtIndex) {
if (data == nullptr) {
FSFW_FLOGWT("{}", "copyFrom: Called on read-only variable\n");
FSFW_LOGWT("{}", "copyFrom: Called on read-only variable\n");
return READONLY;
}
if (from->readonlyData == nullptr) {
FSFW_FLOGWT("{}", "copyFrom: Source not set\n");
FSFW_LOGWT("{}", "copyFrom: Source not set\n");
return SOURCE_NOT_SET;
}
if (type != from->type) {
FSFW_FLOGW("{}", "copyFrom: Datatype missmatch\n");
FSFW_LOGW("{}", "copyFrom: Datatype missmatch\n");
return DATATYPE_MISSMATCH;
}
// The smallest allowed value for rows and columns is one.
if (rows == 0 or columns == 0) {
FSFW_FLOGW("{}", "ParameterWrapper::copyFrom: Columns or rows zero\n");
FSFW_LOGW("{}", "ParameterWrapper::copyFrom: Columns or rows zero\n");
return COLUMN_OR_ROWS_ZERO;
}

View File

@@ -1,7 +1,7 @@
#include "fsfw/power/PowerSwitcher.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
PowerSwitcher::PowerSwitcher(uint8_t setSwitch1, uint8_t setSwitch2,
PowerSwitcher::State_t setStartState)

View File

@@ -5,7 +5,7 @@
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/pus/servicepackets/Service200Packets.h"
#include "fsfw/serialize/SerialLinkedListAdapter.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
CService200ModeCommanding::CService200ModeCommanding(object_id_t objectId, uint16_t apid,
uint8_t serviceId, uint8_t numParallelCommands,
@@ -13,7 +13,7 @@ CService200ModeCommanding::CService200ModeCommanding(object_id_t objectId, uint1
: CommandingServiceBase(objectId, apid, serviceId, numParallelCommands, commandTimeoutSeconds) {
}
CService200ModeCommanding::~CService200ModeCommanding() {}
CService200ModeCommanding::~CService200ModeCommanding() = default;
ReturnValue_t CService200ModeCommanding::isValidSubservice(uint8_t subservice) {
switch (subservice) {

View File

@@ -2,13 +2,13 @@
#include "fsfw/FSFW.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
#include "fsfw/tmtcpacket/pus/tm/TmPacketStored.h"
Service17Test::Service17Test(object_id_t objectId, uint16_t apid, uint8_t serviceId)
: PusServiceBase(objectId, apid, serviceId), packetSubCounter(0) {}
Service17Test::~Service17Test() {}
Service17Test::~Service17Test() = default;
ReturnValue_t Service17Test::handleRequest(uint8_t subservice) {
switch (subservice) {

View File

@@ -5,7 +5,7 @@
#include "fsfw/parameters/ParameterMessage.h"
#include "fsfw/parameters/ReceivesParameterMessagesIF.h"
#include "fsfw/pus/servicepackets/Service20Packets.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
Service20ParameterManagement::Service20ParameterManagement(object_id_t objectId, uint16_t apid,
uint8_t serviceId,
@@ -22,7 +22,7 @@ ReturnValue_t Service20ParameterManagement::isValidSubservice(uint8_t subservice
case Subservice::PARAMETER_DUMP:
return HasReturnvaluesIF::RETURN_OK;
default:
FSFW_FLOGE("Invalid Subservice {} for Service 20\n", subservice);
FSFW_LOGE("Invalid Subservice {} for Service 20\n", subservice);
return AcceptsTelecommandsIF::INVALID_SUBSERVICE;
}
}
@@ -55,7 +55,7 @@ ReturnValue_t Service20ParameterManagement::checkInterfaceAndAcquireMessageQueue
// check ReceivesParameterMessagesIF property of target
auto* possibleTarget = ObjectManager::instance()->get<ReceivesParameterMessagesIF>(*objectId);
if (possibleTarget == nullptr) {
FSFW_FLOGE(
FSFW_LOGE(
"checkInterfaceAndAcquire: Can't retrieve message queue | Object ID {:#08x}\n"
"Does it implement ReceivesParameterMessagesIF?\n",
*objectId);

View File

@@ -25,7 +25,7 @@ ReturnValue_t Service2DeviceAccess::isValidSubservice(uint8_t subservice) {
case Subservice::COMMAND_TOGGLE_WIRETAPPING:
return HasReturnvaluesIF::RETURN_OK;
default:
FSFW_FLOGW("Invalid Subservice {}\n", subservice);
FSFW_LOGW("Invalid Subservice {}\n", subservice);
return AcceptsTelecommandsIF::INVALID_SUBSERVICE;
}
}
@@ -116,8 +116,8 @@ void Service2DeviceAccess::handleUnrequestedReply(CommandMessage* reply) {
sendWiretappingTm(reply, static_cast<uint8_t>(Subservice::REPLY_RAW));
break;
default:
FSFW_FLOGET("handleUnrequestedReply: Unknown message with command ID {}\n",
reply->getCommand());
FSFW_LOGET("handleUnrequestedReply: Unknown message with command ID {}\n",
reply->getCommand());
break;
}
// Must be reached by all cases to clear message

View File

@@ -212,7 +212,7 @@ ReturnValue_t Service3Housekeeping::handleReply(const CommandMessage* reply,
}
default:
FSFW_FLOGW("handleReply: Invalid reply with reply command {}\n", command);
FSFW_LOGW("handleReply: Invalid reply with reply command {}\n", command);
return CommandingServiceBase::INVALID_REPLY;
}
return HasReturnvaluesIF::RETURN_OK;

View File

@@ -4,7 +4,7 @@
#include "fsfw/ipc/QueueFactory.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/pus/servicepackets/Service5Packets.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
#include "fsfw/tmtcpacket/pus/tm/TmPacketStored.h"
Service5EventReporting::Service5EventReporting(object_id_t objectId, uint16_t apid,

View File

@@ -2,14 +2,14 @@
#include "fsfw/events/EventManagerIF.h"
#include "fsfw/pus/servicepackets/Service9Packets.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
#include "fsfw/timemanager/CCSDSTime.h"
Service9TimeManagement::Service9TimeManagement(object_id_t objectId, uint16_t apid,
uint8_t serviceId)
: PusServiceBase(objectId, apid, serviceId) {}
Service9TimeManagement::~Service9TimeManagement() {}
Service9TimeManagement::~Service9TimeManagement() = default;
ReturnValue_t Service9TimeManagement::performService() { return RETURN_OK; }

View File

@@ -4,7 +4,7 @@
#include "../../action/ActionMessage.h"
#include "../../objectmanager/SystemObjectIF.h"
#include "../../serialize/SerialLinkedListAdapter.h"
#include "../../serviceinterface/ServiceInterfaceStream.h"
#include "fsfw/serviceinterface.h"
/**
* @brief Subservice 128

View File

@@ -95,7 +95,7 @@ ReturnValue_t SerialBufferAdapter<count_t>::deSerialize(const uint8_t** buffer,
template <typename count_t>
uint8_t* SerialBufferAdapter<count_t>::getBuffer() {
if (buffer == nullptr) {
FSFW_FLOGW("{}", "getBuffer: Wrong access function for stored type. Use getConstBuffer\n");
FSFW_LOGW("{}", "getBuffer: Wrong access function for stored type. Use getConstBuffer\n");
return nullptr;
}
return buffer;
@@ -104,7 +104,7 @@ uint8_t* SerialBufferAdapter<count_t>::getBuffer() {
template <typename count_t>
const uint8_t* SerialBufferAdapter<count_t>::getConstBuffer() const {
if (constBuffer == nullptr) {
FSFW_FLOGE("{}", "getConstBuffer: Buffers are unitialized\n");
FSFW_LOGE("{}", "getConstBuffer: Buffers are unitialized\n");
return nullptr;
}
return constBuffer;

View File

@@ -2,6 +2,5 @@
#define FSFW_SRC_FSFW_SERVICEINTERFACE_H_
#include "serviceinterface/fmtWrapper.h"
//#include "serviceinterface/ServiceInterface.h"
#endif /* FSFW_SRC_FSFW_SERVICEINTERFACE_H_ */

View File

@@ -1,6 +1,3 @@
target_sources(${LIB_FSFW_NAME} PRIVATE
fmtWrapper.cpp
ServiceInterfaceStream.cpp
ServiceInterfaceBuffer.cpp
ServiceInterfacePrinter.cpp
)

View File

@@ -213,30 +213,13 @@ void error_st(const char* file, unsigned int line, fmt::format_string<T...> fmt,
// The macros postfixed with T are the log variant with timing information
#define FSFW_LOGI(...) sif::info(__VA_ARGS__)
#define FSFW_FLOGI(format, ...) sif::info(FMT_STRING(format), __VA_ARGS__)
#define FSFW_LOGIT(...) sif::info_t(__VA_ARGS__)
#define FSFW_FLOGIT(format, ...) sif::info_t(FMT_STRING(format), __VA_ARGS__)
#define FSFW_LOGD(...) sif::debug(__FILENAME__, __LINE__, __VA_ARGS__)
#define FSFW_FLOGD(format, ...) sif::debug(__FILENAME__, __LINE__, FMT_STRING(format), __VA_ARGS__)
#define FSFW_LOGDT(...) sif::debug_t(__FILENAME__, __LINE__, __VA_ARGS__)
#define FSFW_FLOGDT(format, ...) \
sif::debug_t(__FILENAME__, __LINE__, FMT_STRING(format), __VA_ARGS__)
#define FSFW_LOGW(...) sif::warning_s(__FILENAME__, __LINE__, __VA_ARGS__)
#define FSFW_FLOGW(format, ...) \
sif::warning_s(__FILENAME__, __LINE__, FMT_STRING(format), __VA_ARGS__)
#define FSFW_LOGWT(...) sif::warning_st(__FILENAME__, __LINE__, __VA_ARGS__)
#define FSFW_FLOGWT(format, ...) \
sif::warning_st(__FILENAME__, __LINE__, FMT_STRING(format), __VA_ARGS__)
#define FSFW_LOGE(...) sif::error_s(__FILENAME__, __LINE__, __VA_ARGS__)
#define FSFW_FLOGE(format, ...) \
sif::error_s(__FILENAME__, __LINE__, FMT_STRING(format), __VA_ARGS__)
#define FSFW_LOGET(...) sif::error_st(__FILENAME__, __LINE__, __VA_ARGS__)
#define FSFW_FLOGET(format, ...) \
sif::error_st(__FILENAME__, __LINE__, FMT_STRING(format), __VA_ARGS__)

View File

@@ -46,14 +46,14 @@ const uint8_t* ConstStorageAccessor::data() const { return constDataPointer; }
size_t ConstStorageAccessor::size() const {
if (internalState == AccessState::UNINIT) {
FSFW_FLOGW("{}", "size: Not initialized\n");
FSFW_LOGW("{}", "size: Not initialized\n");
}
return size_;
}
ReturnValue_t ConstStorageAccessor::getDataCopy(uint8_t* pointer, size_t maxSize) {
if (internalState == AccessState::UNINIT) {
FSFW_FLOGW("{}", "getDataCopy: Not initialized\n");
FSFW_LOGW("{}", "getDataCopy: Not initialized\n");
return HasReturnvaluesIF::RETURN_FAILED;
}
if (size_ > maxSize) {

View File

@@ -12,7 +12,7 @@ LocalPool::LocalPool(object_id_t setObjectId, const LocalPoolConfig& poolConfig,
NUMBER_OF_SUBPOOLS(poolConfig.size()),
spillsToHigherPools(spillsToHigherPools) {
if (NUMBER_OF_SUBPOOLS == 0) {
FSFW_FLOGW("{}", "ctor: Passed pool configuration is invalid, 0 subpools\n");
FSFW_LOGW("{}", "ctor: Passed pool configuration is invalid, 0 subpools\n");
}
max_subpools_t index = 0;
for (const auto& currentPoolConfig : poolConfig) {
@@ -125,8 +125,8 @@ ReturnValue_t LocalPool::deleteData(store_address_t storeId) {
sizeLists[storeId.poolIndex][storeId.packetIndex] = STORAGE_FREE;
} else {
// pool_index or packet_index is too large
FSFW_FLOGWT("Object ID {} | deleteData: Illegal store ID, no deletion\n",
SystemObject::getObjectId());
FSFW_LOGWT("Object ID {} | deleteData: Illegal store ID, no deletion\n",
SystemObject::getObjectId());
status = ILLEGAL_STORAGE_ID;
}
return status;
@@ -175,7 +175,7 @@ ReturnValue_t LocalPool::initialize() {
// Check if any pool size is large than the maximum allowed.
for (uint8_t count = 0; count < NUMBER_OF_SUBPOOLS; count++) {
if (elementSizes[count] >= STORAGE_FREE) {
FSFW_FLOGW(
FSFW_LOGW(
"LocalPool::initialize: Pool is too large- "
"Max. allowed size is: {}\n",
STORAGE_FREE - 1);
@@ -199,7 +199,7 @@ ReturnValue_t LocalPool::reserveSpace(const size_t size, store_address_t* storeI
bool ignoreFault) {
ReturnValue_t status = getSubPoolIndex(size, &storeId->poolIndex);
if (status != RETURN_OK) {
FSFW_FLOGW("ID {:#08x} | reserveSpace: Packet too large\n", SystemObject::getObjectId());
FSFW_LOGW("ID {:#08x} | reserveSpace: Packet too large\n", SystemObject::getObjectId());
return status;
}
status = findEmpty(storeId->poolIndex, &storeId->packetIndex);

View File

@@ -9,7 +9,7 @@
#include "fsfw/internalerror/InternalErrorReporterIF.h"
#include "fsfw/objectmanager/ObjectManagerIF.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
#include "fsfw/serviceinterface.h"
#include "fsfw/storagemanager/StorageAccessor.h"
#include "fsfw/storagemanager/StorageManagerIF.h"

View File

@@ -23,7 +23,7 @@ StorageAccessor::StorageAccessor(StorageAccessor&& other)
ReturnValue_t StorageAccessor::getDataCopy(uint8_t* pointer, size_t maxSize) {
if (internalState == AccessState::UNINIT) {
FSFW_FLOGW("{}", "getDataCopy: Not initialized\n");
FSFW_LOGW("{}", "getDataCopy: Not initialized\n");
return HasReturnvaluesIF::RETURN_FAILED;
}
if (size_ > maxSize) {

View File

@@ -2,7 +2,7 @@
#include "fsfw/ipc/QueueFactory.h"
#include "fsfw/objectmanager/ObjectManager.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
SubsystemBase::SubsystemBase(object_id_t setObjectId, object_id_t parent, Mode_t initialMode,
uint16_t commandQueueDepth)

View File

@@ -90,7 +90,7 @@ void FixedSlotSequence::addSlot(object_id_t componentId, uint32_t slotTimeMs, in
ReturnValue_t FixedSlotSequence::checkSequence() const {
if (slotList.empty()) {
FSFW_FLOGW("{}", "FixedSlotSequence::checkSequence: Slot list is empty\n");
FSFW_LOGW("{}", "FixedSlotSequence::checkSequence: Slot list is empty\n");
return FixedTimeslotTaskIF::SLOT_LIST_EMPTY;
}
@@ -98,7 +98,7 @@ ReturnValue_t FixedSlotSequence::checkSequence() const {
ReturnValue_t result = customCheckFunction(slotList);
if (result != HasReturnvaluesIF::RETURN_OK) {
// Continue for now but print error output.
FSFW_FLOGW("FixedSlotSequence::checkSequence: Custom check failed with result {}", result);
FSFW_LOGW("FixedSlotSequence::checkSequence: Custom check failed with result {}", result);
}
}
@@ -108,8 +108,8 @@ ReturnValue_t FixedSlotSequence::checkSequence() const {
if (slot.executableObject == nullptr) {
errorCount++;
} else if (slot.pollingTimeMs < time) {
FSFW_FLOGET("FixedSlotSequence::checkSequence: Time {} is smaller than previous with {}\n",
slot.pollingTimeMs, time);
FSFW_LOGET("FixedSlotSequence::checkSequence: Time {} is smaller than previous with {}\n",
slot.pollingTimeMs, time);
errorCount++;
} else {
// All ok, print slot.
@@ -144,7 +144,7 @@ ReturnValue_t FixedSlotSequence::intializeSequenceAfterTaskCreation() const {
}
}
if (count > 0) {
FSFW_FLOGE(
FSFW_LOGE(
"FixedSlotSequence::intializeSequenceAfterTaskCreation: Counted {} "
"failed initializations\n",
count);

View File

@@ -27,7 +27,7 @@ TcDistributor::TcMqMapIter CCSDSDistributor::selectDestination() {
size_t size = 0;
ReturnValue_t result = this->tcStore->getData(currentMessage.getStorageId(), &packet, &size);
if (result != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGWT("{}", "selectDestination: Getting data from store failed");
FSFW_LOGWT("{}", "selectDestination: Getting data from store failed");
}
SpacePacketBase currentPacket(packet);

View File

@@ -22,8 +22,8 @@ CFDPDistributor::~CFDPDistributor() {}
CFDPDistributor::TcMqMapIter CFDPDistributor::selectDestination() {
#if FSFW_CFDP_DISTRIBUTOR_DEBUGGING == 1
store_address_t storeId = this->currentMessage.getStorageId();
FSFW_FLOGI("selectDestination was called with pool index {} and packet index {}\n",
storeId.poolIndex, storeId.packetIndex);
FSFW_LOGI("selectDestination was called with pool index {} and packet index {}\n",
storeId.poolIndex, storeId.packetIndex);
#endif
TcMqMapIter queueMapIt = this->queueMap.end();
if (this->currentPacket == nullptr) {
@@ -33,8 +33,7 @@ CFDPDistributor::TcMqMapIter CFDPDistributor::selectDestination() {
if (currentPacket->getWholeData() != nullptr) {
tcStatus = checker.checkPacket(currentPacket);
if (tcStatus != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGWT("selectDestination: Packet format invalid, code {}\n",
static_cast<int>(tcStatus));
FSFW_LOGWT("selectDestination: Packet format invalid, code {}\n", static_cast<int>(tcStatus));
}
queueMapIt = this->queueMap.find(0);
} else {
@@ -43,7 +42,7 @@ CFDPDistributor::TcMqMapIter CFDPDistributor::selectDestination() {
if (queueMapIt == this->queueMap.end()) {
tcStatus = DESTINATION_NOT_FOUND;
FSFW_FLOGWT("{}", "handlePacket: Destination not found\n");
FSFW_LOGWT("{}", "handlePacket: Destination not found\n");
}
if (tcStatus != RETURN_OK) {
@@ -56,11 +55,11 @@ CFDPDistributor::TcMqMapIter CFDPDistributor::selectDestination() {
ReturnValue_t CFDPDistributor::registerHandler(AcceptsTelecommandsIF* handler) {
uint16_t handlerId =
handler->getIdentifier(); // should be 0, because CFDPHandler does not set a set a service-ID
FSFW_FLOGIT("CFDPDistributor::registerHandler: Handler ID {}\n", static_cast<int>(handlerId));
FSFW_LOGIT("CFDPDistributor::registerHandler: Handler ID {}\n", static_cast<int>(handlerId));
MessageQueueId_t queue = handler->getRequestQueue();
auto returnPair = queueMap.emplace(handlerId, queue);
if (not returnPair.second) {
FSFW_FLOGE("{}", "CFDPDistributor::registerHandler: Service ID already exists in map\n");
FSFW_LOGE("{}", "CFDPDistributor::registerHandler: Service ID already exists in map\n");
return SERVICE_ID_ALREADY_EXISTS;
}
return HasReturnvaluesIF::RETURN_OK;
@@ -97,7 +96,7 @@ ReturnValue_t CFDPDistributor::initialize() {
auto* ccsdsDistributor = ObjectManager::instance()->get<CCSDSDistributorIF>(packetSource);
if (ccsdsDistributor == nullptr) {
FSFW_FLOGE("{}", "initialize: Packet source invalid. Does it implement CCSDSDistributorIF?\n");
FSFW_LOGE("{}", "initialize: Packet source invalid. Does it implement CCSDSDistributorIF?\n");
return RETURN_FAILED;
}
return ccsdsDistributor->registerApplication(this);

View File

@@ -44,7 +44,7 @@ PUSDistributor::TcMqMapIter PUSDistributor::selectDestination() {
} else if (tcStatus == TcPacketCheckPUS::INCOMPLETE_PACKET) {
keyword = "incomplete packet";
}
FSFW_FLOGWT("selectDestination: Packet format invalid, {} error\n", keyword);
FSFW_LOGWT("selectDestination: Packet format invalid, {} error\n", keyword);
#endif
}
uint32_t queue_id = currentPacket->getService();

View File

@@ -33,9 +33,9 @@ ReturnValue_t TcDistributor::handlePacket() {
}
void TcDistributor::print() {
FSFW_FLOGI("{}", "Distributor content is:\nID\t| Message Queue ID");
FSFW_LOGI("{}", "Distributor content is:\nID\t| Message Queue ID");
for (const auto& queueMapIter : queueMap) {
FSFW_FLOGI("{} \t| {:#08x}", queueMapIter.first, queueMapIter.second);
FSFW_LOGI("{} \t| {:#08x}", queueMapIter.first, queueMapIter.second);
}
}

View File

@@ -1,7 +1,7 @@
#include "fsfw/tcdistribution/TcPacketCheckPUS.h"
#include "fsfw/globalfunctions/CRC.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
#include "fsfw/storagemanager/StorageManagerIF.h"
#include "fsfw/tmtcpacket/pus/tc/TcPacketPusBase.h"
#include "fsfw/tmtcpacket/pus/tc/TcPacketStoredBase.h"
@@ -11,8 +11,8 @@
TcPacketCheckPUS::TcPacketCheckPUS(uint16_t setApid) : apid(setApid) {}
ReturnValue_t TcPacketCheckPUS::checkPacket(SpacePacketBase* currentPacket) {
TcPacketStoredBase* storedPacket = dynamic_cast<TcPacketStoredBase*>(currentPacket);
TcPacketPusBase* tcPacketBase = dynamic_cast<TcPacketPusBase*>(currentPacket);
auto* storedPacket = dynamic_cast<TcPacketStoredBase*>(currentPacket);
auto* tcPacketBase = dynamic_cast<TcPacketPusBase*>(currentPacket);
if (tcPacketBase == nullptr or storedPacket == nullptr) {
return RETURN_FAILED;
}

View File

@@ -31,10 +31,10 @@ void Stopwatch::display() {
if (displayMode == StopwatchDisplayMode::MILLIS) {
auto timeMillis =
static_cast<dur_millis_t>(elapsedTime.tv_sec * 1000 + elapsedTime.tv_usec / 1000);
FSFW_FLOGIT("Stopwatch::display: {} ms elapsed\n", timeMillis);
FSFW_LOGIT("Stopwatch::display: {} ms elapsed\n", timeMillis);
} else if (displayMode == StopwatchDisplayMode::SECONDS) {
FSFW_FLOGIT("Stopwatch::display: {} seconds elapsed\n",
static_cast<float>(timevalOperations::toDouble(elapsedTime)));
FSFW_LOGIT("Stopwatch::display: {} seconds elapsed\n",
static_cast<float>(timevalOperations::toDouble(elapsedTime)));
}
}

View File

@@ -18,7 +18,7 @@ uint8_t SpacePacketBase::getPacketVersionNumber(void) {
ReturnValue_t SpacePacketBase::initSpacePacketHeader(bool isTelecommand, bool hasSecondaryHeader,
uint16_t apid, uint16_t sequenceCount) {
if (data == nullptr) {
FSFW_FLOGWT("{}", "initSpacePacketHeader: Data pointer is invalid\n");
FSFW_LOGWT("{}", "initSpacePacketHeader: Data pointer is invalid\n");
return HasReturnvaluesIF::RETURN_FAILED;
}
// reset header to zero:

View File

@@ -11,6 +11,6 @@ CFDPPacket::CFDPPacket(const uint8_t* setData) : SpacePacketBase(setData) {}
CFDPPacket::~CFDPPacket() {}
void CFDPPacket::print() {
FSFW_FLOGI("{}", "CFDPPacket::print:\n");
FSFW_LOGI("{}", "CFDPPacket::print:\n");
arrayprinter::print(getWholeData(), getFullSize());
}

View File

@@ -7,7 +7,7 @@
#include "fsfw/globalfunctions/CRC.h"
#include "fsfw/globalfunctions/arrayprinter.h"
#include "fsfw/objectmanager/ObjectManagerIF.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
#include "fsfw/timemanager/CCSDSTime.h"
TmPacketPusA::TmPacketPusA(uint8_t* setData) : TmPacketBase(setData) {

View File

@@ -7,7 +7,7 @@
#include "fsfw/globalfunctions/CRC.h"
#include "fsfw/globalfunctions/arrayprinter.h"
#include "fsfw/objectmanager/ObjectManagerIF.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
#include "fsfw/timemanager/CCSDSTime.h"
TmPacketPusC::TmPacketPusC(uint8_t* setData) : TmPacketBase(setData) {

View File

@@ -87,33 +87,16 @@ void TmPacketStoredBase::handleStoreFailure(const char *const packetType, Return
checkAndReportLostTm();
#if FSFW_VERBOSE_LEVEL >= 1
switch (result) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
case (StorageManagerIF::DATA_STORAGE_FULL): {
FSFW_FLOGWT("handleStoreFailure: {} | Store full for packet with size {}\n", packetType,
sizeToReserve);
FSFW_LOGWT("handleStoreFailure: {} | Store full for packet with size {}\n", packetType,
sizeToReserve);
break;
}
case (StorageManagerIF::DATA_TOO_LARGE): {
FSFW_FLOGWT("handleStoreFailure: {} | Data with size {} too large\n", packetType,
sizeToReserve);
FSFW_LOGWT("handleStoreFailure: {} | Data with size {} too large\n", packetType,
sizeToReserve);
break;
}
#else
case (StorageManagerIF::DATA_STORAGE_FULL): {
sif::printWarning(
"TmPacketStoredPus%s: Store full for packet with "
"size %d\n",
packetType, sizeToReserve);
break;
}
case (StorageManagerIF::DATA_TOO_LARGE): {
sif::printWarning(
"TmPacketStoredPus%s: Data with size "
"%d too large\n",
packetType, sizeToReserve);
break;
}
#endif
}
#endif
}

View File

@@ -2,7 +2,7 @@
#include <cstring>
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
#include "fsfw/tmtcservices/TmTcMessage.h"
TmPacketStoredPusA::TmPacketStoredPusA(store_address_t setAddress)
@@ -17,10 +17,10 @@ TmPacketStoredPusA::TmPacketStoredPusA(uint16_t apid, uint8_t service, uint8_t s
return;
}
uint8_t *pData = nullptr;
size_t sizeToReserve = getPacketMinimumSize() + size + headerSize;
size_t sizeToReserve = TmPacketPusA::getPacketMinimumSize() + size + headerSize;
ReturnValue_t returnValue = store->getFreeElement(&storeAddress, sizeToReserve, &pData);
if (returnValue != store->RETURN_OK) {
if (returnValue != StorageManagerIF::RETURN_OK) {
handleStoreFailure("A", returnValue, sizeToReserve);
return;
}

View File

@@ -2,7 +2,7 @@
#include <cstring>
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
#include "fsfw/tmtcservices/TmTcMessage.h"
TmPacketStoredPusC::TmPacketStoredPusC(store_address_t setAddress)

View File

@@ -95,7 +95,7 @@ void CommandingServiceBase::handleCommandQueue() {
} else if (result == MessageQueueIF::EMPTY) {
break;
} else {
FSFW_FLOGWT(
FSFW_LOGWT(
"CommandingServiceBase::handleCommandQueue: Receiving message failed"
"with code {}",
result);

View File

@@ -22,7 +22,7 @@ ReturnValue_t PusServiceBase::performOperation(uint8_t opCode) {
handleRequestQueue();
ReturnValue_t result = this->performService();
if (result != RETURN_OK) {
FSFW_FLOGWT("performOperation: PUS service {} return with error {}\n", serviceId, result);
FSFW_LOGWT("performOperation: PUS service {} return with error {}\n", serviceId, result);
return RETURN_FAILED;
}
return RETURN_OK;
@@ -71,8 +71,8 @@ void PusServiceBase::handleRequestQueue() {
// ": no new packet." << std::endl;
break;
} else {
FSFW_FLOGWT("performOperation: Service {}. Error receiving packed, code {}\n", serviceId,
status);
FSFW_LOGWT("performOperation: Service {}. Error receiving packed, code {}\n", serviceId,
status);
}
}
}
@@ -89,7 +89,7 @@ ReturnValue_t PusServiceBase::initialize() {
auto* destService = ObjectManager::instance()->get<AcceptsTelemetryIF>(packetDestination);
auto* distributor = ObjectManager::instance()->get<PUSDistributorIF>(packetSource);
if (destService == nullptr or distributor == nullptr) {
FSFW_FLOGWT(
FSFW_LOGWT(
"ctor: Service {} | Make sure static packetSource and packetDestination "
"are defined correctly\n",
serviceId);

View File

@@ -37,7 +37,7 @@ ReturnValue_t TmTcBridge::setMaxNumberOfPacketsStored(uint8_t maxNumberOfPackets
this->maxNumberOfPacketsStored = maxNumberOfPacketsStored_;
return RETURN_OK;
} else {
FSFW_FLOGW(
FSFW_LOGW(
"setMaxNumberOfPacketsStored: Passed number of packets {} stored exceeds "
"limit {}\nKeeping default value\n",
maxNumberOfPacketsStored_, LIMIT_DOWNLINK_PACKETS_STORED);
@@ -87,7 +87,7 @@ ReturnValue_t TmTcBridge::handleTm() {
ReturnValue_t status = HasReturnvaluesIF::RETURN_OK;
ReturnValue_t result = handleTmQueue();
if (result != RETURN_OK) {
FSFW_FLOGET("handleTm: Error handling TM queue with error code {:#04x}\n", result);
FSFW_LOGET("handleTm: Error handling TM queue with error code {:#04x}\n", result);
status = result;
}

View File

@@ -26,8 +26,8 @@ void VerificationReporter::sendSuccessReport(uint8_t set_report_id, TcPacketPusB
currentPacket->getPacketSequenceControl(), 0, set_step);
ReturnValue_t status = MessageQueueSenderIF::sendMessage(acknowledgeQueue, &message);
if (status != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGET("VerificationReporter::sendSuccessReport: Error writing to queue. Code: {}\n",
status);
FSFW_LOGET("VerificationReporter::sendSuccessReport: Error writing to queue. Code: {}\n",
status);
}
}
@@ -41,7 +41,7 @@ void VerificationReporter::sendSuccessReport(uint8_t set_report_id, uint8_t ackF
set_step);
ReturnValue_t status = MessageQueueSenderIF::sendMessage(acknowledgeQueue, &message);
if (status != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGET(
FSFW_LOGET(
"VerificationReporter::sendSuccessReport: Error writing "
"to queue. Code: {}\n",
status);
@@ -62,7 +62,7 @@ void VerificationReporter::sendFailureReport(uint8_t report_id, TcPacketPusBase*
currentPacket->getPacketSequenceControl(), error_code, step, parameter1, parameter2);
ReturnValue_t status = MessageQueueSenderIF::sendMessage(acknowledgeQueue, &message);
if (status != HasReturnvaluesIF::RETURN_OK) {
FSFW_FLOGET(
FSFW_LOGET(
"VerificationReporter::sendFailureReport: Error writing "
"to queue. Code: {}\n",
status);

View File

@@ -2,12 +2,12 @@
#include <fsfw/datapool/PoolReadGuard.h>
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/serviceinterface/ServiceInterface.h>
#include <fsfw/serviceinterface.h>
TestController::TestController(object_id_t objectId, object_id_t parentId, size_t commandQueueDepth)
: ExtendedControllerBase(objectId, parentId, commandQueueDepth) {}
TestController::~TestController() {}
TestController::~TestController() = default;
ReturnValue_t TestController::handleCommandMessage(CommandMessage *message) {
return HasReturnvaluesIF::RETURN_OK;

View File

@@ -17,7 +17,7 @@ TestDevice::~TestDevice() {}
void TestDevice::performOperationHook() {
if (periodicPrintout) {
FSFW_FLOGI("TestDevice {} | performOperationHook: Alive!\n", deviceIdx);
FSFW_LOGI("TestDevice {} | performOperationHook: Alive!\n", deviceIdx);
}
if (oneShot) {
@@ -27,7 +27,7 @@ void TestDevice::performOperationHook() {
void TestDevice::doStartUp() {
if (fullInfoPrintout) {
FSFW_FLOGI("TestDevice {} | doStartUp: Switching On\n", deviceIdx);
FSFW_LOGI("TestDevice {} | doStartUp: Switching On\n", deviceIdx);
}
setMode(_MODE_TO_ON);
@@ -35,7 +35,7 @@ void TestDevice::doStartUp() {
void TestDevice::doShutDown() {
if (fullInfoPrintout) {
FSFW_FLOGI("TestDevice {} | doShutDown: Switching Off\n", deviceIdx);
FSFW_LOGI("TestDevice {} | doShutDown: Switching Off\n", deviceIdx);
}
setMode(_MODE_SHUT_DOWN);
@@ -53,7 +53,7 @@ ReturnValue_t TestDevice::buildNormalDeviceCommand(DeviceCommandId_t* id) {
ReturnValue_t TestDevice::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
if (mode == _MODE_TO_ON) {
if (fullInfoPrintout) {
FSFW_FLOGI(
FSFW_LOGI(
"TestDevice {} | buildTransitionDeviceCommand: Was called"
" from _MODE_TO_ON mode\n",
deviceIdx);
@@ -61,7 +61,7 @@ ReturnValue_t TestDevice::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
}
if (mode == _MODE_TO_NORMAL) {
if (fullInfoPrintout) {
FSFW_FLOGI(
FSFW_LOGI(
"TestDevice {} | buildTransitionDeviceCommand: Was called "
"from _MODE_TO_NORMAL mode\n",
deviceIdx);
@@ -71,7 +71,7 @@ ReturnValue_t TestDevice::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
}
if (mode == _MODE_SHUT_DOWN) {
if (fullInfoPrintout) {
FSFW_FLOGI(
FSFW_LOGI(
"TestDevice {} | buildTransitionDeviceCommand: Was called "
"from _MODE_SHUT_DOWN mode\n",
deviceIdx);
@@ -85,7 +85,7 @@ ReturnValue_t TestDevice::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
void TestDevice::doTransition(Mode_t modeFrom, Submode_t submodeFrom) {
if (mode == _MODE_TO_NORMAL) {
if (fullInfoPrintout) {
FSFW_FLOGI(
FSFW_LOGI(
"TestDevice {} | doTransition: Custom transition to "
"normal mode\n",
deviceIdx);

View File

@@ -1,7 +1,7 @@
#include "TestTask.h"
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/serviceinterface/ServiceInterface.h>
#include <fsfw/serviceinterface.h>
MutexIF* TestTask::testLock = nullptr;
@@ -12,7 +12,7 @@ TestTask::TestTask(object_id_t objectId) : SystemObject(objectId), testMode(test
IPCStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
}
TestTask::~TestTask() {}
TestTask::~TestTask() = default;
ReturnValue_t TestTask::performOperation(uint8_t operationCode) {
ReturnValue_t result = RETURN_OK;

View File

@@ -3,6 +3,6 @@
#include "fsfw/serviceinterface.h"
ReturnValue_t unitt::put_error(const std::string& errorId) {
FSFW_FLOGET("Unit Tester error: Failed at test ID {}\n", errorId);
FSFW_LOGET("Unit Tester error: Failed at test ID {}\n", errorId);
return HasReturnvaluesIF::RETURN_FAILED;
}

View File

@@ -6,7 +6,7 @@
#include <string>
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
namespace tv {
// POD test values

View File

@@ -3,7 +3,7 @@
#include <cstdlib>
#include "fsfw/FSFW.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/serviceinterface.h"
#include "fsfw/tasks/SemaphoreFactory.h"
#include "fsfw/timemanager/Stopwatch.h"
#include "fsfw_tests/internal/UnittDefinitions.h"