syrlinks hk handler complete

This commit is contained in:
2021-03-01 12:23:39 +01:00
parent e4f3eb0172
commit be4977df68
7 changed files with 106 additions and 65 deletions

View File

@ -41,6 +41,7 @@ protected:
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) override;
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
private:
@ -66,7 +67,8 @@ private:
std::string setTxModeCw = "<W04:1040:81CF>";
std::string readTxStatus = "<R02:40:7555>";
std::string readTxWaveform = "<R02:44:B991>";
std::string readTxAgcValue = "<R02:46:DFF3>";
std::string readTxAgcValueHighByte = "<R02:46:DFF3>";
std::string readTxAgcValueLowByte = "<R02:47:ECC2>";
/**
* In some cases it is not possible to extract from the received reply the information about
@ -77,16 +79,9 @@ private:
SYRLINKS::RxDataset rxDataset;
SYRLINKS::TxDataset txDataset;
uint8_t commandBuffer[SYRLINKS::MAX_COMMAND_SIZE];
uint8_t agcValueHighByte;
/**
* @brief This function gets the command id relating to a received read response 'R'.
*
* @param foundId Pointer to object where found id will be stored.
* @param foundLen Pointer to objet where reply length of the received response will be
* stored.
*/
void getIdAndLenForReadResponse(DeviceCommandId_t *foundId, size_t *foundLen);
uint8_t commandBuffer[SYRLINKS::MAX_COMMAND_SIZE];
/**
* This object is used to store the id of the next command to execute. This controls the
@ -173,9 +168,11 @@ private:
void parseTxWaveformReply(const uint8_t* packet);
/**
* @brief This function writes the received AGC value to the txDataset.
* @brief The agc value is split over two registers. The parse agc functions are used to get
* the values from the received reply and write them into the txDataset.
*/
void parseTxAgcValueReply(const uint8_t* packet);
void parseAgcLowByte(const uint8_t* packet);
void parseAgcHighByte(const uint8_t* packet);
};
#endif /* MISSION_DEVICES_SYRLINKSHKHANDLER_H_ */