Merge pull request 'Use BPX batt dummy' (#909) from em-update-bpx-dummy into main
Reviewed-on: #909 Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de>
This commit is contained in:
commit
b223a363ca
@ -70,13 +70,13 @@ if(EIVE_Q7S_EM)
|
|||||||
set(OBSW_Q7S_EM
|
set(OBSW_Q7S_EM
|
||||||
1
|
1
|
||||||
CACHE STRING "Q7S EM configuration")
|
CACHE STRING "Q7S EM configuration")
|
||||||
set(INIT_VAL 0)
|
set(OBSW_Q7S_FM 0)
|
||||||
set(OBSW_STAR_TRACKER_GROUND_CONFIG 1)
|
set(OBSW_STAR_TRACKER_GROUND_CONFIG 1)
|
||||||
else()
|
else()
|
||||||
set(OBSW_Q7S_EM
|
set(OBSW_Q7S_EM
|
||||||
0
|
0
|
||||||
CACHE STRING "Q7S EM configuration")
|
CACHE STRING "Q7S EM configuration")
|
||||||
set(INIT_VAL 1)
|
set(OBSW_Q7S_FM 1)
|
||||||
set(OBSW_STAR_TRACKER_GROUND_CONFIG 0)
|
set(OBSW_STAR_TRACKER_GROUND_CONFIG 0)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -87,19 +87,19 @@ set(OBSW_ADD_TMTC_UDP_SERVER
|
|||||||
0
|
0
|
||||||
CACHE STRING "Add UDP TMTC Server")
|
CACHE STRING "Add UDP TMTC Server")
|
||||||
set(OBSW_ADD_MGT
|
set(OBSW_ADD_MGT
|
||||||
${INIT_VAL}
|
${OBSW_Q7S_FM}
|
||||||
CACHE STRING "Add MGT module")
|
CACHE STRING "Add MGT module")
|
||||||
set(OBSW_ADD_BPX_BATTERY_HANDLER
|
set(OBSW_ADD_BPX_BATTERY_HANDLER
|
||||||
1
|
${OBSW_Q7S_FM}
|
||||||
CACHE STRING "Add BPX battery module")
|
CACHE STRING "Add BPX battery module")
|
||||||
set(OBSW_ADD_STAR_TRACKER
|
set(OBSW_ADD_STAR_TRACKER
|
||||||
1
|
1
|
||||||
CACHE STRING "Add Startracker module")
|
CACHE STRING "Add Startracker module")
|
||||||
set(OBSW_ADD_SUN_SENSORS
|
set(OBSW_ADD_SUN_SENSORS
|
||||||
${INIT_VAL}
|
${OBSW_Q7S_FM}
|
||||||
CACHE STRING "Add sun sensor module")
|
CACHE STRING "Add sun sensor module")
|
||||||
set(OBSW_ADD_SUS_BOARD_ASS
|
set(OBSW_ADD_SUS_BOARD_ASS
|
||||||
${INIT_VAL}
|
${OBSW_Q7S_FM}
|
||||||
CACHE STRING "Add sun sensor board assembly")
|
CACHE STRING "Add sun sensor board assembly")
|
||||||
set(OBSW_ADD_THERMAL_TEMP_INSERTER
|
set(OBSW_ADD_THERMAL_TEMP_INSERTER
|
||||||
${OBSW_Q7S_EM}
|
${OBSW_Q7S_EM}
|
||||||
@ -108,7 +108,7 @@ set(OBSW_ADD_ACS_BOARD
|
|||||||
1
|
1
|
||||||
CACHE STRING "Add ACS board module")
|
CACHE STRING "Add ACS board module")
|
||||||
set(OBSW_ADD_GPS_CTRL
|
set(OBSW_ADD_GPS_CTRL
|
||||||
${INIT_VAL}
|
${OBSW_Q7S_FM}
|
||||||
CACHE STRING "Add GPS controllers")
|
CACHE STRING "Add GPS controllers")
|
||||||
set(OBSW_ADD_CCSDS_IP_CORES
|
set(OBSW_ADD_CCSDS_IP_CORES
|
||||||
1
|
1
|
||||||
@ -129,19 +129,19 @@ set(OBSW_ADD_PLOC_SUPERVISOR
|
|||||||
1
|
1
|
||||||
CACHE STRING "Add PLOC supervisor handler")
|
CACHE STRING "Add PLOC supervisor handler")
|
||||||
set(OBSW_ADD_SA_DEPL
|
set(OBSW_ADD_SA_DEPL
|
||||||
${INIT_VAL}
|
${OBSW_Q7S_FM}
|
||||||
CACHE STRING "Add SA deployment handler")
|
CACHE STRING "Add SA deployment handler")
|
||||||
set(OBSW_ADD_PLOC_MPSOC
|
set(OBSW_ADD_PLOC_MPSOC
|
||||||
1
|
1
|
||||||
CACHE STRING "Add MPSoC handler")
|
CACHE STRING "Add MPSoC handler")
|
||||||
set(OBSW_ADD_ACS_CTRL
|
set(OBSW_ADD_ACS_CTRL
|
||||||
${INIT_VAL}
|
${OBSW_Q7S_FM}
|
||||||
CACHE STRING "Add ACS controller")
|
CACHE STRING "Add ACS controller")
|
||||||
set(OBSW_ADD_RTD_DEVICES
|
set(OBSW_ADD_RTD_DEVICES
|
||||||
${INIT_VAL}
|
${OBSW_Q7S_FM}
|
||||||
CACHE STRING "Add RTD devices")
|
CACHE STRING "Add RTD devices")
|
||||||
set(OBSW_ADD_RAD_SENSORS
|
set(OBSW_ADD_RAD_SENSORS
|
||||||
${INIT_VAL}
|
${OBSW_Q7S_FM}
|
||||||
CACHE STRING "Add Rad Sensor module")
|
CACHE STRING "Add Rad Sensor module")
|
||||||
set(OBSW_ADD_PL_PCDU
|
set(OBSW_ADD_PL_PCDU
|
||||||
1
|
1
|
||||||
@ -156,10 +156,10 @@ set(OBSW_ADD_GOMSPACE_PCDU
|
|||||||
1
|
1
|
||||||
CACHE STRING "Add GomSpace PCDU modules")
|
CACHE STRING "Add GomSpace PCDU modules")
|
||||||
set(OBSW_ADD_GOMSPACE_ACU
|
set(OBSW_ADD_GOMSPACE_ACU
|
||||||
${INIT_VAL}
|
${OBSW_Q7S_FM}
|
||||||
CACHE STRING "Add GomSpace ACU submodule")
|
CACHE STRING "Add GomSpace ACU submodule")
|
||||||
set(OBSW_ADD_RW
|
set(OBSW_ADD_RW
|
||||||
${INIT_VAL}
|
${OBSW_Q7S_FM}
|
||||||
CACHE STRING "Add RW modules")
|
CACHE STRING "Add RW modules")
|
||||||
set(OBSW_ADD_SCEX_DEVICE
|
set(OBSW_ADD_SCEX_DEVICE
|
||||||
1
|
1
|
||||||
|
@ -117,10 +117,11 @@ void ObjectFactory::produce(void* args) {
|
|||||||
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
|
#if OBSW_ADD_BPX_BATTERY_HANDLER == 1
|
||||||
createBpxBatteryComponent(enableHkSets, battAndImtqI2cDev);
|
createBpxBatteryComponent(enableHkSets, battAndImtqI2cDev);
|
||||||
#endif
|
#endif
|
||||||
createPowerController(true, enableHkSets);
|
|
||||||
|
|
||||||
dummy::createDummies(dummyCfg, *pwrSwitcher, gpioComIF, enableHkSets);
|
dummy::createDummies(dummyCfg, *pwrSwitcher, gpioComIF, enableHkSets);
|
||||||
|
|
||||||
|
createPowerController(true, enableHkSets);
|
||||||
|
|
||||||
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
|
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
|
||||||
|
|
||||||
auto* stackHandler = new Stack5VHandler(*pwrSwitcher);
|
auto* stackHandler = new Stack5VHandler(*pwrSwitcher);
|
||||||
@ -143,10 +144,6 @@ void ObjectFactory::produce(void* args) {
|
|||||||
createImtqComponents(pwrSwitcher, enableHkSets, battAndImtqI2cDev);
|
createImtqComponents(pwrSwitcher, enableHkSets, battAndImtqI2cDev);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if OBSW_ADD_SYRLINKS == 1
|
|
||||||
createSyrlinksComponents(pwrSwitcher);
|
|
||||||
#endif /* OBSW_ADD_SYRLINKS == 1 */
|
|
||||||
|
|
||||||
#if OBSW_ADD_RW == 1
|
#if OBSW_ADD_RW == 1
|
||||||
createReactionWheelComponents(gpioComIF, pwrSwitcher);
|
createReactionWheelComponents(gpioComIF, pwrSwitcher);
|
||||||
#endif
|
#endif
|
||||||
@ -155,6 +152,10 @@ void ObjectFactory::produce(void* args) {
|
|||||||
createStrComponents(pwrSwitcher, *SdCardManager::instance());
|
createStrComponents(pwrSwitcher, *SdCardManager::instance());
|
||||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||||
|
|
||||||
|
#if OBSW_ADD_SYRLINKS == 1
|
||||||
|
createSyrlinksComponents(pwrSwitcher);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if OBSW_ADD_PL_PCDU == 1
|
#if OBSW_ADD_PL_PCDU == 1
|
||||||
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher, *stackHandler);
|
createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher, *stackHandler);
|
||||||
#endif
|
#endif
|
||||||
|
@ -598,14 +598,13 @@ void ObjectFactory::createSolarArrayDeploymentComponents(PowerSwitchIF& pwrSwitc
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) {
|
void ObjectFactory::createSyrlinksComponents(PowerSwitchIF* pwrSwitcher) {
|
||||||
|
new SyrlinksComHandler(objects::SYRLINKS_COM_HANDLER);
|
||||||
|
auto* syrlinksAssy = new SyrlinksAssembly(objects::SYRLINKS_ASSY);
|
||||||
|
syrlinksAssy->connectModeTreeParent(satsystem::com::SUBSYSTEM);
|
||||||
auto* syrlinksUartCookie =
|
auto* syrlinksUartCookie =
|
||||||
new SerialCookie(objects::SYRLINKS_HANDLER, q7s::UART_SYRLINKS_DEV, serial::SYRLINKS_BAUD,
|
new SerialCookie(objects::SYRLINKS_HANDLER, q7s::UART_SYRLINKS_DEV, serial::SYRLINKS_BAUD,
|
||||||
syrlinks::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
|
syrlinks::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
|
||||||
syrlinksUartCookie->setParityEven();
|
syrlinksUartCookie->setParityEven();
|
||||||
|
|
||||||
new SyrlinksComHandler(objects::SYRLINKS_COM_HANDLER);
|
|
||||||
auto* syrlinksAssy = new SyrlinksAssembly(objects::SYRLINKS_ASSY);
|
|
||||||
syrlinksAssy->connectModeTreeParent(satsystem::com::SUBSYSTEM);
|
|
||||||
auto syrlinksFdir = new SyrlinksFdir(objects::SYRLINKS_HANDLER);
|
auto syrlinksFdir = new SyrlinksFdir(objects::SYRLINKS_HANDLER);
|
||||||
auto syrlinksHandler =
|
auto syrlinksHandler =
|
||||||
new SyrlinksHandler(objects::SYRLINKS_HANDLER, objects::SYRLINKS_COM_HANDLER,
|
new SyrlinksHandler(objects::SYRLINKS_HANDLER, objects::SYRLINKS_COM_HANDLER,
|
||||||
@ -840,7 +839,7 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
|||||||
Levels::LOW);
|
Levels::LOW);
|
||||||
gpioCookiePdec->addGpio(gpioIds::PDEC_RESET, gpio);
|
gpioCookiePdec->addGpio(gpioIds::PDEC_RESET, gpio);
|
||||||
gpioChecker(args.gpioComIF.addGpios(gpioCookiePdec), "PDEC");
|
gpioChecker(args.gpioComIF.addGpios(gpioCookiePdec), "PDEC");
|
||||||
struct UioNames uioNames {};
|
struct UioNames uioNames{};
|
||||||
uioNames.configMemory = q7s::UIO_PDEC_CONFIG_MEMORY;
|
uioNames.configMemory = q7s::UIO_PDEC_CONFIG_MEMORY;
|
||||||
uioNames.ramMemory = q7s::UIO_PDEC_RAM;
|
uioNames.ramMemory = q7s::UIO_PDEC_RAM;
|
||||||
uioNames.registers = q7s::UIO_PDEC_REGISTERS;
|
uioNames.registers = q7s::UIO_PDEC_REGISTERS;
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
int simple::simple() {
|
int simple::simple() {
|
||||||
std::cout << "-- Q7S Simple Application --" << std::endl;
|
std::cout << "-- Q7S Simple Application --" << std::endl;
|
||||||
#if Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST == 1
|
#if Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST == 1
|
||||||
{ FileSystemTest fileSystemTest; }
|
{
|
||||||
|
FileSystemTest fileSystemTest;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if TE0720_GPIO_TEST
|
#if TE0720_GPIO_TEST
|
||||||
|
54
dummies/BatteryDummy.cpp
Normal file
54
dummies/BatteryDummy.cpp
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
#include "BatteryDummy.h"
|
||||||
|
|
||||||
|
BatteryDummy::BatteryDummy(DhbConfig cfg)
|
||||||
|
: FreshDeviceHandlerBase(cfg), cfgSet(this), hkSet(this) {}
|
||||||
|
|
||||||
|
void BatteryDummy::performDeviceOperation(uint8_t opCode) {}
|
||||||
|
|
||||||
|
LocalPoolDataSetBase* BatteryDummy::getDataSetHandle(sid_t sid) {
|
||||||
|
if (sid == hkSet.getSid()) {
|
||||||
|
return &hkSet;
|
||||||
|
}
|
||||||
|
if (sid == cfgSet.getSid()) {
|
||||||
|
return &cfgSet;
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t BatteryDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
|
LocalDataPoolManager& poolManager) {
|
||||||
|
localDataPoolMap.emplace(bpxBat::BATT_TEMP_1, &battTemp1);
|
||||||
|
localDataPoolMap.emplace(bpxBat::BATT_TEMP_2, &battTemp2);
|
||||||
|
localDataPoolMap.emplace(bpxBat::BATT_TEMP_3, &battTemp3);
|
||||||
|
localDataPoolMap.emplace(bpxBat::BATT_TEMP_4, &battTemp4);
|
||||||
|
localDataPoolMap.emplace(bpxBat::CHARGE_CURRENT, &chargeCurrent);
|
||||||
|
localDataPoolMap.emplace(bpxBat::DISCHARGE_CURRENT, &dischargeCurrent);
|
||||||
|
localDataPoolMap.emplace(bpxBat::HEATER_CURRENT, &heaterCurrent);
|
||||||
|
localDataPoolMap.emplace(bpxBat::BATT_VOLTAGE, &battVolt);
|
||||||
|
localDataPoolMap.emplace(bpxBat::REBOOT_COUNTER, &rebootCounter);
|
||||||
|
localDataPoolMap.emplace(bpxBat::BOOTCAUSE, &bootCause);
|
||||||
|
|
||||||
|
localDataPoolMap.emplace(bpxBat::BATTERY_HEATER_MODE, &battheatMode);
|
||||||
|
localDataPoolMap.emplace(bpxBat::BATTHEAT_LOW_LIMIT, &battheatLow);
|
||||||
|
localDataPoolMap.emplace(bpxBat::BATTHEAT_HIGH_LIMIT, &battheatHigh);
|
||||||
|
|
||||||
|
poolManager.subscribeForRegularPeriodicPacket(
|
||||||
|
subdp::RegularHkPeriodicParams(hkSet.getSid(), true, 20.0));
|
||||||
|
poolManager.subscribeForRegularPeriodicPacket(
|
||||||
|
subdp::RegularHkPeriodicParams(cfgSet.getSid(), false, 30.0));
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t BatteryDummy::checkModeCommand(Mode_t mode, Submode_t submode,
|
||||||
|
uint32_t* msToReachTheMode) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t BatteryDummy::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||||
|
const uint8_t* data, size_t size) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t BatteryDummy::handleCommandMessage(CommandMessage* message) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
52
dummies/BatteryDummy.h
Normal file
52
dummies/BatteryDummy.h
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "fsfw/devicehandlers/FreshDeviceHandlerBase.h"
|
||||||
|
#include "mission/power/bpxBattDefs.h"
|
||||||
|
|
||||||
|
/// @brief
|
||||||
|
class BatteryDummy : public FreshDeviceHandlerBase {
|
||||||
|
public:
|
||||||
|
BatteryDummy(DhbConfig cfg);
|
||||||
|
|
||||||
|
private:
|
||||||
|
/**
|
||||||
|
* Periodic helper executed function, implemented by child class.
|
||||||
|
*/
|
||||||
|
void performDeviceOperation(uint8_t opCode) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implemented by child class. Handle all command messages which are
|
||||||
|
* not health, mode, action or housekeeping messages.
|
||||||
|
* @param message
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
|
||||||
|
|
||||||
|
// HK manager abstract functions.
|
||||||
|
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
||||||
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
|
LocalDataPoolManager& poolManager) override;
|
||||||
|
|
||||||
|
// Mode abstract functions
|
||||||
|
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
|
||||||
|
uint32_t* msToReachTheMode) override;
|
||||||
|
// Action override. Forward to user.
|
||||||
|
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||||
|
const uint8_t* data, size_t size) override;
|
||||||
|
|
||||||
|
BpxBatteryCfg cfgSet;
|
||||||
|
BpxBatteryHk hkSet;
|
||||||
|
PoolEntry<uint16_t> chargeCurrent = PoolEntry<uint16_t>({0});
|
||||||
|
PoolEntry<uint16_t> dischargeCurrent = PoolEntry<uint16_t>({0});
|
||||||
|
PoolEntry<uint16_t> heaterCurrent = PoolEntry<uint16_t>({0});
|
||||||
|
PoolEntry<uint16_t> battVolt = PoolEntry<uint16_t>({16'000});
|
||||||
|
PoolEntry<int16_t> battTemp1 = PoolEntry<int16_t>({10}, true);
|
||||||
|
PoolEntry<int16_t> battTemp2 = PoolEntry<int16_t>({10}, true);
|
||||||
|
PoolEntry<int16_t> battTemp3 = PoolEntry<int16_t>({10}, true);
|
||||||
|
PoolEntry<int16_t> battTemp4 = PoolEntry<int16_t>({10}, true);
|
||||||
|
PoolEntry<uint32_t> rebootCounter = PoolEntry<uint32_t>({0});
|
||||||
|
PoolEntry<uint8_t> bootCause = PoolEntry<uint8_t>({0});
|
||||||
|
PoolEntry<uint8_t> battheatMode = PoolEntry<uint8_t>({0});
|
||||||
|
PoolEntry<int8_t> battheatLow = PoolEntry<int8_t>({0});
|
||||||
|
PoolEntry<int8_t> battheatHigh = PoolEntry<int8_t>({0});
|
||||||
|
};
|
@ -29,4 +29,5 @@ target_sources(
|
|||||||
PlocSupervisorDummy.cpp
|
PlocSupervisorDummy.cpp
|
||||||
helperFactory.cpp
|
helperFactory.cpp
|
||||||
MgmRm3100Dummy.cpp
|
MgmRm3100Dummy.cpp
|
||||||
|
BatteryDummy.cpp
|
||||||
Tmp1075Dummy.cpp)
|
Tmp1075Dummy.cpp)
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
|
|
||||||
#include <mission/com/syrlinksDefs.h>
|
#include <mission/com/syrlinksDefs.h>
|
||||||
|
|
||||||
SyrlinksDummy::SyrlinksDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
SyrlinksDummy::SyrlinksDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie,
|
||||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
DeviceHandlerFailureIsolation *fdir)
|
||||||
|
: DeviceHandlerBase(objectId, comif, comCookie, fdir) {}
|
||||||
|
|
||||||
SyrlinksDummy::~SyrlinksDummy() {}
|
SyrlinksDummy::~SyrlinksDummy() {}
|
||||||
|
|
||||||
void SyrlinksDummy::doStartUp() {}
|
void SyrlinksDummy::doStartUp() { setMode(MODE_ON); }
|
||||||
|
|
||||||
void SyrlinksDummy::doShutDown() {}
|
void SyrlinksDummy::doShutDown() { setMode(MODE_OFF); }
|
||||||
|
|
||||||
ReturnValue_t SyrlinksDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
ReturnValue_t SyrlinksDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
||||||
return NOTHING_TO_SEND;
|
return NOTHING_TO_SEND;
|
||||||
@ -36,7 +37,7 @@ ReturnValue_t SyrlinksDummy::interpretDeviceReply(DeviceCommandId_t id, const ui
|
|||||||
|
|
||||||
void SyrlinksDummy::fillCommandAndReplyMap() {}
|
void SyrlinksDummy::fillCommandAndReplyMap() {}
|
||||||
|
|
||||||
uint32_t SyrlinksDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
|
uint32_t SyrlinksDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 1000; }
|
||||||
|
|
||||||
ReturnValue_t SyrlinksDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t SyrlinksDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
|
@ -11,7 +11,8 @@ class SyrlinksDummy : public DeviceHandlerBase {
|
|||||||
static const uint8_t SIMPLE_COMMAND_DATA = 1;
|
static const uint8_t SIMPLE_COMMAND_DATA = 1;
|
||||||
static const uint8_t PERIODIC_REPLY_DATA = 2;
|
static const uint8_t PERIODIC_REPLY_DATA = 2;
|
||||||
|
|
||||||
SyrlinksDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
|
SyrlinksDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie,
|
||||||
|
DeviceHandlerFailureIsolation *fdir);
|
||||||
virtual ~SyrlinksDummy();
|
virtual ~SyrlinksDummy();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "helperFactory.h"
|
#include "helperFactory.h"
|
||||||
|
|
||||||
#include <dummies/AcuDummy.h>
|
#include <dummies/AcuDummy.h>
|
||||||
|
#include <dummies/BatteryDummy.h>
|
||||||
#include <dummies/BpxDummy.h>
|
#include <dummies/BpxDummy.h>
|
||||||
#include <dummies/ComCookieDummy.h>
|
#include <dummies/ComCookieDummy.h>
|
||||||
#include <dummies/ComIFDummy.h>
|
#include <dummies/ComIFDummy.h>
|
||||||
@ -30,6 +31,8 @@
|
|||||||
#include <mission/power/gsDefs.h>
|
#include <mission/power/gsDefs.h>
|
||||||
#include <mission/system/acs/ImtqAssembly.h>
|
#include <mission/system/acs/ImtqAssembly.h>
|
||||||
#include <mission/system/acs/StrAssembly.h>
|
#include <mission/system/acs/StrAssembly.h>
|
||||||
|
#include <mission/system/com/SyrlinksAssembly.h>
|
||||||
|
#include <mission/system/com/SyrlinksFdir.h>
|
||||||
#include <mission/system/objects/CamSwitcher.h>
|
#include <mission/system/objects/CamSwitcher.h>
|
||||||
#include <mission/system/tcs/TcsBoardAssembly.h>
|
#include <mission/system/tcs/TcsBoardAssembly.h>
|
||||||
|
|
||||||
@ -49,7 +52,7 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
|
|||||||
new ComIFDummy(objects::DUMMY_COM_IF);
|
new ComIFDummy(objects::DUMMY_COM_IF);
|
||||||
auto* comCookieDummy = new ComCookieDummy();
|
auto* comCookieDummy = new ComCookieDummy();
|
||||||
if (cfg.addBpxBattDummy) {
|
if (cfg.addBpxBattDummy) {
|
||||||
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
new BatteryDummy(DhbConfig(objects::BPX_BATT_HANDLER));
|
||||||
}
|
}
|
||||||
if (cfg.addCoreCtrlCfg) {
|
if (cfg.addCoreCtrlCfg) {
|
||||||
new CoreControllerDummy(objects::CORE_CONTROLLER);
|
new CoreControllerDummy(objects::CORE_CONTROLLER);
|
||||||
@ -74,9 +77,13 @@ void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitcher, GpioIF* gpio
|
|||||||
strDummy->connectModeTreeParent(*strAssy);
|
strDummy->connectModeTreeParent(*strAssy);
|
||||||
}
|
}
|
||||||
if (cfg.addSyrlinksDummies) {
|
if (cfg.addSyrlinksDummies) {
|
||||||
auto* syrlinksDummy =
|
auto* syrlinksAssy = new SyrlinksAssembly(objects::SYRLINKS_ASSY);
|
||||||
new SyrlinksDummy(objects::SYRLINKS_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
syrlinksAssy->connectModeTreeParent(satsystem::com::SUBSYSTEM);
|
||||||
syrlinksDummy->connectModeTreeParent(satsystem::com::SUBSYSTEM);
|
|
||||||
|
auto syrlinksFdir = new SyrlinksFdir(objects::SYRLINKS_HANDLER);
|
||||||
|
auto* syrlinksDummy = new SyrlinksDummy(objects::SYRLINKS_HANDLER, objects::DUMMY_COM_IF,
|
||||||
|
comCookieDummy, syrlinksFdir);
|
||||||
|
syrlinksDummy->connectModeTreeParent(*syrlinksAssy);
|
||||||
}
|
}
|
||||||
auto* imtqAssy = new ImtqAssembly(objects::IMTQ_ASSY);
|
auto* imtqAssy = new ImtqAssembly(objects::IMTQ_ASSY);
|
||||||
imtqAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
imtqAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
||||||
|
@ -28,7 +28,7 @@ class SyrlinksComHandler : public DeviceCommunicationIF,
|
|||||||
MutexIF *lock;
|
MutexIF *lock;
|
||||||
SemaphoreIF *semaphore;
|
SemaphoreIF *semaphore;
|
||||||
int serialPort = 0;
|
int serialPort = 0;
|
||||||
struct termios tty {};
|
struct termios tty{};
|
||||||
Countdown replyTimeout = Countdown(2000);
|
Countdown replyTimeout = Countdown(2000);
|
||||||
std::array<uint8_t, 2048> recBuf{};
|
std::array<uint8_t, 2048> recBuf{};
|
||||||
SimpleRingBuffer ringBuf;
|
SimpleRingBuffer ringBuf;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
class PtmeIF {
|
class PtmeIF {
|
||||||
public:
|
public:
|
||||||
virtual ~PtmeIF(){};
|
virtual ~PtmeIF() {};
|
||||||
|
|
||||||
virtual bool containsVc(uint8_t vcId) const = 0;
|
virtual bool containsVc(uint8_t vcId) const = 0;
|
||||||
virtual VirtualChannelIF* getVirtChannel(uint8_t vcId) = 0;
|
virtual VirtualChannelIF* getVirtChannel(uint8_t vcId) = 0;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
class VirtualChannelIF : public DirectTmSinkIF {
|
class VirtualChannelIF : public DirectTmSinkIF {
|
||||||
public:
|
public:
|
||||||
virtual ~VirtualChannelIF(){};
|
virtual ~VirtualChannelIF() {};
|
||||||
|
|
||||||
virtual ReturnValue_t initialize() = 0;
|
virtual ReturnValue_t initialize() = 0;
|
||||||
virtual void cancelTransfer() = 0;
|
virtual void cancelTransfer() = 0;
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
ScexDleParser::ScexDleParser(SimpleRingBuffer &decodeRingBuf, DleEncoder &decoder,
|
ScexDleParser::ScexDleParser(SimpleRingBuffer &decodeRingBuf, DleEncoder &decoder,
|
||||||
BufPair encodedBuf, BufPair decodedBuf)
|
BufPair encodedBuf, BufPair decodedBuf)
|
||||||
: DleParser(decodeRingBuf, decoder, encodedBuf, decodedBuf){};
|
: DleParser(decodeRingBuf, decoder, encodedBuf, decodedBuf) {};
|
||||||
|
|
||||||
ScexDleParser::~ScexDleParser(){};
|
ScexDleParser::~ScexDleParser() {};
|
||||||
|
@ -858,7 +858,7 @@ class FlashBasePusCmd {
|
|||||||
|
|
||||||
class FlashReadPusCmd : public FlashBasePusCmd {
|
class FlashReadPusCmd : public FlashBasePusCmd {
|
||||||
public:
|
public:
|
||||||
FlashReadPusCmd(){};
|
FlashReadPusCmd() {};
|
||||||
|
|
||||||
ReturnValue_t extractFields(const uint8_t* commandData, size_t commandDataLen) override {
|
ReturnValue_t extractFields(const uint8_t* commandData, size_t commandDataLen) override {
|
||||||
ReturnValue_t result = FlashBasePusCmd::extractFields(commandData, commandDataLen);
|
ReturnValue_t result = FlashBasePusCmd::extractFields(commandData, commandDataLen);
|
||||||
|
@ -53,7 +53,7 @@ class CspComIF : public DeviceCommunicationIF, public SystemObject {
|
|||||||
|
|
||||||
typedef uint8_t node_t;
|
typedef uint8_t node_t;
|
||||||
struct ReplyInfo {
|
struct ReplyInfo {
|
||||||
ReplyInfo(size_t maxLen) : replyBuf(maxLen){};
|
ReplyInfo(size_t maxLen) : replyBuf(maxLen) {};
|
||||||
std::vector<uint8_t> replyBuf;
|
std::vector<uint8_t> replyBuf;
|
||||||
size_t replyLen = 0;
|
size_t replyLen = 0;
|
||||||
};
|
};
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "fsfw/devicehandlers/DeviceCommunicationIF.h"
|
#include "fsfw/devicehandlers/DeviceCommunicationIF.h"
|
||||||
|
|
||||||
struct Max31865ReaderCookie : public CookieIF {
|
struct Max31865ReaderCookie : public CookieIF {
|
||||||
Max31865ReaderCookie(){};
|
Max31865ReaderCookie() {};
|
||||||
Max31865ReaderCookie(object_id_t handlerId_, uint8_t idx_, const std::string& locString_,
|
Max31865ReaderCookie(object_id_t handlerId_, uint8_t idx_, const std::string& locString_,
|
||||||
SpiCookie* spiCookie_)
|
SpiCookie* spiCookie_)
|
||||||
: idx(idx_), handlerId(handlerId_), locString(locString_), spiCookie(spiCookie_) {}
|
: idx(idx_), handlerId(handlerId_), locString(locString_), spiCookie(spiCookie_) {}
|
||||||
|
@ -2099,7 +2099,7 @@ void StarTrackerHandler::preparePowerRequest() {
|
|||||||
|
|
||||||
void StarTrackerHandler::prepareSwitchToBootloaderCmd() {
|
void StarTrackerHandler::prepareSwitchToBootloaderCmd() {
|
||||||
uint32_t length = 0;
|
uint32_t length = 0;
|
||||||
struct RebootActionRequest rebootReq {};
|
struct RebootActionRequest rebootReq{};
|
||||||
prv_arc_pack_reboot_action_req(&rebootReq, commandBuffer, &length);
|
prv_arc_pack_reboot_action_req(&rebootReq, commandBuffer, &length);
|
||||||
rawPacket = commandBuffer;
|
rawPacket = commandBuffer;
|
||||||
rawPacketLen = length;
|
rawPacketLen = length;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
class SdCardMountedIF {
|
class SdCardMountedIF {
|
||||||
public:
|
public:
|
||||||
virtual ~SdCardMountedIF(){};
|
virtual ~SdCardMountedIF() {};
|
||||||
virtual const char* getCurrentMountPrefix() const = 0;
|
virtual const char* getCurrentMountPrefix() const = 0;
|
||||||
virtual bool isSdCardUsable(std::optional<sd::SdCard> sdCard) = 0;
|
virtual bool isSdCardUsable(std::optional<sd::SdCard> sdCard) = 0;
|
||||||
virtual std::optional<sd::SdCard> getPreferredSdCard() const = 0;
|
virtual std::optional<sd::SdCard> getPreferredSdCard() const = 0;
|
||||||
|
@ -32,8 +32,8 @@ class BpxBatteryHandler : public DeviceHandlerBase {
|
|||||||
|
|
||||||
BpxBatteryHk hkSet;
|
BpxBatteryHk hkSet;
|
||||||
DeviceCommandId_t lastCmd = DeviceHandlerIF::NO_COMMAND_ID;
|
DeviceCommandId_t lastCmd = DeviceHandlerIF::NO_COMMAND_ID;
|
||||||
BpxBatteryCfg cfgSet;
|
|
||||||
std::array<uint8_t, 8> cmdBuf = {};
|
std::array<uint8_t, 8> cmdBuf = {};
|
||||||
|
BpxBatteryCfg cfgSet;
|
||||||
PoolEntry<uint16_t> chargeCurrent = PoolEntry<uint16_t>({0});
|
PoolEntry<uint16_t> chargeCurrent = PoolEntry<uint16_t>({0});
|
||||||
PoolEntry<uint16_t> dischargeCurrent = PoolEntry<uint16_t>({0});
|
PoolEntry<uint16_t> dischargeCurrent = PoolEntry<uint16_t>({0});
|
||||||
PoolEntry<uint16_t> heaterCurrent = PoolEntry<uint16_t>({0});
|
PoolEntry<uint16_t> heaterCurrent = PoolEntry<uint16_t>({0});
|
||||||
|
@ -199,6 +199,7 @@ class BpxBatteryHk : public StaticLocalDataSet<bpxBat::HK_ENTRIES> {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
friend class BpxBatteryHandler;
|
friend class BpxBatteryHandler;
|
||||||
|
friend class BatteryDummy;
|
||||||
/**
|
/**
|
||||||
* Constructor for data creator
|
* Constructor for data creator
|
||||||
* @param hkOwner
|
* @param hkOwner
|
||||||
@ -238,6 +239,7 @@ class BpxBatteryCfg : public StaticLocalDataSet<bpxBat::CFG_ENTRIES> {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
friend class BpxBatteryHandler;
|
friend class BpxBatteryHandler;
|
||||||
|
friend class BatteryDummy;
|
||||||
/**
|
/**
|
||||||
* Constructor for data creator
|
* Constructor for data creator
|
||||||
* @param hkOwner
|
* @param hkOwner
|
||||||
|
@ -59,7 +59,7 @@ ReturnValue_t PersistentTmStore::buildDumpSet(uint32_t fromUnixSeconds, uint32_t
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const path& file = fileOrDir.path();
|
const path& file = fileOrDir.path();
|
||||||
struct tm fileTime {};
|
struct tm fileTime{};
|
||||||
if (pathToTime(file, fileTime) != returnvalue::OK) {
|
if (pathToTime(file, fileTime) != returnvalue::OK) {
|
||||||
sif::error << "Time extraction for file " << file << "failed" << std::endl;
|
sif::error << "Time extraction for file " << file << "failed" << std::endl;
|
||||||
continue;
|
continue;
|
||||||
@ -294,7 +294,7 @@ void PersistentTmStore::deleteFromUpTo(uint32_t startUnixTime, uint32_t endUnixT
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Convert file time to the UNIX epoch
|
// Convert file time to the UNIX epoch
|
||||||
struct tm fileTime {};
|
struct tm fileTime{};
|
||||||
if (pathToTime(file.path(), fileTime) != returnvalue::OK) {
|
if (pathToTime(file.path(), fileTime) != returnvalue::OK) {
|
||||||
sif::error << "Time extraction for " << file << " failed" << std::endl;
|
sif::error << "Time extraction for " << file << " failed" << std::endl;
|
||||||
continue;
|
continue;
|
||||||
|
@ -29,7 +29,7 @@ else
|
|||||||
echo "No ${cmake_fmt} tool found, not formatting CMake files"
|
echo "No ${cmake_fmt} tool found, not formatting CMake files"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cpp_format="clang-format"
|
cpp_format="clang-format-19"
|
||||||
file_selectors="( -iname *.h -o -iname *.cpp -o -iname *.c -o -iname *.tpp )"
|
file_selectors="( -iname *.h -o -iname *.cpp -o -iname *.c -o -iname *.tpp )"
|
||||||
file_excludes="( -not -iname translateObjects.cpp -not -iname translateEvents.cpp )"
|
file_excludes="( -not -iname translateObjects.cpp -not -iname translateEvents.cpp )"
|
||||||
if command -v ${cpp_format} &> /dev/null; then
|
if command -v ${cpp_format} &> /dev/null; then
|
||||||
|
@ -84,6 +84,8 @@ def build_cmd(args):
|
|||||||
cmd = "scp "
|
cmd = "scp "
|
||||||
if args.recursive:
|
if args.recursive:
|
||||||
cmd += "-r "
|
cmd += "-r "
|
||||||
|
# Necessary to avoid some errors related to SFTP server of OBSW.
|
||||||
|
cmd += "-O "
|
||||||
address = ""
|
address = ""
|
||||||
port_args = ""
|
port_args = ""
|
||||||
target = args.target
|
target = args.target
|
||||||
@ -99,7 +101,7 @@ def build_cmd(args):
|
|||||||
target = args.target
|
target = args.target
|
||||||
else:
|
else:
|
||||||
if target == "":
|
if target == "":
|
||||||
target = f"/tmp"
|
target = "/tmp"
|
||||||
else:
|
else:
|
||||||
target = args.target
|
target = args.target
|
||||||
# accepted_key_rsa_args = "-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
|
# accepted_key_rsa_args = "-o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa"
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 9a06c64dfac3f4283c2d5af72a9c095f4726480b
|
Subproject commit 82b388e23e8745c8671b8dfb1a55e443f59bf274
|
Loading…
x
Reference in New Issue
Block a user