eive-obsw/dummies/PcduHandlerDummy.cpp

63 lines
2.2 KiB
C++
Raw Normal View History

2023-03-14 11:21:37 +01:00
#include "PcduHandlerDummy.h"
2023-03-26 16:13:54 +02:00
#include <mission/power/gsDefs.h>
2023-03-14 11:21:37 +01:00
PcduHandlerDummy::PcduHandlerDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie), dummySwitcher(objectId, 18, 18, false) {}
PcduHandlerDummy::~PcduHandlerDummy() {}
void PcduHandlerDummy::doStartUp() { setMode(MODE_NORMAL); }
void PcduHandlerDummy::doShutDown() { setMode(MODE_OFF); }
ReturnValue_t PcduHandlerDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t PcduHandlerDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
ReturnValue_t PcduHandlerDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData,
size_t commandDataLen) {
return returnvalue::OK;
}
ReturnValue_t PcduHandlerDummy::scanForReply(const uint8_t *start, size_t len,
DeviceCommandId_t *foundId, size_t *foundLen) {
return returnvalue::OK;
}
ReturnValue_t PcduHandlerDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
return returnvalue::OK;
}
void PcduHandlerDummy::fillCommandAndReplyMap() {}
uint32_t PcduHandlerDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
ReturnValue_t PcduHandlerDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) {
return returnvalue::OK;
}
ReturnValue_t PcduHandlerDummy::sendSwitchCommand(power::Switch_t switchNr, ReturnValue_t onOff) {
return dummySwitcher.sendSwitchCommand(switchNr, onOff);
}
ReturnValue_t PcduHandlerDummy::sendFuseOnCommand(uint8_t fuseNr) {
return dummySwitcher.sendFuseOnCommand(fuseNr);
}
ReturnValue_t PcduHandlerDummy::getSwitchState(power::Switch_t switchNr) const {
return dummySwitcher.getSwitchState(switchNr);
}
ReturnValue_t PcduHandlerDummy::getFuseState(uint8_t fuseNr) const {
return dummySwitcher.getFuseState(fuseNr);
}
uint32_t PcduHandlerDummy::getSwitchDelayMs(void) const { return dummySwitcher.getSwitchDelayMs(); }