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:
@ -5,8 +5,12 @@
|
||||
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
||||
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
||||
#include <p60pdu.h>
|
||||
#include <p60acu.h>
|
||||
#include <p60dock.h>
|
||||
|
||||
#include "CspCookie.h"
|
||||
#include "mission/csp/CspCookie.h"
|
||||
|
||||
using namespace GOMSPACE;
|
||||
|
||||
CspComIF::CspComIF(object_id_t objectId) : SystemObject(objectId) {}
|
||||
|
||||
@ -82,7 +86,7 @@ ReturnValue_t CspComIF::sendMessage(CookieIF* cookie, const uint8_t* sendData, s
|
||||
|
||||
uint8_t cspPort;
|
||||
uint16_t querySize = 0;
|
||||
if(cspCookie->getRequest() == CspCookie::SpecialRequestTypes::DEFAULT_COM_IF) {
|
||||
if(cspCookie->getRequest() == GOMSPACE::SpecialRequestTypes::DEFAULT_COM_IF) {
|
||||
/* Extract csp port and bytes to query from command buffer */
|
||||
result = getPortAndQuerySize(&sendData, &sendLen, &cspPort, &querySize);
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
@ -94,21 +98,32 @@ ReturnValue_t CspComIF::sendMessage(CookieIF* cookie, const uint8_t* sendData, s
|
||||
}
|
||||
uint8_t cspAddress = cspCookie->getCspAddress();
|
||||
switch (cspPort) {
|
||||
case (GOMSPACE::CspPorts::CSP_PING): {
|
||||
case (CspPorts::CSP_PING): {
|
||||
initiatePingRequest(cspAddress, querySize);
|
||||
break;
|
||||
}
|
||||
case (GOMSPACE::CspPorts::CSP_REBOOT): {
|
||||
case (CspPorts::CSP_REBOOT): {
|
||||
csp_reboot(cspAddress);
|
||||
break;
|
||||
}
|
||||
case (GOMSPACE::CspPorts::P60_PORT_GNDWDT_RESET_ENUM):
|
||||
case (GOMSPACE::CspPorts::P60_PORT_RPARAM_ENUM): {
|
||||
if(cspCookie->getRequest() == CspCookie::SpecialRequestTypes::GET_PDU_HK) {
|
||||
case (CspPorts::P60_PORT_GNDWDT_RESET_ENUM):
|
||||
case (CspPorts::P60_PORT_RPARAM_ENUM): {
|
||||
if(cspCookie->getRequest() != SpecialRequestTypes::DEFAULT_COM_IF) {
|
||||
param_index_t requestStruct{};
|
||||
requestStruct.physaddr = cspDeviceMap[cspAddress].data();
|
||||
if(!p60pdu_get_hk(&requestStruct, cspAddress, cspCookie->getTimeout())) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
if(cspCookie->getRequest() == GOMSPACE::SpecialRequestTypes::GET_PDU_HK) {
|
||||
if(!p60pdu_get_hk(&requestStruct, cspAddress, cspCookie->getTimeout())) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
|
||||
} else if(cspCookie->getRequest() == GOMSPACE::SpecialRequestTypes::GET_ACU_HK) {
|
||||
if(!p60acu_get_hk(&requestStruct, cspAddress, cspCookie->getTimeout())) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
} else if(cspCookie->getRequest() == GOMSPACE::SpecialRequestTypes::GET_P60DOCK_HK) {
|
||||
if(!p60dock_get_hk(&requestStruct, cspAddress, cspCookie->getTimeout())) {
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
/* No CSP fixed port was selected. Send data to the specified port and
|
||||
|
Reference in New Issue
Block a user