Moises Mata 268e168f23
Restructure core subtopologies and add Svc_Subtopologies target (#3904)
* Modify Com/Ccsds/Fprime ComDriverConfig & TopologyDefs for easier ComDriver config

* Fix BaseID collision

* Removed restrict platform, UART/TCP driver configs different files, CMake switch depending on FPRIME_HAS_SOCKETS

* Add Exclude_FROM_ALL to all subtopology cmake modules

* remove exclude from ComCcsds (needed for Ref)

* Remove exclude from all for testing

* Exclude_from_all only on comLoggerTee, comFprime (not used in Ref)

* Added Svc_Subtopologies target

* Use add_custom_target, spelling fix

* Add Configs to Svc_Subtopologies target

* Removed comDriver as instance within subtopologies, now within project topology

* Take out cmdSeq from ComSubtopologies, put in FileHandling

* Added Subtopology States for all, common pattern users can follow

* Fix Extra newline

* Moved Phased comDriver code into RefTopology.cpp

* Update metadata

check-spelling run (pull_request_target) for subtopology-config-phasing-updates

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev>

* Fixed call to default stack size

* Moved cmdSeq from FileHandling subtopology to Ref Root Topology

* Fix integration test

* Remove unneeded Os includes in RefTopology.cpp

* Fix BaseIds

* Add comment for BaseIDs, comDriver configuration order fix

* Restructure of enums within Com Subtopologies

* Correct include for ComCcsds enum headers

* Using namespace syntax change

* Fix BaseIds

* Update metadata

check-spelling run (pull_request_target) for subtopology-config-phasing-updates

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev>

* Remove unneeded Dependency

* Add enum at the top

* Fix RefTopology.cpp

* Update Comment

---------

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
Co-authored-by: Moises Mata <moisesmata@users.noreply.github.com>
2025-07-30 10:25:29 -07:00

53 lines
2.1 KiB
Fortran

module FileHandling {
# ----------------------------------------------------------------------
# Active Components
# ----------------------------------------------------------------------
instance fileUplink: Svc.FileUplink base id FileHandlingConfig.BASE_ID + 0x00000 \
queue size FileHandlingConfig.QueueSizes.fileUplink \
stack size FileHandlingConfig.StackSizes.fileUplink \
priority FileHandlingConfig.Priorities.fileUplink
instance fileDownlink: Svc.FileDownlink base id FileHandlingConfig.BASE_ID + 0x01000 \
queue size FileHandlingConfig.QueueSizes.fileDownlink \
stack size FileHandlingConfig.StackSizes.fileDownlink \
priority FileHandlingConfig.Priorities.fileDownlink \
{
phase Fpp.ToCpp.Phases.configComponents """
FileHandling::fileDownlink.configure(
FileHandlingConfig::DownlinkConfig::timeout,
FileHandlingConfig::DownlinkConfig::cooldown,
FileHandlingConfig::DownlinkConfig::cycleTime,
FileHandlingConfig::DownlinkConfig::fileQueueDepth
);
"""
}
instance fileManager: Svc.FileManager base id FileHandlingConfig.BASE_ID + 0x02000 \
queue size FileHandlingConfig.QueueSizes.fileManager \
stack size FileHandlingConfig.StackSizes.fileManager \
priority FileHandlingConfig.Priorities.fileManager
instance prmDb: Svc.PrmDb base id FileHandlingConfig.BASE_ID + 0x03000 \
queue size FileHandlingConfig.QueueSizes.prmDb \
stack size FileHandlingConfig.StackSizes.prmDb \
priority FileHandlingConfig.Priorities.prmDb \
{
phase Fpp.ToCpp.Phases.configComponents """
FileHandling::prmDb.configure("PrmDb.dat");
"""
phase Fpp.ToCpp.Phases.readParameters """
FileHandling::prmDb.readParamFile();
"""
}
topology Subtopology {
#Active Components
instance fileUplink
instance fileDownlink
instance fileManager
instance prmDb
} # end topology
} # end FileHandling Subtopology