diff --git a/docs/Device.md b/docs/Device.md index a60da1c7..623c7ad5 100644 --- a/docs/Device.md +++ b/docs/Device.md @@ -24,7 +24,7 @@ FairMQ devices communicate via the communication patterns offered by ZeroMQ (or Each FairMQ device has an internal state machine: -![FairMQ state machine](images/device_states.png?raw=true "FairMQ state machine") +![FairMQ state machine](images/device_states.svg "FairMQ state machine") The state machine can be querried and controlled via `GetCurrentStateName()` and `ChangeState("")` methods. Only legal state transitions are allowed (see image above). Illegal transitions will fail with an error. diff --git a/docs/images/device_states.png b/docs/images/device_states.png deleted file mode 100644 index 683d139f..00000000 Binary files a/docs/images/device_states.png and /dev/null differ diff --git a/docs/images/device_states.svg b/docs/images/device_states.svg new file mode 100644 index 00000000..5d505502 --- /dev/null +++ b/docs/images/device_states.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fairmq/plugins/Control.cxx b/fairmq/plugins/Control.cxx index f03dcd24..b0bf9214 100644 --- a/fairmq/plugins/Control.cxx +++ b/fairmq/plugins/Control.cxx @@ -324,13 +324,13 @@ void Control::PrintStateMachineColor() << " ║ \033[01;33mINITIALIZING DEVICE\033[0m ║ ║ \033[01;33mRESETTING DEVICE\033[0m ║ \n" << " ╚══════════╦══════════╝ ╚════════ ▲ ═════════╝ \n" << " ┌───────── ▼ ─────────┐ │ ┌────────────────────────────┐ \n" - << " │ \033[01;36mINITIALIZED\033[0m │ │ │ Legend: │ \n" + << " │ \033[01;36mINITIALIZED\033[0m [\033[01;32md\033[0m]──────────┤ │ Legend: │ \n" << " └─────────[\033[01;32mb\033[0m]─────────┘ │ │----------------------------│ \n" << " ╔═════════ ▼ ═════════╗ │ │ [\033[01;32mk\033[0m] keyboard shortcut for │ \n" << " ║ \033[01;33mBINDING\033[0m ║ │ │ interactive controller │ \n" << " ╚══════════╦══════════╝ │ │ ┌────────────────────────┐ │ \n" << " ┌───────── ▼ ─────────┐ │ │ │ \033[01;36mIDLING STATE\033[0m │ │ \n" - << " │ \033[01;36mBOUND\033[0m │ │ │ └────────────────────────┘ │ \n" + << " │ \033[01;36mBOUND\033[0m [\033[01;32md\033[0m]──────────┤ │ └────────────────────────┘ │ \n" << " └─────────[\033[01;32mx\033[0m]─────────┘ │ │ ╔════════════════════════╗ │ \n" << " ╔═════════ ▼ ═════════╗ │ │ ║ \033[01;33mWORKING STATE\033[0m ║ │ \n" << " ║ \033[01;33mCONNECTING\033[0m ║ │ │ ╚════════════════════════╝ │ \n" @@ -362,13 +362,13 @@ void Control::PrintStateMachine() << " ║ INITIALIZING DEVICE ║ ║ RESETTING DEVICE ║ \n" << " ╚══════════╦══════════╝ ╚════════ ▲ ═════════╝ \n" << " ┌───────── ▼ ─────────┐ │ ┌────────────────────────────┐ \n" - << " │ INITIALIZED │ │ │ Legend: │ \n" + << " │ INITIALIZED [d]──────────┤ │ Legend: │ \n" << " └─────────[b]─────────┘ │ │----------------------------│ \n" << " ╔═════════ ▼ ═════════╗ │ │ [k] keyboard shortcut for │ \n" << " ║ BINDING ║ │ │ interactive controller │ \n" << " ╚══════════╦══════════╝ │ │ ┌────────────────────────┐ │ \n" << " ┌───────── ▼ ─────────┐ │ │ │ IDLING STATE │ │ \n" - << " │ BOUND │ │ │ └────────────────────────┘ │ \n" + << " │ BOUND [d]──────────┤ │ └────────────────────────┘ │ \n" << " └─────────[x]─────────┘ │ │ ╔════════════════════════╗ │ \n" << " ╔═════════ ▼ ═════════╗ │ │ ║ WORKING STATE ║ │ \n" << " ║ CONNECTING ║ │ │ ╚════════════════════════╝ │ \n"