|
Motion Master 6.0.0-alpha.86
Next-generation motion control software
|
One step of a procedure — an entry in the fixed, ordered array a procedure publishes. More...
#include <procedure.h>
Public Attributes | |
| std::string | id |
| Stable identifier, e.g. "phase-resistance". | |
| ProgressStatus | status = ProgressStatus::kIdle |
| How far this step got. | |
| nlohmann::json | value |
| What the step produced; null if nothing. | |
| std::optional< std::string > | error |
| Why the step failed. | |
One step of a procedure — an entry in the fixed, ordered array a procedure publishes.
id identifies the step within its procedure and is stable across runs (the client keys its labels off it).
value is a nlohmann::json because what a step produces is entirely up to its procedure: a resistance is a number, a pole-pair count an integer, a raw OS command's reply a byte array, and open phase detection reports eight per-terminal results at once. Each procedure defines its own value type — a struct with a to_json beside the procedure — and ProgressReporter::succeed converts it here, so the body stays typed and self-documenting while the stored form stays uniform. That uniformity is not incidental: ProcedureManager keeps every procedure's snapshot in one map and serves them through one endpoint, so a ProgressStep<T> would buy type safety in the body and force type erasure one layer above it. A null value means the step produced nothing.
What the value still does not carry is presentation — whether 0.123 renders as "123 mΩ" or 1 as "Inverted" is the client's decision, keyed off the step id.
| std::optional<std::string> mm::node::ProgressStep::error |
Why the step failed.
| std::string mm::node::ProgressStep::id |
Stable identifier, e.g. "phase-resistance".
| ProgressStatus mm::node::ProgressStep::status = ProgressStatus::kIdle |
How far this step got.
| nlohmann::json mm::node::ProgressStep::value |
What the step produced; null if nothing.