mgm handlers continued

This commit is contained in:
Robin Müller 2020-09-30 22:14:44 +02:00 committed by Robin.Mueller
parent 862f029448
commit 436275c61d
5 changed files with 86 additions and 120 deletions

View File

@ -1,5 +1,5 @@
#ifndef MISSION_DEVICEHANDLING_MGMLIS3MDLHANDLER_H_
#define MISSION_DEVICEHANDLING_MGMLIS3MDLHANDLER_H_
#ifndef MISSION_DEVICES_MGMLIS3MDLHANDLER_H_
#define MISSION_DEVICES_MGMLIS3MDLHANDLER_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <subsystemIdRanges.h>
@ -246,4 +246,4 @@ private:
};
#endif /* MISSION_DEVICEHANDLING_MGMLIS3MDLHANDLER_H_ */
#endif /* MISSION_DEVICES_MGMLIS3MDLHANDLER_H_ */

View File

@ -0,0 +1,45 @@
#include "MGMHandlerRM3100.h"
#include <fsfw/devicehandlers/DeviceHandlerMessage.h>
#include <fsfw/objectmanager/SystemObjectIF.h>
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
MGMHandlerRM3100::MGMHandlerRM3100(object_id_t objectId,
object_id_t deviceCommunication, CookieIF* comCookie):
DeviceHandlerBase(objectId, deviceCommunication, comCookie) {
}
MGMHandlerRM3100::~MGMHandlerRM3100() {}
ReturnValue_t MGMHandlerRM3100::buildTransitionDeviceCommand(
DeviceCommandId_t *id) {
return RETURN_OK;
}
void MGMHandlerRM3100::doStartUp() {
}
void MGMHandlerRM3100::doShutDown() {
}
ReturnValue_t MGMHandlerRM3100::buildNormalDeviceCommand(
DeviceCommandId_t *id) {
return RETURN_OK;
}
ReturnValue_t MGMHandlerRM3100::buildCommandFromCommand(
DeviceCommandId_t deviceCommand, const uint8_t *commandData,
size_t commandDataLen) {
return RETURN_OK;
}
ReturnValue_t MGMHandlerRM3100::scanForReply(const uint8_t *start,
size_t len, DeviceCommandId_t *foundId,
size_t *foundLen) {
return RETURN_OK;
}
ReturnValue_t MGMHandlerRM3100::interpretDeviceReply(
DeviceCommandId_t id, const uint8_t *packet) {
return RETURN_OK;
}

View File

@ -0,0 +1,38 @@
#ifndef MISSION_DEVICES_MGMRM3100HANDLER_H_
#define MISSION_DEVICES_MGMRM3100HANDLER_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
class MGMHandlerRM3100: public DeviceHandlerBase {
public:
MGMHandlerRM3100(object_id_t objectId, object_id_t deviceCommunication,
CookieIF* comCookie);
virtual ~MGMHandlerRM3100();
protected:
/* DeviceHandlerBase overrides */
virtual ReturnValue_t buildTransitionDeviceCommand(
DeviceCommandId_t *id) override;
virtual void doStartUp() override;
virtual void doShutDown() override;
virtual ReturnValue_t buildNormalDeviceCommand(
DeviceCommandId_t *id) override;
virtual ReturnValue_t buildCommandFromCommand(
DeviceCommandId_t deviceCommand, const uint8_t *commandData,
size_t commandDataLen) override;
virtual ReturnValue_t scanForReply(const uint8_t *start, size_t len,
DeviceCommandId_t *foundId, size_t *foundLen) override;
virtual ReturnValue_t interpretDeviceReply(DeviceCommandId_t id,
const uint8_t *packet) override;
private:
enum InternalState {
STATE_NONE, STATE_FIRST_CONTACT, STATE_SETUP, STATE_CHECK_REGISTERS
};
InternalState internalState = InternalState::STATE_NONE;
};
#endif /* MISSION_DEVICEHANDLING_MGMRM3100HANDLER_H_ */

View File

