Lely core libraries  2.2.5
sdo_error.hpp File Reference

This header file is part of the C++ CANopen application library; it contains the SDO error declarations. More...

#include <lely/features.h>
#include <stdexcept>
#include <string>
#include <system_error>
#include <cstdint>
Include dependency graph for sdo_error.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  lely::canopen::SdoError
 The type of exception thrown when an SDO abort code is received. More...
 
struct  std::is_error_code_enum<::lely::canopen::SdoErrc >
 

Namespaces

 lely::canopen
 The namespace for the C++ CANopen application library.
 

Enumerations

enum class  lely::canopen::SdoErrc : uint32_t {
  lely::canopen::TOGGLE = UINT32_C(0x05030000) , lely::canopen::TIMEOUT = UINT32_C(0x05040000) , lely::canopen::NO_CS = UINT32_C(0x05040001) , lely::canopen::BLK_SIZE = UINT32_C(0x05040002) ,
  lely::canopen::BLK_SEQ = UINT32_C(0x05040003) , lely::canopen::BLK_CRC = UINT32_C(0x05040004) , lely::canopen::NO_MEM = UINT32_C(0x05040005) , lely::canopen::NO_ACCESS = UINT32_C(0x06010000) ,
  lely::canopen::NO_READ = UINT32_C(0x06010001) , lely::canopen::NO_WRITE = UINT32_C(0x06010002) , lely::canopen::NO_OBJ = UINT32_C(0x06020000) , lely::canopen::NO_PDO = UINT32_C(0x06040041) ,
  lely::canopen::PDO_LEN = UINT32_C(0x06040042) , lely::canopen::PARAM = UINT32_C(0x06040043) , lely::canopen::COMPAT = UINT32_C(0x06040047) , lely::canopen::HARDWARE = UINT32_C(0x06060000) ,
  lely::canopen::TYPE_LEN = UINT32_C(0x06070010) , lely::canopen::TYPE_LEN_HI = UINT32_C(0x06070012) , lely::canopen::TYPE_LEN_LO = UINT32_C(0x06070013) , lely::canopen::NO_SUB = UINT32_C(0x06090011) ,
  lely::canopen::PARAM_VAL = UINT32_C(0x06090030) , lely::canopen::PARAM_HI = UINT32_C(0x06090031) , lely::canopen::PARAM_LO = UINT32_C(0x06090032) , lely::canopen::PARAM_RANGE = UINT32_C(0x06090036) ,
  lely::canopen::NO_SDO = UINT32_C(0x060a0023) , lely::canopen::ERROR = UINT32_C(0x08000000) , lely::canopen::DATA = UINT32_C(0x08000020) , lely::canopen::DATA_CTL = UINT32_C(0x08000021) ,
  lely::canopen::DATA_DEV = UINT32_C(0x08000022) , lely::canopen::NO_OD = UINT32_C(0x08000023) , lely::canopen::NO_VAL = UINT32_C(0x08000024)
}
 The SDO abort codes. More...
 

Functions

const ::std::error_category & lely::canopen::SdoCategory () noexcept
 Returns a reference to the error category object for SDO abort codes.
 
::std::error_code lely::canopen::make_error_code (SdoErrc e) noexcept
 Creates an error code corresponding to an SDO abort code.
 
::std::error_condition lely::canopen::make_error_condition (SdoErrc e) noexcept
 Creates an error condition corresponding to an SDO abort code.
 
SdoErrc lely::canopen::sdo_errc (::std::error_code ec)
 Returns the SDO abort code corresponding to an error code.
 
::std::exception_ptr lely::canopen::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 attributes if ec is an SDO error (ec.category() == SdoCategory()), or to an std::system_error if not. More...
 
::std::exception_ptr lely::canopen::make_sdo_exception_ptr (uint8_t id, uint16_t idx, uint8_t subidx, ::std::error_code ec, const ::std::string &what_arg) noexcept
 Creates an std::exception_ptr that holds a reference to a lely::canopen::SdoError with the specified attributes if ec is an SDO error (ec.category() == SdoCategory()), or to an std::system_error if not. More...
 
::std::exception_ptr lely::canopen::make_sdo_exception_ptr (uint8_t id, uint16_t idx, uint8_t subidx, ::std::error_code ec, const char *what_arg) noexcept
 Creates an std::exception_ptr that holds a reference to a lely::canopen::SdoError with the specified attributes if ec is an SDO error (ec.category() == SdoCategory()), or to an std::system_error if not. More...
 
void lely::canopen::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.category() == SdoCategory()), or an std::system_error if not.
 
void lely::canopen::throw_sdo_error (uint8_t id, uint16_t idx, uint8_t subidx, ::std::error_code ec, const ::std::string &what_arg)
 Throws a lely::canopen::SdoError with the specified attributes if ec is an SDO error (ec.category() == SdoCategory()), or an std::system_error if not. More...
 
void lely::canopen::throw_sdo_error (uint8_t id, uint16_t idx, uint8_t subidx, ::std::error_code ec, const char *what_arg)
 Throws a lely::canopen::SdoError with the specified attributes if ec is an SDO error (ec.category() == SdoCategory()), or an std::system_error if not. More...
 

Detailed Description

This header file is part of the C++ CANopen application library; it contains the SDO error declarations.

Author
J. S. Seldenthuis jseld.nosp@m.enth.nosp@m.uis@l.nosp@m.ely..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file sdo_error.hpp.