diff --git a/bsp_hosted/InitMission.cpp b/bsp_hosted/InitMission.cpp index 8bee1b2e..29101d08 100644 --- a/bsp_hosted/InitMission.cpp +++ b/bsp_hosted/InitMission.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include #include @@ -29,9 +28,6 @@ ServiceInterfaceStream sif::error("ERROR", true, false, true); ObjectManagerIF *objectManager = nullptr; -//Initialize Data Pool -DataPool dataPool(nullptr); - void InitMission::initMission() { sif::info << "Building global objects.." << std::endl; /* Instantiate global object manager and also create all objects */ diff --git a/bsp_hosted/fsfwconfig/FSFWConfig.h b/bsp_hosted/fsfwconfig/FSFWConfig.h index ea86152c..3433613c 100644 --- a/bsp_hosted/fsfwconfig/FSFWConfig.h +++ b/bsp_hosted/fsfwconfig/FSFWConfig.h @@ -1,7 +1,6 @@ #ifndef CONFIG_FSFWCONFIG_H_ #define CONFIG_FSFWCONFIG_H_ -#include #include //! Used to determine whether C++ ostreams are used diff --git a/bsp_hosted/fsfwconfig/objects/systemObjectList.h b/bsp_hosted/fsfwconfig/objects/systemObjectList.h new file mode 100644 index 00000000..3b5717fb --- /dev/null +++ b/bsp_hosted/fsfwconfig/objects/systemObjectList.h @@ -0,0 +1,36 @@ +#ifndef HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ +#define HOSTED_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ + +#include + +// The objects will be instantiated in the ID order +namespace objects { + enum sourceObjects: uint32_t { + /* First Byte 0x50-0x52 reserved for PUS Services **/ + CCSDS_PACKET_DISTRIBUTOR = 0x50000100, + PUS_PACKET_DISTRIBUTOR = 0x50000200, + UDP_BRIDGE = 0x50000300, + UDP_POLLING_TASK = 0x50000400, + + PUS_SERVICE_3 = 0x51000300, + PUS_SERVICE_5 = 0x51000400, + PUS_SERVICE_6 = 0x51000500, + PUS_SERVICE_8 = 0x51000800, + PUS_SERVICE_23 = 0x51002300, + PUS_SERVICE_201 = 0x51020100, + + TIME_STAMPER = 0x52000001, + TM_FUNNEL = 0x52000002, + + /* Test Task */ + + TEST_TASK = 0x42694269, + DUMMY_INTERFACE = 0xCAFECAFE, + DUMMY_HANDLER = 0x4400AFFE, + + /* 0x49 ('I') for Communication Interfaces **/ + ARDUINO_COM_IF = 0x49000001 + }; +} + +#endif /* BSP_CONFIG_OBJECTS_SYSTEMOBJECTLIST_H_ */ diff --git a/bsp_hosted/fsfwconfig/tmtc/apid.h b/bsp_hosted/fsfwconfig/tmtc/apid.h new file mode 100644 index 00000000..ee2fc7c4 --- /dev/null +++ b/bsp_hosted/fsfwconfig/tmtc/apid.h @@ -0,0 +1,19 @@ +#ifndef FSFWCONFIG_TMTC_APID_H_ +#define FSFWCONFIG_TMTC_APID_H_ + +#include + +/** + * Application Process Definition: entity, uniquely identified by an + * application process ID (APID), capable of generating telemetry source + * packets and receiving telecommand packets + * + * SOURCE APID: 0x73 / 115 / s + * APID is a 11 bit number + */ +namespace apid { + static const uint16_t EIVE_OBSW = 0x65; +} + + +#endif /* FSFWCONFIG_TMTC_APID_H_ */ diff --git a/bsp_hosted/fsfwconfig/tmtc/pusIds.h b/bsp_hosted/fsfwconfig/tmtc/pusIds.h new file mode 100644 index 00000000..a2dd7575 --- /dev/null +++ b/bsp_hosted/fsfwconfig/tmtc/pusIds.h @@ -0,0 +1,23 @@ +#ifndef CONFIG_TMTC_PUSIDS_HPP_ +#define CONFIG_TMTC_PUSIDS_HPP_ + +namespace pus { +enum Ids{ + PUS_SERVICE_1 = 1, + PUS_SERVICE_2 = 2, + PUS_SERVICE_3 = 3, + PUS_SERVICE_3_PSB = 3, + PUS_SERVICE_5 = 5, + PUS_SERVICE_6 = 6, + PUS_SERVICE_8 = 8, + PUS_SERVICE_9 = 9, + PUS_SERVICE_17 = 17, + PUS_SERVICE_19 = 19, + PUS_SERVICE_20 = 20, + PUS_SERVICE_23 = 23, + PUS_SERVICE_200 = 200, + PUS_SERVICE_201 = 201, +}; +}; + +#endif /* CONFIG_TMTC_PUSIDS_HPP_ */ diff --git a/fsfwconfig/tmtc/tmTcSize.h b/fsfwconfig/tmtc/tmTcSize.h deleted file mode 100644 index c3c83d31..00000000 --- a/fsfwconfig/tmtc/tmTcSize.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef FSFWCONFIG_TMTC_TMTCSIZE_H_ -#define FSFWCONFIG_TMTC_TMTCSIZE_H_ - -#include - -namespace tmtcsize { -static const uint32_t MAX_TM_PACKET = 50; -} - -#endif /* FSFWCONFIG_TMTC_TMTCSIZE_H_ */ diff --git a/mission/core/GenericFactory.cpp b/mission/core/GenericFactory.cpp index 5305dc82..be0d65e5 100644 --- a/mission/core/GenericFactory.cpp +++ b/mission/core/GenericFactory.cpp @@ -24,32 +24,28 @@ void ObjectFactory::produceGenericObjects() { /* Framework objects */ new EventManager(objects::EVENT_MANAGER); new HealthTable(objects::HEALTH_TABLE); - new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER, 0, 0, 0); + new InternalErrorReporter(objects::INTERNAL_ERROR_REPORTER); new TimeStamper(objects::TIME_STAMPER); { - static constexpr uint8_t NUMBER_OF_POOLS = 5; - const uint16_t element_sizes[NUMBER_OF_POOLS] = {16, 32, 64, 128, 1024}; - const uint16_t n_elements[NUMBER_OF_POOLS] = {100, 50, 25, 15, 5}; - new PoolManager(objects::TC_STORE, element_sizes, - n_elements); + PoolManager::LocalPoolConfig poolCfg = { + {100, 16}, {50, 32}, {25, 64}, {15, 128}, {5, 1024} + }; + new PoolManager(objects::TC_STORE, poolCfg); } { - static constexpr uint8_t NUMBER_OF_POOLS = 5; - const uint16_t element_sizes[NUMBER_OF_POOLS] = {16, 32, 64, 128, 1024}; - const uint16_t n_elements[NUMBER_OF_POOLS] = {100, 50, 25, 15, 5}; - new PoolManager(objects::TM_STORE, element_sizes, - n_elements); + PoolManager::LocalPoolConfig poolCfg = { + {100, 16}, {50, 32}, {25, 64}, {15, 128}, {5, 1024} + }; + new PoolManager(objects::TM_STORE, poolCfg); } { - static constexpr uint8_t NUMBER_OF_POOLS = 6; - const uint16_t element_sizes[NUMBER_OF_POOLS] = {32, 64, 512, - 1024, 2048, 4096}; - const uint16_t n_elements[NUMBER_OF_POOLS] = {200, 100, 50, 25, 15, 5}; - new PoolManager(objects::IPC_STORE, element_sizes, - n_elements); + PoolManager::LocalPoolConfig poolCfg = { + {100, 16}, {50, 32}, {25, 64}, {15, 128}, {5, 1024} + }; + new PoolManager(objects::IPC_STORE, poolCfg); } new CCSDSDistributor(apid::EIVE_OBSW, objects::CCSDS_PACKET_DISTRIBUTOR); @@ -62,7 +58,7 @@ void ObjectFactory::produceGenericObjects() { /* PUS stack */ new Service1TelecommandVerification(objects::PUS_SERVICE_1_VERIFICATION, - apid::EIVE_OBSW, pus::PUS_SERVICE_1, objects::TM_FUNNEL); + apid::EIVE_OBSW, pus::PUS_SERVICE_1, objects::TM_FUNNEL, 20); new Service2DeviceAccess(objects::PUS_SERVICE_2_DEVICE_ACCESS, apid::EIVE_OBSW, pus::PUS_SERVICE_2, 3, 10); new Service5EventReporting(objects::PUS_SERVICE_5_EVENT_REPORTING, diff --git a/mission/devices/MGMHandlerLIS3MDL.h b/mission/devices/MGMHandlerLIS3MDL.h index 0ff4d198..4c06e001 100644 --- a/mission/devices/MGMHandlerLIS3MDL.h +++ b/mission/devices/MGMHandlerLIS3MDL.h @@ -28,7 +28,7 @@ public: static const uint8_t INTERFACE_ID = CLASS_ID::MGM_LIS3MDL; static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::MGM_LIS3MDL; //Notifies a command to change the setup parameters - static const Event CHANGE_OF_SETUP_PARAMETER = MAKE_EVENT(0, SEVERITY::LOW); + static const Event CHANGE_OF_SETUP_PARAMETER = MAKE_EVENT(0, severity::LOW); MGMHandlerLIS3MDL(uint32_t objectId, object_id_t deviceCommunication, CookieIF* comCookie);