22#ifndef LELY_COAPP_SDO_ERROR_HPP_
23#define LELY_COAPP_SDO_ERROR_HPP_
29#include <system_error>
159const ::std::error_category&
SdoCategory() noexcept;
182 ::
std::error_code ec) noexcept;
195 uint8_t
id, uint16_t idx, uint8_t subidx, ::
std::error_code ec,
196 const ::
std::
string& what_arg) noexcept;
210 ::
std::error_code ec,
211 const
char* what_arg) noexcept;
218[[noreturn]] inline
void
220 ::
std::error_code ec) {
222 throw SdoError(
id, idx, subidx, ec);
224 throw ::std::system_error(ec);
239 throw ::std::system_error(ec,
what_arg);
254 throw ::std::system_error(ec,
what_arg);
The type of exception thrown when an SDO abort code is received.
uint8_t id() const noexcept
Returns the node-ID.
uint16_t idx() const noexcept
Returns the object index.
uint8_t subidx() const noexcept
Returns the object sub-index.
This header file is part of the Lely libraries; it contains the compiler feature definitions.
@ TOGGLE
The mask to get/set the toggle bit from an NMT state.
const ::std::error_category & SdoCategory() noexcept
Returns a reference to the error category object for SDO abort codes.
SdoErrc
The SDO abort codes.
@ TIMEOUT
SDO protocol timed out.
@ BLK_SIZE
Invalid block size (block mode only).
@ NO_CS
Client/server command specifier not valid or unknown.
@ TYPE_LEN_LO
Data type does not match, length of service parameter too low.
@ PARAM_VAL
Invalid value for parameter (download only).
@ PARAM
General parameter incompatibility reason.
@ NO_VAL
No data available. (NO_DATA is a macro defined in <netdb.h>)
@ NO_SUB
Sub-index does not exist.
@ PARAM_LO
Value of parameter written too low (download only).
@ BLK_SEQ
Invalid sequence number (block mode only).
@ NO_OD
Object dictionary dynamic generation fails or no object dictionary is present (e.g.
@ DATA_DEV
Data cannot be transferred or stored to the application because of the present device state.
@ HARDWARE
Access failed due to a hardware error.
@ PDO_LEN
The number and length of the objects to be mapped would exceed the PDO length.
@ BLK_CRC
CRC error (block mode only).
@ PARAM_HI
Value of parameter written too high (download only).
@ TYPE_LEN
Data type does not match, length of service parameter does not match.
@ PARAM_RANGE
Maximum value is less than minimum value (download only).
@ COMPAT
General internal incompatibility in the device.
@ NO_OBJ
Object does not exist in the object dictionary.
@ NO_WRITE
Attempt to write a read only object.
@ NO_SDO
Resource not available: SDO connection.
@ DATA_CTL
Data cannot be transferred or stored to the application because of local control.
@ TYPE_LEN_HI
Data type does not match, length of service parameter too high.
@ NO_ACCESS
Unsupported access to an object.
@ NO_PDO
Object cannot be mapped to the PDO.
@ DATA
Data cannot be transferred or stored to the application.
@ NO_READ
Attempt to read a write only object.
SdoErrc sdo_errc(::std::error_code ec)
Returns the SDO abort code corresponding to an error code.
::std::error_condition make_error_condition(SdoErrc e) noexcept
Creates an error condition corresponding to an SDO abort code.
void throw_sdo_error(uint8_t id, uint16_t idx, uint8_t subidx, ::std::error_code ec)
Throws a lely::canopen::SdoError with the specified attributes if ec is an SDO error (ec....
::std::error_code make_error_code(SdoErrc e) noexcept
Creates an error code corresponding to an SDO abort code.
::std::exception_ptr make_sdo_exception_ptr(uint8_t id, uint16_t idx, uint8_t subidx, ::std::error_code ec) noexcept
Creates an std::exception_ptr that holds a reference to a lely::canopen::SdoError with the specified ...