v1.10.0 #220

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

View File

@ -20,6 +20,7 @@ debugging. */
//! Board defines //! Board defines
#define BOARD_TE0720 0 #define BOARD_TE0720 0
#define Q7S_EM 0
/*******************************************************************/ /*******************************************************************/
/** All of the following flags should be enabled for mission code */ /** All of the following flags should be enabled for mission code */
@ -29,8 +30,6 @@ debugging. */
//! All of this should be enabled for mission code! //! All of this should be enabled for mission code!
#if defined XIPHOS_Q7S #if defined XIPHOS_Q7S
#define Q7S_EM 0
#define OBSW_USE_CCSDS_IP_CORE 1 #define OBSW_USE_CCSDS_IP_CORE 1
// Set to 1 if all telemetry should be sent to the PTME IP Core // Set to 1 if all telemetry should be sent to the PTME IP Core
#define OBSW_TM_TO_PTME 0 #define OBSW_TM_TO_PTME 0
@ -54,7 +53,8 @@ debugging. */
#define OBSW_ADD_SYRLINKS 0 #define OBSW_ADD_SYRLINKS 0
#define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0 #define OBSW_ENABLE_SYRLINKS_TRANSMIT_TIMEOUT 0
#define OBSW_STAR_TRACKER_GROUND_CONFIG 1 #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 // This is a really tricky switch.. It initializes the PCDU switches to their default states
// at powerup. I think it would be better // at powerup. I think it would be better
@ -62,8 +62,7 @@ debugging. */
// something the operators might want to do by giving the software too much intelligence // 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 // at the wrong place. The system component might command all the Switches accordingly anyway
#define OBSW_INITIALIZE_SWITCHES 0 #define OBSW_INITIALIZE_SWITCHES 0
#define OBSW_ENABLE_PERIODIC_HK 0
#endif // XIPHOS_Q7S
/*******************************************************************/ /*******************************************************************/
/** All of the following flags should be disabled for mission code */ /** All of the following flags should be disabled for mission code */
@ -126,14 +125,18 @@ debugging. */
#define OBSW_ADD_PLOC_SUPERVISOR 0 #define OBSW_ADD_PLOC_SUPERVISOR 0
#define OBSW_ADD_PLOC_MPSOC 0 #define OBSW_ADD_PLOC_MPSOC 0
#define OBSW_ADD_SUN_SENSORS 0 #define OBSW_ADD_SUN_SENSORS 0
#define OBSW_ADD_MGT 0
#define OBSW_ADD_ACS_BOARD 0 #define OBSW_ADD_ACS_BOARD 0
#define OBSW_ADD_GPS_0 0 #define OBSW_ADD_GPS_0 0
#define OBSW_ADD_GPS_1 0 #define OBSW_ADD_GPS_1 0
#define OBSW_ADD_RW 0 #define OBSW_ADD_RW 0
#define OBSW_ADD_BPX_BATTERY_HANDLER 0
#define OBSW_ADD_RTD_DEVICES 0 #define OBSW_ADD_RTD_DEVICES 0
#define OBSW_ADD_PL_PCDU 0
#define OBSW_ADD_TMP_DEVICES 0 #define OBSW_ADD_TMP_DEVICES 0
#define OBSW_ADD_RAD_SENSORS 0 #define OBSW_ADD_RAD_SENSORS 0
#define OBSW_ADD_SYRLINKS 0 #define OBSW_ADD_SYRLINKS 0
#define OBSW_STAR_TRACKER_GROUND_CONFIG 1
#endif // RASPBERRY_PI #endif // RASPBERRY_PI

View File

@ -40,6 +40,10 @@
#include <test/testtasks/TestTask.h> #include <test/testtasks/TestTask.h>
#endif #endif
#ifndef OBSW_TM_TO_PTME
#define OBSW_TM_TO_PTME 0
#endif
void ObjectFactory::produceGenericObjects() { void ObjectFactory::produceGenericObjects() {
// Framework objects // Framework objects
new EventManager(objects::EVENT_MANAGER); new EventManager(objects::EVENT_MANAGER);
@ -69,8 +73,12 @@ void ObjectFactory::produceGenericObjects() {
new PUSDistributor(apid::EIVE_OBSW, objects::PUS_PACKET_DISTRIBUTOR, new PUSDistributor(apid::EIVE_OBSW, objects::PUS_PACKET_DISTRIBUTOR,
objects::CCSDS_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 // Every TM packet goes through this funnel
new TmFunnel(objects::TM_FUNNEL, 50); new TmFunnel(objects::TM_FUNNEL, 50, vc);
// PUS service stack // PUS service stack
new Service1TelecommandVerification(objects::PUS_SERVICE_1_VERIFICATION, apid::EIVE_OBSW, new Service1TelecommandVerification(objects::PUS_SERVICE_1_VERIFICATION, apid::EIVE_OBSW,

View File

@ -105,10 +105,6 @@ class CCSDSHandler : public SystemObject,
//! [EXPORT] : [COMMENT] Received action message with unknown action id //! [EXPORT] : [COMMENT] Received action message with unknown action id
static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xA0); static const ReturnValue_t COMMAND_NOT_IMPLEMENTED = MAKE_RETURN_CODE(0xA0);
// 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
static const bool UP = true; static const bool UP = true;
static const bool DOWN = false; static const bool DOWN = false;
@ -137,6 +133,10 @@ class CCSDSHandler : public SystemObject,
gpioId_t enTxClock = gpio::NO_GPIO; gpioId_t enTxClock = gpio::NO_GPIO;
gpioId_t enTxData = 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 to disable transmitter after 15 minutes
Countdown transmitterCountdown; Countdown transmitterCountdown;

View File

@ -9,8 +9,8 @@
object_id_t TmFunnel::downlinkDestination = objects::NO_OBJECT; object_id_t TmFunnel::downlinkDestination = objects::NO_OBJECT;
object_id_t TmFunnel::storageDestination = objects::NO_OBJECT; object_id_t TmFunnel::storageDestination = objects::NO_OBJECT;
TmFunnel::TmFunnel(object_id_t objectId, uint32_t messageDepth) TmFunnel::TmFunnel(object_id_t objectId, uint32_t messageDepth, uint8_t reportReceptionVc)
: SystemObject(objectId), messageDepth(messageDepth) { : SystemObject(objectId), messageDepth(messageDepth), reportReceptionVc(reportReceptionVc) {
auto mqArgs = MqArgs(objectId, static_cast<void*>(this)); auto mqArgs = MqArgs(objectId, static_cast<void*>(this));
tmQueue = QueueFactory::instance()->createMessageQueue( tmQueue = QueueFactory::instance()->createMessageQueue(
messageDepth, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs); messageDepth, MessageQueueMessage::MAX_MESSAGE_SIZE, &mqArgs);
@ -97,12 +97,7 @@ ReturnValue_t TmFunnel::initialize() {
return ObjectManagerIF::CHILD_INIT_FAILED; return ObjectManagerIF::CHILD_INIT_FAILED;
} }
#if OBSW_TM_TO_PTME == 1 tmQueue->setDefaultDestination(tmTarget->getReportReceptionQueue(reportReceptionVc));
// 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 */
// Storage destination is optional. // Storage destination is optional.
if (storageDestination == objects::NO_OBJECT) { if (storageDestination == objects::NO_OBJECT) {

View File

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