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,7 @@
|
||||
#include <gps.h>
|
||||
#include <libgpsmm.h>
|
||||
#include <param/param_string.h>
|
||||
#include <param/rparam_client.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <ctime>
|
||||
@ -50,6 +51,21 @@ ReturnValue_t Q7STestTask::performOneShotAction() {
|
||||
}
|
||||
}
|
||||
|
||||
if (DO_TEST_GOMSPACE_GET_CONFIG) {
|
||||
uint8_t p60pdu_node = 3;
|
||||
param_index_t requestStruct{};
|
||||
requestStruct.table = p60pdu_config;
|
||||
requestStruct.mem_id = P60PDU_PARAM;
|
||||
uint8_t hk_mem[P60PDU_PARAM_SIZE];
|
||||
requestStruct.count = p60pdu_config_count;
|
||||
requestStruct.size = P60PDU_PARAM_SIZE;
|
||||
requestStruct.physaddr = hk_mem;
|
||||
int result = rparam_get_full_table(&requestStruct, p60pdu_node, P60_PORT_RPARAM,
|
||||
requestStruct.mem_id, 1000);
|
||||
param_list(&requestStruct, 1);
|
||||
return (result == 0);
|
||||
}
|
||||
|
||||
// testJsonLibDirect();
|
||||
// testDummyParams();
|
||||
if (doTestProtHandler) {
|
||||
|
@ -17,6 +17,7 @@ class Q7STestTask : public TestTask {
|
||||
bool doTestSdCard = false;
|
||||
bool doTestScratchApi = false;
|
||||
static constexpr bool DO_TEST_GOMSPACE_API = false;
|
||||
static constexpr bool DO_TEST_GOMSPACE_GET_CONFIG = true;
|
||||
bool doTestGpsShm = false;
|
||||
bool doTestGpsSocket = false;
|
||||
bool doTestProtHandler = false;
|
||||
|
@ -20,7 +20,6 @@
|
||||
#include "linux/boardtest/UartTestClass.h"
|
||||
#include "linux/callbacks/gpioCallbacks.h"
|
||||
#include "linux/csp/CspComIF.h"
|
||||
#include "mission/csp/CspCookie.h"
|
||||
#include "linux/devices/GPSHyperionLinuxController.h"
|
||||
#include "linux/devices/devicedefinitions/PlocMPSoCDefinitions.h"
|
||||
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
||||
@ -35,6 +34,7 @@
|
||||
#include "linux/obc/PdecHandler.h"
|
||||
#include "linux/obc/Ptme.h"
|
||||
#include "linux/obc/PtmeConfig.h"
|
||||
#include "mission/csp/CspCookie.h"
|
||||
#include "mission/system/RwAssembly.h"
|
||||
#include "mission/system/fdir/AcsBoardFdir.h"
|
||||
#include "mission/system/fdir/GomspacePowerFdir.h"
|
||||
@ -158,10 +158,10 @@ void ObjectFactory::createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, Ua
|
||||
}
|
||||
|
||||
void ObjectFactory::createPcduComponents(LinuxLibgpioIF* gpioComIF, PowerSwitchIF** pwrSwitcher) {
|
||||
CspCookie* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_LENGTH, addresses::P60DOCK, 500);
|
||||
CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH, addresses::PDU1, 500);
|
||||
CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH, addresses::PDU2, 500);
|
||||
CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_LENGTH, addresses::ACU, 500);
|
||||
CspCookie* p60DockCspCookie = new CspCookie(P60Dock::MAX_REPLY_SIZE, addresses::P60DOCK, 500);
|
||||
CspCookie* pdu1CspCookie = new CspCookie(PDU::MAX_REPLY_SIZE, addresses::PDU1, 500);
|
||||
CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_SIZE, addresses::PDU2, 500);
|
||||
CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_SIZE, addresses::ACU, 500);
|
||||
|
||||
auto p60Fdir = new GomspacePowerFdir(objects::P60DOCK_HANDLER);
|
||||
P60DockHandler* p60dockhandler =
|
||||
|
@ -46,20 +46,15 @@ class SdCardManager : public SystemObject, public SdCardMountedIF {
|
||||
|
||||
static constexpr ReturnValue_t OP_ONGOING = returnvalue::makeCode(INTERFACE_ID, 0);
|
||||
static constexpr ReturnValue_t ALREADY_ON = returnvalue::makeCode(INTERFACE_ID, 1);
|
||||
static constexpr ReturnValue_t ALREADY_MOUNTED =
|
||||
returnvalue::makeCode(INTERFACE_ID, 2);
|
||||
static constexpr ReturnValue_t ALREADY_MOUNTED = returnvalue::makeCode(INTERFACE_ID, 2);
|
||||
static constexpr ReturnValue_t ALREADY_OFF = returnvalue::makeCode(INTERFACE_ID, 3);
|
||||
static constexpr ReturnValue_t STATUS_FILE_NEXISTS =
|
||||
returnvalue::makeCode(INTERFACE_ID, 10);
|
||||
static constexpr ReturnValue_t STATUS_FILE_NEXISTS = returnvalue::makeCode(INTERFACE_ID, 10);
|
||||
static constexpr ReturnValue_t STATUS_FILE_FORMAT_INVALID =
|
||||
returnvalue::makeCode(INTERFACE_ID, 11);
|
||||
static constexpr ReturnValue_t MOUNT_ERROR = returnvalue::makeCode(INTERFACE_ID, 12);
|
||||
static constexpr ReturnValue_t UNMOUNT_ERROR =
|
||||
returnvalue::makeCode(INTERFACE_ID, 13);
|
||||
static constexpr ReturnValue_t SYSTEM_CALL_ERROR =
|
||||
returnvalue::makeCode(INTERFACE_ID, 14);
|
||||
static constexpr ReturnValue_t POPEN_CALL_ERROR =
|
||||
returnvalue::makeCode(INTERFACE_ID, 15);
|
||||
static constexpr ReturnValue_t UNMOUNT_ERROR = returnvalue::makeCode(INTERFACE_ID, 13);
|
||||
static constexpr ReturnValue_t SYSTEM_CALL_ERROR = returnvalue::makeCode(INTERFACE_ID, 14);
|
||||
static constexpr ReturnValue_t POPEN_CALL_ERROR = returnvalue::makeCode(INTERFACE_ID, 15);
|
||||
|
||||
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::FILE_SYSTEM;
|
||||
|
||||
|
Reference in New Issue
Block a user