mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 17:47:10 -06:00
* 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>
77 lines
3.2 KiB
Fortran
77 lines
3.2 KiB
Fortran
module DataProducts{
|
|
|
|
# ----------------------------------------------------------------------
|
|
# Active Components
|
|
# ----------------------------------------------------------------------
|
|
|
|
instance dpCat: Svc.DpCatalog base id DataProductsConfig.BASE_ID + 0x00000 \
|
|
queue size DataProductsConfig.QueueSizes.dpCat \
|
|
stack size DataProductsConfig.StackSizes.dpCat \
|
|
priority DataProductsConfig.Priorities.dpCat \
|
|
{
|
|
phase Fpp.ToCpp.Phases.configComponents """
|
|
Fw::FileNameString dpDir(DataProductsConfig::Paths::dpDir);
|
|
Fw::FileNameString dpState(DataProductsConfig::Paths::dpState);
|
|
Os::FileSystem::createDirectory(dpDir.toChar());
|
|
DataProducts::dpCat.configure(&dpDir,1,dpState,0, DataProducts::Allocation::memAllocator);
|
|
"""
|
|
}
|
|
|
|
instance dpMgr: Svc.DpManager base id DataProductsConfig.BASE_ID + 0x01000 \
|
|
queue size DataProductsConfig.QueueSizes.dpMgr \
|
|
stack size DataProductsConfig.StackSizes.dpMgr \
|
|
priority DataProductsConfig.Priorities.dpMgr
|
|
|
|
instance dpWriter: Svc.DpWriter base id DataProductsConfig.BASE_ID + 0x02000 \
|
|
queue size DataProductsConfig.QueueSizes.dpWriter \
|
|
stack size DataProductsConfig.StackSizes.dpWriter \
|
|
priority DataProductsConfig.Priorities.dpWriter \
|
|
{
|
|
phase Fpp.ToCpp.Phases.configComponents """
|
|
DataProducts::dpWriter.configure(dpDir);
|
|
"""
|
|
}
|
|
|
|
# ----------------------------------------------------------------------
|
|
# Passive Components
|
|
# ----------------------------------------------------------------------
|
|
|
|
instance dpBufferManager: Svc.BufferManager base id DataProductsConfig.BASE_ID + 0x03000 \
|
|
{
|
|
phase Fpp.ToCpp.Phases.configObjects """
|
|
Svc::BufferManager::BufferBins bins;
|
|
"""
|
|
phase Fpp.ToCpp.Phases.configComponents """
|
|
memset(&ConfigObjects::DataProducts_dpBufferManager::bins, 0, sizeof(ConfigObjects::DataProducts_dpBufferManager::bins));
|
|
ConfigObjects::DataProducts_dpBufferManager::bins.bins[0].bufferSize = DataProductsConfig::BuffMgr::dpBufferStoreSize;
|
|
ConfigObjects::DataProducts_dpBufferManager::bins.bins[0].numBuffers = DataProductsConfig::BuffMgr::dpBufferStoreCount;
|
|
DataProducts::dpBufferManager.setup(
|
|
DataProductsConfig::BuffMgr::dpBufferManagerId,
|
|
0,
|
|
DataProducts::Allocation::memAllocator,
|
|
ConfigObjects::DataProducts_dpBufferManager::bins
|
|
);
|
|
"""
|
|
phase Fpp.ToCpp.Phases.tearDownComponents """
|
|
DataProducts::dpCat.shutdown();
|
|
DataProducts::dpBufferManager.cleanup();
|
|
"""
|
|
}
|
|
topology Subtopology {
|
|
#Active Components
|
|
instance dpCat
|
|
instance dpMgr
|
|
instance dpWriter
|
|
|
|
#Passive Components
|
|
instance dpBufferManager
|
|
|
|
connections DataProducts {
|
|
# DpMgr and DpWriter connections. Have explicit port indexes for demo
|
|
dpMgr.bufferGetOut[0] -> dpBufferManager.bufferGetCallee
|
|
dpMgr.productSendOut[0] -> dpWriter.bufferSendIn
|
|
dpWriter.deallocBufferSendOut -> dpBufferManager.bufferSendIn
|
|
}
|
|
} # end topology
|
|
} # end DataProducts Subtopology
|