fixed merge conflicts
This commit is contained in:
@ -8,6 +8,4 @@ add_subdirectory(boardconfig)
|
||||
add_subdirectory(comIF)
|
||||
add_subdirectory(boardtest)
|
||||
add_subdirectory(gpio)
|
||||
|
||||
|
||||
|
||||
add_subdirectory(core)
|
||||
|
@ -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/agnJGYeRf6fw2ci/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/2Fp2ag6NGnbtAsK/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++
|
||||
|
@ -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();
|
||||
|
@ -7,11 +7,15 @@
|
||||
#include "devices/powerSwitcherList.h"
|
||||
#include "spiConf.h"
|
||||
|
||||
#include <bsp_q7s/gpio/gpioCallbacks.h>
|
||||
#include "bsp_q7s/gpio/gpioCallbacks.h"
|
||||
#include "bsp_q7s/core/CoreController.h"
|
||||
|
||||
#include <linux/devices/HeaterHandler.h>
|
||||
#include <linux/devices/SolarArrayDeploymentHandler.h>
|
||||
#include <linux/devices/devicedefinitions/SusDefinitions.h>
|
||||
#include <linux/devices/SusHandler.h>
|
||||
#include <linux/csp/CspCookie.h>
|
||||
#include <linux/csp/CspComIF.h>
|
||||
|
||||
#include <mission/core/GenericFactory.h>
|
||||
#include <mission/devices/PDU1Handler.h>
|
||||
@ -28,8 +32,6 @@
|
||||
#include <mission/devices/GyroL3GD20Handler.h>
|
||||
#include <mission/devices/PlocHandler.h>
|
||||
#include <mission/devices/RadiationSensorHandler.h>
|
||||
|
||||
#include <linux/devices/devicedefinitions/SusDefinitions.h>
|
||||
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
||||
#include <mission/devices/devicedefinitions/SyrlinksDefinitions.h>
|
||||
#include <mission/devices/devicedefinitions/PlocDefinitions.h>
|
||||
@ -38,9 +40,6 @@
|
||||
#include <mission/utility/TmFunnel.h>
|
||||
#include <mission/obc/CCSDSIPCoreBridge.h>
|
||||
|
||||
#include <linux/csp/CspCookie.h>
|
||||
#include <linux/csp/CspComIF.h>
|
||||
|
||||
#include "fsfw_hal/linux/uart/UartComIF.h"
|
||||
#include "fsfw_hal/linux/uart/UartCookie.h"
|
||||
#include <fsfw_hal/linux/i2c/I2cCookie.h>
|
||||
@ -83,9 +82,20 @@ void Factory::setStaticFrameworkObjectIds() {
|
||||
|
||||
|
||||
|
||||
void ObjectFactory::produce(){
|
||||
void ObjectFactory::produce(void* args){
|
||||
Factory::setStaticFrameworkObjectIds();
|
||||
ObjectFactory::produceGenericObjects();
|
||||
LinuxLibgpioIF* gpioComIF = new LinuxLibgpioIF(objects::GPIO_IF);
|
||||
|
||||
/* Communication interfaces */
|
||||
new CspComIF(objects::CSP_COM_IF);
|
||||
new I2cComIF(objects::I2C_COM_IF);
|
||||
new UartComIF(objects::UART_COM_IF);
|
||||
#if Q7S_ADD_SPI_TEST == 0
|
||||
new SpiComIF(objects::SPI_COM_IF, gpioComIF);
|
||||
#endif /* Q7S_ADD_SPI_TEST == 0 */
|
||||
|
||||
new CoreController(objects::CORE_CONTROLLER);
|
||||
|
||||
#if TE0720 == 1
|
||||
I2cCookie* i2cCookieTmp1075tcs1 = new I2cCookie(addresses::TMP1075_TCS_1,
|
||||
@ -98,15 +108,6 @@ void ObjectFactory::produce(){
|
||||
I2cCookie* i2cCookieTmp1075tcs2 = new I2cCookie(addresses::TMP1075_TCS_2,
|
||||
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-1"));
|
||||
#endif
|
||||
LinuxLibgpioIF* gpioComIF = new LinuxLibgpioIF(objects::GPIO_IF);
|
||||
|
||||
/* Communication interfaces */
|
||||
new CspComIF(objects::CSP_COM_IF);
|
||||
new I2cComIF(objects::I2C_COM_IF);
|
||||
new UartComIF(objects::UART_COM_IF);
|
||||
#if Q7S_ADD_SPI_TEST == 0
|
||||
new SpiComIF(objects::SPI_COM_IF, gpioComIF);
|
||||
#endif /* Q7S_ADD_SPI_TEST == 0 */
|
||||
|
||||
/* Temperature sensors */
|
||||
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace ObjectFactory {
|
||||
void setStatics();
|
||||
void produce();
|
||||
void produce(void* args);
|
||||
};
|
||||
|
||||
#endif /* BSP_Q7S_OBJECTFACTORY_H_ */
|
||||
|
@ -5,6 +5,3 @@ target_sources(${TARGET_NAME} PRIVATE
|
||||
target_include_directories(${TARGET_NAME} PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
3
bsp_q7s/core/CMakeLists.txt
Normal file
3
bsp_q7s/core/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
CoreController.cpp
|
||||
)
|
26
bsp_q7s/core/CoreController.cpp
Normal file
26
bsp_q7s/core/CoreController.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include "CoreController.h"
|
||||
|
||||
CoreController::CoreController(object_id_t objectId):
|
||||
ExtendedControllerBase(objectId, objects::NO_OBJECT, 5) {
|
||||
}
|
||||
|
||||
ReturnValue_t CoreController::handleCommandMessage(CommandMessage *message) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
void CoreController::performControlOperation() {
|
||||
}
|
||||
|
||||
ReturnValue_t CoreController::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||
LocalDataPoolManager &poolManager) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
LocalPoolDataSetBase* CoreController::getDataSetHandle(sid_t sid) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ReturnValue_t CoreController::checkModeCommand(Mode_t mode, Submode_t submode,
|
||||
uint32_t *msToReachTheMode) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
22
bsp_q7s/core/CoreController.h
Normal file
22
bsp_q7s/core/CoreController.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef BSP_Q7S_CORE_CORECONTROLLER_H_
|
||||
#define BSP_Q7S_CORE_CORECONTROLLER_H_
|
||||
|
||||
#include "fsfw/controller/ExtendedControllerBase.h"
|
||||
|
||||
class CoreController: public ExtendedControllerBase {
|
||||
public:
|
||||
CoreController(object_id_t objectId);
|
||||
|
||||
ReturnValue_t handleCommandMessage(CommandMessage *message) override;
|
||||
void performControlOperation() override;
|
||||
private:
|
||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||
LocalDataPoolManager& poolManager) override;
|
||||
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
||||
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
|
||||
uint32_t *msToReachTheMode);
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* BSP_Q7S_CORE_CORECONTROLLER_H_ */
|
4
bsp_q7s/memory/CMakeLists.txt
Normal file
4
bsp_q7s/memory/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
FileSystemManager.cpp
|
||||
SdCardAccess.cpp
|
||||
)
|
7
bsp_q7s/memory/FileSystemManager.cpp
Normal file
7
bsp_q7s/memory/FileSystemManager.cpp
Normal file
@ -0,0 +1,7 @@
|
||||
#include "FileSystemManager.h"
|
||||
|
||||
class FileSystemManager {
|
||||
public:
|
||||
|
||||
private:
|
||||
};
|
8
bsp_q7s/memory/FileSystemManager.h
Normal file
8
bsp_q7s/memory/FileSystemManager.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef BSP_Q7S_MEMORY_FILESYSTEMMANAGER_H_
|
||||
#define BSP_Q7S_MEMORY_FILESYSTEMMANAGER_H_
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* BSP_Q7S_MEMORY_FILESYSTEMMANAGER_H_ */
|
4
bsp_q7s/memory/SdCardAccess.cpp
Normal file
4
bsp_q7s/memory/SdCardAccess.cpp
Normal file
@ -0,0 +1,4 @@
|
||||
#include "SdCardAccess.h"
|
||||
|
||||
SdCardAccess::SdCardAccess() {
|
||||
}
|
11
bsp_q7s/memory/SdCardAccess.h
Normal file
11
bsp_q7s/memory/SdCardAccess.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef BSP_Q7S_MEMORY_SDCARDACCESS_H_
|
||||
#define BSP_Q7S_MEMORY_SDCARDACCESS_H_
|
||||
|
||||
class SdCardAccess {
|
||||
public:
|
||||
SdCardAccess();
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
#endif /* BSP_Q7S_MEMORY_SDCARDACCESS_H_ */
|
Reference in New Issue
Block a user