Merge branch 'mueller/master' of https://egit.irs.uni-stuttgart.de/fsfw/fsfw_example_public into mueller/master

This commit is contained in:
Robin Müller 2021-06-08 12:57:56 +02:00
commit 3d38d5aad1
22 changed files with 50 additions and 50 deletions

View File

@ -283,7 +283,7 @@ void InitMission::createTasks() {
#endif
#if OBSW_ADD_DEVICE_HANDLER_DEMO
HasModesIF* assembly = objectManager->get<HasModesIF>(objects::TEST_ASSEMBLY);
HasModesIF* assembly = ObjectManager::instance()->get<HasModesIF>(objects::TEST_ASSEMBLY);
if (assembly == nullptr){
return;
}

View File

@ -1,8 +1,6 @@
#include <OBSWConfig.h>
#include <bsp_hosted/core/ObjectFactory.h>
#include "ObjectFactory.h"
#include "OBSWConfig.h"
#include <bsp_hosted/fsfwconfig/objects/systemObjectList.h>
#include <bsp_hosted/fsfwconfig/OBSWConfig.h>
#include <bsp_hosted/fsfwconfig/tmtc/apid.h>
#include <bsp_hosted/fsfwconfig/tmtc/pusIds.h>
@ -21,7 +19,7 @@
#include <fsfw/osal/common/UdpTcPollingTask.h>
#include <fsfw/osal/common/UdpTmTcBridge.h>
void ObjectFactory::produce(){
void ObjectFactory::produce(void* args) {
Factory::setStaticFrameworkObjectIds();
#if OBSW_ADD_CORE_COMPONENTS == 1

View File

@ -4,7 +4,7 @@
namespace ObjectFactory {
void setStatics();
void produce();
void produce(void* args);
};

View File

@ -1,7 +1,7 @@
#ifndef POLLINGSEQUENCE_POLLINGSEQUENCFACTORY_H_
#define POLLINGSEQUENCE_POLLINGSEQUENCFACTORY_H_
#include <bsp_hosted/fsfwconfig/OBSWConfig.h>
#include "OBSWConfig.h"
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
class FixedTimeslotTaskIF;

View File

@ -26,8 +26,6 @@ ServiceInterfaceStream sif::warning("WARNING", false);
ServiceInterfaceStream sif::error("ERROR", false, true, true);
#endif
ObjectManagerIF *objectManager = nullptr;
int main() {
utility::commonInitPrint("Hosted", COMPILE_PRINTOUT);
@ -38,7 +36,8 @@ int main() {
sif::printInfo("Producing system objects..\n");
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
objectManager = new ObjectManager(ObjectFactory::produce);
ObjectManager* objManager = ObjectManager::instance();
objManager->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Objects created successfully.." << std::endl;
@ -47,7 +46,7 @@ int main() {
sif::printInfo("Objects created successfully..\n");
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
objectManager->initialize();
objManager->initialize();
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Creating tasks.." << std::endl;

View File

@ -1,5 +1,5 @@
#include "InitMission.h"
#include <OBSWConfig.h>
#include "OBSWConfig.h"
#include <bsp_linux/fsfwconfig/objects/systemObjectList.h>
#include <bsp_linux/fsfwconfig/pollingsequence/pollingSequenceFactory.h>
@ -216,7 +216,7 @@ void InitMission::createTasks() {
#if OBSW_ADD_DEVICE_HANDLER_DEMO
HasModesIF* assembly = objectManager->get<HasModesIF>(objects::TEST_ASSEMBLY);
HasModesIF* assembly = ObjectManager::instance()->get<HasModesIF>(objects::TEST_ASSEMBLY);
if (assembly == nullptr){
return;
}

View File

@ -20,7 +20,7 @@
#include <fsfw/osal/common/UdpTmTcBridge.h>
void ObjectFactory::produce() {
void ObjectFactory::produce(void* args) {
/* Located inside the GenericFactory source file */
Factory::setStaticFrameworkObjectIds();

View File

@ -4,7 +4,7 @@
namespace ObjectFactory {
void setStatics();
void produce();
void produce(void* args);
};
#endif /* MISSION_CORE_OBJECTFACTORY_H_ */

View File

@ -39,7 +39,8 @@ int main() {
sif::printInfo("Producing system objects..\n");
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
objectManager = new ObjectManager(ObjectFactory::produce);
ObjectManager* objManager = ObjectManager::instance();
objManager->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Objects created successfully.." << std::endl;
@ -48,7 +49,7 @@ int main() {
sif::printInfo("Objects created successfully..\n");
#endif /* FSFW_CPP_OSTREAM_ENABLED == 1 */
objectManager->initialize();
objManager->initialize();
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Creating tasks.." << std::endl;

View File

@ -1,6 +1,5 @@
#include "InitMission.h"
#include "OBSWConfig.h"
#include "objects/systemObjectList.h"
#include "pollingsequence/pollingSequenceFactory.h"
@ -8,7 +7,7 @@
#include "mission/assemblies/TestAssembly.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/serviceinterface/ServiceInterfaceStream.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include "fsfw/tasks/FixedTimeslotTaskIF.h"
#include "fsfw/tasks/PeriodicTaskIF.h"
#include "fsfw/tasks/TaskFactory.h"
@ -195,7 +194,7 @@ void InitMission::createTasks() {
#endif
#if OBSW_ADD_DEVICE_HANDLER_DEMO
HasModesIF* assembly = objectManager->get<HasModesIF>(objects::TEST_ASSEMBLY);
HasModesIF* assembly = ObjectManager::instance()->get<HasModesIF>(objects::TEST_ASSEMBLY);
if (assembly == nullptr){
return;
}

View File

@ -17,7 +17,7 @@
#include <fsfw/tmtcservices/CommandingServiceBase.h>
#include <fsfw/tmtcservices/PusServiceBase.h>
void ObjectFactory::produce() {
void ObjectFactory::produce(void* args) {
/* Located inside GenericFactory source file */
Factory::setStaticFrameworkObjectIds();

View File

@ -4,7 +4,7 @@
namespace ObjectFactory {
void setStatics();
void produce();
void produce(void* args);
};
#endif /* MISSION_CORE_OBJECTFACTORY_H_ */

View File

@ -33,8 +33,6 @@ ServiceInterfaceStream sif::warning("WARNING", true);
ServiceInterfaceStream sif::error("ERROR", true);
#endif
ObjectManagerIF *objectManager = nullptr;
void initTask(void *parameters);
/**
@ -70,8 +68,10 @@ void initTask(void *parameters) {
sif::printInfo("Creating objects..\n\r");
#endif
objectManager = new ObjectManager(ObjectFactory::produce);
objectManager->initialize();
ObjectManager* objManager = ObjectManager::instance();
objManager->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
objManager->initialize();
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Creating tasks.." << std::endl;
#else

View File

@ -6,6 +6,7 @@
#include <hardware_init.h>
#include <fsfw/ipc/MutexGuard.h>
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/serviceinterface/ServiceInterface.h>
#include <lwip/timeouts.h>
@ -18,7 +19,7 @@ UdpTcLwIpPollingTask::~UdpTcLwIpPollingTask() {
}
ReturnValue_t UdpTcLwIpPollingTask::initialize() {
udpBridge = objectManager->get<TmTcLwIpUdpBridge>(bridgeId);
udpBridge = ObjectManager::instance()->get<TmTcLwIpUdpBridge>(bridgeId);
if(udpBridge == nullptr) {
return ObjectManagerIF::CHILD_INIT_FAILED;
}

2
fsfw

@ -1 +1 @@
Subproject commit 070c3f3bbfdbddbda54b18cdb5d1c9928640a0dd
Subproject commit 145dd33fb1e467ef7370ccd44671a91d96c60e26

@ -1 +1 @@
Subproject commit c50868c9dc46e27ae59e79f83f27723766656f08
Subproject commit d194b759c4781f6384786010c460382de97830c2

View File

@ -59,6 +59,6 @@
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#10;&lt;memoryBlockExpressionList context=&quot;Context string&quot;&gt;&#10; &lt;memoryBlockExpression address=&quot;604291484&quot; label=&quot;*((((this)-&amp;gt;hkBuffer))+0)@100&quot;/&gt;&#10;&lt;/memoryBlockExpressionList&gt;&#10;"/>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList context=&quot;Context string&quot;&gt;&#13;&#10; &lt;memoryBlockExpression address=&quot;604291484&quot; label=&quot;*((((this)-&amp;gt;hkBuffer))+0)@100&quot;/&gt;&#13;&#10;&lt;/memoryBlockExpressionList&gt;&#13;&#10;"/>
<stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>
</launchConfiguration>

View File

@ -1,7 +1,7 @@
#include <mission/assemblies/TestAssembly.h>
#include <common/config/commonSystemObjects.h>
#include <fsfw/objectmanager/ObjectManagerIF.h>
#include <fsfw/objectmanager/ObjectManager.h>
TestAssembly::TestAssembly(object_id_t objectId, object_id_t parentId):
@ -149,8 +149,8 @@ ReturnValue_t TestAssembly::initialize() {
if(result != RETURN_OK){
return result;
}
handler0 = objectManager->get<TestDevice>(objects::TEST_DEVICE_HANDLER_0);
handler1 = objectManager->get<TestDevice>(objects::TEST_DEVICE_HANDLER_1);
handler0 = ObjectManager::instance()->get<TestDevice>(objects::TEST_DEVICE_HANDLER_0);
handler1 = ObjectManager::instance()->get<TestDevice>(objects::TEST_DEVICE_HANDLER_1);
if((handler0 == nullptr) or (handler1 == nullptr)){
return HasReturnvaluesIF::RETURN_FAILED;
}

View File

@ -1,7 +1,8 @@
#include "TestController.h"
#include <OBSWConfig.h>
#include "OBSWConfig.h"
#include <fsfw/datapool/PoolReadGuard.h>
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/serviceinterface/ServiceInterface.h>
TestController::TestController(object_id_t objectId, size_t commandQueueDepth):
@ -161,7 +162,7 @@ ReturnValue_t TestController::initializeLocalDataPool(localpool::DataPool &local
ReturnValue_t TestController::initializeAfterTaskCreation() {
namespace td = testdevice;
HasLocalDataPoolIF* device0 = objectManager->get<HasLocalDataPoolIF>(
HasLocalDataPoolIF* device0 = ObjectManager::instance()->get<HasLocalDataPoolIF>(
objects::TEST_DEVICE_HANDLER_0);
if(device0 == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
@ -183,7 +184,7 @@ ReturnValue_t TestController::initializeAfterTaskCreation() {
}
HasLocalDataPoolIF* device1 = objectManager->get<HasLocalDataPoolIF>(
HasLocalDataPoolIF* device1 = ObjectManager::instance()->get<HasLocalDataPoolIF>(
objects::TEST_DEVICE_HANDLER_1);
if(device1 == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1

View File

@ -1,4 +1,5 @@
#include <fsfw/ipc/QueueFactory.h>
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/tmtcpacket/pus/TmPacketStored.h>
#include <fsfw/serviceinterface/ServiceInterface.h>
#include <fsfw/tmtcpacket/pus/TmPacketPusC.h>
@ -81,7 +82,7 @@ ReturnValue_t TmFunnel::handlePacket(TmTcMessage* message) {
ReturnValue_t TmFunnel::initialize() {
tmPool = objectManager->get<StorageManagerIF>(objects::TM_STORE);
tmPool = ObjectManager::instance()->get<StorageManagerIF>(objects::TM_STORE);
if(tmPool == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmFunnel::initialize: TM store not set." << std::endl;
@ -91,8 +92,8 @@ ReturnValue_t TmFunnel::initialize() {
return ObjectManagerIF::CHILD_INIT_FAILED;
}
AcceptsTelemetryIF* tmTarget =
objectManager->get<AcceptsTelemetryIF>(downlinkDestination);
AcceptsTelemetryIF* tmTarget = ObjectManager::instance()->
get<AcceptsTelemetryIF>(downlinkDestination);
if(tmTarget == nullptr){
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "TmFunnel::initialize: Downlink Destination not set." << std::endl;
@ -108,8 +109,8 @@ ReturnValue_t TmFunnel::initialize() {
return SystemObject::initialize();
}
AcceptsTelemetryIF* storageTarget =
objectManager->get<AcceptsTelemetryIF>(storageDestination);
AcceptsTelemetryIF* storageTarget = ObjectManager::instance()->
get<AcceptsTelemetryIF>(storageDestination);
if(storageTarget != nullptr) {
storageQueue->setDefaultDestination(
storageTarget->getReportReceptionQueue());

View File

@ -1,9 +1,10 @@
#include "FsfwExampleTask.h"
#include <OBSWConfig.h>
#include <commonSystemObjects.h>
#include <objects/systemObjectList.h>
#include "OBSWConfig.h"
#include "commonSystemObjects.h"
#include "objects/systemObjectList.h"
#include <fsfw/serviceinterface/ServiceInterface.h>
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/tasks/TaskFactory.h>
#include <fsfw/ipc/QueueFactory.h>
#include <fsfw/ipc/CommandMessage.h>
@ -83,8 +84,7 @@ object_id_t FsfwExampleTask::getSender() {
ReturnValue_t FsfwExampleTask::initialize() {
// Get the dataset of the sender. Will be cached for later checks.
object_id_t sender = getSender();
HasLocalDataPoolIF* senderIF =
objectManager->get<HasLocalDataPoolIF>(sender);
HasLocalDataPoolIF* senderIF = ObjectManager::instance()->get<HasLocalDataPoolIF>(sender);
if(senderIF == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "FsfwDemoTask::initialize: Sender object invalid!" << std::endl;
@ -163,7 +163,7 @@ ReturnValue_t FsfwExampleTask::performMonitoringDemo() {
ReturnValue_t FsfwExampleTask::performSendOperation() {
object_id_t nextRecipient = getNextRecipient();
FsfwExampleTask* target = objectManager->get<FsfwExampleTask>(nextRecipient);
FsfwExampleTask* target = ObjectManager::instance()->get<FsfwExampleTask>(nextRecipient);
if (target == nullptr) {
/* Configuration error */
#if FSFW_CPP_OSTREAM_ENABLED == 1

View File

@ -1,6 +1,6 @@
#include "TestTask.h"
#include <fsfw/objectmanager/ObjectManagerIF.h>
#include <fsfw/objectmanager/ObjectManager.h>
#include <fsfw/serviceinterface/ServiceInterface.h>
bool TestTask::oneShotAction = true;
@ -12,7 +12,7 @@ TestTask::TestTask(object_id_t objectId, bool periodicPrintout):
if(testLock == nullptr) {
testLock = MutexFactory::instance()->createMutex();
}
IPCStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
IPCStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
}
TestTask::~TestTask() {