initialize switch state list

This commit is contained in:
Robin Müller 2023-04-03 14:31:45 +02:00
parent 4f632e2c68
commit e2e87b149d
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -6,7 +6,11 @@ DummyPowerSwitcher::DummyPowerSwitcher(object_id_t objectId, size_t numberOfSwit
: SystemObject(objectId, registerGlobally), : SystemObject(objectId, registerGlobally),
switcherList(numberOfSwitches), switcherList(numberOfSwitches),
fuseList(numberOfFuses), fuseList(numberOfFuses),
switchDelayMs(switchDelayMs) {} switchDelayMs(switchDelayMs) {
for(auto &switchState: switcherList) {
switchState = PowerSwitchIF::SWITCH_UNKNOWN;
}
}
void DummyPowerSwitcher::setInitialSwitcherList(std::vector<ReturnValue_t> switcherList) { void DummyPowerSwitcher::setInitialSwitcherList(std::vector<ReturnValue_t> switcherList) {
this->switcherList = switcherList; this->switcherList = switcherList;