added test to retrieve pdu config
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
@ -8,6 +8,12 @@
|
||||
#include "mission/devices/devicedefinitions/GomspaceDefinitions.h"
|
||||
#include "returnvalues/classIds.h"
|
||||
|
||||
struct TableConfig {
|
||||
uint16_t maxConfigTableAddress;
|
||||
uint16_t maxHkTableAddress;
|
||||
uint16_t hkTableSize;
|
||||
uint16_t cfgTableSize;
|
||||
};
|
||||
/**
|
||||
* @brief This is the device handler class for all gomspace devices.
|
||||
*
|
||||
@ -39,8 +45,7 @@ class GomspaceDeviceHandler : public DeviceHandlerBase {
|
||||
* device.
|
||||
*/
|
||||
GomspaceDeviceHandler(object_id_t objectId, object_id_t comIF, CookieIF *comCookie,
|
||||
FailureIsolationBase *customFdir, uint16_t maxConfigTableAddress,
|
||||
uint16_t maxHkTableAddress, uint16_t hkTableReplySize);
|
||||
TableConfig &tableConfig, FailureIsolationBase *customFdir);
|
||||
virtual ~GomspaceDeviceHandler();
|
||||
|
||||
/**
|
||||
@ -58,15 +63,9 @@ class GomspaceDeviceHandler : public DeviceHandlerBase {
|
||||
uint8_t rememberCommandId = GOMSPACE::NONE;
|
||||
uint8_t cspPacket[MAX_PACKET_LEN];
|
||||
|
||||
uint16_t maxConfigTableAddress;
|
||||
uint16_t maxHkTableAddress;
|
||||
|
||||
/** The size of the reply following a full hk table request.*/
|
||||
uint16_t hkTableReplySize;
|
||||
uint16_t configTableReplySize;
|
||||
|
||||
LocalPoolDataSetBase *hkTableDataset = nullptr;
|
||||
|
||||
void initPduConfigTable();
|
||||
void doStartUp() override;
|
||||
void doShutDown() override;
|
||||
virtual ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||
@ -83,7 +82,8 @@ class GomspaceDeviceHandler : public DeviceHandlerBase {
|
||||
* @brief The command to generate a request to receive the full housekeeping table is device
|
||||
* specific. Thus the child has to build this command.
|
||||
*/
|
||||
virtual ReturnValue_t generateRequestFullTableCmd(GOMSPACE::SpecialRequestTypes reqType, uint8_t tableId, uint16_t tableSize);
|
||||
virtual ReturnValue_t generateRequestFullTableCmd(GOMSPACE::SpecialRequestTypes reqType,
|
||||
uint8_t tableId, uint16_t tableSize);
|
||||
|
||||
/**
|
||||
* This command handles printing the HK table to the console. This is useful for debugging
|
||||
@ -116,11 +116,13 @@ class GomspaceDeviceHandler : public DeviceHandlerBase {
|
||||
LocalDataPoolManager &poolManager,
|
||||
std::array<uint8_t, PDU::CHANNELS_LEN> initOutEnb);
|
||||
|
||||
template<typename T> T as(const uint8_t*);
|
||||
template <typename T>
|
||||
T as(const uint8_t *);
|
||||
static bool validTableId(uint8_t id);
|
||||
|
||||
private:
|
||||
SetParamMessageUnpacker setParamCacher;
|
||||
TableConfig &tableCfg;
|
||||
/**
|
||||
* @brief Function to generate the command to set a parameter. Command
|
||||
* will be sent to the ComIF over the rawPacket buffer.
|
||||
@ -162,9 +164,9 @@ class GomspaceDeviceHandler : public DeviceHandlerBase {
|
||||
ReturnValue_t generateResetWatchdogCmd();
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
inline T GomspaceDeviceHandler::as(const uint8_t* ptr) {
|
||||
return *(reinterpret_cast<const T*>(ptr));
|
||||
template <typename T>
|
||||
inline T GomspaceDeviceHandler::as(const uint8_t *ptr) {
|
||||
return *(reinterpret_cast<const T *>(ptr));
|
||||
}
|
||||
|
||||
#endif /* MISSION_DEVICES_GOMSPACEDEVICEHANDLER_H_ */
|
||||
|
Reference in New Issue
Block a user