Skip to content

Improve start stop

Afonso Mukai requested to merge improve-start-stop into master

Created by: michele-brambilla

This PR closes #54 (closed), closes #55 (closed).

  • If the user provides a start time the Streamer uses offsetsForTimes to make sure that there are no earlier messages in the log. Indeed this is not enough, as #54 (closed) points out. Usually there are unwanted messages among the offset the method returns and the actual target. The solution is in Streamer::write: the message timestamp is extracted using DemuxTopic::time_difference_from_message and compared against the start time. Earlier messages are discarded.
  • After listening for new commands Master checks the status off all the StreamMaster. If any of them is in the StreamMasterErrorCode::is_removable status is removed from the list (erased).
  • If the user issues a stop command specifying the stop time StreamMaster::forceStop makes sure that at most 5 seconds after the stop time (comparing with the system time) all the streams are closed and the StreamMaster is removable.

Merge request reports