cxx/core/heartbeats: provide reason for interrupt
This is a small (but independent) step towards implementing #96. Now the heartbeat manager can provide a reason for interrupting the satellite operation. Right now this is only used for logging, but will later on be useful for setting as a status.
I also changed the log levels of a few things in the FSM because I felt like the same message was repeated several times.
Below are two logs for the same situation, Kronos being terminated from ORBIT
state with Aigisthos listening to its heartbeats.
Before:
Satellite Kronos
^C|2024-07-17 15:50:08.646| STATUS [DEFAULT] Terminating satellite
|2024-07-17 15:50:08.646| STATUS [FSM] Interrupting...
|2024-07-17 15:50:08.646| INFO [FSM] Reacting to transition interrupt
|2024-07-17 15:50:08.646| STATUS [FSM] New state: interrupting
|2024-07-17 15:50:08.646| WARNING [FSM] Interrupting satellite operation
|2024-07-17 15:50:08.646| INFO [FSM] Calling interrupting function of satellite...
|2024-07-17 15:50:08.646| INFO [SATELLITE] Interrupting from ORBIT (default implementation)
|2024-07-17 15:50:08.646| INFO [FSM] Reacting to transition interrupted
|2024-07-17 15:50:08.646| STATUS [FSM] New state: SAFE
Satellite Aigisthos
|2024-07-17 15:50:08.694| STATUS [FSM] Interrupting...
|2024-07-17 15:50:08.694| INFO [FSM] Reacting to transition interrupt
|2024-07-17 15:50:08.695| STATUS [FSM] New state: interrupting
|2024-07-17 15:50:08.695| INFO [FSM] Calling interrupting function of satellite...
|2024-07-17 15:50:08.695| INFO [SATELLITE] Interrupting from ORBIT (default implementation)
|2024-07-17 15:50:08.695| INFO [FSM] Reacting to transition interrupted
|2024-07-17 15:50:08.695| WARNING [FSM] Interrupting satellite operation
|2024-07-17 15:50:08.695| STATUS [FSM] New state: SAFE
After:
Satellite Kronos
^C|2024-07-17 15:40:08.787| STATUS [DEFAULT] Terminating satellite
|2024-07-17 15:40:08.787| INFO [FSM] Reacting to transition interrupt
|2024-07-17 15:40:08.787| STATUS [FSM] New state: interrupting
|2024-07-17 15:40:08.787| INFO [FSM] Calling interrupting function of satellite...
|2024-07-17 15:40:08.787| INFO [SATELLITE] Interrupting from ORBIT (default implementation)
|2024-07-17 15:40:08.787| INFO [FSM] Reacting to transition interrupted
|2024-07-17 15:40:08.787| WARNING [FSM] Interrupting satellite operation: Stopping satellite
|2024-07-17 15:40:08.787| STATUS [FSM] New state: SAFE
Satellite Aigisthos
|2024-07-17 15:40:10.608| INFO [FSM] Reacting to transition interrupt
|2024-07-17 15:40:10.608| STATUS [FSM] New state: interrupting
|2024-07-17 15:40:10.608| WARNING [FSM] Interrupting satellite operation: Sputnik.Kronos reports state SAFE
|2024-07-17 15:40:10.608| INFO [FSM] Calling interrupting function of satellite...
|2024-07-17 15:40:10.608| INFO [SATELLITE] Interrupting from ORBIT (default implementation)
|2024-07-17 15:40:10.608| INFO [FSM] Reacting to transition interrupted
|2024-07-17 15:40:10.608| STATUS [FSM] New state: SAFE