2022-06-16 08:26:40 +02:00
|
|
|
#include "BpxDummy.h"
|
2022-06-17 08:31:36 +02:00
|
|
|
|
2022-06-16 08:26:40 +02:00
|
|
|
#include <mission/devices/devicedefinitions/BpxBatteryDefinitions.h>
|
|
|
|
|
|
|
|
BpxDummy::BpxDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
|
|
|
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
|
|
|
|
|
|
|
BpxDummy::~BpxDummy() {}
|
|
|
|
|
|
|
|
void BpxDummy::doStartUp() {}
|
|
|
|
|
|
|
|
void BpxDummy::doShutDown() {}
|
|
|
|
|
2022-06-17 08:31:36 +02:00
|
|
|
ReturnValue_t BpxDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
|
2022-06-16 08:26:40 +02:00
|
|
|
|
|
|
|
ReturnValue_t BpxDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
|
|
|
return NOTHING_TO_SEND;
|
|
|
|
}
|
|
|
|
|
|
|
|
ReturnValue_t BpxDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
2022-06-17 08:31:36 +02:00
|
|
|
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
|
|
|
}
|
|
|
|
|
2022-06-17 08:31:36 +02:00
|
|
|
ReturnValue_t BpxDummy::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 BpxDummy::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
|
|
|
}
|
|
|
|
|
2022-06-17 08:31:36 +02:00
|
|
|
void BpxDummy::fillCommandAndReplyMap() {}
|
2022-06-16 08:26:40 +02:00
|
|
|
|
|
|
|
uint32_t BpxDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
|
|
|
|
|
2022-06-17 08:31:36 +02:00
|
|
|
ReturnValue_t BpxDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
|
|
|
LocalDataPoolManager &poolManager) {
|
2022-06-16 08:26:40 +02:00
|
|
|
localDataPoolMap.emplace(BpxBattery::BATT_TEMP_1, &battTemp1);
|
|
|
|
localDataPoolMap.emplace(BpxBattery::BATT_TEMP_2, &battTemp2);
|
|
|
|
localDataPoolMap.emplace(BpxBattery::BATT_TEMP_3, &battTemp3);
|
|
|
|
localDataPoolMap.emplace(BpxBattery::BATT_TEMP_4, &battTemp4);
|
|
|
|
localDataPoolMap.emplace(BpxBattery::CHARGE_CURRENT, &chargeCurrent);
|
|
|
|
localDataPoolMap.emplace(BpxBattery::DISCHARGE_CURRENT, &dischargeCurrent);
|
|
|
|
localDataPoolMap.emplace(BpxBattery::HEATER_CURRENT, &heaterCurrent);
|
|
|
|
localDataPoolMap.emplace(BpxBattery::BATT_VOLTAGE, &battVolt);
|
|
|
|
localDataPoolMap.emplace(BpxBattery::REBOOT_COUNTER, &rebootCounter);
|
|
|
|
localDataPoolMap.emplace(BpxBattery::BOOTCAUSE, &bootCause);
|
|
|
|
|
|
|
|
localDataPoolMap.emplace(BpxBattery::BATTERY_HEATER_MODE, &battheatMode);
|
|
|
|
localDataPoolMap.emplace(BpxBattery::BATTHEAT_LOW_LIMIT, &battheatLow);
|
|
|
|
localDataPoolMap.emplace(BpxBattery::BATTHEAT_HIGH_LIMIT, &battheatHigh);
|
2022-08-24 17:27:47 +02:00
|
|
|
return returnvalue::OK;
|
2022-06-16 08:26:40 +02:00
|
|
|
}
|