Executing Port in setupTopology() #2918
Unanswered
maxfirefly
asked this question in
Q&A
Replies: 1 comment 13 replies
-
There is nothing special about calling ports in a rate group. As long as the ports are all connected when you call your |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is a "startup job" that I want to execute before the rategroups of my deployment start ticking. One way I have thought of doing this entails calling a public function in my component at the very end of setupTopology(), e.g.:
where
publicFunction()
calls a number of components' ports that are configured and connected intopology.fpp
is there any risk/inherent problems with this design pattern that includes calling ports outside the context of rategroups?
an alternate implementation includes putting the
publicFunction()
inside one of the rate groups, and only calling it once during the first execution utilizing afirstCycle = true
type flag. this also requires setting theoffset
of all other rategroups to be nonzero to make sure this port is executed first. it also means the port will only be used once, but executed continuouslyif there's any reason to use one implementation over the other, or an entirely different implementation, do let me know. thanks
Beta Was this translation helpful? Give feedback.
All reactions