syrlinks handler wip

This commit is contained in:
2021-02-19 11:02:27 +01:00
parent 89d0427437
commit a5ef1d5853
3 changed files with 103 additions and 77 deletions

View File

@ -2,6 +2,7 @@
#define MISSION_DEVICES_SYRLINKSHKHANDLER_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <mission/devices/devicedefinitions/SyrlinksDefinitions.h>
#include <cstring.h>
/**
@ -38,21 +39,6 @@ protected:
private:
static const DeviceCommandId_t RESET_UNIT = 0x01;
/** Reads out all status registers */
static const DeviceCommandId_t READ_RX_STATUS_REGISTERS = 0x02;
/** Sets Tx mode to standby */
static const DeviceCommandId_t SET_TX_MODE_STANDBY = 0x03;
/** Starts transmission mode. Only reached when clock signal is applying to the data tx input */
static const DeviceCommandId_t SET_TX_MODE_MODULATION = 0x04;
/** Sends out a single carrier wave for testing purpose */
static const DeviceCommandId_t SET_TX_MODE_CW = 0x05;
/** Size of a simple transmission success response */
static const uint8_t REQUEST_STATUS_REPLY_SIZE = 11;
/** Size of reply to an rx status registers request */
static const uint8_t RX_STATUS_REGISTERS_REPLY_SIZE = 39;
std::string resetCommand = "<C04:5A5A:FF41>";
std::string readRxStatusRegCommand = "<E00::825B>";
std::string setTxModeStandby = "<W04:0040:2B9E>";
@ -60,21 +46,7 @@ private:
std::string setTxModeModulation = "<W04:0140:5D2A>";
std::string setTxModeCw = "<W04:1040:81CF>";
/**
* @brief Function fills cmdBuffer with command to start the adc
* conversion for a new temperature value.
*/
void prepareAdcConversionCommand();
void prepareGetTempCommand();
enum class CommunicationStep {
START_ADC_CONVERSION,
GET_TEMPERATURE
};
TMP1075::Tmp1075Dataset dataset;
SYRLINKS::RxStatusRegistersDataset rxStatusRegistersSet;
static const uint8_t MAX_CMD_LEN = 3;