bugfixes in pdec handler parameter commands
This commit is contained in:
@ -1,24 +1,25 @@
|
||||
#ifndef MISSION_SYSTEM_COMSUBSYSTEM_H_
|
||||
#define MISSION_SYSTEM_COMSUBSYSTEM_H_
|
||||
|
||||
#include <fsfw/events/EventMessage.h>
|
||||
#include <fsfw/parameters/HasParametersIF.h>
|
||||
#include <fsfw/parameters/ParameterHelper.h>
|
||||
#include <fsfw/subsystem/Subsystem.h>
|
||||
#include <fsfw/events/EventMessage.h>
|
||||
|
||||
#include "mission/comDefs.h"
|
||||
|
||||
class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
*
|
||||
* @param setObjectId
|
||||
* @param maxNumberOfSequences
|
||||
* @param maxNumberOfTables
|
||||
* @param transmitterTimeout Maximum time the transmitter of the syrlinks
|
||||
* will be enabled
|
||||
*/
|
||||
/**
|
||||
* @brief Constructor
|
||||
*
|
||||
* @param setObjectId
|
||||
* @param maxNumberOfSequences
|
||||
* @param maxNumberOfTables
|
||||
* @param transmitterTimeout Maximum time the transmitter of the syrlinks
|
||||
* will be
|
||||
* enabled
|
||||
*/
|
||||
ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables,
|
||||
uint32_t transmitterTimeout);
|
||||
virtual ~ComSubsystem() = default;
|
||||
@ -30,6 +31,8 @@ class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
|
||||
virtual void performChildOperation() override;
|
||||
|
||||
private:
|
||||
static const Mode_t INITIAL_MODE = 0;
|
||||
|
||||
ReturnValue_t handleCommandMessage(CommandMessage *message) override;
|
||||
|
||||
ReturnValue_t initialize() override;
|
||||
@ -37,28 +40,42 @@ class ComSubsystem : public Subsystem, public ReceivesParameterMessagesIF {
|
||||
void startTransition(Mode_t mode, Submode_t submode) override;
|
||||
|
||||
void readEventQueue();
|
||||
void handleEventMessage(EventMessage* eventMessage);
|
||||
void handleEventMessage(EventMessage *eventMessage);
|
||||
void handleBitLockEvent();
|
||||
void handleCarrierLockEvent();
|
||||
void checkTransmitterCountdown();
|
||||
/**
|
||||
* @brief Enables transmitter in default (low) rate mode
|
||||
* @brief Enables transmitter in low rate mode
|
||||
*/
|
||||
void startRxAndTxDefaultSeq();
|
||||
void startRxAndTxLowRateSeq();
|
||||
|
||||
/**
|
||||
* @brief Returns true if mode is a mode where the transmitter is on
|
||||
*/
|
||||
bool isTxMode(Mode_t mode);
|
||||
|
||||
uint8_t datarateCfg = static_cast<uint8_t>(com::Datarate::LOW_RATE_MODULATION_BPSK);
|
||||
// Maximum time after which the transmitter will be turned of. This is a
|
||||
// protection mechanism due prevent the syrlinks from overheating
|
||||
uint32_t transmitterTimeout = 0;
|
||||
|
||||
// Maximum time after which the transmitter will be turned of. This is a
|
||||
// protection mechanism due prevent the syrlinks from overheating
|
||||
uint32_t transmitterTimeout = 0;
|
||||
ParameterHelper paramHelper;
|
||||
|
||||
MessageQueueIF* eventQueue = nullptr;
|
||||
MessageQueueIF *eventQueue = nullptr;
|
||||
|
||||
bool enableTxWhenCarrierLock = false;
|
||||
|
||||
// Countdown will be started as soon as the transmitter was enabled
|
||||
Countdown transmitterCountdown;
|
||||
|
||||
// Transmitter countdown only active when sysrlinks transmitter is on (modes:
|
||||
// rx and tx low rate, rx and tx high rate, rx and tx default rate)
|
||||
bool countdownActive = false;
|
||||
|
||||
// True when bit lock occurred while COM subsystem is in a transition. This
|
||||
// variable is used to remember the bit lock and execute the default rate
|
||||
// sequence after the active transition has been completed
|
||||
bool rememberBitLock = false;
|
||||
};
|
||||
|
||||
#endif /* MISSION_SYSTEM_COMSUBSYSTEM_H_ */
|
||||
|
Reference in New Issue
Block a user