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

72 lines
2.5 KiB
Fortran

module CdhCore {
# ----------------------------------------------------------------------
# Active Components
# ----------------------------------------------------------------------
instance cmdDisp: Svc.CommandDispatcher base id CdhCoreConfig.BASE_ID + 0x00000 \
queue size CdhCoreConfig.QueueSizes.cmdDisp \
stack size CdhCoreConfig.StackSizes.cmdDisp \
priority CdhCoreConfig.Priorities.cmdDisp
instance events: Svc.EventManager base id CdhCoreConfig.BASE_ID + 0x001000 \
queue size CdhCoreConfig.QueueSizes.events \
stack size CdhCoreConfig.StackSizes.events \
priority CdhCoreConfig.Priorities.events
# ----------------------------------------------------------------------
# Queued Components
# ----------------------------------------------------------------------
instance $health: Svc.Health base id CdhCoreConfig.BASE_ID + 0x002000 \
queue size CdhCoreConfig.QueueSizes.$health \
{
phase Fpp.ToCpp.Phases.configConstants """
enum {
HEALTH_WATCHDOG_CODE = 0x123
};
"""
phase Fpp.ToCpp.Phases.configComponents """
// Health is supplied a set of ping entires.
CdhCore::health.setPingEntries(
ConfigObjects::CdhCore_health::pingEntries,
FW_NUM_ARRAY_ELEMENTS(ConfigObjects::CdhCore_health::pingEntries),
ConfigConstants::CdhCore_health::HEALTH_WATCHDOG_CODE
);
"""
}
# ----------------------------------------------------------------------
# Passive Components
# ----------------------------------------------------------------------
instance version: Svc.Version base id CdhCoreConfig.BASE_ID + 0x003000 \
{
phase Fpp.ToCpp.Phases.configComponents """
// Startup TLM and Config verbosity for Versions
CdhCore::version.config(true);
"""
}
instance textLogger: Svc.PassiveTextLogger base id CdhCoreConfig.BASE_ID + 0x004000
instance fatalAdapter: Svc.AssertFatalAdapter base id CdhCoreConfig.BASE_ID + 0x005000
topology Subtopology {
#Active Components
instance cmdDisp
instance events
instance tlmSend
#Queued Components
instance $health
#Passive Components
instance version
instance textLogger
instance fatalAdapter
instance fatalHandler
connections FaultProtection {
events.FatalAnnounce -> fatalHandler.FatalReceive
}
} # end topology
} # end CdhCore Subtopology