type and name change for HasParametersIF

This commit is contained in:
Robin Müller 2021-01-29 22:45:53 +01:00
parent e65990feff
commit 7f0db5b47c
23 changed files with 67 additions and 68 deletions

View File

@ -1380,10 +1380,10 @@ void DeviceHandlerBase::doOffActivity() {
}
ReturnValue_t DeviceHandlerBase::getParameter(uint8_t domainId,
uint16_t parameterId, ParameterWrapper* parameterWrapper,
uint8_t uniqueId, ParameterWrapper* parameterWrapper,
const ParameterWrapper* newValues, uint16_t startAtIndex) {
ReturnValue_t result = fdirInstance->getParameter(domainId, parameterId,
parameterWrapper, newValues, startAtIndex);
ReturnValue_t result = fdirInstance->getParameter(domainId, uniqueId, parameterWrapper,
newValues, startAtIndex);
if (result != INVALID_DOMAIN_ID) {
return result;
}

View File

@ -216,7 +216,7 @@ public:
virtual void getMode(Mode_t *mode, Submode_t *submode);
HealthState getHealth();
ReturnValue_t setHealth(HealthState health);
virtual ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
virtual ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex) override;

View File

@ -209,20 +209,20 @@ void DeviceHandlerFailureIsolation::startRecovery(Event reason) {
}
ReturnValue_t DeviceHandlerFailureIsolation::getParameter(uint8_t domainId,
uint16_t parameterId, ParameterWrapper* parameterWrapper,
uint8_t uniqueId, ParameterWrapper* parameterWrapper,
const ParameterWrapper* newValues, uint16_t startAtIndex) {
ReturnValue_t result = strangeReplyCount.getParameter(domainId, parameterId,
ReturnValue_t result = strangeReplyCount.getParameter(domainId, uniqueId,
parameterWrapper, newValues, startAtIndex);
if (result != INVALID_DOMAIN_ID) {
return result;
}
result = missedReplyCount.getParameter(domainId, parameterId,
parameterWrapper, newValues, startAtIndex);
result = missedReplyCount.getParameter(domainId, uniqueId, parameterWrapper, newValues,
startAtIndex);
if (result != INVALID_DOMAIN_ID) {
return result;
}
result = recoveryCounter.getParameter(domainId, parameterId,
parameterWrapper, newValues, startAtIndex);
result = recoveryCounter.getParameter(domainId, uniqueId, parameterWrapper, newValues,
startAtIndex);
if (result != INVALID_DOMAIN_ID) {
return result;
}

View File

@ -17,9 +17,9 @@ public:
ReturnValue_t initialize();
void triggerEvent(Event event, uint32_t parameter1 = 0,
uint32_t parameter2 = 0);bool isFdirActionInProgress();
virtual ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex);
virtual ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues,
uint16_t startAtIndex);
protected:
FaultCounter strangeReplyCount;

View File

