mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 17:47:10 -06:00
* Added ComLogTSplit subtopology, compiles but needs testing within a larger topology * Added ComLogTSplit Subtopology - Takes com in from tlm send and uses a com splitter to split between comQueue and comLogger - Uses the instance format, will be compatible with fprime-util new --subtopology-instance in fprime-tools update * Update metadata check-spelling run (push) for add-com-logger-subtopology Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com> on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev> * Syntax fixes to include and add_fprime_subdirectory * Remove uneeded base address in config * Fix BaseID clashes * Fix ComLogTSplit PingEntries Namespace * Update metadata check-spelling run (pull_request_target) for add-com-logger-subtopology Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com> on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev> * Removed un-needed mallocator include in RefTopology.cpp * Update BASE_IDS in Ref, Subtopologies. ComLogTSplit -> ComLoggerTee * Update metadata check-spelling run (pull_request_target) for add-com-logger-subtopology Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com> on-behalf-of: @check-spelling <check-spelling-bot@check-spelling.dev> * Removed unneeded headers is RefTopologyDefs.hpp * ComFprime fix: subtopology state references and configObjects phased code * Queue size bigger in ComFprime * Add missing tearDownComponents phase to comQueue(comFprime) component in ComFprime. --------- Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com> Co-authored-by: Moises Mata <moisesmata@users.noreply.github.com>
29 lines
1.1 KiB
Fortran
29 lines
1.1 KiB
Fortran
module ComFprime {
|
|
# Communications driver. May be swapped out with other comm drivers like UART in this file
|
|
# to use another driver in the Comms Subtopology
|
|
instance comDriver: Drv.TcpClient base id ComFprimeConfig.BASE_ID + 0x0B00 \
|
|
{
|
|
phase Fpp.ToCpp.Phases.configComponents """
|
|
if (state.comFprime.hostname != nullptr && state.comFprime.port != 0) {
|
|
ComFprime::comDriver.configure(state.comFprime.hostname, state.comFprime.port);
|
|
}
|
|
"""
|
|
|
|
phase Fpp.ToCpp.Phases.startTasks """
|
|
// Initialize socket client communication if and only if there is a valid specification
|
|
if (state.comFprime.hostname != nullptr && state.comFprime.port != 0) {
|
|
Os::TaskString name("ReceiveTask");
|
|
ComFprime::comDriver.start(name, ComFprimeConfig::Priorities::comDriver, ComFprimeConfig::StackSizes::comDriver);
|
|
}
|
|
"""
|
|
|
|
phase Fpp.ToCpp.Phases.stopTasks """
|
|
ComFprime::comDriver.stop();
|
|
"""
|
|
|
|
phase Fpp.ToCpp.Phases.freeThreads """
|
|
(void)ComFprime::comDriver.join();
|
|
"""
|
|
}
|
|
}
|