# E94 §6 Control Job state model — encoded as a transition table. # # CJ governs the batch — it owns an ordered list of PRJOBIDs and # proceeds Queued -> Selected -> WaitingForStart -> Executing -> # Completed; from any of those a Stop or Abort diverts to Stopping or # Aborting (then Completed). # # State values are this project's encoding (see control_job_state.hpp). # Host-initiated events (start / pause / resume / stop / abort) arrive # via S16F27; internal events (select / setup_complete / # all_jobs_complete / abort_complete) fire from the equipment's # application logic as the contained PJs progress. initial: Queued transitions: # --- QUEUED ---------------------------------------------------------- - {from: Queued, on: select, to: Selected} - {from: Queued, on: stop, to: Completed} - {from: Queued, on: abort, to: Completed} # --- SELECTED -------------------------------------------------------- - {from: Selected, on: setup_complete, to: WaitingForStart} - {from: Selected, on: stop, to: Stopping} - {from: Selected, on: abort, to: Aborting} # --- WAITING-FOR-START ----------------------------------------------- - {from: WaitingForStart, on: start, to: Executing} - {from: WaitingForStart, on: stop, to: Stopping} - {from: WaitingForStart, on: abort, to: Aborting} # --- EXECUTING ------------------------------------------------------- - {from: Executing, on: pause, to: Paused} - {from: Executing, on: stop, to: Stopping} - {from: Executing, on: abort, to: Aborting} - {from: Executing, on: all_jobs_complete, to: Completed} # --- PAUSED ---------------------------------------------------------- - {from: Paused, on: resume, to: Executing} - {from: Paused, on: stop, to: Stopping} - {from: Paused, on: abort, to: Aborting} # --- STOPPING -------------------------------------------------------- - {from: Stopping, on: all_jobs_complete, to: Completed} - {from: Stopping, on: abort, to: Aborting} # --- ABORTING -------------------------------------------------------- - {from: Aborting, on: abort_complete, to: Completed}