set health overrides
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2023-04-04 14:45:09 +02:00
parent bc7bdfe1fe
commit 01081cbb29
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814
5 changed files with 26 additions and 0 deletions

View File

@ -16,6 +16,12 @@ will consitute of a breaking change warranting a new major release:
# [unreleased]
## Changed
- PCDU components only allow setting `NEEDS_RECOVERY`, `HEALTHY` and `EXTERNAL_CONTROL` health
states now. TMP sensor components only allow `HEALTHY` , `EXTERNAL_CONTROL`, `FAULTY` and
`PERMANENT_FAULTY`.
# [v1.43.0] 2023-04-04
- q7s-package: v2.4.0

View File

@ -642,3 +642,11 @@ ReturnValue_t GomspaceDeviceHandler::parsePduHkTable(PDU::PduCoreHk& coreHk, PDU
}
return returnvalue::OK;
}
ReturnValue_t GomspaceDeviceHandler::setHealth(HealthState health) {
if(health != HealthState::HEALTHY and health != HealthState::EXTERNAL_CONTROL and
health != HealthState::NEEDS_RECOVERY) {
return returnvalue::FAILED;
}
return returnvalue::OK;
}

View File

@ -80,6 +80,9 @@ class GomspaceDeviceHandler : public DeviceHandlerBase {
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override;
void setNormalDatapoolEntriesInvalid() override;
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t setHealth(HealthState health) override;
/**
* @brief The command to generate a request to receive the full housekeeping table is device
* specific. Thus the child has to build this command.

View File

@ -132,3 +132,11 @@ ReturnValue_t Tmp1075Handler::initializeLocalDataPool(localpool::DataPool &local
}
void Tmp1075Handler::setModeNormal() { setMode(_MODE_TO_NORMAL); }
ReturnValue_t Tmp1075Handler::setHealth(HealthState health) {
if(health != FAULTY and health != PERMANENT_FAULTY and health != HEALTHY and
health != EXTERNAL_CONTROL) {
return returnvalue::FAILED;
}
return returnvalue::OK;
}

View File

@ -37,6 +37,7 @@ class Tmp1075Handler : public DeviceHandlerBase {
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) override;
ReturnValue_t setHealth(HealthState health) override;
private:
/**