Syrlinks Update #353
@ -3,7 +3,11 @@
|
||||
|
||||
namespace com {
|
||||
|
||||
enum class Datarate: uint8_t { LOW_RATE_MODULATION_BPSK, HIGH_RATE_MODULATION_0QPSK, NUM_DATARATES };
|
||||
enum class Datarate : uint8_t {
|
||||
LOW_RATE_MODULATION_BPSK,
|
||||
HIGH_RATE_MODULATION_0QPSK,
|
||||
NUM_DATARATES
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
@ -649,11 +649,13 @@ ReturnValue_t SyrlinksHandler::handleAckReply(const uint8_t* packet) {
|
||||
parseReplyStatus(reinterpret_cast<const char*>(packet + syrlinks::MESSAGE_HEADER_SIZE));
|
||||
switch (rememberCommandId) {
|
||||
case (syrlinks::WRITE_LCL_CONFIG): {
|
||||
if (isTransitionalMode()) {
|
||||
if (result != returnvalue::OK) {
|
||||
internalState = InternalState::OFF;
|
||||
} else if (result == returnvalue::OK) {
|
||||
commandExecuted = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (syrlinks::SET_WAVEFORM_BPSK):
|
||||
@ -681,7 +683,9 @@ ReturnValue_t SyrlinksHandler::isModeCombinationValid(Mode_t mode, Submode_t sub
|
||||
}
|
||||
|
||||
ReturnValue_t SyrlinksHandler::getParameter(uint8_t domainId, uint8_t uniqueId,
|
||||
ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues, uint16_t startAtIndex) {
|
||||
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;
|
||||
@ -696,7 +700,8 @@ ReturnValue_t SyrlinksHandler::getParameter(uint8_t domainId, uint8_t uniqueId,
|
||||
}
|
||||
parameterWrapper->set(&datarateCfgRaw);
|
||||
}
|
||||
return DeviceHandlerBase::getParameter(domainId, uniqueId, parameterWrapper, newValues, startAtIndex);
|
||||
return DeviceHandlerBase::getParameter(domainId, uniqueId, parameterWrapper, newValues,
|
||||
startAtIndex);
|
||||
}
|
||||
|
||||
void SyrlinksHandler::prepareCommand(std::string command, DeviceCommandId_t commandId) {
|
||||
@ -742,7 +747,8 @@ void SyrlinksHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
|
||||
if (txOnHandler(InternalState::SELECT_MODULATION_BPSK)) {
|
||||
return;
|
||||
}
|
||||
} else if (datarateCfgRaw == static_cast<uint8_t>(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;
|
||||
}
|
||||
|
@ -53,10 +53,9 @@ class SyrlinksHandler : public DeviceHandlerBase {
|
||||
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;
|
||||
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;
|
||||
|
||||
|
@ -6,9 +6,7 @@
|
||||
|
||||
namespace syrlinks {
|
||||
|
||||
enum class ParameterId: uint8_t {
|
||||
DATARATE = 0
|
||||
};
|
||||
enum class ParameterId : uint8_t { DATARATE = 0 };
|
||||
|
||||
enum Submode {
|
||||
DEFAULT,
|
||||
|
Loading…
Reference in New Issue
Block a user