fprime/Svc/SeqDispatcher/SeqDispatcher.fpp
Zimri Leisher b0716ad605
Add sequence dispatcher component (#2731)
* Add sequence dispatcher component

* Add seq start port to cmd sequencer

* Update author names and some include paths

* Get fully compiling, move consts/enums to correct places, check for connections on init

* Add spelling exceptions

* Get unit tests almost compiling...

* Fix string type in port, call component init in test

* Fix unit test compilation errors and assertions

* Switch back to using StringBase

* Switch to FwIndexType, remove textLogIn

* UpperCamel events, add warning for unexpected seq start

* remove init method, add check for connected to getNextAvailableIdx

* Update sdd, change event from low to high, static cast a portnum

* Add state diagram, add more warnings, fix wrong header types, use assert instead of warning for runSeq

---------

Co-authored-by: Zimri Leisher <zimri.leisher@fireflyspace.com>
2024-09-17 17:55:09 -07:00

55 lines
1.8 KiB
Fortran

module Svc {
@ Dispatches command sequences to available command sequencers
active component SeqDispatcher {
enum CmdSequencerState {
AVAILABLE = 0
RUNNING_SEQUENCE_BLOCK = 1
RUNNING_SEQUENCE_NO_BLOCK = 2
}
include "SeqDispatcherCommands.fppi"
include "SeqDispatcherTelemetry.fppi"
include "SeqDispatcherEvents.fppi"
@ Dispatches a sequence to the first available command sequencer
async input port seqRunIn: Svc.CmdSeqIn
output port seqRunOut: [SeqDispatcherSequencerPorts] Svc.CmdSeqIn
@ Called by a command sequencer whenever it has finished any sequence
async input port seqDoneIn: [SeqDispatcherSequencerPorts] Fw.CmdResponse
@ Called by cmdsequencer whenever it starts any sequence
async input port seqStartIn: [SeqDispatcherSequencerPorts] Svc.CmdSeqIn
match seqRunOut with seqDoneIn
match seqRunOut with seqStartIn
###############################################################################
# Standard AC Ports: Required for Channels, Events, Commands, and Parameters #
###############################################################################
@ Port for requesting the current time
time get port timeCaller
@ Port for sending command registrations
command reg port cmdRegOut
@ Port for receiving commands
command recv port cmdIn
@ Port for sending command responses
command resp port cmdResponseOut
@ Port for sending textual representation of events
text event port logTextOut
@ Port for sending events to downlink
event port logOut
@ Port for sending telemetry channels to downlink
telemetry port tlmOut
}
}