|
Motion Master 6.0.0-alpha.50
Next-generation motion control software
|
#include <cstdint>#include <format>#include <ostream>#include <string>#include <string_view>Go to the source code of this file.
Classes | |
| struct | mm::comm::FoeError |
A structured FoE failure. String-like where a caller only forwards it (operator<<, .message, what()); branchable where a caller must react (kind, retry). More... | |
Namespaces | |
| namespace | mm |
| namespace | mm::comm |
Enumerations | |
| enum class | mm::comm::Retry { mm::comm::Transient , mm::comm::Permanent } |
Retry disposition of a failed operation: whether re-issuing the identical call could plausibly succeed. This is the one axis callers branch on uniformly — a firmware flasher retries Transient failures and aborts on Permanent ones — so it rides alongside the FoE-specific kind rather than being folded into it. More... | |
| enum class | mm::comm::FoeErrorKind { mm::comm::NoResponse , mm::comm::FileNotFound , mm::comm::BufferTooSmall , mm::comm::PacketMismatch , mm::comm::Protocol } |
Specific File-over-EtherCAT failure kind. Transport-agnostic: a SOEM driver decodes it from a negated ec_err_type, a future SPoE driver from its own protocol codes. More... | |
Functions | |
| std::string_view | mm::comm::foeReason (FoeErrorKind kind) |
| Short human-readable reason for a FoE kind (no surrounding punctuation). | |
| Retry | mm::comm::foeRetry (FoeErrorKind kind) |
| Retry disposition implied by a FoE kind. A missing file or an undersized buffer is a fixed condition that will recur identically; a desync or a not-yet-ready slave (the BOOT bootloader warm-up path) is worth another attempt. | |
| std::ostream & | mm::comm::operator<< (std::ostream &os, const FoeError &e) |
Streams the message, so ASSERT_TRUE(r) << r.error() and spdlog {} work unchanged. | |
| FoeError | mm::comm::makeFoeError (FoeErrorKind kind, std::string_view op, uint16_t slave, std::string_view filename) |
Builds a fully-formed FoeError from a decoded kind plus call context. Keeps the message wording identical to the pre-promotion string ("<op> slave N '<file>' failed
(<reason>)") so nothing downstream that logs or displays it changes shape. | |