@ -58,14 +58,14 @@ FaultCounter::FaultCounter() :
parameterDomain(0), timer(), faultCount(0), failureThreshold(0) {
}
ReturnValue_t FaultCounter::getParameter(uint8_t domainId, uint16_t parameterId,
ReturnValue_t FaultCounter::getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues,
uint16_t startAtIndex) {
if (domainId != parameterDomain) {
return INVALID_DOMAIN_ID;
}
switch (parameterId) {
switch (uniqueId) {
case 0:
parameterWrapper->set(failureThreshold);
break;

View File

@ -23,7 +23,7 @@ public:
void setFailureThreshold(uint32_t failureThreshold);
void setFaultDecrementTimeMs(uint32_t timeMs);
virtual ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
virtual ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex);

View File

@ -37,16 +37,16 @@ public:
}
}
virtual ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex) {
virtual ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues,
uint16_t startAtIndex) {
ReturnValue_t result = this->MonitorBase<T>::getParameter(domainId,
parameterId, parameterWrapper, newValues, startAtIndex);
uniqueId, parameterWrapper, newValues, startAtIndex);
//We'll reuse the DOMAIN_ID of MonitorReporter, as we know the parameterIds used there.
if (result != this->INVALID_IDENTIFIER_ID) {
return result;
}
switch (parameterId) {
switch (uniqueId) {
case 10:
parameterWrapper->set(this->lowerLimit);
break;

View File

@ -51,13 +51,13 @@ public:
return state;
}
virtual ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex) {
virtual ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues,
uint16_t startAtIndex) {
if (domainId != monitorId) {
return INVALID_DOMAIN_ID;
}
switch (parameterId) {
switch (uniqueId) {
case 0:
parameterWrapper->set(this->confirmationLimit);
break;

View File

@ -71,13 +71,13 @@ public:
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex) {
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues,
uint16_t startAtIndex) {
if (domainId != this->domainId) {
return INVALID_DOMAIN_ID;
}
switch (parameterId) {
switch (uniqueId) {
case 0:
parameterWrapper->set(limit);
break;

View File

@ -52,9 +52,8 @@ public:
return id;
}
static uint32_t getFullParameterId(uint8_t domainId,
uint8_t uniqueIdentifier, uint16_t linearIndex) {
return (domainId << 24) + (uniqueIdentifier << 16) + linearIndex;
static uint32_t getFullParameterId(uint8_t domainId, uint8_t uniqueId, uint16_t linearIndex) {
return (domainId << 24) + (uniqueId << 16) + linearIndex;
}
virtual ~HasParametersIF() {}
@ -74,9 +73,9 @@ public:
* matrix indexes.
* @return
*/
virtual ReturnValue_t getParameter(uint8_t domainId,
uint8_t uniqueIdentifier, ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex) = 0;
virtual ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueIdentifier,
ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues,
uint16_t startAtIndex) = 0;
};
#endif /* FSFW_PARAMETERS_HASPARAMETERSIF_H_ */

View File

@ -210,15 +210,15 @@ void Fuse::setDataPoolEntriesInvalid() {
set.commit();
}
ReturnValue_t Fuse::getParameter(uint8_t domainId, uint16_t parameterId,
ReturnValue_t Fuse::getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues,
uint16_t startAtIndex) {
ReturnValue_t result = currentLimit.getParameter(domainId, parameterId,
ReturnValue_t result = currentLimit.getParameter(domainId, uniqueId,
parameterWrapper, newValues, startAtIndex);
if (result != INVALID_DOMAIN_ID) {
return result;
}
result = powerMonitor.getParameter(domainId, parameterId, parameterWrapper,
result = powerMonitor.getParameter(domainId, uniqueId, parameterWrapper,
newValues, startAtIndex);
return result;
}

View File

@ -62,9 +62,9 @@ public:
ReturnValue_t setHealth(HealthState health);
HasHealthIF::HealthState getHealth();
ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex);
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues,
uint16_t startAtIndex);
private:
uint8_t oldFuseState;

View File

@ -61,13 +61,13 @@ ReturnValue_t PowerComponent::deSerialize(const uint8_t** buffer, size_t* size,
return SerializeAdapter::deSerialize(&max, buffer, size, streamEndianness);
}
ReturnValue_t PowerComponent::getParameter(uint8_t domainId,
uint16_t parameterId, ParameterWrapper* parameterWrapper,
const ParameterWrapper* newValues, uint16_t startAtIndex) {
ReturnValue_t PowerComponent::getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues,
uint16_t startAtIndex) {
if (domainId != moduleId) {
return INVALID_DOMAIN_ID;
}
switch (parameterId) {
switch (uniqueId) {
case 0:
parameterWrapper->set<>(min);
break;

View File

@ -31,9 +31,9 @@ public:
ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size,
Endianness streamEndianness) override;
ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex);
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper, const ParameterWrapper *newValues,
uint16_t startAtIndex);
private:
const object_id_t deviceObjectId = objects::NO_OBJECT;
const uint8_t switchId1;

View File

@ -119,15 +119,15 @@ HasHealthIF::HealthState PowerSensor::getHealth() {
return healthHelper.getHealth();
}
ReturnValue_t PowerSensor::getParameter(uint8_t domainId, uint16_t parameterId,
ReturnValue_t PowerSensor::getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues,
uint16_t startAtIndex) {
ReturnValue_t result = currentLimit.getParameter(domainId, parameterId,
ReturnValue_t result = currentLimit.getParameter(domainId, uniqueId,
parameterWrapper, newValues, startAtIndex);
if (result != INVALID_DOMAIN_ID) {
return result;
}
result = voltageLimit.getParameter(domainId, parameterId, parameterWrapper,
result = voltageLimit.getParameter(domainId, uniqueId, parameterWrapper,
newValues, startAtIndex);
return result;
}

View File

@ -48,7 +48,7 @@ public:
float getPower();
ReturnValue_t setHealth(HealthState health);
HasHealthIF::HealthState getHealth();
ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex);
private:

View File

@ -290,13 +290,13 @@ void Heater::handleQueue() {
}
}
ReturnValue_t Heater::getParameter(uint8_t domainId, uint16_t parameterId,
ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues,
ReturnValue_t Heater::getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper* parameterWrapper, const ParameterWrapper* newValues,
uint16_t startAtIndex) {
if (domainId != DOMAIN_ID_BASE) {
return INVALID_DOMAIN_ID;
}
switch (parameterId) {
switch (uniqueId) {
case 0:
parameterWrapper->set(heaterOnCountdown.timeout);
break;

View File

@ -34,8 +34,8 @@ public:
MessageQueueId_t getCommandQueue() const;
ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
ParameterWrapper *parameterWrapper,
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex);
protected:

View File

@ -183,10 +183,10 @@ public:
static const uint8_t DOMAIN_ID_SENSOR = 1;
virtual ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
virtual ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex) {
ReturnValue_t result = sensorMonitor.getParameter(domainId, parameterId,
ReturnValue_t result = sensorMonitor.getParameter(domainId, uniqueId,
parameterWrapper, newValues, startAtIndex);
if (result != INVALID_DOMAIN_ID) {
return result;
@ -194,7 +194,7 @@ public:
if (domainId != this->DOMAIN_ID_BASE) {
return INVALID_DOMAIN_ID;
}
switch (parameterId) {
switch (uniqueId) {
case ADDRESS_A:
parameterWrapper->set(parameters.a);
break;

View File

@ -148,14 +148,14 @@ ThermalComponentIF::State ThermalComponent::getIgnoredState(int8_t state) {
}
ReturnValue_t ThermalComponent::getParameter(uint8_t domainId,
uint16_t parameterId, ParameterWrapper* parameterWrapper,
uint8_t uniqueId, ParameterWrapper* parameterWrapper,
const ParameterWrapper* newValues, uint16_t startAtIndex) {
ReturnValue_t result = ThermalComponentCore::getParameter(domainId, parameterId,
ReturnValue_t result = ThermalComponentCore::getParameter(domainId, uniqueId,
parameterWrapper, newValues, startAtIndex);
if (result != INVALID_IDENTIFIER_ID) {
return result;
}
switch (parameterId) {
switch (uniqueId) {
case 12:
parameterWrapper->set(nopParameters.lowerNopLimit);
break;

View File

@ -58,7 +58,7 @@ public:
virtual ReturnValue_t setLimits( const uint8_t* data, size_t size);
virtual ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
virtual ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex);

View File

@ -247,17 +247,17 @@ ThermalComponentCore::Parameters ThermalComponentCore::getParameters() {
}
ReturnValue_t ThermalComponentCore::getParameter(uint8_t domainId,
uint16_t parameterId, ParameterWrapper* parameterWrapper,
uint8_t uniqueId, ParameterWrapper* parameterWrapper,
const ParameterWrapper* newValues, uint16_t startAtIndex) {
ReturnValue_t result = temperatureMonitor.getParameter(domainId,
parameterId, parameterWrapper, newValues, startAtIndex);
uniqueId, parameterWrapper, newValues, startAtIndex);
if (result != INVALID_DOMAIN_ID) {
return result;
}
if (domainId != this->domainId) {
return INVALID_DOMAIN_ID;
}
switch (parameterId) {
switch (uniqueId) {
case 0:
parameterWrapper->set(parameters.heaterOn);
break;

View File

@ -68,7 +68,7 @@ public:
virtual void setOutputInvalid();
virtual ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
virtual ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex);