-While list_in !empty and list_out !empty
- 1. If list_in is empty (need a seek)
- 1.1 Add requests to list_in
- 1.1.1 Find all time requests with the lowest start time in list_out
- (ltime)
- 1.1.2 Find all position requests with the lowest position in list_out
- (lpos)
- 1.1.3 If lpos.start time < ltime
- - Add lpos to list_in, remove them from list_out
- 1.1.4 Else, (lpos.start time >= ltime)
- - Add ltime to list_in, remove them from list_out
- 1.2 Seek
- 1.2.1 If first request in list_in is a time request
- 1.2.1.1 Seek to that time
- 1.2.2 Else, the first request in list_in is a position request
- 1.2.2.1 Seek to that position
- 1.3 Call begin for all list_in members
- (1.3.1 begin hooks called)
- (1.3.2 middle hooks added)
- 2. Else, list_in is not empty, we continue a read
- 2.1 For each req of list_out
- - if req.start time == current context time
- - Add to list_in, remove from list_out
- - Call begin
- - if req.start position == current position
- - Add to list_in, remove from list_out
- - Call begin
-
- 3. Find end criterions
- 3.1 End time
- 3.1.1 Find lowest end time in list_in
- 3.1.2 Find lowest start time in list_out
- 3.1.3 Use lowest of both as end time
- 3.2 Number of events
- 3.2.1 Find lowest number of events in list_in
- 3.3 End position
- 3.3.1 Find lowest end position in list_in
- 3.3.2 Find lowest start position in list_out
- 3.3.3 Use lowest of both as end position
-
- 4. Call process traceset middle
- 4.1 Call process traceset middle (Use end criterion found in 3)
- * note : end criterion can also be viewer's hook returning TRUE
- 5. After process traceset middle
- - if current context time > traceset.end time
- - For each req in list_in
- - Call end for req
- - remove req from list_in
- 5.1 For each req in list_in
- - req.num -= count
- - if req.num == 0
- - Call end for req
- - remove req from list_in
- - if current context time > req.end time
- - Call end for req
- - remove req from list_in
- - if req.end pos == current pos
- - Call end for req
- - remove req from list_in
- - if req.stop_flag == TRUE
- - Call end for req
- - remove req from list_in