Call logs & tlms in an object-oriented programing way #2889
-
Hello everyone. (Below is an example to show what I don't want.)
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
If it were me I would write these helper functions you want within I would definitely recommend against inheriting from the F´ autocoded base classes. |
Beta Was this translation helpful? Give feedback.
-
Another possible solution is to use a dispatch table. Essentially, you can use an array of function pointers to the telemetry functions. Here is some pseudo code
You then cal call these functions in a for loop:
We are aware of the problems with large numbers of telemetry, and have it on our list to work on. For now, this solution, or @thomas-bc's are work arounds! |
Beta Was this translation helpful? Give feedback.
-
Dear @thomas-bc and @LeStarch, |
Beta Was this translation helpful? Give feedback.
If it were me I would write these helper functions you want within
component.cpp
.Longer file doesn't mean untidy code; I do understand where you're coming from in terms of trying to compartmentalize things but these telemetry functions are very much belonging to the component.
I would definitely recommend against inheriting from the F´ autocoded base classes.