@ -1,55 +0,0 @@
///*
// * MGMRM3100Handler.cpp
// *
// * Created on: 28.05.2020
// * Author: lukas
// */
//
//#include <bits/stdint-uintn.h>
//#include <framework/devicehandlers/DeviceHandlerMessage.h>
//#include <framework/objectmanager/SystemObjectIF.h>
//#include <framework/returnvalues/HasReturnvaluesIF.h>
//#include <mission/devicehandling/MGMRM3100Handler.h>
//#include <stddef.h>
//
//MGMRM3100Handler::MGMRM3100Handler(DeviceCommunicationIF *commInterface, object_id_t setOjectId,
// uint32_t address, uint32_t maxReplyLen, datapool::opus_variable_id mgmMeasurement, datapool::opus_variable_id mgmTemperature)
// :NotDeviceHandlerBase(commInterface, setOjectId , address, maxReplyLen),internalState(STATE_NONE),
// mgmMagneticPoolId(mgmMeasurement),mgmTempPoolId(mgmTemperature){
//}
//
//MGMRM3100Handler::~MGMRM3100Handler() {
//}
//
//ReturnValue_t MGMRM3100Handler::buildTransitionDeviceCommand(
// DeviceCommandId_t *id) {
// return RETURN_OK;
//}
//
//void MGMRM3100Handler::doStartUp() {
//}
//
//void MGMRM3100Handler::doShutDown() {
//}
//
//ReturnValue_t MGMRM3100Handler::buildNormalDeviceCommand(
// DeviceCommandId_t *id) {
// return RETURN_OK;
//}
//
//ReturnValue_t MGMRM3100Handler::buildCommandFromCommand(
// DeviceCommandId_t deviceCommand, const uint8_t *commandData,
// size_t commandDataLen) {
// return RETURN_OK;
//}
//
//ReturnValue_t MGMRM3100Handler::scanForReply(
// const uint8_t *start, uint32_t len, DeviceCommandId_t *foundId,
// uint32_t *foundLen) {
// return RETURN_OK;
//}
//
//ReturnValue_t MGMRM3100Handler::interpretDeviceReply(
// DeviceCommandId_t id, const uint8_t *packet) {
// return RETURN_OK;
//}

View File

@ -1,62 +0,0 @@
///*
// * MGMRM3100Handler.h
// *
// * Created on: 28.05.2020
// * Author: lukas
// */
//
//#ifndef MISSION_DEVICEHANDLING_MGMRM3100HANDLER_H_
//#define MISSION_DEVICEHANDLING_MGMRM3100HANDLER_H_
//
//#include <bits/stdint-uintn.h>
//#include <config/datapool/dataPoolInit.h>
//#include <framework/devicehandlers/DeviceHandlerMessage.h>
//#include <framework/objectmanager/SystemObjectIF.h>
//#include <framework/returnvalues/HasReturnvaluesIF.h>
//#include <mission/devicehandling/NotDeviceHandlerBase.h>
//#include <stddef.h>
//
//using namespace std;
//
//class MGMRM3100Handler: public NotDeviceHandlerBase {
//public:
//
// MGMRM3100Handler(DeviceCommunicationIF *comInterface,
// object_id_t setObjectId, uint32_t address, uint32_t maxReplyLen,
// datapool::opus_variable_id mgmMeasurement,
// datapool::opus_variable_id mgmTemperature);
// virtual ~MGMRM3100Handler();
//
//protected:
// //These are the commands the Device has to implement
// virtual ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id);
// virtual void doStartUp();
// virtual void doShutDown();
// virtual ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id);
// virtual ReturnValue_t buildCommandFromCommand(
// DeviceCommandId_t deviceCommand, const uint8_t *commandData,
// size_t commandDataLen);
// virtual ReturnValue_t scanForReply(const uint8_t *start, uint32_t len,
// DeviceCommandId_t *foundId, uint32_t *foundLen);
// virtual ReturnValue_t interpretDeviceReply(DeviceCommandId_t id,
// const uint8_t *packet);
//
//private:
// /**
// * Magnetic field data pool id
// */
// datapool::opus_variable_id mgmMagneticPoolId;
//
// /*
// * Temperature value pool id
// */
//
// datapool::opus_variable_id mgmTempPoolId;
//
// enum InternalState {
// STATE_NONE, STATE_FIRST_CONTACT, STATE_SETUP, STATE_CHECK_REGISTERS
// } internalState;
//
//};
//
//#endif /* MISSION_DEVICEHANDLING_MGMRM3100HANDLER_H_ */