46 lines
1.7 KiB
C++
46 lines
1.7 KiB
C++
#include "PduDummy.h"
|
|
|
|
#include <mission/power/gsDefs.h>
|
|
|
|
PduDummy::PduDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
|
: DeviceHandlerBase(objectId, comif, comCookie),
|
|
coreHk(this, static_cast<uint32_t>(P60System::SetIds::CORE)) {}
|
|
|
|
PduDummy::~PduDummy() {}
|
|
|
|
void PduDummy::doStartUp() { setMode(MODE_NORMAL); }
|
|
|
|
void PduDummy::doShutDown() { setMode(MODE_OFF); }
|
|
|
|
ReturnValue_t PduDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
|
|
|
|
ReturnValue_t PduDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
|
return NOTHING_TO_SEND;
|
|
}
|
|
|
|
ReturnValue_t PduDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
|
const uint8_t *commandData, size_t commandDataLen) {
|
|
return returnvalue::OK;
|
|
}
|
|
|
|
ReturnValue_t PduDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
|
size_t *foundLen) {
|
|
return returnvalue::OK;
|
|
}
|
|
|
|
ReturnValue_t PduDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
|
return returnvalue::OK;
|
|
}
|
|
|
|
void PduDummy::fillCommandAndReplyMap() {}
|
|
|
|
uint32_t PduDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
|
|
|
|
ReturnValue_t PduDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
|
LocalDataPoolManager &poolManager) {
|
|
localDataPoolMap.emplace(PDU::pool::PDU_TEMPERATURE, new PoolEntry<float>({10.0}, true));
|
|
localDataPoolMap.emplace(PDU::pool::PDU_VOLTAGES, &pduVoltages);
|
|
localDataPoolMap.emplace(PDU::pool::PDU_CURRENTS, &pduCurrents);
|
|
return returnvalue::OK;
|
|
}
|