17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-29 01:07:28 +01:00

hardware protocol v2: answer a subscription with current state

The snapshot sent right after SUBSCRIBE was taken from the previous
frame, which on the first frame of a session meant every value came back
as UNAVAILABLE. The link now publishes the state of the current frame
before the received frames are processed.
This commit is contained in:
2026-09-05 20:40:14 +00:00
parent 91be90548f
commit 6bfd21d135
2 changed files with 5 additions and 0 deletions

View File

@@ -49,6 +49,8 @@ public:
void reset();
// consumes one decoded frame
void handle_packet( decoded_packet const &Packet );
// publishes the state of the current simulation frame, before the received frames are processed
void set_snapshot( state_snapshot const &Snapshot ) { m_snapshot = Snapshot; }
// periodic work: heartbeats, subscription updates, timeouts
void update( double const Deltatime, state_snapshot const &Snapshot );
// copies the current condition into the debug report