eive-obsw/dummies/GpsDhbDummy.cpp

59 lines
2.5 KiB
C++
Raw Permalink Normal View History

2023-02-13 13:53:13 +01:00
#include <dummies/GpsDhbDummy.h>
2024-03-18 17:21:08 +01:00
#include <linux/acs/GPSDefinitions.h>
2022-10-12 15:04:19 +02:00
2023-02-13 13:53:13 +01:00
GpsDhbDummy::GpsDhbDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
2022-10-12 15:04:19 +02:00
: DeviceHandlerBase(objectId, comif, comCookie) {}
2023-02-13 13:53:13 +01:00
GpsDhbDummy::~GpsDhbDummy() {}
2022-10-12 15:04:19 +02:00
2023-02-13 13:53:13 +01:00
void GpsDhbDummy::doStartUp() {}
2022-10-12 15:04:19 +02:00
2023-02-13 13:53:13 +01:00
void GpsDhbDummy::doShutDown() {}
2022-10-12 15:04:19 +02:00
2023-02-13 15:59:44 +01:00
ReturnValue_t GpsDhbDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
return NOTHING_TO_SEND;
}
2022-10-12 15:04:19 +02:00
2023-02-13 13:53:13 +01:00
ReturnValue_t GpsDhbDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
2022-10-12 15:04:19 +02:00
return NOTHING_TO_SEND;
}
2023-02-13 13:53:13 +01:00
ReturnValue_t GpsDhbDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
2023-02-13 15:59:44 +01:00
const uint8_t *commandData,
size_t commandDataLen) {
2022-10-12 15:04:19 +02:00
return returnvalue::OK;
}
2023-02-13 15:59:44 +01:00
ReturnValue_t GpsDhbDummy::scanForReply(const uint8_t *start, size_t len,
DeviceCommandId_t *foundId, size_t *foundLen) {
2022-10-12 15:04:19 +02:00
return returnvalue::OK;
}
2023-02-13 13:53:13 +01:00
ReturnValue_t GpsDhbDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
2022-10-12 15:04:19 +02:00
return returnvalue::OK;
}
2023-02-13 13:53:13 +01:00
void GpsDhbDummy::fillCommandAndReplyMap() {}
2022-10-12 15:04:19 +02:00
2023-02-13 13:53:13 +01:00
uint32_t GpsDhbDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
2022-10-12 15:04:19 +02:00
2023-02-13 13:53:13 +01:00
ReturnValue_t GpsDhbDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
2023-02-13 15:59:44 +01:00
LocalDataPoolManager &poolManager) {
2022-11-10 16:31:59 +01:00
localDataPoolMap.emplace(GpsHyperion::LATITUDE, new PoolEntry<double>({0.0}, 1));
localDataPoolMap.emplace(GpsHyperion::LONGITUDE, new PoolEntry<double>({0.0}, 1));
2022-10-12 15:04:19 +02:00
localDataPoolMap.emplace(GpsHyperion::ALTITUDE, new PoolEntry<double>({0.0}));
localDataPoolMap.emplace(GpsHyperion::SPEED, new PoolEntry<double>({7684.2}));
localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(GpsHyperion::SATS_IN_USE, new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(GpsHyperion::SATS_IN_VIEW, new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(GpsHyperion::YEAR, new PoolEntry<uint16_t>({0}));
localDataPoolMap.emplace(GpsHyperion::MONTH, new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(GpsHyperion::DAY, new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(GpsHyperion::HOURS, new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(GpsHyperion::MINUTES, new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(GpsHyperion::SECONDS, new PoolEntry<uint8_t>({0}));
localDataPoolMap.emplace(GpsHyperion::UNIX_SECONDS, new PoolEntry<uint32_t>({0}));
return returnvalue::OK;
}