object manager singleton now

This commit is contained in:
2021-06-08 16:45:25 +02:00
committed by Robin Mueller
parent 4caf6e102c
commit b7e26be45e
19 changed files with 46 additions and 49 deletions

View File

@ -1,15 +1,18 @@
FROM ubuntu:latest
# FROM alpine:latest
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get install -y curl cmake g++
# Q7S root filesystem, required for cross-compilation
RUN mkdir -p /usr/rootfs; \
curl https://eive-cloud.irs.uni-stuttgart.de/index.php/s/dnfMy9kGpgynN6J/download/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz \
curl --tlsv1 https://eive-cloud.irs.uni-stuttgart.de/index.php/s/dnfMy9kGpgynN6J/download/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz \
| tar xvz -C /usr/rootfs
# Q7S C++ cross-compiler
RUN mkdir -p /usr/tools; \
curl https://eive-cloud.irs.uni-stuttgart.de/index.php/s/RMsbHydJc6PSqcz/download/gcc-arm-linux-gnueabi.tar.gz \
curl --tlsv1 https://eive-cloud.irs.uni-stuttgart.de/index.php/s/RMsbHydJc6PSqcz/download/gcc-arm-linux-gnueabi.tar.gz \
| tar xvz -C /usr/tools
# RUN apk add cmake make g++

View File

@ -33,9 +33,9 @@ ObjectManagerIF *objectManager = nullptr;
void initmission::initMission() {
sif::info << "Building global objects.." << std::endl;
/* Instantiate global object manager and also create all objects */
objectManager = new ObjectManager(ObjectFactory::produce);
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
sif::info << "Initializing all objects.." << std::endl;
objectManager->initialize();
ObjectManager::instance()->initialize();
/* This function creates and starts all tasks */
initTasks();

View File

@ -81,7 +81,7 @@ void Factory::setStaticFrameworkObjectIds() {
void ObjectFactory::produce(){
void ObjectFactory::produce(void* args){
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();
LinuxLibgpioIF* gpioComIF = new LinuxLibgpioIF(objects::GPIO_IF);

View File

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