moved transmitter timer and event handling of carrier and bitlock to ComSubsystem
This commit is contained in:
@ -4,26 +4,61 @@
|
||||
#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:
|
||||
ComSubsystem(object_id_t setObjectId, uint32_t maxNumberOfSequences, uint32_t maxNumberOfTables);
|
||||
/**
|
||||
* @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;
|
||||
|
||||
MessageQueueId_t getCommandQueue() const override;
|
||||
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueIdentifier,
|
||||
ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues,
|
||||
uint16_t startAtIndex) override;
|
||||
virtual void performChildOperation() override;
|
||||
|
||||
private:
|
||||
ReturnValue_t handleCommandMessage(CommandMessage *message) override;
|
||||
|
||||
ReturnValue_t initialize() override;
|
||||
|
||||
void startTransition(Mode_t mode, Submode_t submode) override;
|
||||
|
||||
void readEventQueue();
|
||||
void handleEventMessage(EventMessage* eventMessage);
|
||||
void handleBitLockEvent();
|
||||
void handleCarrierLockEvent();
|
||||
void checkTransmitterCountdown();
|
||||
/**
|
||||
* @brief Enables transmitter in default (low) rate mode
|
||||
*/
|
||||
void startRxAndTxDefaultSeq();
|
||||
|
||||
uint8_t datarateCfg = static_cast<uint8_t>(com::Datarate::LOW_RATE_MODULATION_BPSK);
|
||||
ParameterHelper paramHelper;
|
||||
|
||||
MessageQueueIF* eventQueue = nullptr;
|
||||
|
||||
bool enableTxWhenCarrierLock = false;
|
||||
|
||||
// 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;
|
||||
|
||||
// Countdown will be started as soon as the transmitter was enabled
|
||||
Countdown transmitterCountdown;
|
||||
};
|
||||
|
||||
#endif /* MISSION_SYSTEM_COMSUBSYSTEM_H_ */
|
||||
|
Reference in New Issue
Block a user