added gyro handler stub

This commit is contained in:
Robin Müller 2020-12-22 00:30:50 +01:00 committed by Robin Mueller
parent 71853fe1aa
commit 1ed82f6a4b
3 changed files with 101 additions and 3 deletions

View File

@ -0,0 +1,57 @@
#include "GyroHandler.h"
GyroHandler::GyroHandler(object_id_t objectId, object_id_t deviceCommunication,
CookieIF *comCookie):
DeviceHandlerBase(objectId, deviceCommunication, comCookie) {
}
GyroHandler::~GyroHandler() {}
void GyroHandler::doStartUp() {
}
void GyroHandler::doShutDown() {
}
ReturnValue_t GyroHandler::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t GyroHandler::buildNormalDeviceCommand(DeviceCommandId_t *id) {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t GyroHandler::buildCommandFromCommand(
DeviceCommandId_t deviceCommand, const uint8_t *commandData,
size_t commandDataLen) {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t GyroHandler::scanForReply(const uint8_t *start, size_t len,
DeviceCommandId_t *foundId, size_t *foundLen) {
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t GyroHandler::interpretDeviceReply(DeviceCommandId_t id,
const uint8_t *packet) {
return HasReturnvaluesIF::RETURN_OK;
}
uint32_t GyroHandler::getTransitionDelayMs(Mode_t from, Mode_t to) {
return 5000;
}
ReturnValue_t GyroHandler::initializeLocalDataPool(
LocalDataPool &localDataPoolMap, LocalDataPoolManager &poolManager) {
return HasReturnvaluesIF::RETURN_OK;
}
void GyroHandler::fillCommandAndReplyMap() {
}
void GyroHandler::modeChanged() {
}

View File

@ -0,0 +1,41 @@
#ifndef MISSION_DEVICES_GYROHANDLER_H_
#define MISSION_DEVICES_GYROHANDLER_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
class GyroHandler: public DeviceHandlerBase {
public:
GyroHandler(object_id_t objectId, object_id_t deviceCommunication,
CookieIF* comCookie);
virtual ~GyroHandler();
protected:
/* DeviceHandlerBase overrides */
ReturnValue_t buildTransitionDeviceCommand(
DeviceCommandId_t *id) override;
void doStartUp() override;
void doShutDown() override;
ReturnValue_t buildNormalDeviceCommand(
DeviceCommandId_t *id) override;
ReturnValue_t buildCommandFromCommand(
DeviceCommandId_t deviceCommand, const uint8_t *commandData,
size_t commandDataLen) override;
ReturnValue_t scanForReply(const uint8_t *start, size_t len,
DeviceCommandId_t *foundId, size_t *foundLen) override;
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id,
const uint8_t *packet) override;
void fillCommandAndReplyMap() override;
void modeChanged() override;
uint32_t getTransitionDelayMs(Mode_t from, Mode_t to) override;
ReturnValue_t initializeLocalDataPool(LocalDataPool &localDataPoolMap,
LocalDataPoolManager &poolManager) override;
private:
};
#endif /* MISSION_DEVICES_GYROHANDLER_H_ */

View File

@ -290,11 +290,11 @@ void MGMHandlerRM3100::modeChanged(void) {
ReturnValue_t MGMHandlerRM3100::initializeLocalDataPool(
LocalDataPool &localDataPoolMap, LocalDataPoolManager &poolManager) {
localDataPoolMap.emplace(RM3100::FIELD_STRENGTH_X,
new PoolEntry<float>(0.0));
new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(RM3100::FIELD_STRENGTH_Y,
new PoolEntry<float>(0.0));
new PoolEntry<float>({0.0}));
localDataPoolMap.emplace(RM3100::FIELD_STRENGTH_Z,
new PoolEntry<float>(0.0));
new PoolEntry<float>({0.0}));
return HasReturnvaluesIF::RETURN_OK;
}