changed all table parsing to use gom space API
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:
@ -3,8 +3,6 @@
|
||||
#include <common/config/commonObjects.h>
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
#include <fsfw/globalfunctions/arrayprinter.h>
|
||||
#include <linux/csp/CspComIF.h>
|
||||
#include <linux/csp/CspCookie.h>
|
||||
|
||||
#include "devicedefinitions/GomSpacePackets.h"
|
||||
#include "devicedefinitions/powerDefinitions.h"
|
||||
@ -82,14 +80,24 @@ ReturnValue_t GomspaceDeviceHandler::buildCommandFromCommand(DeviceCommandId_t d
|
||||
break;
|
||||
}
|
||||
case (GOMSPACE::REQUEST_HK_TABLE): {
|
||||
result = generateRequestFullTableCmd(GOMSPACE::TableIds::HK, hkTableReplySize);
|
||||
auto reqType = SpecialRequestTypes::DEFAULT_COM_IF;
|
||||
if(getObjectId() == objects::PDU1_HANDLER or getObjectId() == objects::PDU2_HANDLER) {
|
||||
reqType = SpecialRequestTypes::GET_PDU_HK;
|
||||
} else if(getObjectId() == objects::ACU_HANDLER) {
|
||||
reqType = SpecialRequestTypes::GET_ACU_HK;
|
||||
} else if(getObjectId() == objects::P60DOCK_HANDLER) {
|
||||
reqType = SpecialRequestTypes::GET_P60DOCK_HK;
|
||||
}
|
||||
result = generateRequestFullTableCmd(reqType, GOMSPACE::TableIds::HK, hkTableReplySize);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (GOMSPACE::REQUEST_CONFIG_TABLE): {
|
||||
result = generateRequestFullTableCmd(GOMSPACE::TableIds::CONFIG, configTableReplySize);
|
||||
|
||||
result = generateRequestFullTableCmd(SpecialRequestTypes::DEFAULT_COM_IF,
|
||||
GOMSPACE::TableIds::CONFIG, configTableReplySize);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
@ -429,13 +437,14 @@ ReturnValue_t GomspaceDeviceHandler::generateResetWatchdogCmd() {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t GomspaceDeviceHandler::generateRequestFullTableCmd(uint8_t tableId,
|
||||
ReturnValue_t GomspaceDeviceHandler::generateRequestFullTableCmd(SpecialRequestTypes reqType,
|
||||
uint8_t tableId,
|
||||
uint16_t tableReplySize) {
|
||||
uint16_t querySize = tableReplySize;
|
||||
if(getObjectId() == objects::PDU1_HANDLER or getObjectId() == objects::PDU2_HANDLER) {
|
||||
if(reqType != SpecialRequestTypes::DEFAULT_COM_IF) {
|
||||
auto* cspCookie = dynamic_cast<CspCookie*>(comCookie);
|
||||
cspCookie->setRequest(CspCookie::SpecialRequestTypes::GET_PDU_HK, tableReplySize);
|
||||
cspCookie->setCspPort(GOMSPACE::CspPorts::P60_PORT_RPARAM_ENUM);
|
||||
cspCookie->setRequest(reqType, tableReplySize);
|
||||
cspCookie->setCspPort(CspPorts::P60_PORT_RPARAM_ENUM);
|
||||
} else {
|
||||
RequestFullTableCommand requestFullTableCommand(querySize, tableId);
|
||||
|
||||
|
Reference in New Issue
Block a user