Motion Master 6.0.0-alpha.50
Next-generation motion control software
Loading...
Searching...
No Matches
foe_error_codes.h
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <cstdint>
5#include <nlohmann/json_fwd.hpp>
6#include <string_view>
7
8namespace mm::comm {
9
12 uint32_t code = 0;
13 std::string_view name;
14 std::string_view description;
15};
16
24void to_json(nlohmann::json& j, const FoeErrorCode& e);
25
30inline constexpr auto kFoeErrorCodes = std::to_array<FoeErrorCode>({
31 {0x00000000, "Undefined", "Unspecified or vendor-specific FoE error"},
32 {0x00008000, "Not defined", "General FoE error with no further classification"},
33 {0x00008001, "Not found", "The requested file was not found on the slave"},
34 {0x00008002, "Access denied", "Access to the requested file is denied"},
35 {0x00008003, "Disk full", "The slave has insufficient storage to complete the transfer"},
36 {0x00008004, "Illegal", "Illegal FoE operation"},
37 {0x00008005, "Packet number wrong",
38 "Received a data packet with an unexpected sequence number"}, // NOLINT
39 {0x00008006, "Already exists", "The file already exists on the slave"},
40 {0x00008007, "No user", "No user is logged in; authentication required"},
41 {0x00008008, "Bootstrap only", "This operation is only available in Bootstrap state"},
42 {0x00008009, "Not Bootstrap", "This operation is not available in Bootstrap state"},
43 {0x0000800A, "No rights", "Insufficient rights to perform the requested operation"},
44 {0x0000800B, "Program error", "A program error occurred on the slave"},
45});
46
47} // namespace mm::comm
Definition al_status_codes.cc:5
void to_json(nlohmann::json &j, const AlStatusCode &c)
Serialises an AlStatusCode to JSON.
Definition al_status_codes.cc:7
constexpr auto kFoeErrorCodes
Catalogue of FoE error codes defined in ETG.1000.6 ยง5.8.5, Table 93.
Definition foe_error_codes.h:30
Metadata for a single FoE error code entry.
Definition foe_error_codes.h:11
std::string_view description
Full description of the error condition.
Definition foe_error_codes.h:14
uint32_t code
32-bit FoE error code as sent in the FoE ERROR packet.
Definition foe_error_codes.h:12
std::string_view name
Short human-readable name.
Definition foe_error_codes.h:13