moved old loggers to archive
This commit is contained in:
parent
b45b6b3758
commit
f518bc53db
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
@ -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,9 +840,9 @@ void LocalDataPoolManager::printWarningOrError(sif::OutputTypes outputType,
|
||||
objectId = owner->getObjectId();
|
||||
}
|
||||
|
||||
if (outputType == sif::OutputTypes::OUT_WARNING) {
|
||||
if (outputType == sif::LogLevel::WARNING) {
|
||||
FSFW_LOGWT("{} | Object ID {} | {}\n", functionName, objectId, errorPrint);
|
||||
} else if (outputType == sif::OutputTypes::OUT_ERROR) {
|
||||
} else if (outputType == sif::LogLevel::ERROR) {
|
||||
FSFW_LOGET("{} | Object ID {} | {}\n", functionName, objectId, errorPrint);
|
||||
}
|
||||
#endif /* #if FSFW_VERBOSE_LEVEL >= 1 */
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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"
|
||||
|
||||
/**
|
||||
|
@ -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"
|
||||
|
||||
/**
|
||||
|
@ -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,8 +153,7 @@ 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_LOGE("{}",
|
||||
"Make sure the raw receiver object is set up properly "
|
||||
@ -167,8 +166,7 @@ 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_LOGE("{}",
|
||||
"Make sure the power switcher object is set up "
|
||||
@ -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,7 +749,7 @@ 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_LOGW("{}",
|
||||
@ -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,10 +1458,10 @@ void DeviceHandlerBase::printWarningOrError(sif::OutputTypes errorType, const ch
|
||||
functionName = "unknown function";
|
||||
}
|
||||
|
||||
if (errorType == sif::OutputTypes::OUT_WARNING) {
|
||||
if (errorType == sif::LogLevel::WARNING) {
|
||||
FSFW_LOGWT("{} | Object ID {:#08x} | {}", functionName, SystemObject::getObjectId(),
|
||||
errorPrint);
|
||||
} else if (errorType == sif::OutputTypes::OUT_ERROR) {
|
||||
} else if (errorType == sif::LogLevel::ERROR) {
|
||||
FSFW_LOGET("{} | Object ID {:#08x} | {}", functionName, SystemObject::getObjectId(),
|
||||
errorPrint);
|
||||
}
|
||||
|
@ -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);
|
||||
};
|
||||
|
@ -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
|
||||
|
@ -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) {}
|
||||
|
@ -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),
|
||||
|
@ -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),
|
||||
|
@ -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 {
|
||||
|
@ -36,7 +36,7 @@ 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_LOGET("ObjectManager::insert: Object ID {:#08x} is already in use\nTerminating program\n",
|
||||
static_cast<uint32_t>(id));
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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),
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -95,12 +95,7 @@ void tcpip::handleError(Protocol protocol, ErrorSources errorSrc, dur_millis_t s
|
||||
}
|
||||
}
|
||||
|
||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||
FSFW_LOGWT("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 */
|
||||
|
||||
if (sleepDuration > 0) {
|
||||
TaskFactory::delayTask(sleepDuration);
|
||||
|
@ -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)
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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; }
|
||||
|
||||
|
@ -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
|
||||
|
@ -2,6 +2,5 @@
|
||||
#define FSFW_SRC_FSFW_SERVICEINTERFACE_H_
|
||||
|
||||
#include "serviceinterface/fmtWrapper.h"
|
||||
//#include "serviceinterface/ServiceInterface.h"
|
||||
|
||||
#endif /* FSFW_SRC_FSFW_SERVICEINTERFACE_H_ */
|
||||
|
@ -1,6 +1,3 @@
|
||||
target_sources(${LIB_FSFW_NAME} PRIVATE
|
||||
fmtWrapper.cpp
|
||||
ServiceInterfaceStream.cpp
|
||||
ServiceInterfaceBuffer.cpp
|
||||
ServiceInterfacePrinter.cpp
|
||||
)
|
@ -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"
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -87,7 +87,6 @@ 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_LOGWT("handleStoreFailure: {} | Store full for packet with size {}\n", packetType,
|
||||
sizeToReserve);
|
||||
@ -98,22 +97,6 @@ void TmPacketStoredBase::handleStoreFailure(const char *const packetType, Return
|
||||
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
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user