# E30 §6.2 Control State Model — encoded as a transition table. # # Each row is a (from, on) -> (to [, then] [, ack]) tuple: # from: source state # on: triggering event (operator_*, host_request_*) # to: destination state for the transition (optional; omit for "stay put") # then: an automatic follow-on transition (used to advance through the # transient AttemptOnline state in one logical step) # ack: the SEMI-mandated ack code returned to the host (only relevant for # host_request_* events; ignored for operator_* events) # # Rows are evaluated by first match on (from, on). An empty `to`/`then` means # no state change. Unlisted (from, on) pairs are treated as "no transition, # event ignored" (operator events) or "ack = NotAccept" (host events). initial: HostOffline transitions: # --- Host: Request Online (S1F17) ------------------------------------- - {from: HostOffline, on: host_request_online, to: AttemptOnline, then: OnlineRemote, ack: Accept} - {from: OnlineLocal, on: host_request_online, ack: AlreadyOnline} - {from: OnlineRemote, on: host_request_online, ack: AlreadyOnline} - {from: EquipmentOffline, on: host_request_online, ack: NotAccept} - {from: AttemptOnline, on: host_request_online, ack: NotAccept} # --- Host: Request Offline (S1F15) ------------------------------------ - {from: OnlineLocal, on: host_request_offline, to: HostOffline, ack: Accept} - {from: OnlineRemote, on: host_request_offline, to: HostOffline, ack: Accept} # Idempotent when already offline from host's view. - {from: EquipmentOffline, on: host_request_offline, ack: Accept} - {from: HostOffline, on: host_request_offline, ack: Accept} - {from: AttemptOnline, on: host_request_offline, ack: Accept} # --- Operator: Switch Online ----------------------------------------- - {from: EquipmentOffline, on: operator_online, to: AttemptOnline, then: OnlineLocal} - {from: HostOffline, on: operator_online, to: AttemptOnline, then: OnlineLocal} # --- Operator: Switch Offline ---------------------------------------- - {from: OnlineLocal, on: operator_offline, to: HostOffline} - {from: OnlineRemote, on: operator_offline, to: HostOffline} - {from: AttemptOnline, on: operator_offline, to: HostOffline} # --- Operator: Local <-> Remote -------------------------------------- - {from: OnlineRemote, on: operator_local, to: OnlineLocal} - {from: OnlineLocal, on: operator_remote, to: OnlineRemote}