|
Motion Master 6.0.0-alpha.111
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: the SOEM driver decodes it from the error code of the slave's FoE Error packet, or from a negated ec_err_type when the slave sent none. The SPoE driver decodes it 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. | |
| FoeError | mm::comm::makeFoeRefusal (uint32_t code, std::string_view text, std::string_view op, uint16_t slave, std::string_view filename) |
| Builds the FoeError for a transfer the slave refused with an FoE Error packet, naming the code as an SDO failure names its abort code: "(FoE error 0x8001: Not found)". | |