Log Activity and Write Telemetry in Constructor #1412
-
I have a State Machine object and would like to log the state telemetry and activity in the constructor. When I move the Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I wanted to follow up on this question -- is there any way to log in the constructor of a component? |
Beta Was this translation helpful? Give feedback.
-
F Prime's logging and telemetry handling is not guaranteed to be initialized at the time of component construction. Because they are themselves components, this would be a race condition. For those mechanisms to work, the topology ports need to be connected; a process that starts after all of the component instances have been constructed and initialized. BTW; that also means you won't have access to spacecraft time via So, if you want to log something during construction for debugging and testing purposes, you could go around the built-in tooling and just |
Beta Was this translation helpful? Give feedback.
F Prime's logging and telemetry handling is not guaranteed to be initialized at the time of component construction. Because they are themselves components, this would be a race condition. For those mechanisms to work, the topology ports need to be connected; a process that starts after all of the component instances have been constructed and initialized. BTW; that also means you won't have access to spacecraft time via
getTime()
either.So, if you want to log something during construction for debugging and testing purposes, you could go around the built-in tooling and just
printf()
that information. If you need that information to go through a flight or flight-like downlink to a GDS, you …