BPX Handler and a lot more #133
@ -144,9 +144,8 @@ void ObjectFactory::produce(void* args) {
|
|||||||
new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie);
|
new IMTQHandler(objects::IMTQ_HANDLER, objects::I2C_COM_IF, imtqI2cCookie);
|
||||||
createReactionWheelComponents(gpioComIF);
|
createReactionWheelComponents(gpioComIF);
|
||||||
|
|
||||||
I2cCookie* bpxI2cCookie =
|
I2cCookie* bpxI2cCookie = new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
|
||||||
new I2cCookie(addresses::BPX_BATTERY, 100, q7s::I2C_DEFAULT_DEV);
|
(void)bpxI2cCookie;
|
||||||
|
|
||||||
#if OBSW_ADD_PLOC_MPSOC == 1
|
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||||
UartCookie* plocMpsocCookie =
|
UartCookie* plocMpsocCookie =
|
||||||
new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV,
|
new UartCookie(objects::PLOC_MPSOC_HANDLER, q7s::UART_PLOC_MPSOC_DEV,
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#ifndef LINUX_OBC_PTMEIF_H_
|
#ifndef LINUX_OBC_PTMEIF_H_
|
||||||
#define LINUX_OBC_PTMEIF_H_
|
#define LINUX_OBC_PTMEIF_H_
|
||||||
|
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
|
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Interface class for managing the PTME IP Core implemented in the programmable logic.
|
* @brief Interface class for managing the PTME IP Core implemented in the programmable logic.
|
||||||
*
|
*
|
||||||
|
47
mission/devices/BpxBatteryHandler.cpp
Normal file
47
mission/devices/BpxBatteryHandler.cpp
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#include "BpxBatteryHandler.h"
|
||||||
|
|
||||||
|
BpxBatteryHandler::BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie)
|
||||||
|
: DeviceHandlerBase(objectId, comIF, comCookie) {}
|
||||||
|
|
||||||
|
BpxBatteryHandler::~BpxBatteryHandler() {}
|
||||||
|
|
||||||
|
void BpxBatteryHandler::doStartUp() {}
|
||||||
|
|
||||||
|
void BpxBatteryHandler::doShutDown() {}
|
||||||
|
|
||||||
|
ReturnValue_t BpxBatteryHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t BpxBatteryHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BpxBatteryHandler::fillCommandAndReplyMap() {}
|
||||||
|
|
||||||
|
ReturnValue_t BpxBatteryHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
|
const uint8_t* commandData,
|
||||||
|
size_t commandDataLen) {
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t BpxBatteryHandler::scanForReply(const uint8_t* start, size_t remainingSize,
|
||||||
|
DeviceCommandId_t* foundId, size_t* foundLen) {
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t BpxBatteryHandler::interpretDeviceReply(DeviceCommandId_t ixd,
|
||||||
|
const uint8_t* packet) {
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void BpxBatteryHandler::setNormalDatapoolEntriesInvalid() {}
|
||||||
|
|
||||||
|
LocalPoolDataSetBase* BpxBatteryHandler::getDataSetHandle(sid_t sid) { return nullptr; }
|
||||||
|
|
||||||
|
uint32_t BpxBatteryHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 10000; }
|
||||||
|
|
||||||
|
ReturnValue_t BpxBatteryHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
|
LocalDataPoolManager& poolManager) {
|
||||||
|
return HasReturnvaluesIF::RETURN_OK;
|
||||||
|
}
|
@ -7,6 +7,7 @@ class BpxBatteryHandler: public DeviceHandlerBase {
|
|||||||
public:
|
public:
|
||||||
BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie);
|
BpxBatteryHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie);
|
||||||
virtual ~BpxBatteryHandler();
|
virtual ~BpxBatteryHandler();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void doStartUp() override;
|
void doStartUp() override;
|
||||||
void doShutDown() override;
|
void doShutDown() override;
|
||||||
@ -25,6 +26,4 @@ protected:
|
|||||||
LocalDataPoolManager& poolManager) override;
|
LocalDataPoolManager& poolManager) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif /* MISSION_DEVICES_BPXBATTERYHANDLER_H_ */
|
#endif /* MISSION_DEVICES_BPXBATTERYHANDLER_H_ */
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
target_sources(${TARGET_NAME} PUBLIC
|
target_sources(${TARGET_NAME} PUBLIC
|
||||||
GPSHyperionHandler.cpp
|
GPSHyperionHandler.cpp
|
||||||
GomspaceDeviceHandler.cpp
|
GomspaceDeviceHandler.cpp
|
||||||
|
BpxBatteryHandler.cpp
|
||||||
Tmp1075Handler.cpp
|
Tmp1075Handler.cpp
|
||||||
PCDUHandler.cpp
|
PCDUHandler.cpp
|
||||||
P60DockHandler.cpp
|
P60DockHandler.cpp
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
#include "GPSHyperionHandler.h"
|
#include "GPSHyperionHandler.h"
|
||||||
|
|
||||||
|
#ifdef FSFW_OSAL_LINUX
|
||||||
#include <gps.h>
|
#include <gps.h>
|
||||||
#include <libgpsmm.h>
|
#include <libgpsmm.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
@ -22,7 +24,11 @@ GPSHyperionHandler::GPSHyperionHandler(object_id_t objectId, object_id_t parentI
|
|||||||
|
|
||||||
GPSHyperionHandler::~GPSHyperionHandler() {}
|
GPSHyperionHandler::~GPSHyperionHandler() {}
|
||||||
|
|
||||||
void GPSHyperionHandler::performControlOperation() { readGpsDataFromGpsd(); }
|
void GPSHyperionHandler::performControlOperation() {
|
||||||
|
#ifdef FSFW_OSAL_LINUX
|
||||||
|
readGpsDataFromGpsd();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
LocalPoolDataSetBase *GPSHyperionHandler::getDataSetHandle(sid_t sid) { return nullptr; }
|
LocalPoolDataSetBase *GPSHyperionHandler::getDataSetHandle(sid_t sid) { return nullptr; }
|
||||||
|
|
||||||
@ -83,6 +89,7 @@ ReturnValue_t GPSHyperionHandler::handleCommandMessage(CommandMessage *message)
|
|||||||
return ExtendedControllerBase::handleCommandMessage(message);
|
return ExtendedControllerBase::handleCommandMessage(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef FSFW_OSAL_LINUX
|
||||||
void GPSHyperionHandler::readGpsDataFromGpsd() {
|
void GPSHyperionHandler::readGpsDataFromGpsd() {
|
||||||
// The data from the device will generally be read all at once. Therefore, we
|
// The data from the device will generally be read all at once. Therefore, we
|
||||||
// can set all field here
|
// can set all field here
|
||||||
@ -166,3 +173,4 @@ void GPSHyperionHandler::readGpsDataFromGpsd() {
|
|||||||
std::cout << "Speed(m/s): " << gps->fix.speed << std::endl;
|
std::cout << "Speed(m/s): " << gps->fix.speed << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
#ifndef VIRTUALCHANNEL_H_
|
#ifndef VIRTUALCHANNEL_H_
|
||||||
#define VIRTUALCHANNEL_H_
|
#define VIRTUALCHANNEL_H_
|
||||||
|
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
#include "fsfw/ipc/MessageQueueIF.h"
|
||||||
#include "linux/obc/PtmeIF.h"
|
|
||||||
|
|
||||||
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
|
||||||
#include "fsfw/tmtcservices/AcceptsTelemetryIF.h"
|
#include "fsfw/tmtcservices/AcceptsTelemetryIF.h"
|
||||||
#include "fsfw/ipc/MessageQueueIF.h"
|
#include "linux/obc/PtmeIF.h"
|
||||||
|
|
||||||
class StorageManagerIF;
|
class StorageManagerIF;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user