continue ploc supv
This commit is contained in:
parent
42cc9c0fa8
commit
53a743f19f
@ -11,12 +11,15 @@ FreshSupvHandler::FreshSupvHandler(DhbConfig cfg, CookieIF *comCookie, Gpio uart
|
|||||||
PowerSwitchIF &switchIF, power::Switch_t powerSwitch,
|
PowerSwitchIF &switchIF, power::Switch_t powerSwitch,
|
||||||
PlocSupvUartManager &supvHelper)
|
PlocSupvUartManager &supvHelper)
|
||||||
: FreshDeviceHandlerBase(cfg),
|
: FreshDeviceHandlerBase(cfg),
|
||||||
|
uartManager(supvHelper),
|
||||||
|
comCookie(comCookie),
|
||||||
|
switchIF(switchIF),
|
||||||
|
switchId(powerSwitch),
|
||||||
hkSet(this),
|
hkSet(this),
|
||||||
bootStatusReport(this),
|
bootStatusReport(this),
|
||||||
latchupStatusReport(this),
|
latchupStatusReport(this),
|
||||||
countersReport(this),
|
countersReport(this),
|
||||||
adcReport(this),
|
adcReport(this) {}
|
||||||
uartManager(supvHelper) {}
|
|
||||||
|
|
||||||
void FreshSupvHandler::performDeviceOperation(uint8_t opCode) {
|
void FreshSupvHandler::performDeviceOperation(uint8_t opCode) {
|
||||||
if (!transitionActive and mode == MODE_OFF) {
|
if (!transitionActive and mode == MODE_OFF) {
|
||||||
@ -26,7 +29,7 @@ void FreshSupvHandler::performDeviceOperation(uint8_t opCode) {
|
|||||||
if (opCode == OpCode::DEFAULT_OPERATION) {
|
if (opCode == OpCode::DEFAULT_OPERATION) {
|
||||||
if (transitionActive) {
|
if (transitionActive) {
|
||||||
// TODO: Perform transition handling: OFF to ON and ON to OFF.
|
// 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
|
// ensure succesfull communication
|
||||||
// For ON to OFF ????
|
// For ON to OFF ????
|
||||||
} else {
|
} else {
|
||||||
@ -128,11 +131,6 @@ ReturnValue_t FreshSupvHandler::initializeLocalDataPool(localpool::DataPool &loc
|
|||||||
return returnvalue::OK;
|
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,
|
ReturnValue_t FreshSupvHandler::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
|
||||||
const uint8_t *data, size_t size) {
|
const uint8_t *data, size_t size) {
|
||||||
// TODO: Handle all commands here. Need to add them to some command map. Send command immediately
|
// TODO: Handle all commands here. Need to add them to some command map. Send command immediately
|
||||||
|
@ -30,8 +30,6 @@ class FreshSupvHandler : public FreshDeviceHandlerBase {
|
|||||||
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
|
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ReturnValue_t setHealth(HealthState health) override;
|
|
||||||
|
|
||||||
// HK manager abstract functions.
|
// HK manager abstract functions.
|
||||||
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
||||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
@ -46,6 +44,9 @@ class FreshSupvHandler : public FreshDeviceHandlerBase {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
PlocSupvUartManager uartManager;
|
PlocSupvUartManager uartManager;
|
||||||
|
CookieIF* comCookie;
|
||||||
|
PowerSwitchIF& switchIF;
|
||||||
|
power::Switch_t switchId;
|
||||||
|
|
||||||
supv::HkSet hkSet;
|
supv::HkSet hkSet;
|
||||||
supv::BootStatusReport bootStatusReport;
|
supv::BootStatusReport bootStatusReport;
|
||||||
|
Loading…
Reference in New Issue
Block a user