Is it Possible to Delay Port Calls #4678
Replies: 3 comments
-
|
@Adi-Dal123 I'm not sure there is anything in our standard components to do that other than the sequencer. If you want to bypass the sequencer and commands, you would probably have to design your own. |
Beta Was this translation helpful? Give feedback.
-
|
CmdSequencer does currently stop if any command returns an error, although we've got a feature request open about that which you or someone else could work on. It also should be possible to embed the sequence file inside your flight software, so that you don't need to uplink a separate file... although the only out-of-the-box solution to this that I'm aware of is the MicroFs library, which may not meet your needs for other reasons. (But again, F Prime might accept a feature request to support pulling sequences from other places besides the traditional filesystem.) You will also likely have the problem that CmdSequencer doesn't have loops, so if you want to run at 4 AM on 100 consecutive days, you'll need 100 consecutive commands in your sequencer. FpySequencer might be a better option for that reason, although FpySequencer might still be in active development. I think the important point is that you probably don't really want to be "delaying" port calls, or at least that's probably not the right way to think about it. What you want is a component that executes certain behaviors at certain times or in response to certain conditions. If the CmdSequencer doesn't meet your needs, you'll probably want your own component. But you should be able to look at the CmdSequencer to see how you can delay actions... the short version is that you want to have a Sched port get called regularly (i.e. once a second), and then your component looks at the current time (and at any other conditions) to decide what ports it wants to invoke (getting data, executing certain functions, et cetera). |
Beta Was this translation helpful? Give feedback.
-
|
Have you considered using state machines to do all of this. See
https://fprime.jpl.nasa.gov/latest/docs/how-to/define-state-machines/
It should not be hard to connect a specific time of date to sign event to
transition the state machine.
Len
…On Sun, Feb 1, 2026, 10:27 AM Adi-Dal123 ***@***.***> wrote:
Hello everyone, I'm working on a project that would require delayed
execution of certain functions(for example things like getting data from a
component every day at 4am, having a certain set functions be executed in a
pre-defined way based off of some condition, etc.).
I was initially thinking of doing this via a scheduler but am unable to
figure out how to set up the scheduler in such a way that it would allow
for that delayed functionality. I initially made a scheduler component and
was going to have it intercept commands but realized that isn't best
practice after getting others' opinions on that idea in this forum. I know
the sequencer allows for executing commands at specified times but I am
under the assumption that it will stop if any command returns an error and
the file with the commands needs to be uplinked. Since my use cases require
the functions to be called via ports instead of commands and the ability
for the components to specify function execution at some time instead of
depending on a file being uplinked, I don't think the sequencer would work
for me.
I would greatly appreciate any insights or pointers to documentation about
using F' for delayed inter-component function calls via ports and any other
advice if anyone has worked on a similar problem in the past.
—
Reply to this email directly, view it on GitHub
<#4678>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASN3AE5QUZWTEKJIIJOU4D4JZAQBAVCNFSM6AAAAACTTKXCPKVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZZGQYTKNJYGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone, I'm working on a project that would require delayed execution of certain functions(for example things like getting data from a component every day at 4am, having a certain set functions be executed in a pre-defined way based off of some condition, etc.).
I was initially thinking of doing this via a scheduler but am unable to figure out how to set up the scheduler in such a way that it would allow for that delayed functionality. I initially made a scheduler component and was going to have it intercept commands but realized that isn't best practice after getting others' opinions on that idea in this forum. I know the sequencer allows for executing commands at specified times but I am under the assumption that it will stop if any command returns an error and the file with the commands needs to be uplinked. Since my use cases require the functions to be called via ports instead of commands and the ability for the components to specify function execution at some time instead of depending on a file being uplinked, I don't think the sequencer would work for me.
I would greatly appreciate any insights or pointers to documentation about using F' for delayed inter-component function calls via ports and any other advice if anyone has worked on a similar problem in the past.
Beta Was this translation helpful? Give feedback.
All reactions