object manager is now a singleton
This commit is contained in:
parent
e6059812b5
commit
57699cccb7
@ -2,7 +2,7 @@
|
|||||||
#include "HasActionsIF.h"
|
#include "HasActionsIF.h"
|
||||||
|
|
||||||
#include "../ipc/MessageQueueSenderIF.h"
|
#include "../ipc/MessageQueueSenderIF.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../serviceinterface/ServiceInterface.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
ActionHelper::ActionHelper(HasActionsIF* setOwner,
|
ActionHelper::ActionHelper(HasActionsIF* setOwner,
|
||||||
@ -25,7 +25,7 @@ ReturnValue_t ActionHelper::handleActionMessage(CommandMessage* command) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t ActionHelper::initialize(MessageQueueIF* queueToUse_) {
|
ReturnValue_t ActionHelper::initialize(MessageQueueIF* queueToUse_) {
|
||||||
ipcStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
ipcStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
if (ipcStore == nullptr) {
|
if (ipcStore == nullptr) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "ActionMessage.h"
|
#include "ActionMessage.h"
|
||||||
#include "HasActionsIF.h"
|
#include "HasActionsIF.h"
|
||||||
|
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../storagemanager/StorageManagerIF.h"
|
#include "../storagemanager/StorageManagerIF.h"
|
||||||
|
|
||||||
ActionMessage::ActionMessage() {
|
ActionMessage::ActionMessage() {
|
||||||
@ -69,7 +69,7 @@ void ActionMessage::clear(CommandMessage* message) {
|
|||||||
switch(message->getCommand()) {
|
switch(message->getCommand()) {
|
||||||
case EXECUTE_ACTION:
|
case EXECUTE_ACTION:
|
||||||
case DATA_REPLY: {
|
case DATA_REPLY: {
|
||||||
StorageManagerIF *ipcStore = objectManager->get<StorageManagerIF>(
|
StorageManagerIF *ipcStore = ObjectManager::instance()->get<StorageManagerIF>(
|
||||||
objects::IPC_STORE);
|
objects::IPC_STORE);
|
||||||
if (ipcStore != NULL) {
|
if (ipcStore != NULL) {
|
||||||
ipcStore->deleteData(getStoreId(message));
|
ipcStore->deleteData(getStoreId(message));
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
#include "CommandActionHelper.h"
|
#include "CommandActionHelper.h"
|
||||||
#include "CommandsActionsIF.h"
|
#include "CommandsActionsIF.h"
|
||||||
#include "HasActionsIF.h"
|
#include "HasActionsIF.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
CommandActionHelper::CommandActionHelper(CommandsActionsIF *setOwner) :
|
CommandActionHelper::CommandActionHelper(CommandsActionsIF *setOwner) :
|
||||||
owner(setOwner), queueToUse(NULL), ipcStore(
|
owner(setOwner), queueToUse(NULL), ipcStore(
|
||||||
@ -14,7 +15,7 @@ CommandActionHelper::~CommandActionHelper() {
|
|||||||
|
|
||||||
ReturnValue_t CommandActionHelper::commandAction(object_id_t commandTo,
|
ReturnValue_t CommandActionHelper::commandAction(object_id_t commandTo,
|
||||||
ActionId_t actionId, SerializeIF *data) {
|
ActionId_t actionId, SerializeIF *data) {
|
||||||
HasActionsIF *receiver = objectManager->get<HasActionsIF>(commandTo);
|
HasActionsIF *receiver = ObjectManager::instance()->get<HasActionsIF>(commandTo);
|
||||||
if (receiver == NULL) {
|
if (receiver == NULL) {
|
||||||
return CommandsActionsIF::OBJECT_HAS_NO_FUNCTIONS;
|
return CommandsActionsIF::OBJECT_HAS_NO_FUNCTIONS;
|
||||||
}
|
}
|
||||||
@ -40,7 +41,7 @@ ReturnValue_t CommandActionHelper::commandAction(object_id_t commandTo,
|
|||||||
// if (commandCount != 0) {
|
// if (commandCount != 0) {
|
||||||
// return CommandsFunctionsIF::ALREADY_COMMANDING;
|
// return CommandsFunctionsIF::ALREADY_COMMANDING;
|
||||||
// }
|
// }
|
||||||
HasActionsIF *receiver = objectManager->get<HasActionsIF>(commandTo);
|
HasActionsIF *receiver = ObjectManager::instance()->get<HasActionsIF>(commandTo);
|
||||||
if (receiver == NULL) {
|
if (receiver == NULL) {
|
||||||
return CommandsActionsIF::OBJECT_HAS_NO_FUNCTIONS;
|
return CommandsActionsIF::OBJECT_HAS_NO_FUNCTIONS;
|
||||||
}
|
}
|
||||||
@ -66,7 +67,7 @@ ReturnValue_t CommandActionHelper::sendCommand(MessageQueueId_t queueId,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t CommandActionHelper::initialize() {
|
ReturnValue_t CommandActionHelper::initialize() {
|
||||||
ipcStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
ipcStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
if (ipcStore == NULL) {
|
if (ipcStore == NULL) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "../subsystem/SubsystemBase.h"
|
#include "../subsystem/SubsystemBase.h"
|
||||||
#include "../ipc/QueueFactory.h"
|
#include "../ipc/QueueFactory.h"
|
||||||
#include "../action/HasActionsIF.h"
|
#include "../action/HasActionsIF.h"
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
ControllerBase::ControllerBase(object_id_t setObjectId, object_id_t parentId,
|
ControllerBase::ControllerBase(object_id_t setObjectId, object_id_t parentId,
|
||||||
size_t commandQueueDepth) :
|
size_t commandQueueDepth) :
|
||||||
@ -25,7 +26,7 @@ ReturnValue_t ControllerBase::initialize() {
|
|||||||
|
|
||||||
MessageQueueId_t parentQueue = 0;
|
MessageQueueId_t parentQueue = 0;
|
||||||
if (parentId != objects::NO_OBJECT) {
|
if (parentId != objects::NO_OBJECT) {
|
||||||
SubsystemBase *parent = objectManager->get<SubsystemBase>(parentId);
|
SubsystemBase *parent = ObjectManager::instance()->get<SubsystemBase>(parentId);
|
||||||
if (parent == nullptr) {
|
if (parent == nullptr) {
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
#include "MapPacketExtraction.h"
|
#include "MapPacketExtraction.h"
|
||||||
|
|
||||||
#include "../ipc/QueueFactory.h"
|
#include "../ipc/QueueFactory.h"
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "../serviceinterface/ServiceInterfaceStream.h"
|
||||||
#include "../storagemanager/StorageManagerIF.h"
|
#include "../storagemanager/StorageManagerIF.h"
|
||||||
#include "../tmtcpacket/SpacePacketBase.h"
|
#include "../tmtcpacket/SpacePacketBase.h"
|
||||||
#include "../tmtcservices/AcceptsTelecommandsIF.h"
|
#include "../tmtcservices/AcceptsTelecommandsIF.h"
|
||||||
#include "../tmtcservices/TmTcMessage.h"
|
#include "../tmtcservices/TmTcMessage.h"
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
MapPacketExtraction::MapPacketExtraction(uint8_t setMapId,
|
MapPacketExtraction::MapPacketExtraction(uint8_t setMapId,
|
||||||
@ -131,9 +134,9 @@ void MapPacketExtraction::clearBuffers() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t MapPacketExtraction::initialize() {
|
ReturnValue_t MapPacketExtraction::initialize() {
|
||||||
packetStore = objectManager->get<StorageManagerIF>(objects::TC_STORE);
|
packetStore = ObjectManager::instance()->get<StorageManagerIF>(objects::TC_STORE);
|
||||||
AcceptsTelecommandsIF* distributor = objectManager->get<
|
AcceptsTelecommandsIF* distributor = ObjectManager::instance()->
|
||||||
AcceptsTelecommandsIF>(packetDestination);
|
get<AcceptsTelecommandsIF>(packetDestination);
|
||||||
if ((packetStore != NULL) && (distributor != NULL)) {
|
if ((packetStore != NULL) && (distributor != NULL)) {
|
||||||
tcQueueId = distributor->getRequestQueue();
|
tcQueueId = distributor->getRequestQueue();
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
|
@ -34,7 +34,8 @@ class LocalPoolObjectBase;
|
|||||||
* can be retrieved using the object manager, provided the target object is a SystemObject.
|
* can be retrieved using the object manager, provided the target object is a SystemObject.
|
||||||
* For example, the following line of code can be used to retrieve the interface
|
* For example, the following line of code can be used to retrieve the interface
|
||||||
*
|
*
|
||||||
* HasLocalDataPoolIF* poolIF = objectManager->get<HasLocalDataPoolIF>(objects::SOME_OBJECT);
|
* HasLocalDataPoolIF* poolIF = ObjectManager::instance()->
|
||||||
|
* get<HasLocalDataPoolIF>(objects::SOME_OBJECT);
|
||||||
* if(poolIF != nullptr) {
|
* if(poolIF != nullptr) {
|
||||||
* doSomething()
|
* doSomething()
|
||||||
* }
|
* }
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "internal/HasLocalDpIFManagerAttorney.h"
|
#include "internal/HasLocalDpIFManagerAttorney.h"
|
||||||
|
|
||||||
#include "../housekeeping/HousekeepingSetPacket.h"
|
#include "../housekeeping/HousekeepingSetPacket.h"
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../housekeeping/HousekeepingSnapshot.h"
|
#include "../housekeeping/HousekeepingSnapshot.h"
|
||||||
#include "../housekeeping/AcceptsHkPacketsIF.h"
|
#include "../housekeeping/AcceptsHkPacketsIF.h"
|
||||||
#include "../timemanager/CCSDSTime.h"
|
#include "../timemanager/CCSDSTime.h"
|
||||||
@ -52,7 +53,7 @@ ReturnValue_t LocalDataPoolManager::initialize(MessageQueueIF* queueToUse) {
|
|||||||
}
|
}
|
||||||
hkQueue = queueToUse;
|
hkQueue = queueToUse;
|
||||||
|
|
||||||
ipcStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
ipcStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
if(ipcStore == nullptr) {
|
if(ipcStore == nullptr) {
|
||||||
/* Error, all destinations invalid */
|
/* Error, all destinations invalid */
|
||||||
printWarningOrError(sif::OutputTypes::OUT_ERROR,
|
printWarningOrError(sif::OutputTypes::OUT_ERROR,
|
||||||
@ -63,8 +64,8 @@ ReturnValue_t LocalDataPoolManager::initialize(MessageQueueIF* queueToUse) {
|
|||||||
|
|
||||||
|
|
||||||
if(defaultHkDestination != objects::NO_OBJECT) {
|
if(defaultHkDestination != objects::NO_OBJECT) {
|
||||||
AcceptsHkPacketsIF* hkPacketReceiver =
|
AcceptsHkPacketsIF* hkPacketReceiver = ObjectManager::instance()->
|
||||||
objectManager->get<AcceptsHkPacketsIF>(defaultHkDestination);
|
get<AcceptsHkPacketsIF>(defaultHkDestination);
|
||||||
if(hkPacketReceiver != nullptr) {
|
if(hkPacketReceiver != nullptr) {
|
||||||
hkDestinationId = hkPacketReceiver->getHkQueue();
|
hkDestinationId = hkPacketReceiver->getHkQueue();
|
||||||
}
|
}
|
||||||
@ -360,8 +361,8 @@ void LocalDataPoolManager::resetHkUpdateResetHelper() {
|
|||||||
ReturnValue_t LocalDataPoolManager::subscribeForPeriodicPacket(sid_t sid,
|
ReturnValue_t LocalDataPoolManager::subscribeForPeriodicPacket(sid_t sid,
|
||||||
bool enableReporting, float collectionInterval, bool isDiagnostics,
|
bool enableReporting, float collectionInterval, bool isDiagnostics,
|
||||||
object_id_t packetDestination) {
|
object_id_t packetDestination) {
|
||||||
AcceptsHkPacketsIF* hkReceiverObject =
|
AcceptsHkPacketsIF* hkReceiverObject = ObjectManager::instance()->
|
||||||
objectManager->get<AcceptsHkPacketsIF>(packetDestination);
|
get<AcceptsHkPacketsIF>(packetDestination);
|
||||||
if(hkReceiverObject == nullptr) {
|
if(hkReceiverObject == nullptr) {
|
||||||
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"subscribeForPeriodicPacket", QUEUE_OR_DESTINATION_INVALID);
|
"subscribeForPeriodicPacket", QUEUE_OR_DESTINATION_INVALID);
|
||||||
@ -391,7 +392,7 @@ ReturnValue_t LocalDataPoolManager::subscribeForUpdatePacket(sid_t sid,
|
|||||||
bool isDiagnostics, bool reportingEnabled,
|
bool isDiagnostics, bool reportingEnabled,
|
||||||
object_id_t packetDestination) {
|
object_id_t packetDestination) {
|
||||||
AcceptsHkPacketsIF* hkReceiverObject =
|
AcceptsHkPacketsIF* hkReceiverObject =
|
||||||
objectManager->get<AcceptsHkPacketsIF>(packetDestination);
|
ObjectManager::instance()->get<AcceptsHkPacketsIF>(packetDestination);
|
||||||
if(hkReceiverObject == nullptr) {
|
if(hkReceiverObject == nullptr) {
|
||||||
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
printWarningOrError(sif::OutputTypes::OUT_WARNING,
|
||||||
"subscribeForPeriodicPacket", QUEUE_OR_DESTINATION_INVALID);
|
"subscribeForPeriodicPacket", QUEUE_OR_DESTINATION_INVALID);
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "internal/HasLocalDpIFUserAttorney.h"
|
#include "internal/HasLocalDpIFUserAttorney.h"
|
||||||
|
|
||||||
#include "../serviceinterface/ServiceInterface.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../globalfunctions/bitutility.h"
|
#include "../globalfunctions/bitutility.h"
|
||||||
#include "../datapoollocal/LocalDataPoolManager.h"
|
#include "../datapoollocal/LocalDataPoolManager.h"
|
||||||
#include "../housekeeping/PeriodicHousekeepingHelper.h"
|
#include "../housekeeping/PeriodicHousekeepingHelper.h"
|
||||||
@ -45,7 +46,7 @@ LocalPoolDataSetBase::LocalPoolDataSetBase(HasLocalDataPoolIF *hkOwner,
|
|||||||
LocalPoolDataSetBase::LocalPoolDataSetBase(sid_t sid, PoolVariableIF** registeredVariablesArray,
|
LocalPoolDataSetBase::LocalPoolDataSetBase(sid_t sid, PoolVariableIF** registeredVariablesArray,
|
||||||
const size_t maxNumberOfVariables):
|
const size_t maxNumberOfVariables):
|
||||||
PoolDataSetBase(registeredVariablesArray, maxNumberOfVariables) {
|
PoolDataSetBase(registeredVariablesArray, maxNumberOfVariables) {
|
||||||
HasLocalDataPoolIF* hkOwner = objectManager->get<HasLocalDataPoolIF>(
|
HasLocalDataPoolIF* hkOwner = ObjectManager::instance()->get<HasLocalDataPoolIF>(
|
||||||
sid.objectId);
|
sid.objectId);
|
||||||
if(hkOwner != nullptr) {
|
if(hkOwner != nullptr) {
|
||||||
AccessPoolManagerIF* accessor = HasLocalDpIFUserAttorney::getAccessorHandle(hkOwner);
|
AccessPoolManagerIF* accessor = HasLocalDpIFUserAttorney::getAccessorHandle(hkOwner);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include "HasLocalDataPoolIF.h"
|
#include "HasLocalDataPoolIF.h"
|
||||||
#include "internal/HasLocalDpIFUserAttorney.h"
|
#include "internal/HasLocalDpIFUserAttorney.h"
|
||||||
|
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
|
|
||||||
LocalPoolObjectBase::LocalPoolObjectBase(lp_id_t poolId, HasLocalDataPoolIF* hkOwner,
|
LocalPoolObjectBase::LocalPoolObjectBase(lp_id_t poolId, HasLocalDataPoolIF* hkOwner,
|
||||||
@ -43,7 +43,7 @@ LocalPoolObjectBase::LocalPoolObjectBase(object_id_t poolOwner, lp_id_t poolId,
|
|||||||
"which is the NO_PARAMETER value!\n");
|
"which is the NO_PARAMETER value!\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
HasLocalDataPoolIF* hkOwner = objectManager->get<HasLocalDataPoolIF>(poolOwner);
|
HasLocalDataPoolIF* hkOwner = ObjectManager::instance()->get<HasLocalDataPoolIF>(poolOwner);
|
||||||
if(hkOwner == nullptr) {
|
if(hkOwner == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "LocalPoolVariable: The supplied pool owner did not implement the correct "
|
sif::error << "LocalPoolVariable: The supplied pool owner did not implement the correct "
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "ChildHandlerBase.h"
|
#include "ChildHandlerBase.h"
|
||||||
#include "../subsystem/SubsystemBase.h"
|
#include "../subsystem/SubsystemBase.h"
|
||||||
#include "../subsystem/SubsystemBase.h"
|
|
||||||
|
|
||||||
ChildHandlerBase::ChildHandlerBase(object_id_t setObjectId,
|
ChildHandlerBase::ChildHandlerBase(object_id_t setObjectId,
|
||||||
object_id_t deviceCommunication, CookieIF * cookie,
|
object_id_t deviceCommunication, CookieIF * cookie,
|
||||||
@ -30,7 +29,7 @@ ReturnValue_t ChildHandlerBase::initialize() {
|
|||||||
MessageQueueId_t parentQueue = 0;
|
MessageQueueId_t parentQueue = 0;
|
||||||
|
|
||||||
if (parentId != objects::NO_OBJECT) {
|
if (parentId != objects::NO_OBJECT) {
|
||||||
SubsystemBase *parent = objectManager->get<SubsystemBase>(parentId);
|
SubsystemBase *parent = ObjectManager::instance()->get<SubsystemBase>(parentId);
|
||||||
if (parent == NULL) {
|
if (parent == NULL) {
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
communicationInterface = objectManager->get<DeviceCommunicationIF>(
|
communicationInterface = ObjectManager::instance()->get<DeviceCommunicationIF>(
|
||||||
deviceCommunicationId);
|
deviceCommunicationId);
|
||||||
if (communicationInterface == nullptr) {
|
if (communicationInterface == nullptr) {
|
||||||
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
|
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
|
||||||
@ -136,7 +136,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPCStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
IPCStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
if (IPCStore == nullptr) {
|
if (IPCStore == nullptr) {
|
||||||
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
|
printWarningOrError(sif::OutputTypes::OUT_ERROR, "initialize",
|
||||||
ObjectManagerIF::CHILD_INIT_FAILED, "IPC Store not set up");
|
ObjectManagerIF::CHILD_INIT_FAILED, "IPC Store not set up");
|
||||||
@ -144,8 +144,8 @@ ReturnValue_t DeviceHandlerBase::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(rawDataReceiverId != objects::NO_OBJECT) {
|
if(rawDataReceiverId != objects::NO_OBJECT) {
|
||||||
AcceptsDeviceResponsesIF *rawReceiver = objectManager->get<
|
AcceptsDeviceResponsesIF *rawReceiver = ObjectManager::instance()->
|
||||||
AcceptsDeviceResponsesIF>(rawDataReceiverId);
|
get<AcceptsDeviceResponsesIF>(rawDataReceiverId);
|
||||||
|
|
||||||
if (rawReceiver == nullptr) {
|
if (rawReceiver == nullptr) {
|
||||||
printWarningOrError(sif::OutputTypes::OUT_ERROR,
|
printWarningOrError(sif::OutputTypes::OUT_ERROR,
|
||||||
@ -164,7 +164,7 @@ ReturnValue_t DeviceHandlerBase::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(powerSwitcherId != objects::NO_OBJECT) {
|
if(powerSwitcherId != objects::NO_OBJECT) {
|
||||||
powerSwitcher = objectManager->get<PowerSwitchIF>(powerSwitcherId);
|
powerSwitcher = ObjectManager::instance()->get<PowerSwitchIF>(powerSwitcherId);
|
||||||
if (powerSwitcher == nullptr) {
|
if (powerSwitcher == nullptr) {
|
||||||
printWarningOrError(sif::OutputTypes::OUT_ERROR,
|
printWarningOrError(sif::OutputTypes::OUT_ERROR,
|
||||||
"initialize", ObjectManagerIF::CHILD_INIT_FAILED,
|
"initialize", ObjectManagerIF::CHILD_INIT_FAILED,
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "DeviceHandlerFailureIsolation.h"
|
#include "DeviceHandlerFailureIsolation.h"
|
||||||
|
|
||||||
#include "../devicehandlers/DeviceHandlerIF.h"
|
#include "../devicehandlers/DeviceHandlerIF.h"
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../modes/HasModesIF.h"
|
#include "../modes/HasModesIF.h"
|
||||||
#include "../health/HealthTableIF.h"
|
#include "../health/HealthTableIF.h"
|
||||||
#include "../power/Fuse.h"
|
#include "../power/Fuse.h"
|
||||||
@ -175,7 +176,7 @@ ReturnValue_t DeviceHandlerFailureIsolation::initialize() {
|
|||||||
#endif
|
#endif
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
ConfirmsFailuresIF* power = objectManager->get<ConfirmsFailuresIF>(
|
ConfirmsFailuresIF* power = ObjectManager::instance()->get<ConfirmsFailuresIF>(
|
||||||
powerConfirmationId);
|
powerConfirmationId);
|
||||||
if (power != nullptr) {
|
if (power != nullptr) {
|
||||||
powerConfirmation = power->getEventReceptionQueue();
|
powerConfirmation = power->getEventReceptionQueue();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "DeviceHandlerMessage.h"
|
#include "DeviceHandlerMessage.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
store_address_t DeviceHandlerMessage::getStoreAddress(
|
store_address_t DeviceHandlerMessage::getStoreAddress(
|
||||||
const CommandMessage* message) {
|
const CommandMessage* message) {
|
||||||
@ -70,7 +70,7 @@ void DeviceHandlerMessage::clear(CommandMessage* message) {
|
|||||||
case REPLY_RAW_COMMAND:
|
case REPLY_RAW_COMMAND:
|
||||||
case REPLY_RAW_REPLY:
|
case REPLY_RAW_REPLY:
|
||||||
case REPLY_DIRECT_COMMAND_DATA: {
|
case REPLY_DIRECT_COMMAND_DATA: {
|
||||||
StorageManagerIF *ipcStore = objectManager->get<StorageManagerIF>(
|
StorageManagerIF *ipcStore = ObjectManager::instance()->get<StorageManagerIF>(
|
||||||
objects::IPC_STORE);
|
objects::IPC_STORE);
|
||||||
if (ipcStore != nullptr) {
|
if (ipcStore != nullptr) {
|
||||||
ipcStore->deleteData(getStoreAddress(message));
|
ipcStore->deleteData(getStoreAddress(message));
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "EventMessage.h"
|
#include "EventMessage.h"
|
||||||
#include "eventmatching/eventmatching.h"
|
#include "eventmatching/eventmatching.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../ipc/MessageQueueSenderIF.h"
|
#include "../ipc/MessageQueueSenderIF.h"
|
||||||
#include "../ipc/MessageQueueIF.h"
|
#include "../ipc/MessageQueueIF.h"
|
||||||
#include "../serviceinterface/ServiceInterface.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
@ -43,7 +43,7 @@ public:
|
|||||||
static void triggerEvent(EventMessage* message,
|
static void triggerEvent(EventMessage* message,
|
||||||
MessageQueueId_t sentFrom = 0) {
|
MessageQueueId_t sentFrom = 0) {
|
||||||
if (eventmanagerQueue == MessageQueueIF::NO_QUEUE) {
|
if (eventmanagerQueue == MessageQueueIF::NO_QUEUE) {
|
||||||
EventManagerIF *eventmanager = objectManager->get<EventManagerIF>(
|
EventManagerIF *eventmanager = ObjectManager::instance()->get<EventManagerIF>(
|
||||||
objects::EVENT_MANAGER);
|
objects::EVENT_MANAGER);
|
||||||
if (eventmanager == nullptr) {
|
if (eventmanager == nullptr) {
|
||||||
#if FSFW_VERBOSE_LEVEL >= 1
|
#if FSFW_VERBOSE_LEVEL >= 1
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "../health/HasHealthIF.h"
|
#include "../health/HasHealthIF.h"
|
||||||
#include "../health/HealthMessage.h"
|
#include "../health/HealthMessage.h"
|
||||||
#include "../ipc/QueueFactory.h"
|
#include "../ipc/QueueFactory.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
FailureIsolationBase::FailureIsolationBase(object_id_t owner,
|
FailureIsolationBase::FailureIsolationBase(object_id_t owner,
|
||||||
object_id_t parent, uint8_t messageDepth, uint8_t parameterDomainBase) :
|
object_id_t parent, uint8_t messageDepth, uint8_t parameterDomainBase) :
|
||||||
@ -18,7 +18,7 @@ FailureIsolationBase::~FailureIsolationBase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t FailureIsolationBase::initialize() {
|
ReturnValue_t FailureIsolationBase::initialize() {
|
||||||
EventManagerIF* manager = objectManager->get<EventManagerIF>(
|
EventManagerIF* manager = ObjectManager::instance()->get<EventManagerIF>(
|
||||||
objects::EVENT_MANAGER);
|
objects::EVENT_MANAGER);
|
||||||
if (manager == nullptr) {
|
if (manager == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
@ -36,7 +36,7 @@ ReturnValue_t FailureIsolationBase::initialize() {
|
|||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
owner = objectManager->get<HasHealthIF>(ownerId);
|
owner = ObjectManager::instance()->get<HasHealthIF>(ownerId);
|
||||||
if (owner == nullptr) {
|
if (owner == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "FailureIsolationBase::intialize: Owner object "
|
sif::error << "FailureIsolationBase::intialize: Owner object "
|
||||||
@ -46,7 +46,7 @@ ReturnValue_t FailureIsolationBase::initialize() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (faultTreeParent != objects::NO_OBJECT) {
|
if (faultTreeParent != objects::NO_OBJECT) {
|
||||||
ConfirmsFailuresIF* parentIF = objectManager->get<ConfirmsFailuresIF>(
|
ConfirmsFailuresIF* parentIF = ObjectManager::instance()->get<ConfirmsFailuresIF>(
|
||||||
faultTreeParent);
|
faultTreeParent);
|
||||||
if (parentIF == nullptr) {
|
if (parentIF == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "HealthHelper.h"
|
#include "HealthHelper.h"
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
HealthHelper::HealthHelper(HasHealthIF* owner, object_id_t objectId) :
|
HealthHelper::HealthHelper(HasHealthIF* owner, object_id_t objectId) :
|
||||||
objectId(objectId), owner(owner) {
|
objectId(objectId), owner(owner) {
|
||||||
@ -37,8 +37,8 @@ void HealthHelper::setParentQueue(MessageQueueId_t parentQueue) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t HealthHelper::initialize() {
|
ReturnValue_t HealthHelper::initialize() {
|
||||||
healthTable = objectManager->get<HealthTableIF>(objects::HEALTH_TABLE);
|
healthTable = ObjectManager::instance()->get<HealthTableIF>(objects::HEALTH_TABLE);
|
||||||
eventSender = objectManager->get<EventReportingProxyIF>(objectId);
|
eventSender = ObjectManager::instance()->get<EventReportingProxyIF>(objectId);
|
||||||
|
|
||||||
if (healthTable == nullptr) {
|
if (healthTable == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "HousekeepingMessage.h"
|
#include "HousekeepingMessage.h"
|
||||||
|
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
HousekeepingMessage::~HousekeepingMessage() {}
|
HousekeepingMessage::~HousekeepingMessage() {}
|
||||||
@ -161,7 +161,7 @@ void HousekeepingMessage::clear(CommandMessage* message) {
|
|||||||
case(UPDATE_SNAPSHOT_VARIABLE): {
|
case(UPDATE_SNAPSHOT_VARIABLE): {
|
||||||
store_address_t storeId;
|
store_address_t storeId;
|
||||||
getHkDataReply(message, &storeId);
|
getHkDataReply(message, &storeId);
|
||||||
StorageManagerIF *ipcStore = objectManager->get<StorageManagerIF>(
|
StorageManagerIF *ipcStore = ObjectManager::instance()->get<StorageManagerIF>(
|
||||||
objects::IPC_STORE);
|
objects::IPC_STORE);
|
||||||
if (ipcStore != nullptr) {
|
if (ipcStore != nullptr) {
|
||||||
ipcStore->deleteData(storeId);
|
ipcStore->deleteData(storeId);
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
#include "MemoryMessage.h"
|
#include "MemoryMessage.h"
|
||||||
|
|
||||||
#include "../globalfunctions/CRC.h"
|
#include "../globalfunctions/CRC.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../serialize/EndianConverter.h"
|
#include "../serialize/EndianConverter.h"
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
MemoryHelper::MemoryHelper(HasMemoryIF* workOnThis,
|
MemoryHelper::MemoryHelper(HasMemoryIF* workOnThis,
|
||||||
MessageQueueIF* useThisQueue):
|
MessageQueueIF* useThisQueue):
|
||||||
@ -187,7 +187,7 @@ ReturnValue_t MemoryHelper::initialize(MessageQueueIF* queueToUse_) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t MemoryHelper::initialize() {
|
ReturnValue_t MemoryHelper::initialize() {
|
||||||
ipcStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
ipcStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
if (ipcStore != nullptr) {
|
if (ipcStore != nullptr) {
|
||||||
return RETURN_OK;
|
return RETURN_OK;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "MemoryMessage.h"
|
#include "MemoryMessage.h"
|
||||||
|
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
uint32_t MemoryMessage::getAddress(const CommandMessage* message) {
|
uint32_t MemoryMessage::getAddress(const CommandMessage* message) {
|
||||||
return message->getParameter();
|
return message->getParameter();
|
||||||
@ -44,7 +44,7 @@ void MemoryMessage::clear(CommandMessage* message) {
|
|||||||
switch (message->getCommand()) {
|
switch (message->getCommand()) {
|
||||||
case CMD_MEMORY_LOAD:
|
case CMD_MEMORY_LOAD:
|
||||||
case REPLY_MEMORY_DUMP: {
|
case REPLY_MEMORY_DUMP: {
|
||||||
StorageManagerIF *ipcStore = objectManager->get<StorageManagerIF>(
|
StorageManagerIF *ipcStore = ObjectManager::instance()->get<StorageManagerIF>(
|
||||||
objects::IPC_STORE);
|
objects::IPC_STORE);
|
||||||
if (ipcStore != NULL) {
|
if (ipcStore != NULL) {
|
||||||
ipcStore->deleteData(getStoreID(message));
|
ipcStore->deleteData(getStoreID(message));
|
||||||
|
@ -1,13 +1,8 @@
|
|||||||
/**
|
|
||||||
* @file LimitViolationReporter.cpp
|
|
||||||
* @brief This file defines the LimitViolationReporter class.
|
|
||||||
* @date 17.07.2014
|
|
||||||
* @author baetz
|
|
||||||
*/
|
|
||||||
#include "LimitViolationReporter.h"
|
#include "LimitViolationReporter.h"
|
||||||
#include "MonitoringIF.h"
|
#include "MonitoringIF.h"
|
||||||
#include "ReceivesMonitoringReportsIF.h"
|
#include "ReceivesMonitoringReportsIF.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../serialize/SerializeAdapter.h"
|
#include "../serialize/SerializeAdapter.h"
|
||||||
|
|
||||||
ReturnValue_t LimitViolationReporter::sendLimitViolationReport(const SerializeIF* data) {
|
ReturnValue_t LimitViolationReporter::sendLimitViolationReport(const SerializeIF* data) {
|
||||||
@ -16,7 +11,7 @@ ReturnValue_t LimitViolationReporter::sendLimitViolationReport(const SerializeIF
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
store_address_t storeId;
|
store_address_t storeId;
|
||||||
uint8_t* dataTarget = NULL;
|
uint8_t* dataTarget = nullptr;
|
||||||
size_t maxSize = data->getSerializedSize();
|
size_t maxSize = data->getSerializedSize();
|
||||||
if (maxSize > MonitoringIF::VIOLATION_REPORT_MAX_SIZE) {
|
if (maxSize > MonitoringIF::VIOLATION_REPORT_MAX_SIZE) {
|
||||||
return MonitoringIF::INVALID_SIZE;
|
return MonitoringIF::INVALID_SIZE;
|
||||||
@ -38,16 +33,16 @@ ReturnValue_t LimitViolationReporter::sendLimitViolationReport(const SerializeIF
|
|||||||
|
|
||||||
ReturnValue_t LimitViolationReporter::checkClassLoaded() {
|
ReturnValue_t LimitViolationReporter::checkClassLoaded() {
|
||||||
if (reportQueue == 0) {
|
if (reportQueue == 0) {
|
||||||
ReceivesMonitoringReportsIF* receiver = objectManager->get<
|
ReceivesMonitoringReportsIF* receiver = ObjectManager::instance()->get<
|
||||||
ReceivesMonitoringReportsIF>(reportingTarget);
|
ReceivesMonitoringReportsIF>(reportingTarget);
|
||||||
if (receiver == NULL) {
|
if (receiver == nullptr) {
|
||||||
return ObjectManagerIF::NOT_FOUND;
|
return ObjectManagerIF::NOT_FOUND;
|
||||||
}
|
}
|
||||||
reportQueue = receiver->getCommandQueue();
|
reportQueue = receiver->getCommandQueue();
|
||||||
}
|
}
|
||||||
if (ipcStore == NULL) {
|
if (ipcStore == nullptr) {
|
||||||
ipcStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
ipcStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
if (ipcStore == NULL) {
|
if (ipcStore == nullptr) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -56,5 +51,5 @@ ReturnValue_t LimitViolationReporter::checkClassLoaded() {
|
|||||||
|
|
||||||
//Lazy initialization.
|
//Lazy initialization.
|
||||||
MessageQueueId_t LimitViolationReporter::reportQueue = 0;
|
MessageQueueId_t LimitViolationReporter::reportQueue = 0;
|
||||||
StorageManagerIF* LimitViolationReporter::ipcStore = NULL;
|
StorageManagerIF* LimitViolationReporter::ipcStore = nullptr;
|
||||||
object_id_t LimitViolationReporter::reportingTarget = 0;
|
object_id_t LimitViolationReporter::reportingTarget = 0;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "MonitoringMessage.h"
|
#include "MonitoringMessage.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
MonitoringMessage::~MonitoringMessage() {
|
MonitoringMessage::~MonitoringMessage() {
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ void MonitoringMessage::clear(CommandMessage* message) {
|
|||||||
message->setCommand(CommandMessage::CMD_NONE);
|
message->setCommand(CommandMessage::CMD_NONE);
|
||||||
switch (message->getCommand()) {
|
switch (message->getCommand()) {
|
||||||
case MonitoringMessage::LIMIT_VIOLATION_REPORT: {
|
case MonitoringMessage::LIMIT_VIOLATION_REPORT: {
|
||||||
StorageManagerIF *ipcStore = objectManager->get<StorageManagerIF>(
|
StorageManagerIF *ipcStore = ObjectManager::instance()->get<StorageManagerIF>(
|
||||||
objects::IPC_STORE);
|
objects::IPC_STORE);
|
||||||
if (ipcStore != NULL) {
|
if (ipcStore != NULL) {
|
||||||
ipcStore->deleteData(getStoreId(message));
|
ipcStore->deleteData(getStoreId(message));
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "MonitoringIF.h"
|
#include "MonitoringIF.h"
|
||||||
|
|
||||||
#include "../datapoollocal/localPoolDefinitions.h"
|
#include "../datapoollocal/localPoolDefinitions.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../serialize/SerialBufferAdapter.h"
|
#include "../serialize/SerialBufferAdapter.h"
|
||||||
#include "../serialize/SerialFixedArrayListAdapter.h"
|
#include "../serialize/SerialFixedArrayListAdapter.h"
|
||||||
#include "../serialize/SerializeElement.h"
|
#include "../serialize/SerializeElement.h"
|
||||||
@ -71,7 +71,7 @@ private:
|
|||||||
}
|
}
|
||||||
bool checkAndSetStamper() {
|
bool checkAndSetStamper() {
|
||||||
if (timeStamper == nullptr) {
|
if (timeStamper == nullptr) {
|
||||||
timeStamper = objectManager->get<TimeStamperIF>( timeStamperId );
|
timeStamper = ObjectManager::instance()->get<TimeStamperIF>( timeStamperId );
|
||||||
if ( timeStamper == nullptr ) {
|
if ( timeStamper == nullptr ) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "MonitoringReportContent::checkAndSetStamper: "
|
sif::error << "MonitoringReportContent::checkAndSetStamper: "
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "../datapool/PIDReaderList.h"
|
#include "../datapool/PIDReaderList.h"
|
||||||
#include "../health/HealthTableIF.h"
|
#include "../health/HealthTableIF.h"
|
||||||
#include "../parameters/HasParametersIF.h"
|
#include "../parameters/HasParametersIF.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
|
|
||||||
//SHOULDDO: This is by far not perfect. Could be merged with new Monitor classes. But still, it's over-engineering.
|
//SHOULDDO: This is by far not perfect. Could be merged with new Monitor classes. But still, it's over-engineering.
|
||||||
@ -64,7 +64,7 @@ public:
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
ReturnValue_t initialize() {
|
ReturnValue_t initialize() {
|
||||||
healthTable = objectManager->get<HealthTableIF>(objects::HEALTH_TABLE);
|
healthTable = ObjectManager::instance()->get<HealthTableIF>(objects::HEALTH_TABLE);
|
||||||
if (healthTable == NULL) {
|
if (healthTable == NULL) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -6,11 +6,23 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
ObjectManager::ObjectManager( void (*setProducer)() ):
|
ObjectManager* ObjectManager::objManagerInstance = nullptr;
|
||||||
produceObjects(setProducer) {
|
|
||||||
//There's nothing special to do in the constructor.
|
ObjectManager* ObjectManager::instance() {
|
||||||
|
if(objManagerInstance == nullptr) {
|
||||||
|
objManagerInstance = new ObjectManager();
|
||||||
|
}
|
||||||
|
return objManagerInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObjectManager::setObjectFactoryFunction(produce_function_t objFactoryFunc, void *factoryArgs) {
|
||||||
|
this->objectFactoryFunction = objFactoryFunc;
|
||||||
|
this->factoryArgs = factoryArgs;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ObjectManager::ObjectManager() {}
|
||||||
|
|
||||||
|
|
||||||
ObjectManager::~ObjectManager() {
|
ObjectManager::~ObjectManager() {
|
||||||
for (auto const& iter : objectList) {
|
for (auto const& iter : objectList) {
|
||||||
@ -28,10 +40,13 @@ ReturnValue_t ObjectManager::insert( object_id_t id, SystemObjectIF* object) {
|
|||||||
return this->RETURN_OK;
|
return this->RETURN_OK;
|
||||||
} else {
|
} else {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "ObjectManager::insert: Object id " << std::hex
|
sif::error << "ObjectManager::insert: Object ID " << std::hex <<
|
||||||
<< static_cast<uint32_t>(id) << std::dec
|
static_cast<uint32_t>(id) << std::dec << " is already in use!" << std::endl;
|
||||||
<< " is already in use!" << std::endl;
|
sif::error << "Terminating program" << std::endl;
|
||||||
sif::error << "Terminating program." << std::endl;
|
#else
|
||||||
|
sif::printError("ObjectManager::insert: Object ID 0x%08x is already in use!\n",
|
||||||
|
static_cast<unsigned int>(id));
|
||||||
|
sif::printError("Terminating program");
|
||||||
#endif
|
#endif
|
||||||
//This is very severe and difficult to handle in other places.
|
//This is very severe and difficult to handle in other places.
|
||||||
std::exit(INSERTION_FAILED);
|
std::exit(INSERTION_FAILED);
|
||||||
@ -66,12 +81,8 @@ SystemObjectIF* ObjectManager::getSystemObject( object_id_t id ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjectManager::ObjectManager() : produceObjects(nullptr) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void ObjectManager::initialize() {
|
void ObjectManager::initialize() {
|
||||||
if(produceObjects == nullptr) {
|
if(objectFactoryFunction == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "ObjectManager::initialize: Passed produceObjects "
|
sif::error << "ObjectManager::initialize: Passed produceObjects "
|
||||||
"functions is nullptr!" << std::endl;
|
"functions is nullptr!" << std::endl;
|
||||||
@ -80,7 +91,7 @@ void ObjectManager::initialize() {
|
|||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->produceObjects();
|
objectFactoryFunction(factoryArgs);
|
||||||
ReturnValue_t result = RETURN_FAILED;
|
ReturnValue_t result = RETURN_FAILED;
|
||||||
uint32_t errorCount = 0;
|
uint32_t errorCount = 0;
|
||||||
for (auto const& it : objectList) {
|
for (auto const& it : objectList) {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include "SystemObjectIF.h"
|
#include "SystemObjectIF.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This class implements a global object manager.
|
* @brief This class implements a global object manager.
|
||||||
* @details This manager handles a list of available objects with system-wide
|
* @details This manager handles a list of available objects with system-wide
|
||||||
@ -19,44 +20,65 @@
|
|||||||
* @author Bastian Baetz
|
* @author Bastian Baetz
|
||||||
*/
|
*/
|
||||||
class ObjectManager : public ObjectManagerIF {
|
class ObjectManager : public ObjectManagerIF {
|
||||||
private:
|
|
||||||
//comparison?
|
|
||||||
/**
|
|
||||||
* @brief This is the map of all initialized objects in the manager.
|
|
||||||
* @details Objects in the List must inherit the SystemObjectIF.
|
|
||||||
*/
|
|
||||||
std::map<object_id_t, SystemObjectIF*> objectList;
|
|
||||||
protected:
|
|
||||||
SystemObjectIF* getSystemObject( object_id_t id );
|
|
||||||
/**
|
|
||||||
* @brief This attribute is initialized with the factory function
|
|
||||||
* that creates new objects.
|
|
||||||
* @details The function is called if an object was requested with
|
|
||||||
* getSystemObject, but not found in objectList.
|
|
||||||
* @param The id of the object to be created.
|
|
||||||
* @return Returns a pointer to the newly created object or NULL.
|
|
||||||
*/
|
|
||||||
void (*produceObjects)();
|
|
||||||
public:
|
public:
|
||||||
/**
|
|
||||||
* @brief Apart from setting the producer function, nothing special
|
using produce_function_t = void (*) (void* args);
|
||||||
* happens in the constructor.
|
|
||||||
* @param setProducer A pointer to a factory function.
|
/**
|
||||||
*/
|
* Returns the single instance of TaskFactory.
|
||||||
ObjectManager( void (*produce)() );
|
* The implementation of #instance is found in its subclasses.
|
||||||
ObjectManager();
|
* Thus, we choose link-time variability of the instance.
|
||||||
/**
|
*/
|
||||||
* @brief In the class's destructor, all objects in the list are deleted.
|
static ObjectManager* instance();
|
||||||
*/
|
|
||||||
// SHOULDDO: If, for some reason, deleting an ObjectManager instance is
|
void setObjectFactoryFunction(produce_function_t prodFunc, void* args);
|
||||||
// required, check if this works.
|
|
||||||
virtual ~ObjectManager( void );
|
template <typename T> T* get( object_id_t id );
|
||||||
ReturnValue_t insert( object_id_t id, SystemObjectIF* object );
|
|
||||||
ReturnValue_t remove( object_id_t id );
|
/**
|
||||||
void initialize();
|
* @brief In the class's destructor, all objects in the list are deleted.
|
||||||
void printList();
|
*/
|
||||||
|
virtual ~ObjectManager();
|
||||||
|
ReturnValue_t insert(object_id_t id, SystemObjectIF* object) override;
|
||||||
|
ReturnValue_t remove(object_id_t id) override;
|
||||||
|
void initialize() override;
|
||||||
|
void printList() override;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
SystemObjectIF* getSystemObject(object_id_t id) override;
|
||||||
|
/**
|
||||||
|
* @brief This attribute is initialized with the factory function
|
||||||
|
* that creates new objects.
|
||||||
|
* @details The function is called if an object was requested with
|
||||||
|
* getSystemObject, but not found in objectList.
|
||||||
|
* @param The id of the object to be created.
|
||||||
|
* @return Returns a pointer to the newly created object or NULL.
|
||||||
|
*/
|
||||||
|
produce_function_t objectFactoryFunction = nullptr;
|
||||||
|
void* factoryArgs = nullptr;
|
||||||
|
|
||||||
|
private:
|
||||||
|
ObjectManager();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This is the map of all initialized objects in the manager.
|
||||||
|
* @details Objects in the List must inherit the SystemObjectIF.
|
||||||
|
*/
|
||||||
|
std::map<object_id_t, SystemObjectIF*> objectList;
|
||||||
|
static ObjectManager* objManagerInstance;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This is the forward declaration of the global objectManager instance.
|
||||||
|
*/
|
||||||
|
// SHOULDDO: maybe put this in the glob namespace to explicitely mark it global?
|
||||||
|
//extern ObjectManagerIF *objectManager;
|
||||||
|
|
||||||
|
/*Documentation can be found in the class method declaration above.*/
|
||||||
|
template <typename T>
|
||||||
|
T* ObjectManager::get( object_id_t id ) {
|
||||||
|
SystemObjectIF* temp = this->getSystemObject(id);
|
||||||
|
return dynamic_cast<T*>(temp);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* FSFW_OBJECTMANAGER_OBJECTMANAGER_H_ */
|
#endif /* FSFW_OBJECTMANAGER_OBJECTMANAGER_H_ */
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This class provides an interface to the global object manager.
|
* @brief This class provides an interface to the global object manager.
|
||||||
* @details This manager handles a list of available objects with system-wide
|
* @details
|
||||||
* relevance, such as device handlers, and TM/TC services. They can be
|
* This manager handles a list of available objects with system-wide relevance, such as device
|
||||||
* inserted, removed and retrieved from the list. On getting the
|
* handlers, and TM/TC services. They can be inserted, removed and retrieved from the list.
|
||||||
* object, the call checks if the object implements the requested
|
* On getting the object, the call checks if the object implements the requested interface.
|
||||||
* interface.
|
* This interface does not specify a getter function because templates can't be used in interfaces.
|
||||||
* @author Bastian Baetz
|
* @author Bastian Baetz
|
||||||
* @ingroup system_objects
|
* @ingroup system_objects
|
||||||
*/
|
*/
|
||||||
@ -21,7 +21,8 @@ public:
|
|||||||
static constexpr uint8_t INTERFACE_ID = CLASS_ID::OBJECT_MANAGER_IF;
|
static constexpr uint8_t INTERFACE_ID = CLASS_ID::OBJECT_MANAGER_IF;
|
||||||
static constexpr ReturnValue_t INSERTION_FAILED = MAKE_RETURN_CODE( 1 );
|
static constexpr ReturnValue_t INSERTION_FAILED = MAKE_RETURN_CODE( 1 );
|
||||||
static constexpr ReturnValue_t NOT_FOUND = MAKE_RETURN_CODE( 2 );
|
static constexpr ReturnValue_t NOT_FOUND = MAKE_RETURN_CODE( 2 );
|
||||||
static constexpr ReturnValue_t CHILD_INIT_FAILED = MAKE_RETURN_CODE( 3 ); //!< Can be used if the initialization of a SystemObject failed.
|
//!< Can be used if the initialization of a SystemObject failed.
|
||||||
|
static constexpr ReturnValue_t CHILD_INIT_FAILED = MAKE_RETURN_CODE( 3 );
|
||||||
static constexpr ReturnValue_t INTERNAL_ERR_REPORTER_UNINIT = MAKE_RETURN_CODE( 4 );
|
static constexpr ReturnValue_t INTERNAL_ERR_REPORTER_UNINIT = MAKE_RETURN_CODE( 4 );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -49,22 +50,11 @@ public:
|
|||||||
* @li RETURN_OK in case the object was successfully inserted
|
* @li RETURN_OK in case the object was successfully inserted
|
||||||
*/
|
*/
|
||||||
virtual ReturnValue_t insert( object_id_t id, SystemObjectIF* object ) = 0;
|
virtual ReturnValue_t insert( object_id_t id, SystemObjectIF* object ) = 0;
|
||||||
/**
|
|
||||||
* @brief With the get call, interfaces of an object can be retrieved in
|
|
||||||
* a type-safe manner.
|
|
||||||
* @details With the template-based call, the object list is searched with the
|
|
||||||
* getSystemObject method and afterwards it is checked, if the object
|
|
||||||
* implements the requested interface (with a dynamic_cast).
|
|
||||||
* @param id The object id of the requested object.
|
|
||||||
* @return The method returns a pointer to an object implementing the
|
|
||||||
* requested interface, or NULL.
|
|
||||||
*/
|
|
||||||
template <typename T> T* get( object_id_t id );
|
|
||||||
/**
|
/**
|
||||||
* @brief With this call, an object is removed from the list.
|
* @brief With this call, an object is removed from the list.
|
||||||
* @param id The object id of the object to be removed.
|
* @param id The object id of the object to be removed.
|
||||||
* @return \li NOT_FOUND in case the object was not found
|
* @return @li NOT_FOUND in case the object was not found
|
||||||
* \li RETURN_OK in case the object was successfully removed
|
* @li RETURN_OK in case the object was successfully removed
|
||||||
*/
|
*/
|
||||||
virtual ReturnValue_t remove( object_id_t id ) = 0;
|
virtual ReturnValue_t remove( object_id_t id ) = 0;
|
||||||
virtual void initialize() = 0;
|
virtual void initialize() = 0;
|
||||||
@ -75,24 +65,4 @@ public:
|
|||||||
virtual void printList() = 0;
|
virtual void printList() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief This is the forward declaration of the global objectManager instance.
|
|
||||||
*/
|
|
||||||
// SHOULDDO: maybe put this in the glob namespace to explicitely mark it global?
|
|
||||||
extern ObjectManagerIF *objectManager;
|
|
||||||
|
|
||||||
/*Documentation can be found in the class method declaration above.*/
|
|
||||||
template <typename T>
|
|
||||||
T* ObjectManagerIF::get( object_id_t id ) {
|
|
||||||
if(objectManager == nullptr) {
|
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
|
||||||
sif::error << "ObjectManagerIF: Global object manager has not "
|
|
||||||
"been initialized yet!" << std::endl;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
SystemObjectIF* temp = this->getSystemObject(id);
|
|
||||||
return dynamic_cast<T*>(temp);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* OBJECTMANAGERIF_H_ */
|
#endif /* OBJECTMANAGERIF_H_ */
|
||||||
|
@ -4,18 +4,14 @@
|
|||||||
|
|
||||||
SystemObject::SystemObject(object_id_t setObjectId, bool doRegister) :
|
SystemObject::SystemObject(object_id_t setObjectId, bool doRegister) :
|
||||||
objectId(setObjectId), registered(doRegister) {
|
objectId(setObjectId), registered(doRegister) {
|
||||||
if (registered) {
|
if (registered) {
|
||||||
if(objectManager != nullptr) {
|
ObjectManager::instance()->insert(objectId, this);
|
||||||
objectManager->insert(objectId, this);
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SystemObject::~SystemObject() {
|
SystemObject::~SystemObject() {
|
||||||
if (registered) {
|
if (registered) {
|
||||||
if(objectManager != nullptr) {
|
ObjectManager::instance()->remove(objectId);
|
||||||
objectManager->remove(objectId);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "FixedTimeslotTask.h"
|
#include "FixedTimeslotTask.h"
|
||||||
|
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
uint32_t FixedTimeslotTask::deadlineMissedCount = 0;
|
uint32_t FixedTimeslotTask::deadlineMissedCount = 0;
|
||||||
const size_t PeriodicTaskIF::MINIMUM_STACK_SIZE = configMINIMAL_STACK_SIZE;
|
const size_t PeriodicTaskIF::MINIMUM_STACK_SIZE = configMINIMAL_STACK_SIZE;
|
||||||
@ -66,8 +67,7 @@ ReturnValue_t FixedTimeslotTask::startTask() {
|
|||||||
|
|
||||||
ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
|
ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
|
||||||
uint32_t slotTimeMs, int8_t executionStep) {
|
uint32_t slotTimeMs, int8_t executionStep) {
|
||||||
ExecutableObjectIF* handler =
|
ExecutableObjectIF* handler = ObjectManager::instance()->get<ExecutableObjectIF>(componentId);
|
||||||
objectManager->get<ExecutableObjectIF>(componentId);
|
|
||||||
if (handler != nullptr) {
|
if (handler != nullptr) {
|
||||||
pst.addSlot(componentId, slotTimeMs, executionStep, handler, this);
|
pst.addSlot(componentId, slotTimeMs, executionStep, handler, this);
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "MessageQueue.h"
|
#include "MessageQueue.h"
|
||||||
#include "QueueMapManager.h"
|
#include "QueueMapManager.h"
|
||||||
#include "../../objectmanager/ObjectManagerIF.h"
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
MessageQueue::MessageQueue(size_t messageDepth, size_t maxMessageSize):
|
MessageQueue::MessageQueue(size_t messageDepth, size_t maxMessageSize):
|
||||||
maxMessageSize(maxMessageSize) {
|
maxMessageSize(maxMessageSize) {
|
||||||
@ -66,7 +66,7 @@ QueueHandle_t MessageQueue::getNativeQueueHandle() {
|
|||||||
ReturnValue_t MessageQueue::handleSendResult(BaseType_t result, bool ignoreFault) {
|
ReturnValue_t MessageQueue::handleSendResult(BaseType_t result, bool ignoreFault) {
|
||||||
if (result != pdPASS) {
|
if (result != pdPASS) {
|
||||||
if (not ignoreFault) {
|
if (not ignoreFault) {
|
||||||
InternalErrorReporterIF* internalErrorReporter = objectManager->
|
InternalErrorReporterIF* internalErrorReporter = ObjectManager::instance()->
|
||||||
get<InternalErrorReporterIF>(objects::INTERNAL_ERROR_REPORTER);
|
get<InternalErrorReporterIF>(objects::INTERNAL_ERROR_REPORTER);
|
||||||
if (internalErrorReporter != nullptr) {
|
if (internalErrorReporter != nullptr) {
|
||||||
internalErrorReporter->queueMessageNotSent();
|
internalErrorReporter->queueMessageNotSent();
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "PeriodicTask.h"
|
#include "PeriodicTask.h"
|
||||||
|
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
#include "../../tasks/ExecutableObjectIF.h"
|
#include "../../tasks/ExecutableObjectIF.h"
|
||||||
|
|
||||||
PeriodicTask::PeriodicTask(const char *name, TaskPriority setPriority,
|
PeriodicTask::PeriodicTask(const char *name, TaskPriority setPriority,
|
||||||
@ -100,7 +101,7 @@ void PeriodicTask::taskFunctionality() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PeriodicTask::addComponent(object_id_t object) {
|
ReturnValue_t PeriodicTask::addComponent(object_id_t object) {
|
||||||
ExecutableObjectIF* newObject = objectManager->get<ExecutableObjectIF>(
|
ExecutableObjectIF* newObject = ObjectManager::instance()->get<ExecutableObjectIF>(
|
||||||
object);
|
object);
|
||||||
if (newObject == nullptr) {
|
if (newObject == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
#include "../../container/SharedRingBuffer.h"
|
#include "../../container/SharedRingBuffer.h"
|
||||||
#include "../../ipc/MessageQueueSenderIF.h"
|
#include "../../ipc/MessageQueueSenderIF.h"
|
||||||
#include "../../ipc/MutexGuard.h"
|
#include "../../ipc/MutexGuard.h"
|
||||||
#include "../../objectmanager/ObjectManagerIF.h"
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
#include "../../serviceinterface/ServiceInterface.h"
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
#include "../../tmtcservices/TmTcMessage.h"
|
#include "../../tmtcservices/TmTcMessage.h"
|
||||||
@ -41,7 +41,7 @@ ReturnValue_t TcpTmTcServer::initialize() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
tcStore = objectManager->get<StorageManagerIF>(objects::TC_STORE);
|
tcStore = ObjectManager::instance()->get<StorageManagerIF>(objects::TC_STORE);
|
||||||
if (tcStore == nullptr) {
|
if (tcStore == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "TcpTmTcServer::initialize: TC store uninitialized!" << std::endl;
|
sif::error << "TcpTmTcServer::initialize: TC store uninitialized!" << std::endl;
|
||||||
@ -51,7 +51,7 @@ ReturnValue_t TcpTmTcServer::initialize() {
|
|||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmtcBridge = objectManager->get<TcpTmTcBridge>(tmtcBridgeId);
|
tmtcBridge = ObjectManager::instance()->get<TcpTmTcBridge>(tmtcBridgeId);
|
||||||
|
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
struct addrinfo *addrResult = nullptr;
|
struct addrinfo *addrResult = nullptr;
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
#include "tcpipHelpers.h"
|
#include "tcpipHelpers.h"
|
||||||
#include "../../platform.h"
|
#include "../../platform.h"
|
||||||
#include "../../globalfunctions/arrayprinter.h"
|
#include "../../globalfunctions/arrayprinter.h"
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
#ifdef PLATFORM_WIN
|
#ifdef PLATFORM_WIN
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
@ -116,7 +117,7 @@ ReturnValue_t UdpTcPollingTask::handleSuccessfullTcRead(size_t bytesRead) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t UdpTcPollingTask::initialize() {
|
ReturnValue_t UdpTcPollingTask::initialize() {
|
||||||
tcStore = objectManager->get<StorageManagerIF>(objects::TC_STORE);
|
tcStore = ObjectManager::instance()->get<StorageManagerIF>(objects::TC_STORE);
|
||||||
if (tcStore == nullptr) {
|
if (tcStore == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "UdpTcPollingTask::initialize: TC store uninitialized!" << std::endl;
|
sif::error << "UdpTcPollingTask::initialize: TC store uninitialized!" << std::endl;
|
||||||
@ -124,7 +125,7 @@ ReturnValue_t UdpTcPollingTask::initialize() {
|
|||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmtcBridge = objectManager->get<UdpTmTcBridge>(tmtcBridgeId);
|
tmtcBridge = ObjectManager::instance()->get<UdpTmTcBridge>(tmtcBridgeId);
|
||||||
if(tmtcBridge == nullptr) {
|
if(tmtcBridge == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "UdpTcPollingTask::initialize: Invalid TMTC bridge object!" <<
|
sif::error << "UdpTcPollingTask::initialize: Invalid TMTC bridge object!" <<
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
#include "taskHelpers.h"
|
#include "taskHelpers.h"
|
||||||
|
|
||||||
#include "../../platform.h"
|
#include "../../platform.h"
|
||||||
#include "../../osal/host/FixedTimeslotTask.h"
|
#include "../../osal/host/FixedTimeslotTask.h"
|
||||||
#include "../../ipc/MutexFactory.h"
|
#include "../../ipc/MutexFactory.h"
|
||||||
#include "../../osal/host/Mutex.h"
|
#include "../../osal/host/Mutex.h"
|
||||||
#include "../../osal/host/FixedTimeslotTask.h"
|
#include "../../osal/host/FixedTimeslotTask.h"
|
||||||
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
#include "../../serviceinterface/ServiceInterface.h"
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
#include "../../tasks/ExecutableObjectIF.h"
|
#include "../../tasks/ExecutableObjectIF.h"
|
||||||
|
|
||||||
@ -110,7 +112,7 @@ void FixedTimeslotTask::taskFunctionality() {
|
|||||||
|
|
||||||
ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
|
ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
|
||||||
uint32_t slotTimeMs, int8_t executionStep) {
|
uint32_t slotTimeMs, int8_t executionStep) {
|
||||||
ExecutableObjectIF* executableObject = objectManager->
|
ExecutableObjectIF* executableObject = ObjectManager::instance()->
|
||||||
get<ExecutableObjectIF>(componentId);
|
get<ExecutableObjectIF>(componentId);
|
||||||
if (executableObject != nullptr) {
|
if (executableObject != nullptr) {
|
||||||
pollingSeqTable.addSlot(componentId, slotTimeMs, executionStep,
|
pollingSeqTable.addSlot(componentId, slotTimeMs, executionStep,
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#include "MessageQueue.h"
|
#include "MessageQueue.h"
|
||||||
#include "QueueMapManager.h"
|
#include "QueueMapManager.h"
|
||||||
|
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
#include "../../ipc/MutexFactory.h"
|
#include "../../ipc/MutexFactory.h"
|
||||||
#include "../../ipc/MutexGuard.h"
|
#include "../../ipc/MutexGuard.h"
|
||||||
|
|
||||||
@ -121,9 +122,8 @@ ReturnValue_t MessageQueue::sendMessageFromMessageQueue(MessageQueueId_t sendTo,
|
|||||||
QueueMapManager::instance()->getMessageQueue(sendTo));
|
QueueMapManager::instance()->getMessageQueue(sendTo));
|
||||||
if(targetQueue == nullptr) {
|
if(targetQueue == nullptr) {
|
||||||
if(not ignoreFault) {
|
if(not ignoreFault) {
|
||||||
InternalErrorReporterIF* internalErrorReporter =
|
InternalErrorReporterIF* internalErrorReporter = ObjectManager::instance()->
|
||||||
objectManager->get<InternalErrorReporterIF>(
|
get<InternalErrorReporterIF>(objects::INTERNAL_ERROR_REPORTER);
|
||||||
objects::INTERNAL_ERROR_REPORTER);
|
|
||||||
if (internalErrorReporter != nullptr) {
|
if (internalErrorReporter != nullptr) {
|
||||||
internalErrorReporter->queueMessageNotSent();
|
internalErrorReporter->queueMessageNotSent();
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
|
|
||||||
#include "../../platform.h"
|
#include "../../platform.h"
|
||||||
#include "../../ipc/MutexFactory.h"
|
#include "../../ipc/MutexFactory.h"
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
#include "../../tasks/ExecutableObjectIF.h"
|
#include "../../tasks/ExecutableObjectIF.h"
|
||||||
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
@ -103,7 +104,7 @@ void PeriodicTask::taskFunctionality() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PeriodicTask::addComponent(object_id_t object) {
|
ReturnValue_t PeriodicTask::addComponent(object_id_t object) {
|
||||||
ExecutableObjectIF* newObject = objectManager->get<ExecutableObjectIF>(
|
ExecutableObjectIF* newObject = ObjectManager::instance()->get<ExecutableObjectIF>(
|
||||||
object);
|
object);
|
||||||
if (newObject == nullptr) {
|
if (newObject == nullptr) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#include "FixedTimeslotTask.h"
|
#include "FixedTimeslotTask.h"
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
|
||||||
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
@ -40,7 +42,7 @@ uint32_t FixedTimeslotTask::getPeriodMs() const {
|
|||||||
ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
|
ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
|
||||||
uint32_t slotTimeMs, int8_t executionStep) {
|
uint32_t slotTimeMs, int8_t executionStep) {
|
||||||
ExecutableObjectIF* executableObject =
|
ExecutableObjectIF* executableObject =
|
||||||
objectManager->get<ExecutableObjectIF>(componentId);
|
ObjectManager::instance()->get<ExecutableObjectIF>(componentId);
|
||||||
if (executableObject != nullptr) {
|
if (executableObject != nullptr) {
|
||||||
pst.addSlot(componentId, slotTimeMs, executionStep,
|
pst.addSlot(componentId, slotTimeMs, executionStep,
|
||||||
executableObject,this);
|
executableObject,this);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "MessageQueue.h"
|
#include "MessageQueue.h"
|
||||||
|
|
||||||
#include "../../serviceinterface/ServiceInterface.h"
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
#include "../../objectmanager/ObjectManagerIF.h"
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
@ -351,7 +352,7 @@ ReturnValue_t MessageQueue::sendMessageFromMessageQueue(MessageQueueId_t sendTo,
|
|||||||
if (result != 0) {
|
if (result != 0) {
|
||||||
if(!ignoreFault){
|
if(!ignoreFault){
|
||||||
InternalErrorReporterIF* internalErrorReporter =
|
InternalErrorReporterIF* internalErrorReporter =
|
||||||
objectManager->get<InternalErrorReporterIF>(
|
ObjectManager::instance()->get<InternalErrorReporterIF>(
|
||||||
objects::INTERNAL_ERROR_REPORTER);
|
objects::INTERNAL_ERROR_REPORTER);
|
||||||
if (internalErrorReporter != NULL) {
|
if (internalErrorReporter != NULL) {
|
||||||
internalErrorReporter->queueMessageNotSent();
|
internalErrorReporter->queueMessageNotSent();
|
||||||
|
@ -1,8 +1,12 @@
|
|||||||
#include "../../tasks/ExecutableObjectIF.h"
|
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
|
||||||
#include <errno.h>
|
|
||||||
#include "PeriodicPosixTask.h"
|
#include "PeriodicPosixTask.h"
|
||||||
|
|
||||||
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
|
#include "../../tasks/ExecutableObjectIF.h"
|
||||||
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
|
||||||
PeriodicPosixTask::PeriodicPosixTask(const char* name_, int priority_,
|
PeriodicPosixTask::PeriodicPosixTask(const char* name_, int priority_,
|
||||||
size_t stackSize_, uint32_t period_, void(deadlineMissedFunc_)()):
|
size_t stackSize_, uint32_t period_, void(deadlineMissedFunc_)()):
|
||||||
PosixThread(name_, priority_, stackSize_), objectList(), started(false),
|
PosixThread(name_, priority_, stackSize_), objectList(), started(false),
|
||||||
@ -22,7 +26,7 @@ void* PeriodicPosixTask::taskEntryPoint(void* arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PeriodicPosixTask::addComponent(object_id_t object) {
|
ReturnValue_t PeriodicPosixTask::addComponent(object_id_t object) {
|
||||||
ExecutableObjectIF* newObject = objectManager->get<ExecutableObjectIF>(
|
ExecutableObjectIF* newObject = ObjectManager::instance()->get<ExecutableObjectIF>(
|
||||||
object);
|
object);
|
||||||
if (newObject == nullptr) {
|
if (newObject == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "../../tasks/FixedSequenceSlot.h"
|
#include "../../tasks/FixedSequenceSlot.h"
|
||||||
#include "../../objectmanager/SystemObjectIF.h"
|
#include "../../objectmanager/SystemObjectIF.h"
|
||||||
#include "../../objectmanager/ObjectManagerIF.h"
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
#include "../../returnvalues/HasReturnvaluesIF.h"
|
#include "../../returnvalues/HasReturnvaluesIF.h"
|
||||||
#include "../../serviceinterface/ServiceInterface.h"
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ ReturnValue_t FixedTimeslotTask::startTask() {
|
|||||||
|
|
||||||
ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
|
ReturnValue_t FixedTimeslotTask::addSlot(object_id_t componentId,
|
||||||
uint32_t slotTimeMs, int8_t executionStep) {
|
uint32_t slotTimeMs, int8_t executionStep) {
|
||||||
ExecutableObjectIF* object = objectManager->get<ExecutableObjectIF>(componentId);
|
ExecutableObjectIF* object = ObjectManager::instance()->get<ExecutableObjectIF>(componentId);
|
||||||
if (object != nullptr) {
|
if (object != nullptr) {
|
||||||
pst.addSlot(componentId, slotTimeMs, executionStep, object, this);
|
pst.addSlot(componentId, slotTimeMs, executionStep, object, this);
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
|
||||||
#include "../../objectmanager/ObjectManagerIF.h"
|
|
||||||
#include "MessageQueue.h"
|
#include "MessageQueue.h"
|
||||||
#include "RtemsBasic.h"
|
#include "RtemsBasic.h"
|
||||||
|
|
||||||
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
MessageQueue::MessageQueue(size_t message_depth, size_t max_message_size) :
|
MessageQueue::MessageQueue(size_t message_depth, size_t max_message_size) :
|
||||||
id(0), lastPartner(0), defaultDestination(NO_QUEUE), internalErrorReporter(nullptr) {
|
id(0), lastPartner(0), defaultDestination(NO_QUEUE), internalErrorReporter(nullptr) {
|
||||||
rtems_name name = ('Q' << 24) + (queueCounter++ << 8);
|
rtems_name name = ('Q' << 24) + (queueCounter++ << 8);
|
||||||
@ -94,7 +97,7 @@ ReturnValue_t MessageQueue::sendMessageFrom(MessageQueueId_t sendTo,
|
|||||||
//TODO: Check if we're in ISR.
|
//TODO: Check if we're in ISR.
|
||||||
if (result != RTEMS_SUCCESSFUL && !ignoreFault) {
|
if (result != RTEMS_SUCCESSFUL && !ignoreFault) {
|
||||||
if (internalErrorReporter == nullptr) {
|
if (internalErrorReporter == nullptr) {
|
||||||
internalErrorReporter = objectManager->get<InternalErrorReporterIF>(
|
internalErrorReporter = ObjectManager::instance()->get<InternalErrorReporterIF>(
|
||||||
objects::INTERNAL_ERROR_REPORTER);
|
objects::INTERNAL_ERROR_REPORTER);
|
||||||
}
|
}
|
||||||
if (internalErrorReporter != nullptr) {
|
if (internalErrorReporter != nullptr) {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "PeriodicTask.h"
|
#include "PeriodicTask.h"
|
||||||
|
|
||||||
#include "../../serviceinterface/ServiceInterface.h"
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
#include "../../tasks/ExecutableObjectIF.h"
|
#include "../../tasks/ExecutableObjectIF.h"
|
||||||
|
|
||||||
PeriodicTask::PeriodicTask(const char *name, rtems_task_priority setPriority,
|
PeriodicTask::PeriodicTask(const char *name, rtems_task_priority setPriority,
|
||||||
@ -68,7 +69,7 @@ void PeriodicTask::taskFunctionality() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PeriodicTask::addComponent(object_id_t object) {
|
ReturnValue_t PeriodicTask::addComponent(object_id_t object) {
|
||||||
ExecutableObjectIF* newObject = objectManager->get<ExecutableObjectIF>(object);
|
ExecutableObjectIF* newObject = ObjectManager::instance()->get<ExecutableObjectIF>(object);
|
||||||
if (newObject == nullptr) {
|
if (newObject == nullptr) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "ParameterHelper.h"
|
#include "ParameterHelper.h"
|
||||||
#include "ParameterMessage.h"
|
#include "ParameterMessage.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
ParameterHelper::ParameterHelper(ReceivesParameterMessagesIF* owner):
|
ParameterHelper::ParameterHelper(ReceivesParameterMessagesIF* owner):
|
||||||
owner(owner) {}
|
owner(owner) {}
|
||||||
@ -124,7 +125,7 @@ ReturnValue_t ParameterHelper::sendParameter(MessageQueueId_t to, uint32_t id,
|
|||||||
ReturnValue_t ParameterHelper::initialize() {
|
ReturnValue_t ParameterHelper::initialize() {
|
||||||
ownerQueueId = owner->getCommandQueue();
|
ownerQueueId = owner->getCommandQueue();
|
||||||
|
|
||||||
storage = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
storage = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
if (storage == nullptr) {
|
if (storage == nullptr) {
|
||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "../parameters/ParameterMessage.h"
|
#include "ParameterMessage.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
ParameterId_t ParameterMessage::getParameterId(const CommandMessage* message) {
|
ParameterId_t ParameterMessage::getParameterId(const CommandMessage* message) {
|
||||||
return message->getParameter();
|
return message->getParameter();
|
||||||
@ -51,7 +52,7 @@ void ParameterMessage::clear(CommandMessage* message) {
|
|||||||
switch (message->getCommand()) {
|
switch (message->getCommand()) {
|
||||||
case CMD_PARAMETER_LOAD:
|
case CMD_PARAMETER_LOAD:
|
||||||
case REPLY_PARAMETER_DUMP: {
|
case REPLY_PARAMETER_DUMP: {
|
||||||
StorageManagerIF *ipcStore = objectManager->get<StorageManagerIF>(
|
StorageManagerIF *ipcStore = ObjectManager::instance()->get<StorageManagerIF>(
|
||||||
objects::IPC_STORE);
|
objects::IPC_STORE);
|
||||||
if (ipcStore != NULL) {
|
if (ipcStore != NULL) {
|
||||||
ipcStore->deleteData(getStoreId(message));
|
ipcStore->deleteData(getStoreId(message));
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "../monitoring/LimitViolationReporter.h"
|
#include "../monitoring/LimitViolationReporter.h"
|
||||||
#include "../monitoring/MonitoringMessageContent.h"
|
#include "../monitoring/MonitoringMessageContent.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../serialize/SerialFixedArrayListAdapter.h"
|
#include "../serialize/SerialFixedArrayListAdapter.h"
|
||||||
#include "../ipc/QueueFactory.h"
|
#include "../ipc/QueueFactory.h"
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ ReturnValue_t Fuse::initialize() {
|
|||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
powerIF = objectManager->get<PowerSwitchIF>(powerSwitchId);
|
powerIF = ObjectManager::instance()->get<PowerSwitchIF>(powerSwitchId);
|
||||||
if (powerIF == NULL) {
|
if (powerIF == NULL) {
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "PowerSwitcher.h"
|
#include "PowerSwitcher.h"
|
||||||
|
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
PowerSwitcher::PowerSwitcher(uint8_t setSwitch1, uint8_t setSwitch2,
|
PowerSwitcher::PowerSwitcher(uint8_t setSwitch1, uint8_t setSwitch2,
|
||||||
PowerSwitcher::State_t setStartState):
|
PowerSwitcher::State_t setStartState):
|
||||||
@ -10,7 +10,7 @@ PowerSwitcher::PowerSwitcher(uint8_t setSwitch1, uint8_t setSwitch2,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PowerSwitcher::initialize(object_id_t powerSwitchId) {
|
ReturnValue_t PowerSwitcher::initialize(object_id_t powerSwitchId) {
|
||||||
power = objectManager->get<PowerSwitchIF>(powerSwitchId);
|
power = ObjectManager::instance()->get<PowerSwitchIF>(powerSwitchId);
|
||||||
if (power == nullptr) {
|
if (power == nullptr) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
#include "servicepackets/Service200Packets.h"
|
#include "servicepackets/Service200Packets.h"
|
||||||
|
|
||||||
#include "../modes/HasModesIF.h"
|
#include "../modes/HasModesIF.h"
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
#include "../serialize/SerialLinkedListAdapter.h"
|
#include "../serialize/SerialLinkedListAdapter.h"
|
||||||
#include "../modes/ModeMessage.h"
|
#include "../modes/ModeMessage.h"
|
||||||
|
|
||||||
@ -40,7 +41,7 @@ ReturnValue_t CService200ModeCommanding::getMessageQueueAndObject(
|
|||||||
|
|
||||||
ReturnValue_t CService200ModeCommanding::checkInterfaceAndAcquireMessageQueue(
|
ReturnValue_t CService200ModeCommanding::checkInterfaceAndAcquireMessageQueue(
|
||||||
MessageQueueId_t* messageQueueToSet, object_id_t* objectId) {
|
MessageQueueId_t* messageQueueToSet, object_id_t* objectId) {
|
||||||
HasModesIF * destination = objectManager->get<HasModesIF>(*objectId);
|
HasModesIF * destination = ObjectManager::instance()->get<HasModesIF>(*objectId);
|
||||||
if(destination == nullptr) {
|
if(destination == nullptr) {
|
||||||
return CommandingServiceBase::INVALID_OBJECT;
|
return CommandingServiceBase::INVALID_OBJECT;
|
||||||
|
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
#include "CService201HealthCommanding.h"
|
#include "CService201HealthCommanding.h"
|
||||||
|
#include "servicepackets/Service201Packets.h"
|
||||||
|
|
||||||
#include "../health/HasHealthIF.h"
|
#include "../health/HasHealthIF.h"
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../health/HealthMessage.h"
|
#include "../health/HealthMessage.h"
|
||||||
#include "servicepackets/Service201Packets.h"
|
|
||||||
|
|
||||||
CService201HealthCommanding::CService201HealthCommanding(object_id_t objectId,
|
CService201HealthCommanding::CService201HealthCommanding(object_id_t objectId,
|
||||||
uint16_t apid, uint8_t serviceId, uint8_t numParallelCommands,
|
uint16_t apid, uint8_t serviceId, uint8_t numParallelCommands,
|
||||||
@ -43,7 +45,7 @@ ReturnValue_t CService201HealthCommanding::getMessageQueueAndObject(
|
|||||||
|
|
||||||
ReturnValue_t CService201HealthCommanding::checkInterfaceAndAcquireMessageQueue(
|
ReturnValue_t CService201HealthCommanding::checkInterfaceAndAcquireMessageQueue(
|
||||||
MessageQueueId_t* messageQueueToSet, object_id_t* objectId) {
|
MessageQueueId_t* messageQueueToSet, object_id_t* objectId) {
|
||||||
HasHealthIF * destination = objectManager->get<HasHealthIF>(*objectId);
|
HasHealthIF * destination = ObjectManager::instance()->get<HasHealthIF>(*objectId);
|
||||||
if(destination == nullptr) {
|
if(destination == nullptr) {
|
||||||
return CommandingServiceBase::INVALID_OBJECT;
|
return CommandingServiceBase::INVALID_OBJECT;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include "servicepackets/Service1Packets.h"
|
#include "servicepackets/Service1Packets.h"
|
||||||
|
|
||||||
#include "../ipc/QueueFactory.h"
|
#include "../ipc/QueueFactory.h"
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../tmtcservices/PusVerificationReport.h"
|
#include "../tmtcservices/PusVerificationReport.h"
|
||||||
#include "../tmtcpacket/pus/TmPacketStored.h"
|
#include "../tmtcpacket/pus/TmPacketStored.h"
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "../serviceinterface/ServiceInterfaceStream.h"
|
||||||
@ -99,7 +100,7 @@ ReturnValue_t Service1TelecommandVerification::generateSuccessReport(
|
|||||||
|
|
||||||
ReturnValue_t Service1TelecommandVerification::initialize() {
|
ReturnValue_t Service1TelecommandVerification::initialize() {
|
||||||
// Get target object for TC verification messages
|
// Get target object for TC verification messages
|
||||||
AcceptsTelemetryIF* funnel = objectManager->
|
AcceptsTelemetryIF* funnel = ObjectManager::instance()->
|
||||||
get<AcceptsTelemetryIF>(targetDestination);
|
get<AcceptsTelemetryIF>(targetDestination);
|
||||||
if(funnel == nullptr){
|
if(funnel == nullptr){
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
#include "Service20ParameterManagement.h"
|
#include "Service20ParameterManagement.h"
|
||||||
#include "servicepackets/Service20Packets.h"
|
#include "servicepackets/Service20Packets.h"
|
||||||
|
|
||||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
#include <fsfw/parameters/HasParametersIF.h>
|
#include "../parameters/HasParametersIF.h"
|
||||||
#include <fsfw/parameters/ParameterMessage.h>
|
#include "../parameters/ParameterMessage.h"
|
||||||
#include <fsfw/parameters/ReceivesParameterMessagesIF.h>
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include <tmtc/pusIds.h>
|
#include "../parameters/ReceivesParameterMessagesIF.h"
|
||||||
|
|
||||||
|
|
||||||
Service20ParameterManagement::Service20ParameterManagement(object_id_t objectId, uint16_t apid,
|
Service20ParameterManagement::Service20ParameterManagement(object_id_t objectId, uint16_t apid,
|
||||||
@ -65,7 +65,7 @@ ReturnValue_t Service20ParameterManagement::checkInterfaceAndAcquireMessageQueue
|
|||||||
MessageQueueId_t* messageQueueToSet, object_id_t* objectId) {
|
MessageQueueId_t* messageQueueToSet, object_id_t* objectId) {
|
||||||
// check ReceivesParameterMessagesIF property of target
|
// check ReceivesParameterMessagesIF property of target
|
||||||
ReceivesParameterMessagesIF* possibleTarget =
|
ReceivesParameterMessagesIF* possibleTarget =
|
||||||
objectManager->get<ReceivesParameterMessagesIF>(*objectId);
|
ObjectManager::instance()->get<ReceivesParameterMessagesIF>(*objectId);
|
||||||
if(possibleTarget == nullptr) {
|
if(possibleTarget == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "Service20ParameterManagement::checkInterfaceAndAcquire"
|
sif::error << "Service20ParameterManagement::checkInterfaceAndAcquire"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef FSFW_PUS_SERVICE20PARAMETERMANAGEMENT_H_
|
#ifndef FSFW_PUS_SERVICE20PARAMETERMANAGEMENT_H_
|
||||||
#define FSFW_PUS_SERVICE20PARAMETERMANAGEMENT_H_
|
#define FSFW_PUS_SERVICE20PARAMETERMANAGEMENT_H_
|
||||||
|
|
||||||
#include <fsfw/tmtcservices/CommandingServiceBase.h>
|
#include "../tmtcservices/CommandingServiceBase.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief PUS Service 20 Parameter Service implementation
|
* @brief PUS Service 20 Parameter Service implementation
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "Service2DeviceAccess.h"
|
#include "Service2DeviceAccess.h"
|
||||||
#include "servicepackets/Service2Packets.h"
|
#include "servicepackets/Service2Packets.h"
|
||||||
|
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../devicehandlers/DeviceHandlerIF.h"
|
#include "../devicehandlers/DeviceHandlerIF.h"
|
||||||
#include "../storagemanager/StorageManagerIF.h"
|
#include "../storagemanager/StorageManagerIF.h"
|
||||||
#include "../devicehandlers/DeviceHandlerMessage.h"
|
#include "../devicehandlers/DeviceHandlerMessage.h"
|
||||||
@ -47,7 +48,7 @@ ReturnValue_t Service2DeviceAccess::getMessageQueueAndObject(
|
|||||||
ReturnValue_t Service2DeviceAccess::checkInterfaceAndAcquireMessageQueue(
|
ReturnValue_t Service2DeviceAccess::checkInterfaceAndAcquireMessageQueue(
|
||||||
MessageQueueId_t * messageQueueToSet, object_id_t *objectId) {
|
MessageQueueId_t * messageQueueToSet, object_id_t *objectId) {
|
||||||
DeviceHandlerIF* possibleTarget =
|
DeviceHandlerIF* possibleTarget =
|
||||||
objectManager->get<DeviceHandlerIF>(*objectId);
|
ObjectManager::instance()->get<DeviceHandlerIF>(*objectId);
|
||||||
if(possibleTarget == nullptr) {
|
if(possibleTarget == nullptr) {
|
||||||
return CommandingServiceBase::INVALID_OBJECT;
|
return CommandingServiceBase::INVALID_OBJECT;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#include "Service3Housekeeping.h"
|
#include "Service3Housekeeping.h"
|
||||||
#include "servicepackets/Service3Packets.h"
|
#include "servicepackets/Service3Packets.h"
|
||||||
#include "../datapoollocal/HasLocalDataPoolIF.h"
|
|
||||||
|
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
#include "../datapoollocal/HasLocalDataPoolIF.h"
|
||||||
|
|
||||||
Service3Housekeeping::Service3Housekeeping(object_id_t objectId, uint16_t apid,
|
Service3Housekeeping::Service3Housekeeping(object_id_t objectId, uint16_t apid,
|
||||||
uint8_t serviceId):
|
uint8_t serviceId):
|
||||||
@ -56,7 +57,7 @@ ReturnValue_t Service3Housekeeping::checkInterfaceAndAcquireMessageQueue(
|
|||||||
MessageQueueId_t* messageQueueToSet, object_id_t* objectId) {
|
MessageQueueId_t* messageQueueToSet, object_id_t* objectId) {
|
||||||
// check HasLocalDataPoolIF property of target
|
// check HasLocalDataPoolIF property of target
|
||||||
HasLocalDataPoolIF* possibleTarget =
|
HasLocalDataPoolIF* possibleTarget =
|
||||||
objectManager->get<HasLocalDataPoolIF>(*objectId);
|
ObjectManager::instance()->get<HasLocalDataPoolIF>(*objectId);
|
||||||
if(possibleTarget == nullptr){
|
if(possibleTarget == nullptr){
|
||||||
return CommandingServiceBase::INVALID_OBJECT;
|
return CommandingServiceBase::INVALID_OBJECT;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#include "Service5EventReporting.h"
|
#include "Service5EventReporting.h"
|
||||||
#include "servicepackets/Service5Packets.h"
|
#include "servicepackets/Service5Packets.h"
|
||||||
|
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../events/EventManagerIF.h"
|
#include "../events/EventManagerIF.h"
|
||||||
#include "../ipc/QueueFactory.h"
|
#include "../ipc/QueueFactory.h"
|
||||||
#include "../tmtcpacket/pus/TmPacketStored.h"
|
#include "../tmtcpacket/pus/TmPacketStored.h"
|
||||||
@ -89,7 +90,7 @@ ReturnValue_t Service5EventReporting::handleRequest(uint8_t subservice) {
|
|||||||
// In addition to the default PUSServiceBase initialization, this service needs
|
// In addition to the default PUSServiceBase initialization, this service needs
|
||||||
// to be registered to the event manager to listen for events.
|
// to be registered to the event manager to listen for events.
|
||||||
ReturnValue_t Service5EventReporting::initialize() {
|
ReturnValue_t Service5EventReporting::initialize() {
|
||||||
EventManagerIF* manager = objectManager->get<EventManagerIF>(
|
EventManagerIF* manager = ObjectManager::instance()->get<EventManagerIF>(
|
||||||
objects::EVENT_MANAGER);
|
objects::EVENT_MANAGER);
|
||||||
if (manager == NULL) {
|
if (manager == NULL) {
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
#include "Service8FunctionManagement.h"
|
#include "Service8FunctionManagement.h"
|
||||||
#include "servicepackets/Service8Packets.h"
|
#include "servicepackets/Service8Packets.h"
|
||||||
|
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../objectmanager/SystemObjectIF.h"
|
#include "../objectmanager/SystemObjectIF.h"
|
||||||
#include "../action/HasActionsIF.h"
|
#include "../action/HasActionsIF.h"
|
||||||
#include "../devicehandlers/DeviceHandlerIF.h"
|
#include "../devicehandlers/DeviceHandlerIF.h"
|
||||||
#include "../serialize/SerializeAdapter.h"
|
#include "../serialize/SerializeAdapter.h"
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
Service8FunctionManagement::Service8FunctionManagement(object_id_t objectId,
|
Service8FunctionManagement::Service8FunctionManagement(object_id_t objectId,
|
||||||
uint16_t apid, uint8_t serviceId, uint8_t numParallelCommands,
|
uint16_t apid, uint8_t serviceId, uint8_t numParallelCommands,
|
||||||
@ -41,7 +42,7 @@ ReturnValue_t Service8FunctionManagement::getMessageQueueAndObject(
|
|||||||
ReturnValue_t Service8FunctionManagement::checkInterfaceAndAcquireMessageQueue(
|
ReturnValue_t Service8FunctionManagement::checkInterfaceAndAcquireMessageQueue(
|
||||||
MessageQueueId_t* messageQueueToSet, object_id_t* objectId) {
|
MessageQueueId_t* messageQueueToSet, object_id_t* objectId) {
|
||||||
// check HasActionIF property of target
|
// check HasActionIF property of target
|
||||||
HasActionsIF* possibleTarget = objectManager->get<HasActionsIF>(*objectId);
|
HasActionsIF* possibleTarget = ObjectManager::instance()->get<HasActionsIF>(*objectId);
|
||||||
if(possibleTarget == nullptr){
|
if(possibleTarget == nullptr){
|
||||||
return CommandingServiceBase::INVALID_OBJECT;
|
return CommandingServiceBase::INVALID_OBJECT;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#include "LocalPool.h"
|
#include "LocalPool.h"
|
||||||
#include <FSFWConfig.h>
|
#include "FSFWConfig.h"
|
||||||
|
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
LocalPool::LocalPool(object_id_t setObjectId, const LocalPoolConfig& poolConfig,
|
LocalPool::LocalPool(object_id_t setObjectId, const LocalPoolConfig& poolConfig,
|
||||||
@ -185,7 +188,7 @@ ReturnValue_t LocalPool::initialize() {
|
|||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
internalErrorReporter = objectManager->get<InternalErrorReporterIF>(
|
internalErrorReporter = ObjectManager::instance()->get<InternalErrorReporterIF>(
|
||||||
objects::INTERNAL_ERROR_REPORTER);
|
objects::INTERNAL_ERROR_REPORTER);
|
||||||
if (internalErrorReporter == nullptr){
|
if (internalErrorReporter == nullptr){
|
||||||
return ObjectManagerIF::INTERNAL_ERR_REPORTER_UNINIT;
|
return ObjectManagerIF::INTERNAL_ERR_REPORTER_UNINIT;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "Subsystem.h"
|
#include "Subsystem.h"
|
||||||
|
|
||||||
#include "../health/HealthMessage.h"
|
#include "../health/HealthMessage.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../serialize/SerialArrayListAdapter.h"
|
#include "../serialize/SerialArrayListAdapter.h"
|
||||||
#include "../serialize/SerialFixedArrayListAdapter.h"
|
#include "../serialize/SerialFixedArrayListAdapter.h"
|
||||||
#include "../serialize/SerializeElement.h"
|
#include "../serialize/SerializeElement.h"
|
||||||
@ -477,13 +478,13 @@ ReturnValue_t Subsystem::initialize() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPCStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
IPCStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
if (IPCStore == NULL) {
|
if (IPCStore == NULL) {
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if FSFW_USE_MODESTORE == 1
|
#if FSFW_USE_MODESTORE == 1
|
||||||
modeStore = objectManager->get<ModeStoreIF>(objects::MODE_STORE);
|
modeStore = ObjectManager::instance()->get<ModeStoreIF>(objects::MODE_STORE);
|
||||||
|
|
||||||
if (modeStore == nullptr) {
|
if (modeStore == nullptr) {
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "SubsystemBase.h"
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
|
||||||
#include "../subsystem/SubsystemBase.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../ipc/QueueFactory.h"
|
#include "../ipc/QueueFactory.h"
|
||||||
|
|
||||||
SubsystemBase::SubsystemBase(object_id_t setObjectId, object_id_t parent,
|
SubsystemBase::SubsystemBase(object_id_t setObjectId, object_id_t parent,
|
||||||
@ -19,10 +20,10 @@ SubsystemBase::~SubsystemBase() {
|
|||||||
ReturnValue_t SubsystemBase::registerChild(object_id_t objectId) {
|
ReturnValue_t SubsystemBase::registerChild(object_id_t objectId) {
|
||||||
ChildInfo info;
|
ChildInfo info;
|
||||||
|
|
||||||
HasModesIF *child = objectManager->get<HasModesIF>(objectId);
|
HasModesIF *child = ObjectManager::instance()->get<HasModesIF>(objectId);
|
||||||
// This is a rather ugly hack to have the changedHealth info for all
|
// This is a rather ugly hack to have the changedHealth info for all
|
||||||
// children available.
|
// children available.
|
||||||
HasHealthIF* healthChild = objectManager->get<HasHealthIF>(objectId);
|
HasHealthIF* healthChild = ObjectManager::instance()->get<HasHealthIF>(objectId);
|
||||||
if (child == nullptr) {
|
if (child == nullptr) {
|
||||||
if (healthChild == nullptr) {
|
if (healthChild == nullptr) {
|
||||||
return CHILD_DOESNT_HAVE_MODES;
|
return CHILD_DOESNT_HAVE_MODES;
|
||||||
@ -174,7 +175,7 @@ ReturnValue_t SubsystemBase::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (parentId != objects::NO_OBJECT) {
|
if (parentId != objects::NO_OBJECT) {
|
||||||
SubsystemBase *parent = objectManager->get<SubsystemBase>(parentId);
|
SubsystemBase *parent = ObjectManager::instance()->get<SubsystemBase>(parentId);
|
||||||
if (parent == nullptr) {
|
if (parent == nullptr) {
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "ModeSequenceMessage.h"
|
#include "ModeSequenceMessage.h"
|
||||||
|
|
||||||
#include "../../objectmanager/ObjectManagerIF.h"
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
#include "../../storagemanager/StorageManagerIF.h"
|
#include "../../storagemanager/StorageManagerIF.h"
|
||||||
|
|
||||||
void ModeSequenceMessage::setModeSequenceMessage(CommandMessage* message,
|
void ModeSequenceMessage::setModeSequenceMessage(CommandMessage* message,
|
||||||
@ -50,7 +50,7 @@ void ModeSequenceMessage::clear(CommandMessage *message) {
|
|||||||
case TABLE_LIST:
|
case TABLE_LIST:
|
||||||
case TABLE:
|
case TABLE:
|
||||||
case SEQUENCE: {
|
case SEQUENCE: {
|
||||||
StorageManagerIF *ipcStore = objectManager->get<StorageManagerIF>(
|
StorageManagerIF *ipcStore = ObjectManager::instance()->get<StorageManagerIF>(
|
||||||
objects::IPC_STORE);
|
objects::IPC_STORE);
|
||||||
if (ipcStore != nullptr){
|
if (ipcStore != nullptr){
|
||||||
ipcStore->deleteData(ModeSequenceMessage::getStoreAddress(message));
|
ipcStore->deleteData(ModeSequenceMessage::getStoreAddress(message));
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "CCSDSDistributor.h"
|
#include "CCSDSDistributor.h"
|
||||||
|
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../serviceinterface/ServiceInterface.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
#include "../tmtcpacket/SpacePacketBase.h"
|
#include "../tmtcpacket/SpacePacketBase.h"
|
||||||
|
|
||||||
@ -86,7 +87,7 @@ uint16_t CCSDSDistributor::getIdentifier() {
|
|||||||
|
|
||||||
ReturnValue_t CCSDSDistributor::initialize() {
|
ReturnValue_t CCSDSDistributor::initialize() {
|
||||||
ReturnValue_t status = this->TcDistributor::initialize();
|
ReturnValue_t status = this->TcDistributor::initialize();
|
||||||
this->tcStore = objectManager->get<StorageManagerIF>( objects::TC_STORE );
|
this->tcStore = ObjectManager::instance()->get<StorageManagerIF>( objects::TC_STORE );
|
||||||
if (this->tcStore == nullptr) {
|
if (this->tcStore == nullptr) {
|
||||||
#if FSFW_VERBOSE_LEVEL >= 1
|
#if FSFW_VERBOSE_LEVEL >= 1
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "CCSDSDistributorIF.h"
|
#include "CCSDSDistributorIF.h"
|
||||||
#include "PUSDistributor.h"
|
#include "PUSDistributor.h"
|
||||||
|
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../serviceinterface/ServiceInterface.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
#include "../tmtcpacket/pus/TcPacketStored.h"
|
#include "../tmtcpacket/pus/TcPacketStored.h"
|
||||||
#include "../tmtcservices/PusVerificationReport.h"
|
#include "../tmtcservices/PusVerificationReport.h"
|
||||||
@ -125,7 +126,7 @@ ReturnValue_t PUSDistributor::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
CCSDSDistributorIF* ccsdsDistributor =
|
CCSDSDistributorIF* ccsdsDistributor =
|
||||||
objectManager->get<CCSDSDistributorIF>(packetSource);
|
ObjectManager::instance()->get<CCSDSDistributorIF>(packetSource);
|
||||||
if (ccsdsDistributor == nullptr) {
|
if (ccsdsDistributor == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "PUSDistributor::initialize: Packet source invalid" << std::endl;
|
sif::error << "PUSDistributor::initialize: Packet source invalid" << std::endl;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "Heater.h"
|
#include "Heater.h"
|
||||||
|
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../devicehandlers/DeviceHandlerFailureIsolation.h"
|
#include "../devicehandlers/DeviceHandlerFailureIsolation.h"
|
||||||
#include "../power/Fuse.h"
|
#include "../power/Fuse.h"
|
||||||
#include "../ipc/QueueFactory.h"
|
#include "../ipc/QueueFactory.h"
|
||||||
@ -239,7 +240,7 @@ ReturnValue_t Heater::initialize() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
EventManagerIF* manager = objectManager->get<EventManagerIF>(
|
EventManagerIF* manager = ObjectManager::instance()->get<EventManagerIF>(
|
||||||
objects::EVENT_MANAGER);
|
objects::EVENT_MANAGER);
|
||||||
if (manager == NULL) {
|
if (manager == NULL) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
@ -249,7 +250,7 @@ ReturnValue_t Heater::initialize() {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfirmsFailuresIF* pcdu = objectManager->get<ConfirmsFailuresIF>(
|
ConfirmsFailuresIF* pcdu = ObjectManager::instance()->get<ConfirmsFailuresIF>(
|
||||||
DeviceHandlerFailureIsolation::powerConfirmationId);
|
DeviceHandlerFailureIsolation::powerConfirmationId);
|
||||||
if (pcdu == NULL) {
|
if (pcdu == NULL) {
|
||||||
return HasReturnvaluesIF::RETURN_FAILED;
|
return HasReturnvaluesIF::RETURN_FAILED;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "TmStoreMessage.h"
|
#include "TmStoreMessage.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
|
||||||
TmStoreMessage::~TmStoreMessage() {
|
TmStoreMessage::~TmStoreMessage() {
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ void TmStoreMessage::clear(CommandMessage* cmd) {
|
|||||||
case INDEX_REPORT:
|
case INDEX_REPORT:
|
||||||
case DELETE_STORE_CONTENT_TIME:
|
case DELETE_STORE_CONTENT_TIME:
|
||||||
case DOWNLINK_STORE_CONTENT_TIME: {
|
case DOWNLINK_STORE_CONTENT_TIME: {
|
||||||
StorageManagerIF *ipcStore = objectManager->get<StorageManagerIF>(
|
StorageManagerIF *ipcStore = ObjectManager::instance()->get<StorageManagerIF>(
|
||||||
objects::IPC_STORE);
|
objects::IPC_STORE);
|
||||||
if (ipcStore != NULL) {
|
if (ipcStore != NULL) {
|
||||||
ipcStore->deleteData(getStoreId(cmd));
|
ipcStore->deleteData(getStoreId(cmd));
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "TcPacketStored.h"
|
#include "TcPacketStored.h"
|
||||||
#include "../../objectmanager/ObjectManagerIF.h"
|
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
@ -63,7 +64,7 @@ ReturnValue_t TcPacketStored::deletePacket() {
|
|||||||
|
|
||||||
bool TcPacketStored::checkAndSetStore() {
|
bool TcPacketStored::checkAndSetStore() {
|
||||||
if (this->store == nullptr) {
|
if (this->store == nullptr) {
|
||||||
this->store = objectManager->get<StorageManagerIF>(objects::TC_STORE);
|
this->store = ObjectManager::instance()->get<StorageManagerIF>(objects::TC_STORE);
|
||||||
if (this->store == nullptr) {
|
if (this->store == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "TcPacketStored::TcPacketStored: TC Store not found!"
|
sif::error << "TcPacketStored::TcPacketStored: TC Store not found!"
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "../../globalfunctions/CRC.h"
|
#include "../../globalfunctions/CRC.h"
|
||||||
#include "../../globalfunctions/arrayprinter.h"
|
#include "../../globalfunctions/arrayprinter.h"
|
||||||
#include "../../objectmanager/ObjectManagerIF.h"
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
#include "../../serviceinterface/ServiceInterface.h"
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
#include "../../timemanager/CCSDSTime.h"
|
#include "../../timemanager/CCSDSTime.h"
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ void TmPacketBase::print() {
|
|||||||
|
|
||||||
bool TmPacketBase::checkAndSetStamper() {
|
bool TmPacketBase::checkAndSetStamper() {
|
||||||
if (timeStamper == NULL) {
|
if (timeStamper == NULL) {
|
||||||
timeStamper = objectManager->get<TimeStamperIF>(timeStamperId);
|
timeStamper = ObjectManager::instance()->get<TimeStamperIF>(timeStamperId);
|
||||||
if (timeStamper == NULL) {
|
if (timeStamper == NULL) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::warning << "TmPacketBase::checkAndSetStamper: Stamper not found!" << std::endl;
|
sif::warning << "TmPacketBase::checkAndSetStamper: Stamper not found!" << std::endl;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "TmPacketStoredBase.h"
|
#include "TmPacketStoredBase.h"
|
||||||
|
|
||||||
#include "../../objectmanager/ObjectManagerIF.h"
|
#include "../../objectmanager/ObjectManager.h"
|
||||||
#include "../../serviceinterface/ServiceInterfaceStream.h"
|
#include "../../serviceinterface/ServiceInterface.h"
|
||||||
#include "../../tmtcservices/TmTcMessage.h"
|
#include "../../tmtcservices/TmTcMessage.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
@ -48,7 +48,7 @@ void TmPacketStoredBase::setStoreAddress(store_address_t setAddress) {
|
|||||||
|
|
||||||
bool TmPacketStoredBase::checkAndSetStore() {
|
bool TmPacketStoredBase::checkAndSetStore() {
|
||||||
if (store == nullptr) {
|
if (store == nullptr) {
|
||||||
store = objectManager->get<StorageManagerIF>(objects::TM_STORE);
|
store = ObjectManager::instance()->get<StorageManagerIF>(objects::TM_STORE);
|
||||||
if (store == nullptr) {
|
if (store == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "TmPacketStored::TmPacketStored: TM Store not found!"
|
sif::error << "TmPacketStored::TmPacketStored: TM Store not found!"
|
||||||
@ -83,7 +83,7 @@ ReturnValue_t TmPacketStoredBase::sendPacket(MessageQueueId_t destination,
|
|||||||
|
|
||||||
void TmPacketStoredBase::checkAndReportLostTm() {
|
void TmPacketStoredBase::checkAndReportLostTm() {
|
||||||
if (internalErrorReporter == nullptr) {
|
if (internalErrorReporter == nullptr) {
|
||||||
internalErrorReporter = objectManager->get<InternalErrorReporterIF>(
|
internalErrorReporter = ObjectManager::instance()->get<InternalErrorReporterIF>(
|
||||||
objects::INTERNAL_ERROR_REPORTER);
|
objects::INTERNAL_ERROR_REPORTER);
|
||||||
}
|
}
|
||||||
if (internalErrorReporter != nullptr) {
|
if (internalErrorReporter != nullptr) {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <FSFWConfig.h>
|
#include <FSFWConfig.h>
|
||||||
|
|
||||||
#include "../tcdistribution/PUSDistributorIF.h"
|
#include "../tcdistribution/PUSDistributorIF.h"
|
||||||
#include "../objectmanager/ObjectManagerIF.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../ipc/QueueFactory.h"
|
#include "../ipc/QueueFactory.h"
|
||||||
#include "../tmtcpacket/pus/TcPacketStored.h"
|
#include "../tmtcpacket/pus/TcPacketStored.h"
|
||||||
#include "../tmtcpacket/pus/TmPacketStored.h"
|
#include "../tmtcpacket/pus/TmPacketStored.h"
|
||||||
@ -68,12 +68,12 @@ ReturnValue_t CommandingServiceBase::initialize() {
|
|||||||
packetDestination = defaultPacketDestination;
|
packetDestination = defaultPacketDestination;
|
||||||
}
|
}
|
||||||
AcceptsTelemetryIF* packetForwarding =
|
AcceptsTelemetryIF* packetForwarding =
|
||||||
objectManager->get<AcceptsTelemetryIF>(packetDestination);
|
ObjectManager::instance()->get<AcceptsTelemetryIF>(packetDestination);
|
||||||
|
|
||||||
if(packetSource == objects::NO_OBJECT) {
|
if(packetSource == objects::NO_OBJECT) {
|
||||||
packetSource = defaultPacketSource;
|
packetSource = defaultPacketSource;
|
||||||
}
|
}
|
||||||
PUSDistributorIF* distributor = objectManager->get<PUSDistributorIF>(
|
PUSDistributorIF* distributor = ObjectManager::instance()->get<PUSDistributorIF>(
|
||||||
packetSource);
|
packetSource);
|
||||||
|
|
||||||
if (packetForwarding == nullptr or distributor == nullptr) {
|
if (packetForwarding == nullptr or distributor == nullptr) {
|
||||||
@ -88,8 +88,8 @@ ReturnValue_t CommandingServiceBase::initialize() {
|
|||||||
requestQueue->setDefaultDestination(
|
requestQueue->setDefaultDestination(
|
||||||
packetForwarding->getReportReceptionQueue());
|
packetForwarding->getReportReceptionQueue());
|
||||||
|
|
||||||
IPCStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
IPCStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
TCStore = objectManager->get<StorageManagerIF>(objects::TC_STORE);
|
TCStore = ObjectManager::instance()->get<StorageManagerIF>(objects::TC_STORE);
|
||||||
|
|
||||||
if (IPCStore == nullptr or TCStore == nullptr) {
|
if (IPCStore == nullptr or TCStore == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
@ -3,7 +3,8 @@
|
|||||||
#include "PusVerificationReport.h"
|
#include "PusVerificationReport.h"
|
||||||
#include "TmTcMessage.h"
|
#include "TmTcMessage.h"
|
||||||
|
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "../objectmanager/ObjectManager.h"
|
||||||
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
#include "../tcdistribution/PUSDistributorIF.h"
|
#include "../tcdistribution/PUSDistributorIF.h"
|
||||||
#include "../ipc/QueueFactory.h"
|
#include "../ipc/QueueFactory.h"
|
||||||
|
|
||||||
@ -105,9 +106,9 @@ ReturnValue_t PusServiceBase::initialize() {
|
|||||||
if (result != RETURN_OK) {
|
if (result != RETURN_OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
AcceptsTelemetryIF* destService = objectManager->get<AcceptsTelemetryIF>(
|
AcceptsTelemetryIF* destService = ObjectManager::instance()->get<AcceptsTelemetryIF>(
|
||||||
packetDestination);
|
packetDestination);
|
||||||
PUSDistributorIF* distributor = objectManager->get<PUSDistributorIF>(
|
PUSDistributorIF* distributor = ObjectManager::instance()->get<PUSDistributorIF>(
|
||||||
packetSource);
|
packetSource);
|
||||||
if (destService == nullptr or distributor == nullptr) {
|
if (destService == nullptr or distributor == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "TmTcBridge.h"
|
#include "TmTcBridge.h"
|
||||||
|
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../ipc/QueueFactory.h"
|
#include "../ipc/QueueFactory.h"
|
||||||
#include "../serviceinterface/ServiceInterface.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
#include "../globalfunctions/arrayprinter.h"
|
#include "../globalfunctions/arrayprinter.h"
|
||||||
@ -53,7 +54,7 @@ ReturnValue_t TmTcBridge::setMaxNumberOfPacketsStored(
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t TmTcBridge::initialize() {
|
ReturnValue_t TmTcBridge::initialize() {
|
||||||
tcStore = objectManager->get<StorageManagerIF>(tcStoreId);
|
tcStore = ObjectManager::instance()->get<StorageManagerIF>(tcStoreId);
|
||||||
if (tcStore == nullptr) {
|
if (tcStore == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "TmTcBridge::initialize: TC store invalid. Make sure"
|
sif::error << "TmTcBridge::initialize: TC store invalid. Make sure"
|
||||||
@ -61,7 +62,7 @@ ReturnValue_t TmTcBridge::initialize() {
|
|||||||
#endif
|
#endif
|
||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
tmStore = objectManager->get<StorageManagerIF>(tmStoreId);
|
tmStore = ObjectManager::instance()->get<StorageManagerIF>(tmStoreId);
|
||||||
if (tmStore == nullptr) {
|
if (tmStore == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "TmTcBridge::initialize: TM store invalid. Make sure"
|
sif::error << "TmTcBridge::initialize: TM store invalid. Make sure"
|
||||||
@ -70,7 +71,7 @@ ReturnValue_t TmTcBridge::initialize() {
|
|||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
AcceptsTelecommandsIF* tcDistributor =
|
AcceptsTelecommandsIF* tcDistributor =
|
||||||
objectManager->get<AcceptsTelecommandsIF>(tcDestination);
|
ObjectManager::instance()->get<AcceptsTelecommandsIF>(tcDestination);
|
||||||
if (tcDistributor == nullptr) {
|
if (tcDistributor == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "TmTcBridge::initialize: TC Distributor invalid"
|
sif::error << "TmTcBridge::initialize: TC Distributor invalid"
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
#include "AcceptsVerifyMessageIF.h"
|
#include "AcceptsVerifyMessageIF.h"
|
||||||
#include "PusVerificationReport.h"
|
#include "PusVerificationReport.h"
|
||||||
|
|
||||||
|
#include "../objectmanager/ObjectManager.h"
|
||||||
#include "../ipc/MessageQueueIF.h"
|
#include "../ipc/MessageQueueIF.h"
|
||||||
#include "../serviceinterface/ServiceInterfaceStream.h"
|
#include "../serviceinterface/ServiceInterface.h"
|
||||||
#include "../objectmanager/frameworkObjects.h"
|
#include "../objectmanager/frameworkObjects.h"
|
||||||
|
|
||||||
object_id_t VerificationReporter::messageReceiver =
|
object_id_t VerificationReporter::messageReceiver =
|
||||||
@ -104,7 +105,7 @@ void VerificationReporter::initialize() {
|
|||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
AcceptsVerifyMessageIF* temp = objectManager->get<AcceptsVerifyMessageIF>(
|
AcceptsVerifyMessageIF* temp = ObjectManager::instance()->get<AcceptsVerifyMessageIF>(
|
||||||
messageReceiver);
|
messageReceiver);
|
||||||
if (temp == nullptr) {
|
if (temp == nullptr) {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <catch2/catch_test_macros.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <catch2/catch_approx.hpp>
|
#include <catch2/catch_approx.hpp>
|
||||||
|
|
||||||
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/datapoollocal/HasLocalDataPoolIF.h>
|
#include <fsfw/datapoollocal/HasLocalDataPoolIF.h>
|
||||||
#include <fsfw/datapoollocal/SharedLocalDataSet.h>
|
#include <fsfw/datapoollocal/SharedLocalDataSet.h>
|
||||||
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
|
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
|
||||||
@ -12,7 +13,7 @@
|
|||||||
#include <unittest/core/CatchDefinitions.h>
|
#include <unittest/core/CatchDefinitions.h>
|
||||||
|
|
||||||
TEST_CASE("DataSetTest" , "[DataSetTest]") {
|
TEST_CASE("DataSetTest" , "[DataSetTest]") {
|
||||||
LocalPoolOwnerBase* poolOwner = objectManager->
|
LocalPoolOwnerBase* poolOwner = ObjectManager::instance()->
|
||||||
get<LocalPoolOwnerBase>(objects::TEST_LOCAL_POOL_OWNER_BASE);
|
get<LocalPoolOwnerBase>(objects::TEST_LOCAL_POOL_OWNER_BASE);
|
||||||
REQUIRE(poolOwner != nullptr);
|
REQUIRE(poolOwner != nullptr);
|
||||||
REQUIRE(poolOwner->initializeHkManager() == retval::CATCH_OK);
|
REQUIRE(poolOwner->initializeHkManager() == retval::CATCH_OK);
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include <catch2/catch_test_macros.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
#include <catch2/catch_approx.hpp>
|
#include <catch2/catch_approx.hpp>
|
||||||
|
|
||||||
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/datapool/PoolReadGuard.h>
|
#include <fsfw/datapool/PoolReadGuard.h>
|
||||||
#include <fsfw/datapoollocal/HasLocalDataPoolIF.h>
|
#include <fsfw/datapoollocal/HasLocalDataPoolIF.h>
|
||||||
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
|
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
|
||||||
@ -14,7 +15,7 @@
|
|||||||
|
|
||||||
|
|
||||||
TEST_CASE("LocalPoolManagerTest" , "[LocManTest]") {
|
TEST_CASE("LocalPoolManagerTest" , "[LocManTest]") {
|
||||||
LocalPoolOwnerBase* poolOwner = objectManager->
|
LocalPoolOwnerBase* poolOwner = ObjectManager::instance()->
|
||||||
get<LocalPoolOwnerBase>(objects::TEST_LOCAL_POOL_OWNER_BASE);
|
get<LocalPoolOwnerBase>(objects::TEST_LOCAL_POOL_OWNER_BASE);
|
||||||
REQUIRE(poolOwner != nullptr);
|
REQUIRE(poolOwner != nullptr);
|
||||||
REQUIRE(poolOwner->initializeHkManager() == retval::CATCH_OK);
|
REQUIRE(poolOwner->initializeHkManager() == retval::CATCH_OK);
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
#include "LocalPoolOwnerBase.h"
|
#include "LocalPoolOwnerBase.h"
|
||||||
|
|
||||||
#include <catch2/catch_test_macros.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/datapoollocal/HasLocalDataPoolIF.h>
|
#include <fsfw/datapoollocal/HasLocalDataPoolIF.h>
|
||||||
#include <unittest/core/CatchDefinitions.h>
|
#include <unittest/core/CatchDefinitions.h>
|
||||||
|
|
||||||
|
|
||||||
TEST_CASE("LocalPoolVariable" , "[LocPoolVarTest]") {
|
TEST_CASE("LocalPoolVariable" , "[LocPoolVarTest]") {
|
||||||
LocalPoolOwnerBase* poolOwner = objectManager->
|
LocalPoolOwnerBase* poolOwner = ObjectManager::instance()->
|
||||||
get<LocalPoolOwnerBase>(objects::TEST_LOCAL_POOL_OWNER_BASE);
|
get<LocalPoolOwnerBase>(objects::TEST_LOCAL_POOL_OWNER_BASE);
|
||||||
REQUIRE(poolOwner != nullptr);
|
REQUIRE(poolOwner != nullptr);
|
||||||
REQUIRE(poolOwner->initializeHkManager() == retval::CATCH_OK);
|
REQUIRE(poolOwner->initializeHkManager() == retval::CATCH_OK);
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
#include "LocalPoolOwnerBase.h"
|
#include "LocalPoolOwnerBase.h"
|
||||||
|
|
||||||
#include <catch2/catch_test_macros.hpp>
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/datapoollocal/HasLocalDataPoolIF.h>
|
#include <fsfw/datapoollocal/HasLocalDataPoolIF.h>
|
||||||
#include <unittest/core/CatchDefinitions.h>
|
#include <unittest/core/CatchDefinitions.h>
|
||||||
|
|
||||||
TEST_CASE("LocalPoolVector" , "[LocPoolVecTest]") {
|
TEST_CASE("LocalPoolVector" , "[LocPoolVecTest]") {
|
||||||
LocalPoolOwnerBase* poolOwner = objectManager->
|
LocalPoolOwnerBase* poolOwner = ObjectManager::instance()->
|
||||||
get<LocalPoolOwnerBase>(objects::TEST_LOCAL_POOL_OWNER_BASE);
|
get<LocalPoolOwnerBase>(objects::TEST_LOCAL_POOL_OWNER_BASE);
|
||||||
REQUIRE(poolOwner != nullptr);
|
REQUIRE(poolOwner != nullptr);
|
||||||
REQUIRE(poolOwner->initializeHkManager() == retval::CATCH_OK);
|
REQUIRE(poolOwner->initializeHkManager() == retval::CATCH_OK);
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#include "CatchDefinitions.h"
|
#include "CatchDefinitions.h"
|
||||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||||
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
|
|
||||||
StorageManagerIF* tglob::getIpcStoreHandle() {
|
StorageManagerIF* tglob::getIpcStoreHandle() {
|
||||||
if(objectManager != nullptr) {
|
if(ObjectManager::instance() != nullptr) {
|
||||||
return objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
return ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
} else {
|
} else {
|
||||||
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
#if FSFW_CPP_OSTREAM_ENABLED == 1
|
||||||
sif::error << "Global object manager uninitialized" << std::endl;
|
sif::error << "Global object manager uninitialized" << std::endl;
|
||||||
|
@ -8,7 +8,7 @@ namespace Factory {
|
|||||||
* @brief Creates all SystemObject elements which are persistent
|
* @brief Creates all SystemObject elements which are persistent
|
||||||
* during execution.
|
* during execution.
|
||||||
*/
|
*/
|
||||||
void produce();
|
void produce(void* args);
|
||||||
void setStaticFrameworkObjectIds();
|
void setStaticFrameworkObjectIds();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user