v1.10.0 #220

Merged
meierj merged 592 commits from develop into main 2022-04-22 07:42:20 +02:00
19 changed files with 124 additions and 94 deletions
Showing only changes of commit af57f02840 - Show all commits

View File

@ -20,6 +20,9 @@ option(EIVE_ADD_JSON_LIB "Add JSON library" ON)
option(EIVE_SYSROOT_MAGIC "Perform sysroot magic which might not be necessary" OFF)
option(EIVE_CREATE_UNIQUE_OBSW_BIN "Append username to generated binary name" ON)
set(OBSW_ADD_STAR_TRACKER 0)
set(OBSW_DEBUG_STARTRACKER 0)
if(NOT FSFW_OSAL)
set(FSFW_OSAL linux CACHE STRING "OS for the FSFW.")
endif()
@ -117,6 +120,8 @@ if(TGT_BSP)
# Used by configure file
set(EGSE ON)
set(FSFW_HAL_LINUX_ADD_LIBGPIOD OFF)
set(OBSW_ADD_STAR_TRACKER 1)
set(OBSW_DEBUG_STARTRACKER 1)
endif()
if(TGT_BSP MATCHES "arm/beagleboneblack")

View File

@ -385,20 +385,7 @@ more recent disitributions anymore.
## <a id="arm-toolchain"></a> Installing toolchain without Vivado
You can download the toolchains for Windows and Linux
[from the EIVE cloud](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files?dir=/EIVE_IRS/Software/tools&fileid=831898).
If `wget` is available (e.g. MinGW64), you can use the following command to download the
toolchain for Windows
```sh
wget https://eive-cloud.irs.uni-stuttgart.de/index.php/s/rfoaistRd67yBbH/download/gcc-arm-linux-gnueabi-win.zip
```
or the following command for Linux (could be useful for CI/CD)
```sh
wget https://eive-cloud.irs.uni-stuttgart.de/index.php/s/MRaeA2XnMXpZ5Pp/download/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.xz
```
[from the EIVE cloud](https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_IRS/Software/tools).
## Installing CMake and MSYS2 on Windows

View File

