Replies: 1 comment 1 reply
-
Thanks for the good proposal. I have implemented the Mode management component and it works well. I have a question regarding the port invocations. Is there a way to make an announcement to all ports? or it should be invoked one by one since in F Prime an output port can only be connected to one input port. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a follow-up to this discussion.
Here is a proposal for how to do basic mode management:
1) FPP updates - Add a new
SpacecraftMode
enumeration that lives in the project config directory. That allows projects to customize it to modes they like. For instance:Add an optional
modes
attribute to commands that specify a set of modes where the command is valid. For instance:Define a port type that allows getting the current mode (
SpacecraftModeGet
) for command checking, and setting (SpacecraftModeSet
) for components (like fault protection) to set the mode.2) FPP Autocoder
For commands that have the
modes
attribute, add a call to generated code to check the spacecraft mode via theSpacecraftModeGet
port prior to executing the command.3) Components: Write a basic
SpacecraftMode
component. This component would implement theSpacecraftModeGet
andSpacecraftModeSet
ports to store the current spacecraft mode. It would have commands to set the mode for ground operators.If projects wanted more sophisticated mode management, they could implement their own component with
SpacecraftModeGet
andSpacecraftModeSet
ports, but the above would provide a basic implementation.This could also be wired into the basic fault protection component as a mode switch due to a fault.
Beta Was this translation helpful? Give feedback.
All reactions