This commit is contained in:
parent
ca1e8f3dc1
commit
07c242282d
@ -37,6 +37,8 @@ class AxiPtmeConfig : public SystemObject {
|
||||
* 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
|
||||
* times of the S-and transceiver.
|
||||
* Default: Enables TX clock manipulator
|
||||
*
|
||||
*/
|
||||
ReturnValue_t enableTxclockManipulator();
|
||||
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
|
||||
* syrlinks)
|
||||
* Disable clock inversion. Data updated on rising edge.
|
||||
* Default: Inversion is disabled
|
||||
*/
|
||||
ReturnValue_t enableTxclockInversion();
|
||||
ReturnValue_t disableTxclockInversion();
|
||||
@ -54,7 +57,7 @@ class AxiPtmeConfig : public SystemObject {
|
||||
private:
|
||||
// Address of register storing the bitrate configuration parameter
|
||||
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 ADRESS_DIVIDER = 4;
|
||||
|
||||
|
@ -5,13 +5,12 @@
|
||||
#include "OBSWConfig.h"
|
||||
|
||||
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),
|
||||
rxDataset(this),
|
||||
txDataset(this),
|
||||
temperatureSet(this),
|
||||
powerSwitch(powerSwitch),
|
||||
fault(fault){
|
||||
powerSwitch(powerSwitch) {
|
||||
if (comCookie == NULL) {
|
||||
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() {}
|
||||
|
||||
void SyrlinksHkHandler::doStartUp() {
|
||||
switch (startupState) {
|
||||
case StartupState::OFF: {
|
||||
startupState = StartupState::ENABLE_TEMPERATURE_PROTECTION;
|
||||
break;
|
||||
}
|
||||
case StartupState::DONE: {
|
||||
setMode(_MODE_TO_ON);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// switch (startupState) {
|
||||
// case StartupState::OFF: {
|
||||
// startupState = StartupState::ENABLE_TEMPERATURE_PROTECTION;
|
||||
// break;
|
||||
// }
|
||||
// case StartupState::DONE: {
|
||||
// setMode(_MODE_TO_ON);
|
||||
// break;
|
||||
// }
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
setMode(_MODE_TO_ON);
|
||||
}
|
||||
|
||||
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;
|
||||
rawPacket = commandBuffer;
|
||||
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:
|
||||
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
||||
}
|
||||
@ -219,6 +240,12 @@ void SyrlinksHkHandler::fillCommandAndReplyMap() {
|
||||
true, syrlinks::ACK_REPLY);
|
||||
this->insertInCommandAndReplyMap(syrlinks::WRITE_LCL_CONFIG, 1, nullptr, syrlinks::ACK_SIZE,
|
||||
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,
|
||||
syrlinks::READ_ONE_REGISTER_REPLY_SIE);
|
||||
this->insertInCommandAndReplyMap(syrlinks::READ_TX_STATUS, 1, &txDataset,
|
||||
@ -622,7 +649,7 @@ void SyrlinksHkHandler::parseAgcHighByte(const uint8_t* packet) {
|
||||
|
||||
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,
|
||||
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_WAVEFORM, new PoolEntry<uint8_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;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
class SyrlinksHkHandler : public DeviceHandlerBase {
|
||||
public:
|
||||
SyrlinksHkHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie,
|
||||
power::Switch_t powerSwitch, Gpio fault);
|
||||
power::Switch_t powerSwitch);
|
||||
virtual ~SyrlinksHkHandler();
|
||||
|
||||
/**
|
||||
@ -67,8 +67,12 @@ class SyrlinksHkHandler : public DeviceHandlerBase {
|
||||
std::string setTxModeStandby = "<W04:4000:7E58>";
|
||||
/** W - write, 04 - 4 bytes in data field, 01 - value, 40 register to write value */
|
||||
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 writeLclConfig = "<W04:0707:3FE4>";
|
||||
std::string setWaveformOQPSK = "<W04:4403:E1FA>";
|
||||
std::string setWaveformBPSK = "<W04:4406:1E0F>";
|
||||
std::string readTxStatus = "<R02:40:7555>";
|
||||
std::string readTxWaveform = "<R02:44:B991>";
|
||||
std::string readTxAgcValueHighByte = "<R02:46:DFF3>";
|
||||
@ -91,8 +95,6 @@ class SyrlinksHkHandler : public DeviceHandlerBase {
|
||||
|
||||
const power::Switch_t powerSwitch = power::NO_SWITCH;
|
||||
|
||||
Gpio fault;
|
||||
|
||||
uint8_t agcValueHighByte = 0;
|
||||
uint16_t rawTempPowerAmplifier = 0;
|
||||
uint16_t rawTempBasebandBoard = 0;
|
||||
@ -109,7 +111,7 @@ class SyrlinksHkHandler : public DeviceHandlerBase {
|
||||
|
||||
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
|
||||
|
@ -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_BASEBAND_BOARD_HIGH_BYTE = 15;
|
||||
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 */
|
||||
static const uint8_t ACK_SIZE = 12;
|
||||
|
@ -91,9 +91,9 @@ class CCSDSHandler : public SystemObject,
|
||||
static const ActionId_t ARBITRARY_RATE = 4;
|
||||
static const ActionId_t ENABLE_TX_CLK_MANIPULATOR = 5;
|
||||
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;
|
||||
// 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;
|
||||
|
||||
// Syrlinks supports two bitrates (200 kbps and 1000 kbps)
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit 5ac8912dd2b47f01f66093187f15a9f9824ffd66
|
||||
Subproject commit 811aedce9762daa87e268b8832f23b0d28f8a714
|
Loading…
Reference in New Issue
Block a user