syrlinks test
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Jakob Meier 2022-04-01 14:15:42 +02:00
parent ca1e8f3dc1
commit 07c242282d
6 changed files with 62 additions and 24 deletions

View File

@ -37,6 +37,8 @@ class AxiPtmeConfig : public SystemObject {
* The default implementation of the PTME generates a clock where the high level is * The default implementation of the PTME generates a clock where the high level is
* only one bit clock period long. This might be too short to match the setup and hold * only one bit clock period long. This might be too short to match the setup and hold
* times of the S-and transceiver. * times of the S-and transceiver.
* Default: Enables TX clock manipulator
*
*/ */
ReturnValue_t enableTxclockManipulator(); ReturnValue_t enableTxclockManipulator();
ReturnValue_t disableTxclockManipulator(); ReturnValue_t disableTxclockManipulator();
@ -47,6 +49,7 @@ class AxiPtmeConfig : public SystemObject {
* Enable inversion will update data on falling edge (not the configuration required by the * Enable inversion will update data on falling edge (not the configuration required by the
* syrlinks) * syrlinks)
* Disable clock inversion. Data updated on rising edge. * Disable clock inversion. Data updated on rising edge.
* Default: Inversion is disabled
*/ */
ReturnValue_t enableTxclockInversion(); ReturnValue_t enableTxclockInversion();
ReturnValue_t disableTxclockInversion(); ReturnValue_t disableTxclockInversion();
@ -54,7 +57,7 @@ class AxiPtmeConfig : public SystemObject {
private: private:
// Address of register storing the bitrate configuration parameter // Address of register storing the bitrate configuration parameter
static const uint32_t CADU_BITRATE_REG = 0x0; static const uint32_t CADU_BITRATE_REG = 0x0;
// Address to register storing common configuration parameters // Address of register storing common configuration parameters
static const uint32_t COMMON_CONFIG_REG = 0x4; static const uint32_t COMMON_CONFIG_REG = 0x4;
static const uint32_t ADRESS_DIVIDER = 4; static const uint32_t ADRESS_DIVIDER = 4;

View File

@ -5,13 +5,12 @@
#include "OBSWConfig.h" #include "OBSWConfig.h"
SyrlinksHkHandler::SyrlinksHkHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, SyrlinksHkHandler::SyrlinksHkHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie,
power::Switch_t powerSwitch, Gpio fault) power::Switch_t powerSwitch)
: DeviceHandlerBase(objectId, comIF, comCookie), : DeviceHandlerBase(objectId, comIF, comCookie),
rxDataset(this), rxDataset(this),
txDataset(this), txDataset(this),
temperatureSet(this), temperatureSet(this),
powerSwitch(powerSwitch), powerSwitch(powerSwitch) {
fault(fault){
if (comCookie == NULL) { if (comCookie == NULL) {
sif::warning << "SyrlinksHkHandler: Invalid com cookie" << std::endl; sif::warning << "SyrlinksHkHandler: Invalid com cookie" << std::endl;
} }
@ -20,18 +19,19 @@ SyrlinksHkHandler::SyrlinksHkHandler(object_id_t objectId, object_id_t comIF, Co
SyrlinksHkHandler::~SyrlinksHkHandler() {} SyrlinksHkHandler::~SyrlinksHkHandler() {}
void SyrlinksHkHandler::doStartUp() { void SyrlinksHkHandler::doStartUp() {
switch (startupState) { // switch (startupState) {
case StartupState::OFF: { // case StartupState::OFF: {
startupState = StartupState::ENABLE_TEMPERATURE_PROTECTION; // startupState = StartupState::ENABLE_TEMPERATURE_PROTECTION;
break; // break;
} // }
case StartupState::DONE: { // case StartupState::DONE: {
// setMode(_MODE_TO_ON);
// break;
// }
// default:
// break;
// }
setMode(_MODE_TO_ON); setMode(_MODE_TO_ON);
break;
}
default:
break;
}
} }
void SyrlinksHkHandler::doShutDown() { setMode(_MODE_POWER_DOWN); } void SyrlinksHkHandler::doShutDown() { setMode(_MODE_POWER_DOWN); }
@ -202,6 +202,27 @@ ReturnValue_t SyrlinksHkHandler::buildCommandFromCommand(DeviceCommandId_t devic
rememberCommandId = syrlinks::TEMP_BASEBAND_BOARD_LOW_BYTE; rememberCommandId = syrlinks::TEMP_BASEBAND_BOARD_LOW_BYTE;
rawPacket = commandBuffer; rawPacket = commandBuffer;
return RETURN_OK; return RETURN_OK;
case (syrlinks::SET_WAVEFORM_OQPSK):
setWaveformOQPSK.copy(reinterpret_cast<char*>(commandBuffer),
setWaveformOQPSK.size(), 0);
rawPacketLen = setWaveformOQPSK.size();
rememberCommandId = syrlinks::SET_WAVEFORM_OQPSK;
rawPacket = commandBuffer;
return RETURN_OK;
case (syrlinks::SET_WAVEFORM_BPSK):
setWaveformBPSK.copy(reinterpret_cast<char*>(commandBuffer),
setWaveformBPSK.size(), 0);
rawPacketLen = setWaveformBPSK.size();
rememberCommandId = syrlinks::SET_WAVEFORM_BPSK;
rawPacket = commandBuffer;
return RETURN_OK;
case (syrlinks::SET_SECOND_CONFIG):
setSecondConfiguration.copy(reinterpret_cast<char*>(commandBuffer),
setSecondConfiguration.size(), 0);
rawPacketLen = setSecondConfiguration.size();
rememberCommandId = syrlinks::SET_SECOND_CONFIG;
rawPacket = commandBuffer;
return RETURN_OK;
default: default:
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED; return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
} }
@ -219,6 +240,12 @@ void SyrlinksHkHandler::fillCommandAndReplyMap() {
true, syrlinks::ACK_REPLY); true, syrlinks::ACK_REPLY);
this->insertInCommandAndReplyMap(syrlinks::WRITE_LCL_CONFIG, 1, nullptr, syrlinks::ACK_SIZE, this->insertInCommandAndReplyMap(syrlinks::WRITE_LCL_CONFIG, 1, nullptr, syrlinks::ACK_SIZE,
false, true, syrlinks::ACK_REPLY); false, true, syrlinks::ACK_REPLY);
this->insertInCommandAndReplyMap(syrlinks::SET_WAVEFORM_OQPSK, 1, nullptr, syrlinks::ACK_SIZE,
false, true, syrlinks::ACK_REPLY);
this->insertInCommandAndReplyMap(syrlinks::SET_WAVEFORM_BPSK, 1, nullptr, syrlinks::ACK_SIZE,
false, true, syrlinks::ACK_REPLY);
this->insertInCommandAndReplyMap(syrlinks::SET_SECOND_CONFIG, 1, nullptr, syrlinks::ACK_SIZE,
false, true, syrlinks::ACK_REPLY);
this->insertInCommandAndReplyMap(syrlinks::READ_LCL_CONFIG, 1, nullptr, this->insertInCommandAndReplyMap(syrlinks::READ_LCL_CONFIG, 1, nullptr,
syrlinks::READ_ONE_REGISTER_REPLY_SIE); syrlinks::READ_ONE_REGISTER_REPLY_SIE);
this->insertInCommandAndReplyMap(syrlinks::READ_TX_STATUS, 1, &txDataset, this->insertInCommandAndReplyMap(syrlinks::READ_TX_STATUS, 1, &txDataset,
@ -622,7 +649,7 @@ void SyrlinksHkHandler::parseAgcHighByte(const uint8_t* packet) {
void SyrlinksHkHandler::setNormalDatapoolEntriesInvalid() {} void SyrlinksHkHandler::setNormalDatapoolEntriesInvalid() {}
uint32_t SyrlinksHkHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; } uint32_t SyrlinksHkHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 5000; }
ReturnValue_t SyrlinksHkHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap, ReturnValue_t SyrlinksHkHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) { LocalDataPoolManager& poolManager) {
@ -638,6 +665,8 @@ ReturnValue_t SyrlinksHkHandler::initializeLocalDataPool(localpool::DataPool& lo
localDataPoolMap.emplace(syrlinks::TX_STATUS, new PoolEntry<uint8_t>({0})); localDataPoolMap.emplace(syrlinks::TX_STATUS, new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(syrlinks::TX_WAVEFORM, new PoolEntry<uint8_t>({0})); localDataPoolMap.emplace(syrlinks::TX_WAVEFORM, new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(syrlinks::TX_AGC_VALUE, new PoolEntry<uint16_t>({0})); localDataPoolMap.emplace(syrlinks::TX_AGC_VALUE, new PoolEntry<uint16_t>({0}));
localDataPoolMap.emplace(syrlinks::TEMP_BASEBAND_BOARD, new PoolEntry<uint16_t>({0}));
localDataPoolMap.emplace(syrlinks::TEMP_POWER_AMPLIFIER, new PoolEntry<uint16_t>({0}));
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }

View File

@ -19,7 +19,7 @@
class SyrlinksHkHandler : public DeviceHandlerBase { class SyrlinksHkHandler : public DeviceHandlerBase {
public: public:
SyrlinksHkHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie, SyrlinksHkHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie,
power::Switch_t powerSwitch, Gpio fault); power::Switch_t powerSwitch);
virtual ~SyrlinksHkHandler(); virtual ~SyrlinksHkHandler();
/** /**
@ -67,8 +67,12 @@ class SyrlinksHkHandler : public DeviceHandlerBase {
std::string setTxModeStandby = "<W04:4000:7E58>"; std::string setTxModeStandby = "<W04:4000:7E58>";
/** W - write, 04 - 4 bytes in data field, 01 - value, 40 register to write value */ /** W - write, 04 - 4 bytes in data field, 01 - value, 40 register to write value */
std::string setTxModeModulation = "<W04:4001:4D69>"; std::string setTxModeModulation = "<W04:4001:4D69>";
// std::string setSecondConfiguration = "<W04:4007:E7CF>";
std::string setSecondConfiguration = "<W04:400B:1063>";
std::string setTxModeCw = "<W04:4010:4968>"; std::string setTxModeCw = "<W04:4010:4968>";
std::string writeLclConfig = "<W04:0707:3FE4>"; std::string writeLclConfig = "<W04:0707:3FE4>";
std::string setWaveformOQPSK = "<W04:4403:E1FA>";
std::string setWaveformBPSK = "<W04:4406:1E0F>";
std::string readTxStatus = "<R02:40:7555>"; std::string readTxStatus = "<R02:40:7555>";
std::string readTxWaveform = "<R02:44:B991>"; std::string readTxWaveform = "<R02:44:B991>";
std::string readTxAgcValueHighByte = "<R02:46:DFF3>"; std::string readTxAgcValueHighByte = "<R02:46:DFF3>";
@ -91,8 +95,6 @@ class SyrlinksHkHandler : public DeviceHandlerBase {
const power::Switch_t powerSwitch = power::NO_SWITCH; const power::Switch_t powerSwitch = power::NO_SWITCH;
Gpio fault;
uint8_t agcValueHighByte = 0; uint8_t agcValueHighByte = 0;
uint16_t rawTempPowerAmplifier = 0; uint16_t rawTempPowerAmplifier = 0;
uint16_t rawTempBasebandBoard = 0; uint16_t rawTempBasebandBoard = 0;
@ -109,7 +111,7 @@ class SyrlinksHkHandler : public DeviceHandlerBase {
StartupState startupState = StartupState::OFF; StartupState startupState = StartupState::OFF;
bool debug = false; bool debug = true;
/** /**
* This object is used to store the id of the next command to execute. This controls the * This object is used to store the id of the next command to execute. This controls the

View File

@ -24,6 +24,10 @@ static const DeviceCommandId_t TEMP_POWER_AMPLIFIER_HIGH_BYTE = 13;
static const DeviceCommandId_t TEMP_POWER_AMPLIFIER_LOW_BYTE = 14; static const DeviceCommandId_t TEMP_POWER_AMPLIFIER_LOW_BYTE = 14;
static const DeviceCommandId_t TEMP_BASEBAND_BOARD_HIGH_BYTE = 15; static const DeviceCommandId_t TEMP_BASEBAND_BOARD_HIGH_BYTE = 15;
static const DeviceCommandId_t TEMP_BASEBAND_BOARD_LOW_BYTE = 16; static const DeviceCommandId_t TEMP_BASEBAND_BOARD_LOW_BYTE = 16;
static const DeviceCommandId_t SET_WAVEFORM_OQPSK = 17;
static const DeviceCommandId_t SET_WAVEFORM_BPSK = 18;
static const DeviceCommandId_t SET_SECOND_CONFIG = 19;
static const DeviceCommandId_t ENABLE_DEBUG = 20;
/** Size of a simple transmission success response */ /** Size of a simple transmission success response */
static const uint8_t ACK_SIZE = 12; static const uint8_t ACK_SIZE = 12;

View File

@ -91,9 +91,9 @@ class CCSDSHandler : public SystemObject,
static const ActionId_t ARBITRARY_RATE = 4; static const ActionId_t ARBITRARY_RATE = 4;
static const ActionId_t ENABLE_TX_CLK_MANIPULATOR = 5; static const ActionId_t ENABLE_TX_CLK_MANIPULATOR = 5;
static const ActionId_t DISABLE_TX_CLK_MANIPULATOR = 6; static const ActionId_t DISABLE_TX_CLK_MANIPULATOR = 6;
// Will update data with respect to tx clock signal of cadu bitsream on rising edge // Will update data with respect to tx clock signal of cadu bitstream on rising edge
static const ActionId_t UPDATE_ON_RISING_EDGE = 7; static const ActionId_t UPDATE_ON_RISING_EDGE = 7;
// Will update data with respect to tx clock signal of cadu bitsream on falling edge // Will update data with respect to tx clock signal of cadu bitstream on falling edge
static const ActionId_t UPDATE_ON_FALLING_EDGE = 8; static const ActionId_t UPDATE_ON_FALLING_EDGE = 8;
// Syrlinks supports two bitrates (200 kbps and 1000 kbps) // Syrlinks supports two bitrates (200 kbps and 1000 kbps)

2
tmtc

@ -1 +1 @@
Subproject commit 5ac8912dd2b47f01f66093187f15a9f9824ffd66 Subproject commit 811aedce9762daa87e268b8832f23b0d28f8a714