added core controller stub

This commit is contained in:
Robin Müller 2021-05-26 14:16:16 +02:00
parent 37fb33e378
commit 546273d5b8
No known key found for this signature in database
GPG Key ID: FC76078F520434A5
8 changed files with 79 additions and 30 deletions

View File

@ -8,6 +8,4 @@ add_subdirectory(boardconfig)
add_subdirectory(comIF) add_subdirectory(comIF)
add_subdirectory(boardtest) add_subdirectory(boardtest)
add_subdirectory(gpio) add_subdirectory(gpio)
add_subdirectory(core)

View File

@ -7,11 +7,15 @@
#include "devices/powerSwitcherList.h" #include "devices/powerSwitcherList.h"
#include "spiConf.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/HeaterHandler.h>
#include <linux/devices/SolarArrayDeploymentHandler.h> #include <linux/devices/SolarArrayDeploymentHandler.h>
#include <linux/devices/devicedefinitions/SusDefinitions.h>
#include <linux/devices/SusHandler.h> #include <linux/devices/SusHandler.h>
#include <linux/csp/CspCookie.h>
#include <linux/csp/CspComIF.h>
#include <mission/core/GenericFactory.h> #include <mission/core/GenericFactory.h>
#include <mission/devices/PDU1Handler.h> #include <mission/devices/PDU1Handler.h>
@ -28,8 +32,6 @@
#include <mission/devices/GyroL3GD20Handler.h> #include <mission/devices/GyroL3GD20Handler.h>
#include <mission/devices/PlocHandler.h> #include <mission/devices/PlocHandler.h>
#include <mission/devices/RadiationSensorHandler.h> #include <mission/devices/RadiationSensorHandler.h>
#include <linux/devices/devicedefinitions/SusDefinitions.h>
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h> #include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
#include <mission/devices/devicedefinitions/SyrlinksDefinitions.h> #include <mission/devices/devicedefinitions/SyrlinksDefinitions.h>
#include <mission/devices/devicedefinitions/PlocDefinitions.h> #include <mission/devices/devicedefinitions/PlocDefinitions.h>
@ -37,13 +39,8 @@
#include <mission/devices/devicedefinitions/Max31865Definitions.h> #include <mission/devices/devicedefinitions/Max31865Definitions.h>
#include <mission/utility/TmFunnel.h> #include <mission/utility/TmFunnel.h>
#include <linux/csp/CspCookie.h> #include "fsfw_hal/linux/uart/UartComIF.h"
#include <linux/csp/CspComIF.h> #include "fsfw_hal/linux/uart/UartCookie.h"
#include <linux/uart/UartComIF.h>
#include <linux/uart/UartCookie.h>
#include <fsfw_hal/linux/i2c/I2cCookie.h> #include <fsfw_hal/linux/i2c/I2cCookie.h>
#include <fsfw_hal/linux/i2c/I2cComIF.h> #include <fsfw_hal/linux/i2c/I2cComIF.h>
#include <fsfw_hal/linux/spi/SpiCookie.h> #include <fsfw_hal/linux/spi/SpiCookie.h>
@ -87,6 +84,17 @@ void Factory::setStaticFrameworkObjectIds() {
void ObjectFactory::produce(){ void ObjectFactory::produce(){
Factory::setStaticFrameworkObjectIds(); Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects(); 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 #if TE0720 == 1
I2cCookie* i2cCookieTmp1075tcs1 = new I2cCookie(addresses::TMP1075_TCS_1, I2cCookie* i2cCookieTmp1075tcs1 = new I2cCookie(addresses::TMP1075_TCS_1,
@ -99,15 +107,6 @@ void ObjectFactory::produce(){
I2cCookie* i2cCookieTmp1075tcs2 = new I2cCookie(addresses::TMP1075_TCS_2, I2cCookie* i2cCookieTmp1075tcs2 = new I2cCookie(addresses::TMP1075_TCS_2,
TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-1")); TMP1075::MAX_REPLY_LENGTH, std::string("/dev/i2c-1"));
#endif #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 */ /* Temperature sensors */
Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler( Tmp1075Handler* tmp1075Handler_1 = new Tmp1075Handler(

View File

@ -0,0 +1,3 @@
target_sources(${TARGET_NAME} PRIVATE
CoreController.cpp
)

View 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;
}

View 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_ */

View File

@ -11,6 +11,12 @@ enum commonObjects: uint32_t {
UDP_BRIDGE = 0x50000300, UDP_BRIDGE = 0x50000300,
UDP_POLLING_TASK = 0x50000400, UDP_POLLING_TASK = 0x50000400,
/* 0x43 ('C') for Controllers */
THERMAL_CONTROLLER = 0x43001000,
ATTITUDE_CONTROLLER = 0x43002000,
ACS_CONTROLLER = 0x43003000,
CORE_CONTROLLER = 0x43004000,
/* 0x44 ('D') for device handlers */ /* 0x44 ('D') for device handlers */
P60DOCK_HANDLER = 0x44000001, P60DOCK_HANDLER = 0x44000001,
PDU1_HANDLER = 0x44000002, PDU1_HANDLER = 0x44000002,

2
fsfw

@ -1 +1 @@
Subproject commit e9adaf672f7bfac9aaa03c284410b318142431ff Subproject commit 5d2c62e75de447a3aed1fde78e8654f9ce8e1205

View File

@ -1,9 +1,9 @@
#ifndef HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ #ifndef HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
#define HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ #define HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_
#include <cstdint> #include "commonObjects.h"
#include <fsfw/objectmanager/frameworkObjects.h> #include <fsfw/objectmanager/frameworkObjects.h>
#include <commonObjects.h> #include <cstdint>
// The objects will be instantiated in the ID order // The objects will be instantiated in the ID order
namespace objects { namespace objects {
@ -12,12 +12,7 @@ namespace objects {
FW_ADDRESS_START = PUS_SERVICE_1_VERIFICATION, FW_ADDRESS_START = PUS_SERVICE_1_VERIFICATION,
FW_ADDRESS_END = TIME_STAMPER, FW_ADDRESS_END = TIME_STAMPER,
PUS_SERVICE_3 = 0x51000300,
PUS_SERVICE_5 = 0x51000400,
PUS_SERVICE_6 = 0x51000500, PUS_SERVICE_6 = 0x51000500,
PUS_SERVICE_8 = 0x51000800,
PUS_SERVICE_23 = 0x51002300,
PUS_SERVICE_201 = 0x51020100,
TM_FUNNEL = 0x52000002, TM_FUNNEL = 0x52000002,