Syrlinks Update #353
@ -27,8 +27,10 @@ list yields a list of all related PRs for each release.
|
||||
|
||||
## Added
|
||||
|
||||
- The Syrlinks handler has submodes for the TX mode now: TX Standby (1), TX Modulation (2) and
|
||||
TX Carrier Wave (3). The submodes apply for both ON and NORMAL mode.
|
||||
- The Syrlinks handler has submodes for the TX mode now: RX Only (1), RX and TX default
|
||||
datarate (2), RX and TX Low Rate (3), RX and TX High Rate (4) and TX Carrier Wave (3).
|
||||
The submodes apply for both ON and NORMAL mode. The default datarate can be updated using
|
||||
a parameter command (domain ID 0 and unique ID 0) with value 0 for low rate and 1 for high rate.
|
||||
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/353
|
||||
- Startracker temperature set and PCDU switcher set are diagnostic now
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
namespace com {
|
||||
|
||||
enum class Datarate { LOW_RATE_MODULATION_BPSK, HIGH_RATE_MODULATION_0QPSK };
|
||||
enum class Datarate: uint8_t { LOW_RATE_MODULATION_BPSK, HIGH_RATE_MODULATION_0QPSK, NUM_DATARATES };
|
||||
|
||||
}
|
||||
|
||||
|
@ -19,11 +19,6 @@ SyrlinksHandler::SyrlinksHandler(object_id_t objectId, object_id_t comIF, Cookie
|
||||
SyrlinksHandler::~SyrlinksHandler() = default;
|
||||
|
||||
void SyrlinksHandler::doStartUp() {
|
||||
if (internalState != InternalState::OFF) {
|
||||
sif::error << "SyrlinksHandler::doStartUp: Not in internal OFF mode, possible config error"
|
||||
<< std::endl;
|
||||
internalState = InternalState::OFF;
|
||||
}
|
||||
if (internalState == InternalState::OFF) {
|
||||
internalState = InternalState::ENABLE_TEMPERATURE_PROTECTION;
|
||||
commandExecuted = false;
|
||||
@ -685,6 +680,25 @@ ReturnValue_t SyrlinksHandler::isModeCombinationValid(Mode_t mode, Submode_t sub
|
||||
return DeviceHandlerBase::isModeCombinationValid(mode, submode);
|
||||
}
|
||||
|
||||
ReturnValue_t SyrlinksHandler::getParameter(uint8_t domainId, uint8_t uniqueId,
|
||||
ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues, uint16_t startAtIndex) {
|
||||
if((domainId == 0) and (uniqueId == static_cast<uint8_t>(syrlinks::ParameterId::DATARATE))) {
|
||||
if(newValues->getSerializedSize() != 1) {
|
||||
return HasParametersIF::INVALID_VALUE;
|
||||
}
|
||||
uint8_t newVal = 0;
|
||||
ReturnValue_t result = newValues->getElement(&newVal);
|
||||
if(result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
if(newVal >= static_cast<uint8_t>(com::Datarate::NUM_DATARATES)) {
|
||||
return HasParametersIF::INVALID_VALUE;
|
||||
}
|
||||
parameterWrapper->set(&datarateCfgRaw);
|
||||
}
|
||||
return DeviceHandlerBase::getParameter(domainId, uniqueId, parameterWrapper, newValues, startAtIndex);
|
||||
}
|
||||
|
||||
void SyrlinksHandler::prepareCommand(std::string command, DeviceCommandId_t commandId) {
|
||||
command.copy(reinterpret_cast<char*>(commandBuffer), command.size(), 0);
|
||||
rawPacketLen = command.size();
|
||||
@ -724,11 +738,11 @@ void SyrlinksHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
|
||||
if (tgtMode == HasModesIF::MODE_ON or tgtMode == DeviceHandlerIF::MODE_NORMAL) {
|
||||
switch (getSubmode()) {
|
||||
case (syrlinks::Submode::RX_AND_TX_DEFAULT_DATARATE): {
|
||||
if (datarateCfg == com::Datarate::LOW_RATE_MODULATION_BPSK) {
|
||||
if (datarateCfgRaw == static_cast<uint8_t>(com::Datarate::LOW_RATE_MODULATION_BPSK)) {
|
||||
if (txOnHandler(InternalState::SELECT_MODULATION_BPSK)) {
|
||||
return;
|
||||
}
|
||||
} else if (datarateCfg == com::Datarate::HIGH_RATE_MODULATION_0QPSK) {
|
||||
} else if (datarateCfgRaw == static_cast<uint8_t>(com::Datarate::HIGH_RATE_MODULATION_0QPSK)) {
|
||||
if (txOnHandler(InternalState::SELECT_MODULATION_0QPSK)) {
|
||||
return;
|
||||
}
|
||||
|
@ -52,6 +52,11 @@ class SyrlinksHandler : public DeviceHandlerBase {
|
||||
LocalDataPoolManager& poolManager) override;
|
||||
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
||||
|
||||
// Parameter IF
|
||||
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
|
||||
ParameterWrapper *parameterWrapper,
|
||||
const ParameterWrapper *newValues,
|
||||
uint16_t startAtIndex) override;
|
||||
private:
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::SYRLINKS_HANDLER;
|
||||
|
||||
@ -100,7 +105,9 @@ class SyrlinksHandler : public DeviceHandlerBase {
|
||||
syrlinks::TemperatureSet temperatureSet;
|
||||
|
||||
const power::Switch_t powerSwitch = power::NO_SWITCH;
|
||||
com::Datarate datarateCfg = com::Datarate::LOW_RATE_MODULATION_BPSK;
|
||||
// Use uint8_t for compatibility with parameter interface
|
||||
uint8_t datarateCfgRaw = static_cast<uint8_t>(com::Datarate::LOW_RATE_MODULATION_BPSK);
|
||||
//com::Datarate datarateCfg = com::Datarate::LOW_RATE_MODULATION_BPSK;
|
||||
|
||||
bool debugMode = false;
|
||||
uint8_t agcValueHighByte = 0;
|
||||
|
@ -6,6 +6,10 @@
|
||||
|
||||
namespace syrlinks {
|
||||
|
||||
enum class ParameterId: uint8_t {
|
||||
DATARATE = 0
|
||||
};
|
||||
|
||||
enum Submode {
|
||||
DEFAULT,
|
||||
RX_ONLY,
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit 99d5ed014bc3264b621c066ba0fb035b1037a637
|
||||
Subproject commit 2ac182e753565f8fff2729bca81a80263d9460ca
|
Loading…
Reference in New Issue
Block a user