Merge pull request 'Generators & CMake & FSFW Update' (#42) from mueller/generators-cmake-fsfw-update into develop
Reviewed-on: #42
This commit is contained in:
commit
d42a273336
8
.gitmodules
vendored
8
.gitmodules
vendored
@ -15,7 +15,7 @@
|
|||||||
url = https://github.com/rmspacefish/lwgps.git
|
url = https://github.com/rmspacefish/lwgps.git
|
||||||
[submodule "fsfw_hal"]
|
[submodule "fsfw_hal"]
|
||||||
path = fsfw_hal
|
path = fsfw_hal
|
||||||
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw_hal.git
|
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw-hal.git
|
||||||
[submodule "generators/modgen"]
|
[submodule "generators/fsfwgen"]
|
||||||
path = generators/modgen
|
path = generators/fsfwgen
|
||||||
url = https://git.ksat-stuttgart.de/source/modgen.git
|
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw-generators.git
|
||||||
|
@ -54,6 +54,7 @@ set(MISSION_PATH mission)
|
|||||||
set(TEST_PATH test/testtasks)
|
set(TEST_PATH test/testtasks)
|
||||||
set(LINUX_PATH linux)
|
set(LINUX_PATH linux)
|
||||||
set(COMMON_PATH common)
|
set(COMMON_PATH common)
|
||||||
|
set(COMMON_CONFIG_PATH ${COMMON_PATH}/config)
|
||||||
|
|
||||||
set(FSFW_HAL_LIB_PATH fsfw_hal)
|
set(FSFW_HAL_LIB_PATH fsfw_hal)
|
||||||
set(CSP_LIB_PATH ${THIRD_PARTY_FOLDER}/libcsp)
|
set(CSP_LIB_PATH ${THIRD_PARTY_FOLDER}/libcsp)
|
||||||
@ -95,8 +96,21 @@ else()
|
|||||||
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
|
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Configuration files
|
||||||
|
configure_file(${COMMON_CONFIG_PATH}/commonConfig.h.in commonConfig.h)
|
||||||
|
configure_file(${FSFW_CONFIG_PATH}/FSFWConfig.h.in FSFWConfig.h)
|
||||||
|
configure_file(${FSFW_CONFIG_PATH}/OBSWConfig.h.in OBSWConfig.h)
|
||||||
|
if(${TGT_BSP} MATCHES "arm/q7s")
|
||||||
|
configure_file(${BSP_PATH}/boardconfig/q7sConfig.h.in q7sConfig.h)
|
||||||
|
elseif(${TGT_BSP} MATCHES "arm/raspberrypi")
|
||||||
|
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Set common config path for FSFW
|
# Set common config path for FSFW
|
||||||
set(FSFW_ADDITIONAL_INC_PATH "${COMMON_PATH}/config")
|
set(FSFW_ADDITIONAL_INC_PATHS
|
||||||
|
"${COMMON_PATH}/config"
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
)
|
||||||
# Set for lwgps library
|
# Set for lwgps library
|
||||||
set(LWGPS_CONFIG_PATH "${COMMON_PATH}/config")
|
set(LWGPS_CONFIG_PATH "${COMMON_PATH}/config")
|
||||||
|
|
||||||
@ -157,6 +171,7 @@ endif()
|
|||||||
target_include_directories(${TARGET_NAME} PRIVATE
|
target_include_directories(${TARGET_NAME} PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${FSFW_CONFIG_PATH}
|
${FSFW_CONFIG_PATH}
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
FROM ubuntu:latest
|
FROM ubuntu:latest
|
||||||
# FROM alpine: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 cmake g++
|
RUN apt-get update && apt-get install -y cmake g++
|
||||||
# RUN apk add cmake make g++
|
# RUN apk add cmake make g++
|
||||||
|
|
||||||
|
@ -32,9 +32,9 @@ ObjectManagerIF *objectManager = nullptr;
|
|||||||
void initmission::initMission() {
|
void initmission::initMission() {
|
||||||
sif::info << "Building global objects.." << std::endl;
|
sif::info << "Building global objects.." << std::endl;
|
||||||
/* Instantiate global object manager and also create all objects */
|
/* 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;
|
sif::info << "Initializing all objects.." << std::endl;
|
||||||
objectManager->initialize();
|
ObjectManager::instance()->initialize();
|
||||||
|
|
||||||
/* This function creates and starts all tasks */
|
/* This function creates and starts all tasks */
|
||||||
initTasks();
|
initTasks();
|
||||||
|
@ -36,7 +36,7 @@ void Factory::setStaticFrameworkObjectIds(){
|
|||||||
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
|
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::produce(){
|
void ObjectFactory::produce(void* args){
|
||||||
Factory::setStaticFrameworkObjectIds();
|
Factory::setStaticFrameworkObjectIds();
|
||||||
ObjectFactory::produceGenericObjects();
|
ObjectFactory::produceGenericObjects();
|
||||||
|
|
||||||
|
@ -1,17 +1,10 @@
|
|||||||
/*
|
|
||||||
* ObjectFactory.h
|
|
||||||
*
|
|
||||||
* Created on: Sep 22, 2020
|
|
||||||
* Author: steffen
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BSP_LINUX_OBJECTFACTORY_H_
|
#ifndef BSP_LINUX_OBJECTFACTORY_H_
|
||||||
#define BSP_LINUX_OBJECTFACTORY_H_
|
#define BSP_LINUX_OBJECTFACTORY_H_
|
||||||
|
|
||||||
|
|
||||||
namespace ObjectFactory {
|
namespace ObjectFactory {
|
||||||
void setStatics();
|
void setStatics();
|
||||||
void produce();
|
void produce(void* args);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* BSP_LINUX_OBJECTFACTORY_H_ */
|
#endif /* BSP_LINUX_OBJECTFACTORY_H_ */
|
||||||
|
@ -26,9 +26,9 @@ ObjectManagerIF *objectManager = nullptr;
|
|||||||
void initmission::initMission() {
|
void initmission::initMission() {
|
||||||
sif::info << "Building global objects.." << std::endl;
|
sif::info << "Building global objects.." << std::endl;
|
||||||
/* Instantiate global object manager and also create all objects */
|
/* 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;
|
sif::info << "Initializing all objects.." << std::endl;
|
||||||
objectManager->initialize();
|
ObjectManager::instance()->initialize();
|
||||||
|
|
||||||
/* This function creates and starts all tasks */
|
/* This function creates and starts all tasks */
|
||||||
initTasks();
|
initTasks();
|
||||||
@ -117,6 +117,10 @@ void initmission::initTasks() {
|
|||||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
}
|
}
|
||||||
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
|
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* pusLowPrio = factory->createPeriodicTask(
|
PeriodicTaskIF* pusLowPrio = factory->createPeriodicTask(
|
||||||
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
||||||
@ -124,6 +128,11 @@ void initmission::initTasks() {
|
|||||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
||||||
}
|
}
|
||||||
|
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
|
||||||
|
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
|
initmission::printAddObjectError("INT_ERR_RPRT",
|
||||||
|
objects::INTERNAL_ERROR_REPORTER);
|
||||||
|
}
|
||||||
|
|
||||||
#if OBSW_ADD_TEST_PST == 1
|
#if OBSW_ADD_TEST_PST == 1
|
||||||
FixedTimeslotTaskIF* pstTestTask = factory->createFixedTimeslotTask(
|
FixedTimeslotTaskIF* pstTestTask = factory->createFixedTimeslotTask(
|
||||||
|
@ -45,15 +45,13 @@ void Factory::setStaticFrameworkObjectIds() {
|
|||||||
// No storage object for now.
|
// No storage object for now.
|
||||||
TmFunnel::storageDestination = objects::NO_OBJECT;
|
TmFunnel::storageDestination = objects::NO_OBJECT;
|
||||||
|
|
||||||
LocalDataPoolManager::defaultHkDestination = objects::NO_OBJECT;
|
|
||||||
|
|
||||||
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
|
VerificationReporter::messageReceiver = objects::PUS_SERVICE_1_VERIFICATION;
|
||||||
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
|
TmPacketBase::timeStamperId = objects::TIME_STAMPER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void ObjectFactory::produce(){
|
void ObjectFactory::produce(void* args){
|
||||||
Factory::setStaticFrameworkObjectIds();
|
Factory::setStaticFrameworkObjectIds();
|
||||||
ObjectFactory::produceGenericObjects();
|
ObjectFactory::produceGenericObjects();
|
||||||
|
|
||||||
|
@ -1,17 +1,10 @@
|
|||||||
/*
|
|
||||||
* ObjectFactory.h
|
|
||||||
*
|
|
||||||
* Created on: Sep 22, 2020
|
|
||||||
* Author: steffen
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef BSP_LINUX_OBJECTFACTORY_H_
|
#ifndef BSP_LINUX_OBJECTFACTORY_H_
|
||||||
#define BSP_LINUX_OBJECTFACTORY_H_
|
#define BSP_LINUX_OBJECTFACTORY_H_
|
||||||
|
|
||||||
|
|
||||||
namespace ObjectFactory {
|
namespace ObjectFactory {
|
||||||
void setStatics();
|
void setStatics();
|
||||||
void produce();
|
void produce(void* args);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* BSP_LINUX_OBJECTFACTORY_H_ */
|
#endif /* BSP_LINUX_OBJECTFACTORY_H_ */
|
||||||
|
@ -5,6 +5,3 @@ target_sources(${TARGET_NAME} PRIVATE
|
|||||||
target_include_directories(${TARGET_NAME} PUBLIC
|
target_include_directories(${TARGET_NAME} PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,15 +1,18 @@
|
|||||||
FROM ubuntu:latest
|
FROM ubuntu:latest
|
||||||
# FROM alpine: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++
|
RUN apt-get update && apt-get install -y curl cmake g++
|
||||||
|
|
||||||
# Q7S root filesystem, required for cross-compilation
|
# Q7S root filesystem, required for cross-compilation
|
||||||
RUN mkdir -p /usr/rootfs; \
|
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
|
| tar xvz -C /usr/rootfs
|
||||||
# Q7S C++ cross-compiler
|
# Q7S C++ cross-compiler
|
||||||
RUN mkdir -p /usr/tools; \
|
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
|
| tar xvz -C /usr/tools
|
||||||
|
|
||||||
# RUN apk add cmake make g++
|
# RUN apk add cmake make g++
|
||||||
|
@ -33,9 +33,9 @@ ObjectManagerIF *objectManager = nullptr;
|
|||||||
void initmission::initMission() {
|
void initmission::initMission() {
|
||||||
sif::info << "Building global objects.." << std::endl;
|
sif::info << "Building global objects.." << std::endl;
|
||||||
/* Instantiate global object manager and also create all objects */
|
/* 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;
|
sif::info << "Initializing all objects.." << std::endl;
|
||||||
objectManager->initialize();
|
ObjectManager::instance()->initialize();
|
||||||
|
|
||||||
/* This function creates and starts all tasks */
|
/* This function creates and starts all tasks */
|
||||||
initTasks();
|
initTasks();
|
||||||
|
@ -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>
|
||||||
@ -84,9 +81,20 @@ void Factory::setStaticFrameworkObjectIds() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void ObjectFactory::produce(){
|
void ObjectFactory::produce(void* args){
|
||||||
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(
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
namespace ObjectFactory {
|
namespace ObjectFactory {
|
||||||
void setStatics();
|
void setStatics();
|
||||||
void produce();
|
void produce(void* args);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* BSP_Q7S_OBJECTFACTORY_H_ */
|
#endif /* BSP_Q7S_OBJECTFACTORY_H_ */
|
||||||
|
@ -5,6 +5,3 @@ target_sources(${TARGET_NAME} PRIVATE
|
|||||||
target_include_directories(${TARGET_NAME} PUBLIC
|
target_include_directories(${TARGET_NAME} PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${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_ */
|
@ -6,7 +6,7 @@ if(NOT DEFINED ENV{Q7S_SYSROOT})
|
|||||||
# "point to the raspbian rootfs."
|
# "point to the raspbian rootfs."
|
||||||
# )
|
# )
|
||||||
else()
|
else()
|
||||||
set(SYSROOT_PATH "$ENV{Q7S_SYSROOT}" CACHE FILEPATH "Q7S root filesystem path")
|
set(SYSROOT_PATH "$ENV{Q7S_SYSROOT}" CACHE PATH "Q7S root filesystem path")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT DEFINED ENV{CROSS_COMPILE})
|
if(NOT DEFINED ENV{CROSS_COMPILE})
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
namespace CLASS_ID {
|
namespace CLASS_ID {
|
||||||
enum commonClassIds: uint8_t {
|
enum commonClassIds: uint8_t {
|
||||||
MISSION_CLASS_ID_START = FW_CLASS_ID_COUNT,
|
COMMON_CLASS_ID_START = FW_CLASS_ID_COUNT,
|
||||||
MGM_LIS3MDL, //MGMLIS3
|
MGM_LIS3MDL, //MGMLIS3
|
||||||
MGM_RM3100, //MGMRM3100
|
MGM_RM3100, //MGMRM3100
|
||||||
PCDU_HANDLER, //PCDU
|
PCDU_HANDLER, //PCDU
|
||||||
|
@ -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,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
version: "3.8"
|
version: "3.3"
|
||||||
|
|
||||||
services:
|
services:
|
||||||
build-host:
|
build-host:
|
||||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit e9adaf672f7bfac9aaa03c284410b318142431ff
|
Subproject commit 4b095eea8991d3e9a48fa8945c86339cfdad26d5
|
@ -11,10 +11,10 @@ On Windows, Build Tools installation might be necessary
|
|||||||
"""
|
"""
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from modgen.events.event_parser import handle_csv_export, handle_cpp_export, SubsystemDefinitionParser, EventParser
|
from fsfwgen.events.event_parser import handle_csv_export, handle_cpp_export, SubsystemDefinitionParser, EventParser
|
||||||
from modgen.parserbase.file_list_parser import FileListParser
|
from fsfwgen.parserbase.file_list_parser import FileListParser
|
||||||
from modgen.utility.printer import PrettyPrinter
|
from fsfwgen.utility.printer import PrettyPrinter
|
||||||
from modgen.utility.file_management import copy_file, move_file
|
from fsfwgen.utility.file_management import copy_file, move_file
|
||||||
|
|
||||||
from definitions import BspType
|
from definitions import BspType
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 83 translations.
|
* @brief Auto-generated event translation file. Contains 83 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2021-05-18 16:15:50
|
* Generated on: 2021-06-08 17:09:32
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
|
1
generators/fsfwgen
Submodule
1
generators/fsfwgen
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 78e890f947f55a9417d390fea8d9bd5684d11730
|
@ -1 +0,0 @@
|
|||||||
Subproject commit d9beb68bd9d1a1e6015e4979d547a762d199bff7
|
|
@ -10,10 +10,10 @@ On Windows, Build Tools installation might be necessary
|
|||||||
"""
|
"""
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
from modgen.objects.objects import sql_object_exporter, ObjectDefinitionParser, write_translation_file, \
|
from fsfwgen.objects.objects import sql_object_exporter, ObjectDefinitionParser, write_translation_file, \
|
||||||
export_object_file, write_translation_header_file
|
export_object_file, write_translation_header_file
|
||||||
from modgen.utility.printer import PrettyPrinter
|
from fsfwgen.utility.printer import PrettyPrinter
|
||||||
from modgen.utility.file_management import copy_file, move_file
|
from fsfwgen.utility.file_management import copy_file, move_file
|
||||||
|
|
||||||
from definitions import BspType, DATABASE_NAME
|
from definitions import BspType, DATABASE_NAME
|
||||||
|
|
||||||
|
@ -9,10 +9,10 @@ Returnvalue exporter.
|
|||||||
To use MySQLdb, run pip install mysqlclient or install in IDE. On Windows, Build Tools installation might be necessary.
|
To use MySQLdb, run pip install mysqlclient or install in IDE. On Windows, Build Tools installation might be necessary.
|
||||||
:data: 21.11.2019
|
:data: 21.11.2019
|
||||||
"""
|
"""
|
||||||
from modgen.parserbase.file_list_parser import FileListParser
|
from fsfwgen.parserbase.file_list_parser import FileListParser
|
||||||
from modgen.returnvalues.returnvalues_parser import InterfaceParser, ReturnValueParser
|
from fsfwgen.returnvalues.returnvalues_parser import InterfaceParser, ReturnValueParser
|
||||||
from modgen.utility.sql_writer import SqlWriter
|
from fsfwgen.utility.sql_writer import SqlWriter
|
||||||
from modgen.utility.file_management import move_file
|
from fsfwgen.utility.file_management import move_file
|
||||||
|
|
||||||
from definitions import BspType, DATABASE_NAME
|
from definitions import BspType, DATABASE_NAME
|
||||||
|
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
#include "devices/gpioIds.h"
|
#include "devices/gpioIds.h"
|
||||||
|
|
||||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||||
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/tasks/TaskFactory.h>
|
#include <fsfw/tasks/TaskFactory.h>
|
||||||
|
|
||||||
LibgpiodTest::LibgpiodTest(object_id_t objectId, object_id_t gpioIfobjectId,
|
LibgpiodTest::LibgpiodTest(object_id_t objectId, object_id_t gpioIfobjectId,
|
||||||
GpioCookie* gpioCookie):
|
GpioCookie* gpioCookie):
|
||||||
TestTask(objectId) {
|
TestTask(objectId) {
|
||||||
|
|
||||||
gpioInterface = objectManager->get<GpioIF>(gpioIfobjectId);
|
gpioInterface = ObjectManager::instance()->get<GpioIF>(gpioIfobjectId);
|
||||||
if (gpioInterface == nullptr) {
|
if (gpioInterface == nullptr) {
|
||||||
sif::error << "LibgpiodTest::LibgpiodTest: Invalid Gpio interface." << std::endl;
|
sif::error << "LibgpiodTest::LibgpiodTest: Invalid Gpio interface." << std::endl;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include "devices/gpioIds.h"
|
#include "devices/gpioIds.h"
|
||||||
#include "devices/powerSwitcherList.h"
|
#include "devices/powerSwitcherList.h"
|
||||||
|
|
||||||
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/ipc/QueueFactory.h>
|
#include <fsfw/ipc/QueueFactory.h>
|
||||||
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
||||||
|
|
||||||
@ -38,7 +39,7 @@ ReturnValue_t HeaterHandler::initialize() {
|
|||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
gpioInterface = objectManager->get<GpioIF>(gpioDriverId);
|
gpioInterface = ObjectManager::instance()->get<GpioIF>(gpioDriverId);
|
||||||
if (gpioInterface == nullptr) {
|
if (gpioInterface == nullptr) {
|
||||||
sif::error << "HeaterHandler::initialize: Invalid Gpio interface." << std::endl;
|
sif::error << "HeaterHandler::initialize: Invalid Gpio interface." << std::endl;
|
||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
@ -50,14 +51,14 @@ ReturnValue_t HeaterHandler::initialize() {
|
|||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
IPCStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
IPCStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
if (IPCStore == nullptr) {
|
if (IPCStore == nullptr) {
|
||||||
sif::error << "HeaterHandler::initialize: IPC store not set up in factory." << std::endl;
|
sif::error << "HeaterHandler::initialize: IPC store not set up in factory." << std::endl;
|
||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mainLineSwitcherObjectId != objects::NO_OBJECT) {
|
if(mainLineSwitcherObjectId != objects::NO_OBJECT) {
|
||||||
mainLineSwitcher = objectManager->get<PowerSwitchIF>(mainLineSwitcherObjectId);
|
mainLineSwitcher = ObjectManager::instance()->get<PowerSwitchIF>(mainLineSwitcherObjectId);
|
||||||
if (mainLineSwitcher == nullptr) {
|
if (mainLineSwitcher == nullptr) {
|
||||||
sif::error
|
sif::error
|
||||||
<< "HeaterHandler::initialize: Failed to get main line switcher. Make sure "
|
<< "HeaterHandler::initialize: Failed to get main line switcher. Make sure "
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
#include <fsfw_hal/common/gpio/GpioCookie.h>
|
||||||
#include <fsfw/ipc/QueueFactory.h>
|
#include <fsfw/ipc/QueueFactory.h>
|
||||||
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
|
|
||||||
|
|
||||||
SolarArrayDeploymentHandler::SolarArrayDeploymentHandler(object_id_t setObjectId_,
|
SolarArrayDeploymentHandler::SolarArrayDeploymentHandler(object_id_t setObjectId_,
|
||||||
@ -35,7 +36,7 @@ ReturnValue_t SolarArrayDeploymentHandler::initialize() {
|
|||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
gpioInterface = objectManager->get<GpioIF>(gpioDriverId);
|
gpioInterface = ObjectManager::instance()->get<GpioIF>(gpioDriverId);
|
||||||
if (gpioInterface == nullptr) {
|
if (gpioInterface == nullptr) {
|
||||||
sif::error << "SolarArrayDeploymentHandler::initialize: Invalid Gpio interface."
|
sif::error << "SolarArrayDeploymentHandler::initialize: Invalid Gpio interface."
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
@ -50,7 +51,7 @@ ReturnValue_t SolarArrayDeploymentHandler::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mainLineSwitcherObjectId != objects::NO_OBJECT) {
|
if (mainLineSwitcherObjectId != objects::NO_OBJECT) {
|
||||||
mainLineSwitcher = objectManager->get<PowerSwitchIF>(mainLineSwitcherObjectId);
|
mainLineSwitcher = ObjectManager::instance()->get<PowerSwitchIF>(mainLineSwitcherObjectId);
|
||||||
if (mainLineSwitcher == nullptr) {
|
if (mainLineSwitcher == nullptr) {
|
||||||
sif::error
|
sif::error
|
||||||
<< "SolarArrayDeploymentHandler::initialize: Main line switcher failed to fetch object"
|
<< "SolarArrayDeploymentHandler::initialize: Main line switcher failed to fetch object"
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
#define FSFWCONFIG_OBSWCONFIG_H_
|
#define FSFWCONFIG_OBSWCONFIG_H_
|
||||||
|
|
||||||
#ifdef RASPBERRY_PI
|
#ifdef RASPBERRY_PI
|
||||||
#include <rpi_config.h>
|
#include "rpiConfig.h"
|
||||||
#elif defined(XIPHOS_Q7S)
|
#elif defined(XIPHOS_Q7S)
|
||||||
#include <q7s_config.h>
|
#include "q7sConfig.h"
|
||||||
#endif
|
#endif
|
||||||
#include "commonConfig.h"
|
#include "commonConfig.h"
|
||||||
#include "OBSWVersion.h"
|
#include "OBSWVersion.h"
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 83 translations.
|
* @brief Auto-generated event translation file. Contains 83 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2021-05-18 16:15:50
|
* Generated on: 2021-06-08 17:09:32
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
|
@ -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,
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "GPIORPi.h"
|
#include "GPIORPi.h"
|
||||||
#include <FSFWConfig.h>
|
|
||||||
|
|
||||||
#include <fsfw/serviceinterface/ServiceInterface.h>
|
#include <fsfw/serviceinterface/ServiceInterface.h>
|
||||||
|
#include <linux/fsfwconfig/FSFWConfig.h.in>
|
||||||
#include <linux/gpio/GpioCookie.h>
|
#include <linux/gpio/GpioCookie.h>
|
||||||
|
|
||||||
ReturnValue_t gpio::createRpiGpioConfig(GpioCookie* cookie, gpioId_t gpioId, int bcmPin,
|
ReturnValue_t gpio::createRpiGpioConfig(GpioCookie* cookie, gpioId_t gpioId, int bcmPin,
|
||||||
|
@ -30,7 +30,7 @@ ReturnValue_t ThermalController::initializeAfterTaskCreation() {
|
|||||||
sif::error << "ThermalController::initializeAfterTaskCreation: Base"
|
sif::error << "ThermalController::initializeAfterTaskCreation: Base"
|
||||||
<< " class initialization failed!" << std::endl;
|
<< " class initialization failed!" << std::endl;
|
||||||
}
|
}
|
||||||
HasLocalDataPoolIF* testHkbHandler = objectManager->get<HasLocalDataPoolIF>(
|
HasLocalDataPoolIF* testHkbHandler = ObjectManager::instance()->get<HasLocalDataPoolIF>(
|
||||||
TSensorDefinitions::ObjIds::TEST_HKB_HANDLER);
|
TSensorDefinitions::ObjIds::TEST_HKB_HANDLER);
|
||||||
if(testHkbHandler == nullptr) {
|
if(testHkbHandler == nullptr) {
|
||||||
sif::warning << "ThermalController::initializeAfterTaskCreation: Test"
|
sif::warning << "ThermalController::initializeAfterTaskCreation: Test"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
#include <fsfw/action/HasActionsIF.h>
|
||||||
#include <fsfw/datapool/PoolReadGuard.h>
|
#include <fsfw/datapool/PoolReadGuard.h>
|
||||||
#include <fsfw_hal/linux/utility.h>
|
#include <fsfw_hal/linux/utility.h>
|
||||||
|
|
||||||
@ -14,7 +15,7 @@
|
|||||||
GyroADIS16507Handler::GyroADIS16507Handler(object_id_t objectId,
|
GyroADIS16507Handler::GyroADIS16507Handler(object_id_t objectId,
|
||||||
object_id_t deviceCommunication, CookieIF * comCookie):
|
object_id_t deviceCommunication, CookieIF * comCookie):
|
||||||
DeviceHandlerBase(objectId, deviceCommunication, comCookie), primaryDataset(this),
|
DeviceHandlerBase(objectId, deviceCommunication, comCookie), primaryDataset(this),
|
||||||
configDataset(this) {
|
configDataset(this), breakCountdown() {
|
||||||
#if ADIS16507_DEBUG == 1
|
#if ADIS16507_DEBUG == 1
|
||||||
debugDivider = new PeriodicOperationDivider(5);
|
debugDivider = new PeriodicOperationDivider(5);
|
||||||
#endif
|
#endif
|
||||||
@ -28,18 +29,34 @@ GyroADIS16507Handler::GyroADIS16507Handler(object_id_t objectId,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GyroADIS16507Handler::doStartUp() {
|
void GyroADIS16507Handler::doStartUp() {
|
||||||
|
// Initial 310 ms start up time after power-up
|
||||||
if(internalState == InternalState::STARTUP) {
|
if(internalState == InternalState::STARTUP) {
|
||||||
|
if(not commandExecuted) {
|
||||||
|
breakCountdown.setTimeout(ADIS16507::START_UP_TIME);
|
||||||
|
commandExecuted = true;
|
||||||
|
}
|
||||||
|
if(breakCountdown.hasTimedOut()) {
|
||||||
|
internalState = InternalState::CONFIG;
|
||||||
|
commandExecuted = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read all configuration registers first
|
||||||
|
if(internalState == InternalState::CONFIG) {
|
||||||
if(commandExecuted) {
|
if(commandExecuted) {
|
||||||
commandExecuted = false;
|
commandExecuted = false;
|
||||||
internalState = InternalState::IDLE;
|
internalState = InternalState::IDLE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(internalState == InternalState::IDLE) {
|
if(internalState == InternalState::IDLE) {
|
||||||
setMode(MODE_NORMAL);
|
setMode(MODE_NORMAL);
|
||||||
|
// setMode(MODE_ON);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GyroADIS16507Handler::doShutDown() {
|
void GyroADIS16507Handler::doShutDown() {
|
||||||
|
commandExecuted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t GyroADIS16507Handler::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
ReturnValue_t GyroADIS16507Handler::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
||||||
@ -49,11 +66,14 @@ ReturnValue_t GyroADIS16507Handler::buildNormalDeviceCommand(DeviceCommandId_t *
|
|||||||
|
|
||||||
ReturnValue_t GyroADIS16507Handler::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
ReturnValue_t GyroADIS16507Handler::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
||||||
switch(internalState) {
|
switch(internalState) {
|
||||||
case(InternalState::STARTUP): {
|
case(InternalState::CONFIG): {
|
||||||
*id = ADIS16507::READ_OUT_CONFIG;
|
*id = ADIS16507::READ_OUT_CONFIG;
|
||||||
buildCommandFromCommand(*id, nullptr, 0);
|
buildCommandFromCommand(*id, nullptr, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case(InternalState::STARTUP): {
|
||||||
|
break;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
/* Might be a configuration error. */
|
/* Might be a configuration error. */
|
||||||
sif::debug << "GyroADIS16507Handler::buildTransitionDeviceCommand: "
|
sif::debug << "GyroADIS16507Handler::buildTransitionDeviceCommand: "
|
||||||
@ -80,6 +100,10 @@ ReturnValue_t GyroADIS16507Handler::buildCommandFromCommand(DeviceCommandId_t de
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case(ADIS16507::READ_SENSOR_DATA): {
|
case(ADIS16507::READ_SENSOR_DATA): {
|
||||||
|
if(breakCountdown.isBusy()) {
|
||||||
|
// A glob command is pending and sensor data can't be read currently
|
||||||
|
return NO_REPLY_EXPECTED;
|
||||||
|
}
|
||||||
std::memcpy(commandBuffer.data(), ADIS16507::BURST_READ_ENABLE.data(),
|
std::memcpy(commandBuffer.data(), ADIS16507::BURST_READ_ENABLE.data(),
|
||||||
ADIS16507::BURST_READ_ENABLE.size());
|
ADIS16507::BURST_READ_ENABLE.size());
|
||||||
std::memset(commandBuffer.data() + 2, 0, 10 * 2);
|
std::memset(commandBuffer.data() + 2, 0, 10 * 2);
|
||||||
@ -87,6 +111,62 @@ ReturnValue_t GyroADIS16507Handler::buildCommandFromCommand(DeviceCommandId_t de
|
|||||||
this->rawPacket = commandBuffer.data();
|
this->rawPacket = commandBuffer.data();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case(ADIS16507::SELF_TEST_SENSORS): {
|
||||||
|
if(breakCountdown.isBusy()) {
|
||||||
|
// Another glob command is pending
|
||||||
|
return HasActionsIF::IS_BUSY;
|
||||||
|
}
|
||||||
|
prepareWriteCommand(ADIS16507::GLOB_CMD, ADIS16507::GlobCmds::SENSOR_SELF_TEST, 0x00);
|
||||||
|
breakCountdown.setTimeout(ADIS16507::SELF_TEST_BREAK);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case(ADIS16507::SELF_TEST_MEMORY): {
|
||||||
|
if(breakCountdown.isBusy()) {
|
||||||
|
// Another glob command is pending
|
||||||
|
return HasActionsIF::IS_BUSY;
|
||||||
|
}
|
||||||
|
prepareWriteCommand(ADIS16507::GLOB_CMD, ADIS16507::GlobCmds::FLASH_MEMORY_TEST, 0x00);
|
||||||
|
breakCountdown.setTimeout(ADIS16507::FLASH_MEMORY_TEST_BREAK);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case(ADIS16507::UPDATE_NV_CONFIGURATION): {
|
||||||
|
if(breakCountdown.isBusy()) {
|
||||||
|
// Another glob command is pending
|
||||||
|
return HasActionsIF::IS_BUSY;
|
||||||
|
}
|
||||||
|
prepareWriteCommand(ADIS16507::GLOB_CMD, ADIS16507::GlobCmds::FLASH_MEMORY_UPDATE, 0x00);
|
||||||
|
breakCountdown.setTimeout(ADIS16507::FLASH_MEMORY_UPDATE_BREAK);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case(ADIS16507::RESET_SENSOR_CONFIGURATION): {
|
||||||
|
if(breakCountdown.isBusy()) {
|
||||||
|
// Another glob command is pending
|
||||||
|
return HasActionsIF::IS_BUSY;
|
||||||
|
}
|
||||||
|
prepareWriteCommand(ADIS16507::GLOB_CMD, ADIS16507::GlobCmds::FACTORY_CALIBRATION, 0x00);
|
||||||
|
breakCountdown.setTimeout(ADIS16507::FACTORY_CALIBRATION_BREAK);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case(ADIS16507::SW_RESET): {
|
||||||
|
if(breakCountdown.isBusy()) {
|
||||||
|
// Another glob command is pending
|
||||||
|
return HasActionsIF::IS_BUSY;
|
||||||
|
}
|
||||||
|
prepareWriteCommand(ADIS16507::GLOB_CMD, ADIS16507::GlobCmds::SOFTWARE_RESET, 0x00);
|
||||||
|
breakCountdown.setTimeout(ADIS16507::SW_RESET_BREAK);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case(ADIS16507::PRINT_CURRENT_CONFIGURATION): {
|
||||||
|
#if OBSW_VERBOSE_LEVEL >= 1
|
||||||
|
PoolReadGuard pg(&configDataset);
|
||||||
|
sif::info << "ADIS16507 Sensor configuration: DIAG_STAT: 0x" << std::hex << std::setw(4) <<
|
||||||
|
std::setfill('0') << "0x" << configDataset.diagStatReg.value << std::endl;
|
||||||
|
sif::info << "MSC_CTRL: " << std::hex << std::setw(4) << "0x" <<
|
||||||
|
configDataset.mscCtrlReg.value << " | FILT_CTRL: 0x" <<
|
||||||
|
configDataset.filterSetting.value << " | DEC_RATE: 0x" <<
|
||||||
|
configDataset.decRateReg.value << std::setfill(' ') << std::endl;
|
||||||
|
#endif /* OBSW_VERBOSE_LEVEL >= 1 */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return HasReturnvaluesIF::RETURN_OK;
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
}
|
}
|
||||||
@ -94,6 +174,12 @@ ReturnValue_t GyroADIS16507Handler::buildCommandFromCommand(DeviceCommandId_t de
|
|||||||
void GyroADIS16507Handler::fillCommandAndReplyMap() {
|
void GyroADIS16507Handler::fillCommandAndReplyMap() {
|
||||||
insertInCommandAndReplyMap(ADIS16507::READ_SENSOR_DATA, 1, &primaryDataset);
|
insertInCommandAndReplyMap(ADIS16507::READ_SENSOR_DATA, 1, &primaryDataset);
|
||||||
insertInCommandAndReplyMap(ADIS16507::READ_OUT_CONFIG, 1, &configDataset);
|
insertInCommandAndReplyMap(ADIS16507::READ_OUT_CONFIG, 1, &configDataset);
|
||||||
|
insertInCommandAndReplyMap(ADIS16507::SELF_TEST_SENSORS, 1);
|
||||||
|
insertInCommandAndReplyMap(ADIS16507::SELF_TEST_MEMORY, 1);
|
||||||
|
insertInCommandAndReplyMap(ADIS16507::UPDATE_NV_CONFIGURATION, 1);
|
||||||
|
insertInCommandAndReplyMap(ADIS16507::RESET_SENSOR_CONFIGURATION, 1);
|
||||||
|
insertInCommandAndReplyMap(ADIS16507::SW_RESET, 1);
|
||||||
|
insertInCommandAndReplyMap(ADIS16507::PRINT_CURRENT_CONFIGURATION, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t GyroADIS16507Handler::scanForReply(const uint8_t *start, size_t remainingSize,
|
ReturnValue_t GyroADIS16507Handler::scanForReply(const uint8_t *start, size_t remainingSize,
|
||||||
@ -123,7 +209,7 @@ ReturnValue_t GyroADIS16507Handler::interpretDeviceReply(DeviceCommandId_t id,
|
|||||||
configDataset.mscCtrlReg.value = packet[6] << 8 | packet[7];
|
configDataset.mscCtrlReg.value = packet[6] << 8 | packet[7];
|
||||||
configDataset.decRateReg.value = packet[8] << 8 | packet[9];
|
configDataset.decRateReg.value = packet[8] << 8 | packet[9];
|
||||||
configDataset.setValidity(true, true);
|
configDataset.setValidity(true, true);
|
||||||
if(internalState == InternalState::STARTUP) {
|
if(internalState == InternalState::CONFIG) {
|
||||||
commandExecuted = true;
|
commandExecuted = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -223,6 +309,19 @@ uint32_t GyroADIS16507Handler::getTransitionDelayMs(Mode_t modeFrom, Mode_t mode
|
|||||||
return 5000;
|
return 5000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GyroADIS16507Handler::prepareWriteCommand(uint8_t startReg, uint8_t valueOne,
|
||||||
|
uint8_t valueTwo) {
|
||||||
|
uint8_t secondReg = startReg + 1;
|
||||||
|
startReg |= ADIS16507::WRITE_MASK;
|
||||||
|
secondReg |= ADIS16507::WRITE_MASK;
|
||||||
|
commandBuffer[0] = startReg;
|
||||||
|
commandBuffer[1] = valueOne;
|
||||||
|
commandBuffer[2] = secondReg;
|
||||||
|
commandBuffer[3] = valueTwo;
|
||||||
|
this->rawPacketLen = 4;
|
||||||
|
this->rawPacket = commandBuffer.data();
|
||||||
|
}
|
||||||
|
|
||||||
void GyroADIS16507Handler::prepareReadCommand(uint8_t *regList, size_t len) {
|
void GyroADIS16507Handler::prepareReadCommand(uint8_t *regList, size_t len) {
|
||||||
for(size_t idx = 0; idx < len; idx++) {
|
for(size_t idx = 0; idx < len; idx++) {
|
||||||
commandBuffer[idx * 2] = regList[idx];
|
commandBuffer[idx * 2] = regList[idx];
|
||||||
|
@ -40,6 +40,7 @@ private:
|
|||||||
|
|
||||||
enum class InternalState {
|
enum class InternalState {
|
||||||
STARTUP,
|
STARTUP,
|
||||||
|
CONFIG,
|
||||||
IDLE
|
IDLE
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -65,6 +66,8 @@ private:
|
|||||||
#if ADIS16507_DEBUG == 1
|
#if ADIS16507_DEBUG == 1
|
||||||
PeriodicOperationDivider* debugDivider;
|
PeriodicOperationDivider* debugDivider;
|
||||||
#endif
|
#endif
|
||||||
|
Countdown breakCountdown;
|
||||||
|
void prepareWriteCommand(uint8_t startReg, uint8_t valueOne, uint8_t valueTwo);
|
||||||
|
|
||||||
ReturnValue_t handleSensorData(const uint8_t* packet);
|
ReturnValue_t handleSensorData(const uint8_t* packet);
|
||||||
};
|
};
|
||||||
|
@ -33,7 +33,7 @@ ReturnValue_t PCDUHandler::initialize() {
|
|||||||
|
|
||||||
ReturnValue_t result;
|
ReturnValue_t result;
|
||||||
|
|
||||||
IPCStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
IPCStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
if (IPCStore == nullptr) {
|
if (IPCStore == nullptr) {
|
||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
}
|
}
|
||||||
@ -44,7 +44,8 @@ ReturnValue_t PCDUHandler::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Subscribing for housekeeping table update messages of the PDU2 */
|
/* Subscribing for housekeeping table update messages of the PDU2 */
|
||||||
HasLocalDataPoolIF* pdu2Handler = objectManager->get<HasLocalDataPoolIF>(objects::PDU2_HANDLER);
|
HasLocalDataPoolIF* pdu2Handler = ObjectManager::instance()->get<HasLocalDataPoolIF>(
|
||||||
|
objects::PDU2_HANDLER);
|
||||||
if(pdu2Handler == nullptr) {
|
if(pdu2Handler == nullptr) {
|
||||||
sif::error << "PCDUHandler::initialize: Invalid pdu2Handler" << std::endl;
|
sif::error << "PCDUHandler::initialize: Invalid pdu2Handler" << std::endl;
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
@ -58,7 +59,8 @@ ReturnValue_t PCDUHandler::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Subscribing for housekeeping table update messages of the PDU1 */
|
/* Subscribing for housekeeping table update messages of the PDU1 */
|
||||||
HasLocalDataPoolIF* pdu1Handler = objectManager->get<HasLocalDataPoolIF>(objects::PDU1_HANDLER);
|
HasLocalDataPoolIF* pdu1Handler = ObjectManager::instance()->get<HasLocalDataPoolIF>(
|
||||||
|
objects::PDU1_HANDLER);
|
||||||
if(pdu1Handler == nullptr) {
|
if(pdu1Handler == nullptr) {
|
||||||
sif::error << "PCDUHandler::initialize: Invalid pdu1Handler" << std::endl;
|
sif::error << "PCDUHandler::initialize: Invalid pdu1Handler" << std::endl;
|
||||||
return RETURN_FAILED;
|
return RETURN_FAILED;
|
||||||
@ -207,11 +209,11 @@ void PCDUHandler::sendSwitchCommand(uint8_t switchNr, ReturnValue_t onOff) const
|
|||||||
switch (switchNr) {
|
switch (switchNr) {
|
||||||
case pcduSwitches::TCS_BOARD_8V_HEATER_IN:
|
case pcduSwitches::TCS_BOARD_8V_HEATER_IN:
|
||||||
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_TCS_BOARD_HEATER_IN;
|
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_TCS_BOARD_HEATER_IN;
|
||||||
pdu = objectManager->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
||||||
break;
|
break;
|
||||||
case pcduSwitches::DEPLOYMENT_MECHANISM:
|
case pcduSwitches::DEPLOYMENT_MECHANISM:
|
||||||
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_DEPLOYMENT_MECHANISM;
|
memoryAddress = PDU2::CONFIG_ADDRESS_OUT_EN_DEPLOYMENT_MECHANISM;
|
||||||
pdu = objectManager->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
pdu = ObjectManager::instance()->get<GomspaceDeviceHandler>(objects::PDU2_HANDLER);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sif::error << "PCDUHandler::sendSwitchCommand: Invalid switch number " << std::endl;
|
sif::error << "PCDUHandler::sendSwitchCommand: Invalid switch number " << std::endl;
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
namespace ADIS16507 {
|
namespace ADIS16507 {
|
||||||
|
|
||||||
static constexpr size_t MAXIMUM_REPLY_SIZE = 64;
|
static constexpr size_t MAXIMUM_REPLY_SIZE = 64;
|
||||||
|
static constexpr uint8_t WRITE_MASK = 0b1000'0000;
|
||||||
|
|
||||||
static constexpr uint32_t GYRO_RANGE = 125;
|
static constexpr uint32_t GYRO_RANGE = 125;
|
||||||
static constexpr uint32_t ACCELEROMETER_RANGE = 392;
|
static constexpr uint32_t ACCELEROMETER_RANGE = 392;
|
||||||
@ -18,6 +19,13 @@ static constexpr uint16_t PROD_ID = 16507;
|
|||||||
|
|
||||||
static constexpr std::array<uint8_t, 2> BURST_READ_ENABLE = {0x68, 0x00};
|
static constexpr std::array<uint8_t, 2> BURST_READ_ENABLE = {0x68, 0x00};
|
||||||
|
|
||||||
|
static constexpr dur_millis_t START_UP_TIME = 310;
|
||||||
|
static constexpr dur_millis_t SW_RESET_BREAK = 255;
|
||||||
|
static constexpr dur_millis_t FACTORY_CALIBRATION_BREAK = 136;
|
||||||
|
static constexpr dur_millis_t FLASH_MEMORY_UPDATE_BREAK = 70;
|
||||||
|
static constexpr dur_millis_t FLASH_MEMORY_TEST_BREAK = 30;
|
||||||
|
static constexpr dur_millis_t SELF_TEST_BREAK = 24;
|
||||||
|
|
||||||
static constexpr uint8_t DIAG_STAT_REG = 0x02;
|
static constexpr uint8_t DIAG_STAT_REG = 0x02;
|
||||||
static constexpr uint8_t FILTER_CTRL_REG = 0x5c;
|
static constexpr uint8_t FILTER_CTRL_REG = 0x5c;
|
||||||
static constexpr uint8_t MSC_CTRL_REG = 0x60;
|
static constexpr uint8_t MSC_CTRL_REG = 0x60;
|
||||||
@ -47,6 +55,14 @@ static constexpr size_t SENSOR_READOUT_SIZE = 20 + 2;
|
|||||||
static constexpr uint32_t ADIS_DATASET_ID = READ_SENSOR_DATA;
|
static constexpr uint32_t ADIS_DATASET_ID = READ_SENSOR_DATA;
|
||||||
static constexpr uint32_t ADIS_CFG_DATASET_ID = READ_OUT_CONFIG;
|
static constexpr uint32_t ADIS_CFG_DATASET_ID = READ_OUT_CONFIG;
|
||||||
|
|
||||||
|
enum GlobCmds: uint8_t {
|
||||||
|
FACTORY_CALIBRATION = 0b0000'0010,
|
||||||
|
SENSOR_SELF_TEST = 0b0000'0100,
|
||||||
|
FLASH_MEMORY_UPDATE = 0b0000'1000,
|
||||||
|
FLASH_MEMORY_TEST = 0b0001'0000,
|
||||||
|
SOFTWARE_RESET = 0b1000'0000
|
||||||
|
};
|
||||||
|
|
||||||
enum PrimaryPoolIds: lp_id_t {
|
enum PrimaryPoolIds: lp_id_t {
|
||||||
ANG_VELOC_X,
|
ANG_VELOC_X,
|
||||||
ANG_VELOC_Y,
|
ANG_VELOC_Y,
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <fsfw/ipc/QueueFactory.h>
|
#include <fsfw/ipc/QueueFactory.h>
|
||||||
#include <fsfw/tmtcpacket/pus/TmPacketStored.h>
|
#include <fsfw/tmtcpacket/pus/TmPacketStored.h>
|
||||||
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||||
#include <fsfw/tmtcpacket/pus/TmPacketPusC.h>
|
#include <fsfw/tmtcpacket/pus/TmPacketPusC.h>
|
||||||
#include <mission/utility/TmFunnel.h>
|
#include <mission/utility/TmFunnel.h>
|
||||||
@ -79,7 +80,7 @@ ReturnValue_t TmFunnel::handlePacket(TmTcMessage* message) {
|
|||||||
|
|
||||||
ReturnValue_t TmFunnel::initialize() {
|
ReturnValue_t TmFunnel::initialize() {
|
||||||
|
|
||||||
tmPool = objectManager->get<StorageManagerIF>(objects::TM_STORE);
|
tmPool = ObjectManager::instance()->get<StorageManagerIF>(objects::TM_STORE);
|
||||||
if(tmPool == nullptr) {
|
if(tmPool == nullptr) {
|
||||||
sif::error << "TmFunnel::initialize: TM store not set."
|
sif::error << "TmFunnel::initialize: TM store not set."
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
@ -89,7 +90,7 @@ ReturnValue_t TmFunnel::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
AcceptsTelemetryIF* tmTarget =
|
AcceptsTelemetryIF* tmTarget =
|
||||||
objectManager->get<AcceptsTelemetryIF>(downlinkDestination);
|
ObjectManager::instance()->get<AcceptsTelemetryIF>(downlinkDestination);
|
||||||
if(tmTarget == nullptr){
|
if(tmTarget == nullptr){
|
||||||
sif::error << "TmFunnel::initialize: Downlink Destination not set."
|
sif::error << "TmFunnel::initialize: Downlink Destination not set."
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
@ -105,7 +106,7 @@ ReturnValue_t TmFunnel::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
AcceptsTelemetryIF* storageTarget =
|
AcceptsTelemetryIF* storageTarget =
|
||||||
objectManager->get<AcceptsTelemetryIF>(storageDestination);
|
ObjectManager::instance()->get<AcceptsTelemetryIF>(storageDestination);
|
||||||
if(storageTarget != nullptr) {
|
if(storageTarget != nullptr) {
|
||||||
storageQueue->setDefaultDestination(
|
storageQueue->setDefaultDestination(
|
||||||
storageTarget->getReportReceptionQueue());
|
storageTarget->getReportReceptionQueue());
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include <test/testtasks/PusTcInjector.h>
|
#include <test/testtasks/PusTcInjector.h>
|
||||||
|
|
||||||
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/tmtcservices/AcceptsTelecommandsIF.h>
|
#include <fsfw/tmtcservices/AcceptsTelecommandsIF.h>
|
||||||
#include <fsfw/tmtcservices/TmTcMessage.h>
|
#include <fsfw/tmtcservices/TmTcMessage.h>
|
||||||
#include <fsfw/tmtcpacket/pus/TcPacketBase.h>
|
#include <fsfw/tmtcpacket/pus/TcPacketBase.h>
|
||||||
@ -47,7 +47,7 @@ ReturnValue_t PusTcInjector::initialize() {
|
|||||||
// Prepare message queue which is used to send telecommands.
|
// Prepare message queue which is used to send telecommands.
|
||||||
injectionQueue = QueueFactory::instance()->
|
injectionQueue = QueueFactory::instance()->
|
||||||
createMessageQueue(INJECTION_QUEUE_DEPTH);
|
createMessageQueue(INJECTION_QUEUE_DEPTH);
|
||||||
AcceptsTelecommandsIF* targetQueue = objectManager->
|
AcceptsTelecommandsIF* targetQueue = ObjectManager::instance()->
|
||||||
get<AcceptsTelecommandsIF>(destination);
|
get<AcceptsTelecommandsIF>(destination);
|
||||||
if(targetQueue == nullptr) {
|
if(targetQueue == nullptr) {
|
||||||
sif::error << "PusTcInjector: CCSDS distributor not initialized yet!" << std::endl;
|
sif::error << "PusTcInjector: CCSDS distributor not initialized yet!" << std::endl;
|
||||||
@ -58,7 +58,7 @@ ReturnValue_t PusTcInjector::initialize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prepare store used to store TC messages
|
// Prepare store used to store TC messages
|
||||||
tcStore = objectManager->get<StorageManagerIF>(tcStoreId);
|
tcStore = ObjectManager::instance()->get<StorageManagerIF>(tcStoreId);
|
||||||
if(tcStore == nullptr) {
|
if(tcStore == nullptr) {
|
||||||
sif::error << "PusTcInjector: TC Store not initialized!" << std::endl;
|
sif::error << "PusTcInjector: TC Store not initialized!" << std::endl;
|
||||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#include "TestTask.h"
|
#include "TestTask.h"
|
||||||
#include <OBSWConfig.h>
|
#include "OBSWConfig.h"
|
||||||
|
|
||||||
#include <fsfw/objectmanager/frameworkObjects.h>
|
#include <fsfw/objectmanager/frameworkObjects.h>
|
||||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||||
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/timemanager/Stopwatch.h>
|
#include <fsfw/timemanager/Stopwatch.h>
|
||||||
#include <fsfw/globalfunctions/arrayprinter.h>
|
#include <fsfw/globalfunctions/arrayprinter.h>
|
||||||
|
|
||||||
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
TestTask::TestTask(object_id_t objectId_):
|
TestTask::TestTask(object_id_t objectId_):
|
||||||
SystemObject(objectId_), testMode(testModes::A) {
|
SystemObject(objectId_), testMode(testModes::A) {
|
||||||
IPCStore = objectManager->get<StorageManagerIF>(objects::IPC_STORE);
|
IPCStore = ObjectManager::instance()->get<StorageManagerIF>(objects::IPC_STORE);
|
||||||
}
|
}
|
||||||
|
|
||||||
TestTask::~TestTask() {
|
TestTask::~TestTask() {
|
||||||
|
Loading…
Reference in New Issue
Block a user