@ -3,8 +3,8 @@
#include "InitMission.h"
#include "OBSWConfig.h"
#include "OBSWVersion.h"
#include "fsfw/version.h"
#include "fsfw/tasks/TaskFactory.h"
#include "fsfw/version.h"
#ifdef RASPBERRY_PI
static const char* const BOARD_NAME = "Raspberry Pi";
@ -22,8 +22,7 @@ int main(void) {
std::cout << "-- EIVE OBSW --" << std::endl;
std::cout << "-- Compiled for Linux board " << BOARD_NAME << " --" << std::endl;
std::cout << "-- OBSW " << SW_NAME << " v" << SW_VERSION << "." << SW_SUBVERSION << "."
<< SW_REVISION << ", FSFW v" << fsfw::FSFW_VERSION
<< "--" << std::endl;
<< SW_REVISION << ", FSFW v" << fsfw::FSFW_VERSION << "--" << std::endl;
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
initmission::initMission();

View File

@ -243,8 +243,10 @@ void initmission::createPstTasks(TaskFactory& factory,
"PST_TASK_DEFAULT", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.5, missedDeadlineFunc);
result = pst::pstSpi(spiPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
if (result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
sif::warning << "InitMission::initTasks: SPI PST is empty" << std::endl;
} else {
sif::error << "InitMission::initTasks: Creating SPI PST failed!" << std::endl;
}
} else {
taskVec.push_back(spiPst);
@ -255,32 +257,49 @@ void initmission::createPstTasks(TaskFactory& factory,
"UART_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
result = pst::pstUart(uartPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
sif::warning << "InitMission::initTasks: UART PST is empty" << std::endl;
} else {
sif::error << "InitMission::initTasks: Creating UART PST failed!" << std::endl;
}
} else {
taskVec.push_back(uartPst);
}
taskVec.push_back(uartPst);
FixedTimeslotTaskIF* gpioPst = factory.createFixedTimeslotTask(
"GPIO_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
result = pst::pstGpio(gpioPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
sif::warning << "InitMission::initTasks: GPIO PST is empty" << std::endl;
} else {
sif::error << "InitMission::initTasks: Creating GPIO PST failed!" << std::endl;
}
} else {
taskVec.push_back(gpioPst);
}
taskVec.push_back(gpioPst);
#if OBSW_ADD_I2C_TEST_CODE == 0
FixedTimeslotTaskIF* i2cPst = factory.createFixedTimeslotTask(
"I2C_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 0.2, missedDeadlineFunc);
result = pst::pstI2c(i2cPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
sif::warning << "InitMission::initTasks: I2C PST is empty" << std::endl;
} else {
sif::error << "InitMission::initTasks: Creating I2C PST failed!" << std::endl;
}
} else {
taskVec.push_back(i2cPst);
}
taskVec.push_back(i2cPst);
#endif
FixedTimeslotTaskIF* gomSpacePstTask = factory.createFixedTimeslotTask(
"GS_PST_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 1.0, missedDeadlineFunc);
result = pst::pstGompaceCan(gomSpacePstTask);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: GomSpace PST initialization failed!" << std::endl;
if (result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
sif::error << "InitMission::initTasks: GomSpace PST initialization failed!" << std::endl;
}
}
taskVec.push_back(gomSpacePstTask);
#else /* BOARD_TE7020 == 0 */

View File

@ -160,8 +160,8 @@ void ObjectFactory::produce(void* args) {
auto imtqHandler = new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie);
static_cast<void>(imtqHandler);
#if OBSW_DEBUG_IMTQ == 1
imtqHandler->setToGoToNormal(true);
imtqHandler->setStartUpImmediately();
imtqHandler->setToGoToNormal(true);
#else
(void)imtqHandler;
#endif
@ -917,6 +917,7 @@ void ObjectFactory::createRtdComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF
rtds[idx]->setParent(objects::TCS_BOARD_ASS);
rtdFdir = new RtdFdir(rtdIds[idx]);
rtds[idx]->setCustomFdir(rtdFdir);
rtds[idx]->setDeviceIdx(idx + 3);
}
#if OBSW_TEST_RTD == 1
@ -1086,9 +1087,15 @@ void ObjectFactory::createCcsdsComponents(LinuxLibgpioIF* gpioComIF) {
AxiPtmeConfig* axiPtmeConfig =
new AxiPtmeConfig(objects::AXI_PTME_CONFIG, q7s::UIO_PTME, q7s::uiomapids::PTME_CONFIG);
PtmeConfig* ptmeConfig = new PtmeConfig(objects::PTME_CONFIG, axiPtmeConfig);
#if OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT == 1
// Set to high value when not sending via syrlinks
static const uint32_t TRANSMITTER_TIMEOUT = 86400000; // 1 day
#else
static const uint32_t TRANSMITTER_TIMEOUT = 900000; // 15 minutes
#endif
CCSDSHandler* ccsdsHandler = new CCSDSHandler(
objects::CCSDS_HANDLER, objects::PTME, objects::CCSDS_PACKET_DISTRIBUTOR, ptmeConfig,
gpioComIF, gpioIds::RS485_EN_TX_CLOCK, gpioIds::RS485_EN_TX_DATA);
gpioComIF, gpioIds::RS485_EN_TX_CLOCK, gpioIds::RS485_EN_TX_DATA, TRANSMITTER_TIMEOUT);
VirtualChannel* vc = nullptr;
vc = new VirtualChannel(ccsds::VC0, common::VC0_QUEUE_SIZE, objects::CCSDS_HANDLER);

View File

@ -4,6 +4,7 @@
#include "OBSWConfig.h"
#include "bsp_q7s/memory/SdCardManager.h"
#include "devicedefinitions/PlocSupervisorDefinitions.h"
#include "eive/definitions.h"
#include "fsfw/action/ActionHelper.h"
#include "fsfw/action/CommandActionHelper.h"
#include "fsfw/action/CommandsActionsIF.h"

View File

@ -6,6 +6,7 @@
#include "OBSWConfig.h"
#include "SdCardManager.h"
#include "eive/definitions.h"
#include "fsfw/ipc/MessageQueueIF.h"
#include "fsfw/memory/HasFileSystemIF.h"
#include "fsfw/objectmanager/SystemObject.h"

View File

@ -0,0 +1,21 @@
#ifndef COMMON_CONFIG_DEFINITIONS_H_
#define COMMON_CONFIG_DEFINITIONS_H_
#include <cstdint>
namespace config {
static constexpr uint32_t PL_PCDU_TRANSITION_TIMEOUT_MS = 20 * 60 * 1000;
static constexpr uint32_t LONGEST_MODE_TIMEOUT_SECONDS = PL_PCDU_TRANSITION_TIMEOUT_MS / 1000;
/* Add mission configuration flags here */
static constexpr uint32_t OBSW_FILESYSTEM_HANDLER_QUEUE_SIZE = 50;
static constexpr uint32_t PLOC_UPDATER_QUEUE_SIZE = 50;
static constexpr uint32_t STR_IMG_HELPER_QUEUE_SIZE = 50;
static constexpr uint8_t LIVE_TM = 0;
}
#endif /* COMMON_CONFIG_DEFINITIONS_H_ */

View File

@ -11,11 +11,6 @@
#cmakedefine BEAGLEBONEBLACK
#cmakedefine EGSE
#ifdef RASPBERRY_PI
#include "rpiConfig.h"
#elif defined(XIPHOS_Q7S)
#include "q7sConfig.h"
#endif
#include "commonConfig.h"
#include "OBSWVersion.h"
@ -25,6 +20,7 @@ debugging. */
//! Board defines
#define BOARD_TE0720 0
#define Q7S_EM 0
/*******************************************************************/
/** All of the following flags should be enabled for mission code */
@ -34,8 +30,6 @@ debugging. */
//! All of this should be enabled for mission code!
#if defined XIPHOS_Q7S
#define Q7S_EM 0
#define OBSW_USE_CCSDS_IP_CORE 1
// Set to 1 if all telemetry should be sent to the PTME IP Core
#define OBSW_TM_TO_PTME 0
@ -45,7 +39,7 @@ debugging. */
#define OBSW_ENABLE_TIMERS 1
#define OBSW_ADD_MGT 1
#define OBSW_ADD_BPX_BATTERY_HANDLER 1
#define OBSW_ADD_STAR_TRACKER 0
#define OBSW_ADD_STAR_TRACKER @OBSW_ADD_STAR_TRACKER@
#define OBSW_ADD_PLOC_SUPERVISOR 0
#define OBSW_ADD_PLOC_MPSOC 0
#define OBSW_ADD_SUN_SENSORS 1
@ -59,7 +53,8 @@ debugging. */
#define OBSW_ADD_SYRLINKS 0
#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0
#define OBSW_STAR_TRACKER_GROUND_CONFIG 1
#define OBSW_ENABLE_PERIODIC_HK 0
#endif // XIPHOS_Q7S
// This is a really tricky switch.. It initializes the PCDU switches to their default states
// at powerup. I think it would be better
@ -67,12 +62,7 @@ debugging. */
// something the operators might want to do by giving the software too much intelligence
// at the wrong place. The system component might command all the Switches accordingly anyway
#define OBSW_INITIALIZE_SWITCHES 0
#endif
#ifdef EGSE
#define OBSW_ADD_STAR_TRACKER 1
#endif
#define OBSW_ENABLE_PERIODIC_HK 0
/*******************************************************************/
/** All of the following flags should be disabled for mission code */
@ -126,12 +116,7 @@ debugging. */
#define OBSW_DEBUG_PLOC_MPSOC 0
#define OBSW_DEBUG_PLOC_SUPERVISOR 0
#define OBSW_DEBUG_PDEC_HANDLER 0
#ifdef EGSE
#define OBSW_DEBUG_STARTRACKER 1
#else
#define OBSW_DEBUG_STARTRACKER 0
#endif
#define OBSW_DEBUG_STARTRACKER @OBSW_DEBUG_STARTRACKER@
#ifdef RASPBERRY_PI
@ -140,23 +125,28 @@ debugging. */
#define OBSW_ADD_PLOC_SUPERVISOR 0
#define OBSW_ADD_PLOC_MPSOC 0
#define OBSW_ADD_SUN_SENSORS 0
#define OBSW_ADD_MGT 0
#define OBSW_ADD_ACS_BOARD 0
#define OBSW_ADD_GPS_0 0
#define OBSW_ADD_GPS_1 0
#define OBSW_ADD_RW 0
#define OBSW_ADD_BPX_BATTERY_HANDLER 0
#define OBSW_ADD_RTD_DEVICES 0
#define OBSW_ADD_PL_PCDU 0
#define OBSW_ADD_TMP_DEVICES 0
#define OBSW_ADD_RAD_SENSORS 0
#define OBSW_ADD_SYRLINKS 0
#define OBSW_STAR_TRACKER_GROUND_CONFIG 1
#endif
#endif // RASPBERRY_PI
/*******************************************************************/
/** CMake Defines */
/*******************************************************************/
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
#include "OBSWVersion.h"
#ifdef RASPBERRY_PI
#include "rpiConfig.h"
#elif defined(XIPHOS_Q7S)
#include "q7sConfig.h"
#endif
#ifdef __cplusplus
@ -167,13 +157,6 @@ debugging. */
namespace config {
#endif
/* Add mission configuration flags here */
static constexpr uint32_t OBSW_FILESYSTEM_HANDLER_QUEUE_SIZE = 50;
static constexpr uint32_t PLOC_UPDATER_QUEUE_SIZE = 50;
static constexpr uint32_t STR_IMG_HELPER_QUEUE_SIZE = 50;
static constexpr uint8_t LIVE_TM = 0;
#ifdef __cplusplus
}
#endif

View File

@ -589,7 +589,7 @@
<cconfiguration id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.toolchain.gnu.mingw.base.1455833186.1840876443.2117915473.688890851.1707795689" moduleId="org.eclipse.cdt.core.settings" name="eive-q7s-debug">
<macros>
<stringMacro name="Q7S_SYSROOT_UNIX" type="VALUE_PATH_DIR" value="/home/rmueller/Xilinx/cortexa9hf-neon-xiphos-linux-gnueabi"/>
<stringMacro name="Q7S_SYSROOT_UNIX" type="VALUE_PATH_DIR" value="${HOME}/Xilinx/cortexa9hf-neon-xiphos-linux-gnueabi"/>
<stringMacro name="Q7S_SYSROOT" type="VALUE_TEXT" value="C:\Xilinx\cortexa9hf-neon-xiphos-linux-gnueabi"/>
</macros>
<externalSettings/>

View File

@ -1,6 +1,5 @@
#include "GenericFactory.h"
#include <OBSWConfig.h>
#include <fsfw/events/EventManager.h>
#include <fsfw/health/HealthTable.h>
#include <fsfw/internalerror/InternalErrorReporter.h>
@ -18,10 +17,12 @@
#include <fsfw/tcdistribution/PUSDistributor.h>
#include <fsfw/timemanager/TimeStamper.h>
#include <mission/utility/TmFunnel.h>
#include <tmtc/apid.h>
#include <tmtc/pusIds.h>
#include "OBSWConfig.h"
#include "eive/definitions.h"
#include "objects/systemObjectList.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
#if OBSW_ADD_TCPIP_BRIDGE == 1
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
@ -39,6 +40,10 @@
#include <test/testtasks/TestTask.h>
#endif
#ifndef OBSW_TM_TO_PTME
#define OBSW_TM_TO_PTME 0
#endif
void ObjectFactory::produceGenericObjects() {
// Framework objects
new EventManager(objects::EVENT_MANAGER);
@ -68,8 +73,12 @@ void ObjectFactory::produceGenericObjects() {
new PUSDistributor(apid::EIVE_OBSW, objects::PUS_PACKET_DISTRIBUTOR,
objects::CCSDS_PACKET_DISTRIBUTOR);
uint8_t vc = 0;
#if OBSW_TM_TO_PTME == 1
vc = config::LIVE_TM;
#endif
// Every TM packet goes through this funnel
new TmFunnel(objects::TM_FUNNEL, 50);
new TmFunnel(objects::TM_FUNNEL, 50, vc);
// PUS service stack
new Service1TelecommandVerification(objects::PUS_SERVICE_1_VERIFICATION, apid::EIVE_OBSW,
@ -87,7 +96,7 @@ void ObjectFactory::produceGenericObjects() {
new Service20ParameterManagement(objects::PUS_SERVICE_20_PARAMETERS, apid::EIVE_OBSW,
pus::PUS_SERVICE_20);
new CService200ModeCommanding(objects::PUS_SERVICE_200_MODE_MGMT, apid::EIVE_OBSW,
pus::PUS_SERVICE_200);
pus::PUS_SERVICE_200, 8, config::LONGEST_MODE_TIMEOUT_SECONDS);
#if OBSW_ADD_TCPIP_BRIDGE == 1
#if OBSW_USE_TMTC_TCP_BRIDGE == 0

View File

@ -403,9 +403,9 @@ ReturnValue_t Max31865PT1000Handler::interpretDeviceReply(DeviceCommandId_t id,
#if OBSW_VERBOSE_LEVEL >= 1
if (debugDivider->checkAndIncrement()) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::info << "Max31865: Object ID: " << std::hex << this->getObjectId()
<< ": Measured resistance is " << rtdValue << " Ohms." << std::endl;
sif::info << "Approximated temperature is " << approxTemp << " C" << std::endl;
sif::info << "Max31865: ObjID " << std::hex << this->getObjectId() << " | RTD " << std::dec
<< static_cast<int>(deviceIdx) << ": R[Ohm] " << rtdValue
<< " Ohms | Approx T[C]: " << approxTemp << std::endl;
#else
sif::printInfo("Max31685: Measured resistance is %f Ohms\n", rtdValue);
sif::printInfo("Approximated temperature is %f C\n", approxTemp);
@ -529,3 +529,5 @@ void Max31865PT1000Handler::modeChanged() {
internalState = InternalState::NONE;
}
}
void Max31865PT1000Handler::setDeviceIdx(uint8_t idx) { deviceIdx = idx; }

View File

@ -46,6 +46,8 @@ class Max31865PT1000Handler : public DeviceHandlerBase {
static constexpr uint8_t DEFAULT_CONFIG = 0b11000001;
void setInstantNormal(bool instantNormal);
void setDeviceIdx(uint8_t idx);
/**
* Expected temperature range is -100 C and 100 C.
* If there are temperatures beyond this range there must be a fault.
@ -105,6 +107,7 @@ class Max31865PT1000Handler : public DeviceHandlerBase {
bool resetFaultBit = false;
dur_millis_t startTime = 0;
uint8_t faultByte = 0;
uint8_t deviceIdx = 0;
std::array<uint8_t, 3> commandBuffer{0};
Max31865Definitions::Max31865Set sensorDataset;

View File

@ -14,8 +14,7 @@ struct TcsBoardHelper {
class TcsBoardAssembly : public AssemblyBase, public ConfirmsFailuresIF {
public:
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::TCS_BOARD_ASS;
static constexpr Event CHILDREN_LOST_MODE =
event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
static constexpr Event CHILDREN_LOST_MODE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
TcsBoardAssembly(object_id_t objectId, object_id_t parentId, PowerSwitchIF* pwrSwitcher,
power::Switch_t switcher, TcsBoardHelper helper);

View File

@ -12,7 +12,7 @@
CCSDSHandler::CCSDSHandler(object_id_t objectId, object_id_t ptmeId, object_id_t tcDestination,
PtmeConfig* ptmeConfig, GpioIF* gpioIF, gpioId_t enTxClock,
gpioId_t enTxData)
gpioId_t enTxData, uint32_t transmitterTimeout)
: SystemObject(objectId),
ptmeId(ptmeId),
tcDestination(tcDestination),
@ -21,7 +21,8 @@ CCSDSHandler::CCSDSHandler(object_id_t objectId, object_id_t ptmeId, object_id_t
ptmeConfig(ptmeConfig),
gpioIF(gpioIF),
enTxClock(enTxClock),
enTxData(enTxData) {
enTxData(enTxData),
TRANSMITTER_TIMEOUT(transmitterTimeout) {
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE);
auto mqArgs = MqArgs(objectId, static_cast<void*>(this));
eventQueue =

View File

@ -51,7 +51,8 @@ class CCSDSHandler : public SystemObject,
* @param enTxData GPIO ID of RS485 tx data enable
*/
CCSDSHandler(object_id_t objectId, object_id_t ptmeId, object_id_t tcDestination,
PtmeConfig* ptmeConfig, GpioIF* gpioIF, gpioId_t enTxClock, gpioId_t enTxData);
PtmeConfig* ptmeConfig, GpioIF* gpioIF, gpioId_t enTxClock, gpioId_t enTxData,
uint32_t transmitterTimeout = 900000);
~CCSDSHandler();
@ -104,14 +105,6 @@ class CCSDSHandler : public SystemObject,
//! [EXPORT] : [COMMENT] Received action message with unknown action id
static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xA0);
#if OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT == 1
// syrlinks must not be transmitting more than 15 minutes (according to datasheet)
static const uint32_t TRANSMITTER_TIMEOUT = 900000; // 900000 ms = 15 min
#else
// Set to high value when not sending via syrlinks
static const uint32_t TRANSMITTER_TIMEOUT = 86400000; // 1 day
#endif /* OBSW_SYRLINKS_DOWNLINK == 0 */
static const bool UP = true;
static const bool DOWN = false;
@ -140,6 +133,10 @@ class CCSDSHandler : public SystemObject,
gpioId_t enTxClock = gpio::NO_GPIO;
gpioId_t enTxData = gpio::NO_GPIO;
// syrlinks must not be transmitting more than 15 minutes (according to datasheet)
// Value can be configured via CTOR argument to allow test setups
const uint32_t TRANSMITTER_TIMEOUT = 900000; // 900000 ms = 15 min
// Countdown to disable transmitter after 15 minutes
Countdown transmitterCountdown;

View File

@ -9,8 +9,8 @@
object_id_t TmFunnel::downlinkDestination = objects::NO_OBJECT;
object_id_t TmFunnel::storageDestination = objects::NO_OBJECT;
TmFunnel::TmFunnel(object_id_t objectId, uint32_t messageDepth)
: SystemObject(objectId), messageDepth(messageDepth) {
TmFunnel::TmFunnel(object_id_t objectId, uint32_t messageDepth, uint8_t reportReceptionVc)
: SystemObject(objectId), messageDepth(messageDepth), reportReceptionVc(reportReceptionVc) {
auto mqArgs = MqArgs(objectId, static_cast<void*>(this));
tmQueue = QueueFactory::instance()->createMessageQueue(
messageDepth, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
@ -97,12 +97,7 @@ ReturnValue_t TmFunnel::initialize() {
return ObjectManagerIF::CHILD_INIT_FAILED;
}
#if OBSW_TM_TO_PTME == 1
// Live TM will be sent via the virtual channel 0
tmQueue->setDefaultDestination(tmTarget->getReportReceptionQueue(config::LIVE_TM));
#else
tmQueue->setDefaultDestination(tmTarget->getReportReceptionQueue());
#endif /* OBSW_TM_TO_PTME == 1 */
tmQueue->setDefaultDestination(tmTarget->getReportReceptionQueue(reportReceptionVc));
// Storage destination is optional.
if (storageDestination == objects::NO_OBJECT) {

View File

@ -23,7 +23,7 @@ class TmFunnel : public AcceptsTelemetryIF, public ExecutableObjectIF, public Sy
friend void(Factory::setStaticFrameworkObjectIds)();
public:
TmFunnel(object_id_t objectId, uint32_t messageDepth = 20);
TmFunnel(object_id_t objectId, uint32_t messageDepth = 20, uint8_t reportReceptionVc = 0);
virtual ~TmFunnel();
virtual MessageQueueId_t getReportReceptionQueue(uint8_t virtualChannel = 0) override;
@ -35,12 +35,13 @@ class TmFunnel : public AcceptsTelemetryIF, public ExecutableObjectIF, public Sy
static object_id_t storageDestination;
private:
uint32_t messageDepth = 0;
uint8_t reportReceptionVc = 0;
uint16_t sourceSequenceCount = 0;
MessageQueueIF* tmQueue = nullptr;
MessageQueueIF* storageQueue = nullptr;
StorageManagerIF* tmStore = nullptr;
uint32_t messageDepth = 0;
ReturnValue_t handlePacket(TmTcMessage* message);
};

0
scripts/egse-port.sh Normal file → Executable file
View File