From f573d158303e46bf4d3f01a6e5597687e3f5a71c Mon Sep 17 00:00:00 2001 From: "Jakob.Meier" Date: Mon, 21 Dec 2020 10:26:28 +0100 Subject: [PATCH] p60dock, acu and pdu handler completed --- fsfwconfig/devices/addresses.h | 1 + fsfwconfig/objects/systemObjectList.h | 3 ++- fsfwconfig/pollingsequence/PollingSequenceFactory.cpp | 8 ++++++++ mission/core/GenericFactory.cpp | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/fsfwconfig/devices/addresses.h b/fsfwconfig/devices/addresses.h index 0884d4c5..37d653fa 100644 --- a/fsfwconfig/devices/addresses.h +++ b/fsfwconfig/devices/addresses.h @@ -24,6 +24,7 @@ namespace addresses { /* Addresses of devices supporting the CSP protocol */ enum cspAddresses: uint8_t { P60DOCK = 4, + ACU = 2, PDU1 = 3, /* PDU2 occupies X4 slot of P60Dock */ PDU2 = 6 diff --git a/fsfwconfig/objects/systemObjectList.h b/fsfwconfig/objects/systemObjectList.h index 758e8fbc..e1334af7 100644 --- a/fsfwconfig/objects/systemObjectList.h +++ b/fsfwconfig/objects/systemObjectList.h @@ -36,7 +36,8 @@ namespace objects { /* 0x44 ('D') for device handlers */ P60DOCK_HANDLER = 0x44000001, PDU1_HANDLER = 0x44000002, - PDU2_HANDLER = 0x44000003 + PDU2_HANDLER = 0x44000003, + ACU_HANDLER = 0x44000004 }; } diff --git a/fsfwconfig/pollingsequence/PollingSequenceFactory.cpp b/fsfwconfig/pollingsequence/PollingSequenceFactory.cpp index 3c326ac8..c3f5872d 100644 --- a/fsfwconfig/pollingsequence/PollingSequenceFactory.cpp +++ b/fsfwconfig/pollingsequence/PollingSequenceFactory.cpp @@ -38,6 +38,8 @@ ReturnValue_t pst::gomspacePstInit(FixedTimeslotTaskIF *thisSequence){ length * 0, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::PDU2_HANDLER, length * 0, DeviceHandlerIF::SEND_WRITE); + thisSequence->addSlot(objects::ACU_HANDLER, + length * 0, DeviceHandlerIF::SEND_WRITE); thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0.25, DeviceHandlerIF::GET_WRITE); @@ -45,6 +47,8 @@ ReturnValue_t pst::gomspacePstInit(FixedTimeslotTaskIF *thisSequence){ length * 0.25, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::PDU2_HANDLER, length * 0.25, DeviceHandlerIF::GET_WRITE); + thisSequence->addSlot(objects::ACU_HANDLER, + length * 0.25, DeviceHandlerIF::GET_WRITE); thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0.5, DeviceHandlerIF::SEND_READ); @@ -52,6 +56,8 @@ ReturnValue_t pst::gomspacePstInit(FixedTimeslotTaskIF *thisSequence){ length * 0.5, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::PDU2_HANDLER, length * 0.5, DeviceHandlerIF::SEND_READ); + thisSequence->addSlot(objects::ACU_HANDLER, + length * 0.5, DeviceHandlerIF::SEND_READ); thisSequence->addSlot(objects::P60DOCK_HANDLER, length * 0.75, DeviceHandlerIF::GET_READ); @@ -59,6 +65,8 @@ ReturnValue_t pst::gomspacePstInit(FixedTimeslotTaskIF *thisSequence){ length * 0.75, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::PDU2_HANDLER, length * 0.75, DeviceHandlerIF::GET_READ); + thisSequence->addSlot(objects::ACU_HANDLER, + length * 0.75, DeviceHandlerIF::GET_READ); if (thisSequence->checkSequence() == HasReturnvaluesIF::RETURN_OK) { return HasReturnvaluesIF::RETURN_OK; diff --git a/mission/core/GenericFactory.cpp b/mission/core/GenericFactory.cpp index 77a7a1e8..1fb7ca38 100644 --- a/mission/core/GenericFactory.cpp +++ b/mission/core/GenericFactory.cpp @@ -92,6 +92,8 @@ void ObjectFactory::produceGenericObjects() { addresses::PDU1); CspCookie* pdu2CspCookie = new CspCookie(PDU::MAX_REPLY_LENGTH, addresses::PDU2); + CspCookie* acuCspCookie = new CspCookie(ACU::MAX_REPLY_LENGTH, + addresses::ACU); /* Communication interfaces */ new CspComIF(objects::CSP_COM_IF); @@ -106,6 +108,9 @@ void ObjectFactory::produceGenericObjects() { new GomspaceDeviceHandler(objects::PDU2_HANDLER, objects::CSP_COM_IF, pdu2CspCookie, PDU::MAX_CONFIGTABLE_ADDRESS, PDU::MAX_HKTABLE_ADDRESS); + new GomspaceDeviceHandler(objects::ACU_HANDLER, objects::CSP_COM_IF, + acuCspCookie, ACU::MAX_CONFIGTABLE_ADDRESS, + ACU::MAX_HKTABLE_ADDRESS); /* Test Device Handler */ #if ADD_TEST_CODE == 1