2022-06-16 08:26:40 +02:00
|
|
|
#include "PduDummy.h"
|
|
|
|
|
|
|
|
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
|
|
|
|
|
|
|
PduDummy::PduDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
2023-02-21 21:37:30 +01:00
|
|
|
: DeviceHandlerBase(objectId, comif, comCookie),
|
|
|
|
coreHk(this, static_cast<uint32_t>(P60System::SetIds::CORE)) {}
|
2022-06-16 08:26:40 +02:00
|
|
|
|
|
|
|
PduDummy::~PduDummy() {}
|
|
|
|
|
|
|
|
void PduDummy::doStartUp() {}
|
|
|
|
|
|
|
|
void PduDummy::doShutDown() {}
|
|
|
|
|
|
|
|
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) {
|
2022-08-24 17:27:47 +02:00
|
|
|
return returnvalue::OK;
|
2022-06-16 08:26:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ReturnValue_t PduDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
|
|
|
size_t *foundLen) {
|
2022-08-24 17:27:47 +02:00
|
|
|
return returnvalue::OK;
|
2022-06-16 08:26:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ReturnValue_t PduDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
2022-08-24 17:27:47 +02:00
|
|
|
return returnvalue::OK;
|
2022-06-16 08:26:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void PduDummy::fillCommandAndReplyMap() {}
|
|
|
|
|
|
|
|
uint32_t PduDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
|
|
|
|
|
|
|
|
ReturnValue_t PduDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
|
|
|
LocalDataPoolManager &poolManager) {
|
2022-08-27 01:02:08 +02:00
|
|
|
localDataPoolMap.emplace(PDU::pool::PDU_TEMPERATURE, new PoolEntry<float>({0}));
|
2023-02-21 21:37:30 +01:00
|
|
|
localDataPoolMap.emplace(PDU::pool::PDU_VOLTAGES, &pduVoltages);
|
|
|
|
localDataPoolMap.emplace(PDU::pool::PDU_CURRENTS, &pduCurrents);
|
2022-08-24 17:27:47 +02:00
|
|
|
return returnvalue::OK;
|
2022-06-16 08:26:40 +02:00
|
|
|
}
|