16 #ifndef PSEN_SCAN_V2_STANDALONE_DIAGNOSTICS_H 17 #define PSEN_SCAN_V2_STANDALONE_DIAGNOSTICS_H 32 namespace data_conversion_layer
34 namespace monitoring_frame
51 using RawChunk = std::array<uint8_t, diagnostic::RAW_CHUNK_LENGTH_IN_BYTES>;
92 {
Et::ossd_integr,
"OSSDF1: An error has occurred when testing the OSSDs." },
94 {
Et::win_cln_al,
"Alarm: The front panel of the safety laser scanner must be cleaned." },
102 "In the configuration, check the configured state transitions and switching operations." },
104 "Check whether the wiring and the configuration will match." },
105 {
Et::win_cln_warn,
"Warning: The front panel of the safety laser scanner must be cleaned." },
110 {
Et::edm2_err,
"EDM2: Error in the External Device Monitoring." },
111 {
Et::edm1_err,
"EDM1: Error in the External Device Monitoring." },
112 {
Et::conf_err,
"WAITING_CONF: The safety laser scanner waits for a configuration (e.g. after restoring a configuration). - " 113 "Configure the safety laser scanner." },
121 #define REV(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) arg8, arg7, arg6, arg5, arg4, arg3, arg2, arg1 123 static constexpr std::array<std::array<ErrorType, 8>, 9>
ERROR_BITS{{
196 return error_location_;
201 return ERROR_BITS.at(error_location_.byte()).at(error_location_.bit());
210 : id_(id), error_location_(location)
225 return AMBIGUOUS_DIAGNOSTIC_CODES.find(code) != AMBIGUOUS_DIAGNOSTIC_CODES.end();
235 #endif // PSEN_SCAN_V2_STANDALONE_DIAGNOSTICS_H #define REV(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8)
constexpr ByteLocation byte() const
constexpr BitLocation bit() const
constexpr configuration::ScannerId scannerId() const
Defines an Diagnostic message by defining the ErrorLocation and a scanner ID.
static const std::map< ErrorType, ErrorMessage > ERROR_CODE_TO_STRING
static constexpr uint32_t RAW_CHUNK_UNUSED_OFFSET_IN_BYTES
std::ostream & operator<<(std::ostream &os, const diagnostic::Message &msg)
static constexpr std::array< ScannerId, 4 > VALID_SCANNER_IDS
static constexpr uint32_t RAW_CHUNK_LENGTH_FOR_ONE_DEVICE_IN_BYTES
Contains constants and types needed to define the diagnostic::Message.
RawData serialize(const Message &reply)
bool isAmbiguous(const ErrorType &code)
constexpr bool operator==(const diagnostic::Message &rhs) const
static const std::set< Et > AMBIGUOUS_DIAGNOSTIC_CODES
static constexpr std::array< std::array< ErrorType, 8 >, 9 > ERROR_BITS
configuration::ScannerId id_
Root namespace in which the software components to communicate with the scanner (firmware-version: 2)...
constexpr Message(const configuration::ScannerId &id, const diagnostic::ErrorLocation &location)
constexpr ErrorLocation(const ByteLocation &byte, const BitLocation &bit)
constexpr ErrorLocation errorLocation() const
constexpr ErrorType diagnosticCode() const
ErrorLocation error_location_
std::array< uint8_t, diagnostic::RAW_CHUNK_LENGTH_IN_BYTES > RawChunk
Defines a byte and bit position of an error in the diagnostic chunk.
bool operator==(const Rotation &a, const Rotation &b)
static constexpr uint32_t RAW_CHUNK_LENGTH_IN_BYTES