2021-11-21 18:07:05 +01:00
|
|
|
#ifndef LINUX_OBC_PTMERATESETTER_H_
|
|
|
|
#define LINUX_OBC_PTMERATESETTER_H_
|
|
|
|
|
|
|
|
#include "TxRateSetterIF.h"
|
|
|
|
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
2022-01-24 07:43:14 +01:00
|
|
|
#include "linux/obc/PtmeAxiConfig.h"
|
|
|
|
#include "linux/obc/PtmeConfig.h"
|
|
|
|
#include "fsfw/objectmanager/SystemObject.h"
|
2021-11-21 18:07:05 +01:00
|
|
|
|
|
|
|
/**
|
2022-01-24 07:43:14 +01:00
|
|
|
* @brief Class to set the downlink bit rate by writing to the AXI configuration interface of the
|
|
|
|
* PTME IP core.
|
2021-11-21 18:07:05 +01:00
|
|
|
*
|
2022-01-24 07:43:14 +01:00
|
|
|
* @details This is the bitrate of the CADU clock and not the downlink which has twice the bitrate
|
|
|
|
* of the CADU clock due to the convolutional code added by the s-Band transceiver.
|
2021-11-21 18:07:05 +01:00
|
|
|
*
|
|
|
|
* @author J. Meier
|
|
|
|
*/
|
2022-01-24 07:43:14 +01:00
|
|
|
class PtmeRateSetter: public TxRateSetterIF, public SystemObject {
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* @brief Constructor
|
|
|
|
*
|
|
|
|
* objectId Object id of system object
|
|
|
|
* ptmeAxiConfig Pointer to object providing access to PTME configuration registers.
|
|
|
|
*/
|
|
|
|
PtmeRateSetter(object_id_t objectId, PtmeAxiConfig* ptmeAxiConfig);
|
|
|
|
virtual ~PtmeRateSetter();
|
2022-01-17 15:58:27 +01:00
|
|
|
|
2022-01-24 07:43:14 +01:00
|
|
|
virtual ReturnValue_t initialize() override;
|
|
|
|
virtual ReturnValue_t setRate(BitRates rate);
|
2022-01-17 15:58:27 +01:00
|
|
|
|
2022-01-24 07:43:14 +01:00
|
|
|
private:
|
2022-01-17 15:58:27 +01:00
|
|
|
|
2022-01-24 07:43:14 +01:00
|
|
|
PtmeAxiConfig* ptmeAxiConfig = nullptr;
|
2021-11-21 18:07:05 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* LINUX_OBC_PTMERATESETTER_H_ */
|