continue ploc supv

This commit is contained in:
Robin Müller 2023-11-13 11:39:13 +01:00
parent 42cc9c0fa8
commit 53a743f19f
Signed by: muellerr
GPG Key ID: A649FB78196E3849
2 changed files with 9 additions and 10 deletions

View File

@ -11,12 +11,15 @@ FreshSupvHandler::FreshSupvHandler(DhbConfig cfg, CookieIF *comCookie, Gpio uart
PowerSwitchIF &switchIF, power::Switch_t powerSwitch,
PlocSupvUartManager &supvHelper)
: FreshDeviceHandlerBase(cfg),
uartManager(supvHelper),
comCookie(comCookie),
switchIF(switchIF),
switchId(powerSwitch),
hkSet(this),
bootStatusReport(this),
latchupStatusReport(this),
countersReport(this),
adcReport(this),
uartManager(supvHelper) {}
adcReport(this) {}
void FreshSupvHandler::performDeviceOperation(uint8_t opCode) {
if (!transitionActive and mode == MODE_OFF) {
@ -26,7 +29,7 @@ void FreshSupvHandler::performDeviceOperation(uint8_t opCode) {
if (opCode == OpCode::DEFAULT_OPERATION) {
if (transitionActive) {
// TODO: Perform transition handling: OFF to ON and ON to OFF.
// For OFF to ON, command power switch first, then to isolato switch handling, and lastly
// For OFF to ON, command power switch first, then to isolator switch handling, and lastly
// ensure succesfull communication
// For ON to OFF ????
} else {
@ -128,11 +131,6 @@ ReturnValue_t FreshSupvHandler::initializeLocalDataPool(localpool::DataPool &loc
return returnvalue::OK;
}
ReturnValue_t FreshSupvHandler::setHealth(HealthState health) {
// TODO: Go to off is the device is commanded faulty.
return returnvalue::OK;
}
ReturnValue_t FreshSupvHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t *data, size_t size) {
// TODO: Handle all commands here. Need to add them to some command map. Send command immediately

View File

@ -30,8 +30,6 @@ class FreshSupvHandler : public FreshDeviceHandlerBase {
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
private:
ReturnValue_t setHealth(HealthState health) override;
// HK manager abstract functions.
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
@ -46,6 +44,9 @@ class FreshSupvHandler : public FreshDeviceHandlerBase {
private:
PlocSupvUartManager uartManager;
CookieIF* comCookie;
PowerSwitchIF& switchIF;
power::Switch_t switchId;
supv::HkSet hkSet;
supv::BootStatusReport bootStatusReport;