Lely core libraries  2.2.5
lely::canopen Namespace Reference

The namespace for the C++ CANopen application library. More...

Namespaces

 detail
 The namespace for implementation details of the C++ CANopen application library.
 

Data Structures

class  AsyncMaster
 An asynchronous CANopen master. More...
 
class  BasicDriver
 The base class for drivers for remote CANopen nodes. More...
 
class  BasicLogicalDriver
 The base class for drivers for logical devices on remote CANopen nodes. More...
 
class  BasicLogicalDriver< BasicDriver >
 The base class for drivers for logical devices on remote CANopen nodes. More...
 
class  BasicMaster
 The CANopen master. More...
 
class  BasicSlave
 The base class for CANopen slaves. More...
 
class  Device
 The CANopen device description. More...
 
class  DriverBase
 The abstract driver interface for a remote CANopen node. More...
 
class  FiberDriver
 A CANopen driver running its tasks and callbacks in fibers. More...
 
class  LogicalDriverBase
 The abstract driver interface for a logical device on a remote CANopen node. More...
 
class  LoopDriver
 A CANopen driver running its own dedicated event loop in a separate thread. More...
 
struct  LssAddress
 The 128-bit number uniquely identifying each CANopen node. More...
 
class  LssFastscanRequest
 An 'LSS Fastscan' request. More...
 
class  LssGetIdRequest
 An LSS 'inquire node-ID' request. More...
 
class  LssGetProductCodeRequest
 An LSS 'inquire identity product-code' request. More...
 
class  LssGetRevisionRequest
 An LSS 'inquire identity revision-number' request. More...
 
class  LssGetSerialNrRequest
 An LSS 'inquire identity serial-number' request. More...
 
class  LssGetVendorIdRequest
 An LSS 'inquire identity vendor-ID' request. More...
 
class  LssIdNonConfigRequest
 An LSS 'identify non-configured remote slave' request. More...
 
class  LssMaster
 The base class for CANopen LSS masters. More...
 
class  LssSetBitrateRequest
 An LSS 'configure bit timing parameters' request. More...
 
class  LssSetIdRequest
 An LSS 'configure node-ID' request. More...
 
class  LssSlowscanRequest
 An 'LSS Slowscan' request. More...
 
class  LssStoreRequest
 An LSS 'store configuration' request. More...
 
class  LssSwitchBitrateRequest
 An LSS 'activate bit timing parameters' request. More...
 
class  LssSwitchRequest
 An LSS 'switch state global' request. More...
 
class  LssSwitchSelectiveRequest
 An LSS 'switch state selective' request. More...
 
class  Node
 The base class for CANopen nodes. More...
 
class  Sdo
 A Client-SDO queue. More...
 
class  SdoDownloadRequest
 An SDO download (i.e., write) request. More...
 
class  SdoError
 The type of exception thrown when an SDO abort code is received. More...
 
class  SdoUploadRequest
 An SDO upload (i.e., read) request. More...
 

Typedefs

template<class T >
using LssPromise = ev::Promise< T, ::std::exception_ptr >
 A helper alias template for the type of promise used to store the result of an asynchronous LSS request. More...
 
template<class T >
using LssFuture = ev::Future< T, ::std::exception_ptr >
 A helper alias template for the type of future used to retrieve the result of an asynchronous LSS request. More...
 
template<class T >
using SdoPromise = ev::Promise< T, ::std::exception_ptr >
 A helper alias template for the type of promise used to store the result of an asynchronous SDO request. More...
 
template<class T >
using SdoFuture = ev::Future< T, ::std::exception_ptr >
 A helper alias template for the type of future used to retrieve the result of an asynchronous SDO request. More...
 

Enumerations

enum  LssState { LssState::WAITING = 0, LssState::CONFIG = 1 }
 The states of the LSS finite state automaton (FSA) of a slave device. More...
 
enum  NmtCommand {
  NmtCommand::START = 0x01, NmtCommand::STOP = 0x02, NmtCommand::ENTER_PREOP = 0x80, NmtCommand::RESET_NODE = 0x81,
  NmtCommand::RESET_COMM = 0x82
}
 The NMT command specifiers. More...
 
enum  NmtState {
  NmtState::BOOTUP = 0x00, NmtState::STOP = 0x04, NmtState::START = 0x05, NmtState::RESET_NODE = 0x06,
  NmtState::RESET_COMM = 0x07, NmtState::PREOP = 0x7f, NmtState::TOGGLE = 0x80
}
 The NMT states. More...
 
enum  SdoErrc : uint32_t {
  SdoErrc::TOGGLE = UINT32_C(0x05030000), SdoErrc::TIMEOUT = UINT32_C(0x05040000), SdoErrc::NO_CS = UINT32_C(0x05040001), SdoErrc::BLK_SIZE = UINT32_C(0x05040002),
  SdoErrc::BLK_SEQ = UINT32_C(0x05040003), SdoErrc::BLK_CRC = UINT32_C(0x05040004), SdoErrc::NO_MEM = UINT32_C(0x05040005), SdoErrc::NO_ACCESS = UINT32_C(0x06010000),
  SdoErrc::NO_READ = UINT32_C(0x06010001), SdoErrc::NO_WRITE = UINT32_C(0x06010002), SdoErrc::NO_OBJ = UINT32_C(0x06020000), SdoErrc::NO_PDO = UINT32_C(0x06040041),
  SdoErrc::PDO_LEN = UINT32_C(0x06040042), SdoErrc::PARAM = UINT32_C(0x06040043), SdoErrc::COMPAT = UINT32_C(0x06040047), SdoErrc::HARDWARE = UINT32_C(0x06060000),
  SdoErrc::TYPE_LEN = UINT32_C(0x06070010), SdoErrc::TYPE_LEN_HI = UINT32_C(0x06070012), SdoErrc::TYPE_LEN_LO = UINT32_C(0x06070013), SdoErrc::NO_SUB = UINT32_C(0x06090011),
  SdoErrc::PARAM_VAL = UINT32_C(0x06090030), SdoErrc::PARAM_HI = UINT32_C(0x06090031), SdoErrc::PARAM_LO = UINT32_C(0x06090032), SdoErrc::PARAM_RANGE = UINT32_C(0x06090036),
  SdoErrc::NO_SDO = UINT32_C(0x060a0023), SdoErrc::ERROR = UINT32_C(0x08000000), SdoErrc::DATA = UINT32_C(0x08000020), SdoErrc::DATA_CTL = UINT32_C(0x08000021),
  SdoErrc::DATA_DEV = UINT32_C(0x08000022), SdoErrc::NO_OD = UINT32_C(0x08000023), SdoErrc::NO_VAL = UINT32_C(0x08000024)
}
 The SDO abort codes. More...
 

Functions

template<class F >
typename ::std::enable_if< compat::is_invocable< F, ::std::error_code >::value, detail::LssSwitchRequestWrapper< F > * >::type make_lss_switch_request (ev_exec_t *exec, LssState state, F &&con)
 Creates an LSS 'switch state global' request with a completion task. More...
 
template<class F >
typename ::std::enable_if< compat::is_invocable< F, ::std::error_code >::value, detail::LssSwitchSelectiveRequestWrapper< F > * >::type make_lss_switch_selective_request (ev_exec_t *exec, const LssAddress &address, F &&con)
 Creates an LSS 'switch state selective' request with a completion task. More...
 
template<class F >
typename ::std::enable_if< compat::is_invocable< F, ::std::error_code >::value, detail::LssSetIdRequestWrapper< F > * >::type make_lss_set_id_request (ev_exec_t *exec, uint8_t id, F &&con)
 Creates an LSS 'configure node-ID' request with a completion task. More...
 
template<class F >
typename ::std::enable_if< compat::is_invocable< F, ::std::error_code >::value, detail::LssSetBitrateRequestWrapper< F > * >::type make_lss_set_bitrate_request (ev_exec_t *exec, int bitrate, F &&con)
 Creates an LSS 'configure bit timing parameters' request with a completion task. More...
 
template<class F >
typename ::std::enable_if< compat::is_invocable< F, ::std::error_code >::value, detail::LssSwitchBitrateRequestWrapper< F > * >::type make_lss_switch_bitrate_request (ev_exec_t *exec, int delay, F &&con)
 Creates an LSS 'activate bit timing parameters' request with a completion task. More...
 
template<class F >
typename ::std::enable_if< compat::is_invocable< F, ::std::error_code >::value, detail::LssStoreRequestWrapper< F > * >::type make_lss_store_request (ev_exec_t *exec, F &&con)
 Creates an LSS 'store configuration' request with a completion task. More...
 
template<class F >
typename ::std::enable_if< compat::is_invocable< F, ::std::error_code, uint32_t >::value, detail::LssGetVendorIdRequestWrapper< F > * >::type make_lss_get_vendor_id_request (ev_exec_t *exec, F &&con)
 Creates an LSS 'inquire identity vendor-ID' request with a completion task. More...
 
template<class F >
typename ::std::enable_if< compat::is_invocable< F, ::std::error_code, uint32_t >::value, detail::LssGetProductCodeRequestWrapper< F > * >::type make_lss_get_product_code_request (ev_exec_t *exec, F &&con)
 Creates an LSS 'inquire identity product-code' request with a completion task. More...
 
template<class F >
typename ::std::enable_if< compat::is_invocable< F, ::std::error_code, uint32_t >::value, detail::LssGetRevisionRequestWrapper< F > * >::type make_lss_get_revision_request (ev_exec_t *exec, F &&con)
 Creates an LSS 'inquire identity revision-number' request with a completion task. More...
 
template<class F >
typename ::std::enable_if< compat::is_invocable< F, ::std::error_code, uint32_t >::value, detail::LssGetSerialNrRequestWrapper< F > * >::type make_lss_get_serial_nr_request (ev_exec_t *exec, F &&con)
 Creates an LSS 'inquire identity serial-number' request with a completion task. More...
 
template<class F >
typename ::std::enable_if< compat::is_invocable< F, ::std::error_code, uint8_t >::value, detail::LssGetIdRequestWrapper< F > * >::type make_lss_get_id_request (ev_exec_t *exec, F &&con)
 Creates an LSS 'inquire node-ID' request with a completion task. More...
 
template<class F >
typename ::std::enable_if< compat::is_invocable< F, ::std::error_code, bool >::value, detail::LssIdNonConfigRequestWrapper< F > * >::type make_lss_id_non_config_request (ev_exec_t *exec, F &&con)
 Creates an LSS 'identify non-configured remote slave' request with a completion task. More...
 
template<class F >
typename ::std::enable_if< compat::is_invocable< F, ::std::error_code, LssAddress >::value, detail::LssSlowscanRequestWrapper< F > * >::type make_lss_slowscan_request (ev_exec_t *exec, const LssAddress &lo, const LssAddress &hi, F &&con)
 Creates an 'LSS Slowscan' request with a completion task. More...
 
template<class F >
typename ::std::enable_if< compat::is_invocable< F, ::std::error_code, LssAddress >::value, detail::LssFastscanRequestWrapper< F > * >::type make_lss_fastscan_request (ev_exec_t *exec, const LssAddress &address, const LssAddress &mask, F &&con)
 Creates an 'LSS Fastscan' request with a completion task. More...
 
SdoFuture< void > make_empty_sdo_future ()
 Returns an SDO future with a shared state that is immediately ready, containing a successful result of type void. More...
 
template<class T , class V = typename ::std::decay<T>::type>
SdoFuture< V > make_ready_sdo_future (T &&value)
 Returns an SDO future with a shared state that is immediately ready, containing a successful result constructed from std::forward<T>(value). More...
 
template<class T >
SdoFuture< T > make_error_sdo_future (uint8_t id, uint16_t idx, uint8_t subidx, ::std::error_code ec)
 Returns an SDO future with a shared state that is immediately ready, containing a failure result constructed with make_sdo_exception_ptr(uint8_t, uint16_t, uint8_t, ::std::error_code). More...
 
template<class T >
SdoFuture< T > make_error_sdo_future (uint8_t id, uint16_t idx, uint8_t subidx, ::std::error_code ec, const ::std::string &what_arg)
 Returns an SDO future with a shared state that is immediately ready, containing a failure result constructed with make_sdo_exception_ptr(uint8_t, uint16_t, uint8_t, ::std::error_code, const ::std::string&). More...
 
template<class T >
SdoFuture< T > make_error_sdo_future (uint8_t id, uint16_t idx, uint8_t subidx, ::std::error_code ec, const char *what_arg)
 Returns an SDO future with a shared state that is immediately ready, containing a failure result constructed with make_sdo_exception_ptr(uint8_t, uint16_t, uint8_t, ::std::error_code, const char*). More...
 
template<class T , class U , class F >
detail::SdoDownloadRequestWrapper< T > * make_sdo_download_request (ev_exec_t *exec, uint16_t idx, uint8_t subidx, U &&value, F &&con, const ::std::chrono::milliseconds &timeout={})
 Creates an SDO download request with a completion task. More...
 
template<class T , class F >
detail::SdoUploadRequestWrapper< T > * make_sdo_upload_request (ev_exec_t *exec, uint16_t idx, uint8_t subidx, F &&con, const ::std::chrono::milliseconds &timeout={})
 Creates an SDO upload request with a completion task. More...
 
const ::std::error_category & SdoCategory () noexcept
 Returns a reference to the error category object for SDO abort codes.
 
::std::error_code make_error_code (SdoErrc e) noexcept
 Creates an error code corresponding to an SDO abort code.
 
::std::error_condition make_error_condition (SdoErrc e) noexcept
 Creates an error condition corresponding to an SDO abort code.
 
SdoErrc sdo_errc (::std::error_code ec)
 Returns the SDO abort code corresponding to an error 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 attributes if ec is an SDO error (ec.category() == SdoCategory()), or to an std::system_error if not. More...
 
::std::exception_ptr 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 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 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 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 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

The namespace for the C++ CANopen application library.

Typedef Documentation

◆ LssPromise

template<class T >
using lely::canopen::LssPromise = typedef ev::Promise<T, ::std::exception_ptr>

A helper alias template for the type of promise used to store the result of an asynchronous LSS request.

See also
LssFuture<T>

Definition at line 46 of file lss_master.hpp.

◆ LssFuture

template<class T >
using lely::canopen::LssFuture = typedef ev::Future<T, ::std::exception_ptr>

A helper alias template for the type of future used to retrieve the result of an asynchronous LSS request.

See also
LssPromise<T>

Definition at line 55 of file lss_master.hpp.

◆ SdoPromise

template<class T >
using lely::canopen::SdoPromise = typedef ev::Promise<T, ::std::exception_ptr>

A helper alias template for the type of promise used to store the result of an asynchronous SDO request.

See also
SdoFuture<T>

Definition at line 55 of file sdo.hpp.

◆ SdoFuture

template<class T >
using lely::canopen::SdoFuture = typedef ev::Future<T, ::std::exception_ptr>

A helper alias template for the type of future used to retrieve the result of an asynchronous SDO request.

See also
SdoPromise<T>

Definition at line 64 of file sdo.hpp.

Enumeration Type Documentation

◆ LssState

The states of the LSS finite state automaton (FSA) of a slave device.

Enumerator
WAITING 

The state in which a slave may be identified.

CONFIG 

The state in which the node-ID and bit timing parameters of a slave may be configured.

Definition at line 80 of file lss_master.hpp.

◆ NmtCommand

The NMT command specifiers.

Enumerator
START 

Start.

STOP 

Stop.

ENTER_PREOP 

Enter pre-operational.

RESET_NODE 

Reset node.

RESET_COMM 

Reset communication.

Definition at line 42 of file node.hpp.

◆ NmtState

The NMT states.

Enumerator
BOOTUP 

Boot-up.

STOP 

Stopped,.

START 

Operational.

RESET_NODE 

Reset application (a local NMT sub-state).

RESET_COMM 

Reset communication (a local NMT sub-state).

PREOP 

Pre-operational.

TOGGLE 

The mask to get/set the toggle bit from an NMT state.

Definition at line 56 of file node.hpp.

◆ SdoErrc

enum lely::canopen::SdoErrc : uint32_t
strong

The SDO abort codes.

Enumerator
TOGGLE 

Toggle bit not altered.

TIMEOUT 

SDO protocol timed out.

NO_CS 

Client/server command specifier not valid or unknown.

BLK_SIZE 

Invalid block size (block mode only).

BLK_SEQ 

Invalid sequence number (block mode only).

BLK_CRC 

CRC error (block mode only).

NO_MEM 

Out of memory.

NO_ACCESS 

Unsupported access to an object.

NO_READ 

Attempt to read a write only object.

NO_WRITE 

Attempt to write a read only object.

NO_OBJ 

Object does not exist in the object dictionary.

NO_PDO 

Object cannot be mapped to the PDO.

PDO_LEN 

The number and length of the objects to be mapped would exceed the PDO length.

PARAM 

General parameter incompatibility reason.

COMPAT 

General internal incompatibility in the device.

HARDWARE 

Access failed due to a hardware error.

TYPE_LEN 

Data type does not match, length of service parameter does not match.

TYPE_LEN_HI 

Data type does not match, length of service parameter too high.

TYPE_LEN_LO 

Data type does not match, length of service parameter too low.

NO_SUB 

Sub-index does not exist.

PARAM_VAL 

Invalid value for parameter (download only).

PARAM_HI 

Value of parameter written too high (download only).

PARAM_LO 

Value of parameter written too low (download only).

PARAM_RANGE 

Maximum value is less than minimum value (download only).

NO_SDO 

Resource not available: SDO connection.

ERROR 

General error.

DATA 

Data cannot be transferred or stored to the application.

DATA_CTL 

Data cannot be transferred or stored to the application because of local control.

DATA_DEV 

Data cannot be transferred or stored to the application because of the present device state.

NO_OD 

Object dictionary dynamic generation fails or no object dictionary is present (e.g.

object dictionary is generated from file and generation fails because of a file error).

NO_VAL 

No data available. (NO_DATA is a macro defined in <netdb.h>)

Definition at line 42 of file sdo_error.hpp.

Function Documentation

◆ make_lss_switch_request()

template<class F >
typename ::std::enable_if< compat::is_invocable<F, ::std::error_code>::value, detail::LssSwitchRequestWrapper<F>*>::type lely::canopen::make_lss_switch_request ( ev_exec_t exec,
LssState  state,
F &&  con 
)
inline

Creates an LSS 'switch state global' request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to an LSS master.

Parameters
execthe executor used to execute the completion task.
statethe desired state of the LSS slave devices.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1077 of file lss_master.hpp.

◆ make_lss_switch_selective_request()

template<class F >
typename ::std::enable_if< compat::is_invocable<F, ::std::error_code>::value, detail::LssSwitchSelectiveRequestWrapper<F>*>::type lely::canopen::make_lss_switch_selective_request ( ev_exec_t exec,
const LssAddress address,
F &&  con 
)
inline

Creates an LSS 'switch state selective' request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to an LSS master.

Parameters
execthe executor used to execute the completion task.
addressthe address of the LSS slave device to be switched into the configuration state.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1098 of file lss_master.hpp.

◆ make_lss_set_id_request()

template<class F >
typename ::std::enable_if< compat::is_invocable<F, ::std::error_code>::value, detail::LssSetIdRequestWrapper<F>*>::type lely::canopen::make_lss_set_id_request ( ev_exec_t exec,
uint8_t  id,
F &&  con 
)
inline

Creates an LSS 'configure node-ID' request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to an LSS master.

Parameters
execthe executor used to execute the completion task.
idthe requested pending node-ID of the LSS slave device.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1119 of file lss_master.hpp.

◆ make_lss_set_bitrate_request()

template<class F >
typename ::std::enable_if< compat::is_invocable<F, ::std::error_code>::value, detail::LssSetBitrateRequestWrapper<F>*>::type lely::canopen::make_lss_set_bitrate_request ( ev_exec_t exec,
int  bitrate,
F &&  con 
)
inline

Creates an LSS 'configure bit timing parameters' request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to an LSS master.

Parameters
execthe executor used to execute the completion task.
bitratethe requested pending bit rate (in bit/s) of the LSS slave device.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1141 of file lss_master.hpp.

◆ make_lss_switch_bitrate_request()

template<class F >
typename ::std::enable_if< compat::is_invocable<F, ::std::error_code>::value, detail::LssSwitchBitrateRequestWrapper<F>*>::type lely::canopen::make_lss_switch_bitrate_request ( ev_exec_t exec,
int  delay,
F &&  con 
)
inline

Creates an LSS 'activate bit timing parameters' request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to an LSS master.

Parameters
execthe executor used to execute the completion task.
delaythe delay (in milliseconds) before and after the switch, during which CAN frames MUST NOT be sent.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1163 of file lss_master.hpp.

◆ make_lss_store_request()

template<class F >
typename ::std::enable_if< compat::is_invocable<F, ::std::error_code>::value, detail::LssStoreRequestWrapper<F>*>::type lely::canopen::make_lss_store_request ( ev_exec_t exec,
F &&  con 
)
inline

Creates an LSS 'store configuration' request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to an LSS master.

Parameters
execthe executor used to execute the completion task.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1183 of file lss_master.hpp.

◆ make_lss_get_vendor_id_request()

template<class F >
typename ::std::enable_if< compat::is_invocable<F, ::std::error_code, uint32_t>::value, detail::LssGetVendorIdRequestWrapper<F>*>::type lely::canopen::make_lss_get_vendor_id_request ( ev_exec_t exec,
F &&  con 
)
inline

Creates an LSS 'inquire identity vendor-ID' request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to an LSS master.

Parameters
execthe executor used to execute the completion task.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1201 of file lss_master.hpp.

◆ make_lss_get_product_code_request()

template<class F >
typename ::std::enable_if< compat::is_invocable<F, ::std::error_code, uint32_t>::value, detail::LssGetProductCodeRequestWrapper<F>*>::type lely::canopen::make_lss_get_product_code_request ( ev_exec_t exec,
F &&  con 
)
inline

Creates an LSS 'inquire identity product-code' request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to an LSS master.

Parameters
execthe executor used to execute the completion task.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1219 of file lss_master.hpp.

◆ make_lss_get_revision_request()

template<class F >
typename ::std::enable_if< compat::is_invocable<F, ::std::error_code, uint32_t>::value, detail::LssGetRevisionRequestWrapper<F>*>::type lely::canopen::make_lss_get_revision_request ( ev_exec_t exec,
F &&  con 
)
inline

Creates an LSS 'inquire identity revision-number' request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to an LSS master.

Parameters
execthe executor used to execute the completion task.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1237 of file lss_master.hpp.

◆ make_lss_get_serial_nr_request()

template<class F >
typename ::std::enable_if< compat::is_invocable<F, ::std::error_code, uint32_t>::value, detail::LssGetSerialNrRequestWrapper<F>*>::type lely::canopen::make_lss_get_serial_nr_request ( ev_exec_t exec,
F &&  con 
)
inline

Creates an LSS 'inquire identity serial-number' request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to an LSS master.

Parameters
execthe executor used to execute the completion task.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1255 of file lss_master.hpp.

◆ make_lss_get_id_request()

template<class F >
typename ::std::enable_if< compat::is_invocable<F, ::std::error_code, uint8_t>::value, detail::LssGetIdRequestWrapper<F>*>::type lely::canopen::make_lss_get_id_request ( ev_exec_t exec,
F &&  con 
)
inline

Creates an LSS 'inquire node-ID' request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to an LSS master.

Parameters
execthe executor used to execute the completion task.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1273 of file lss_master.hpp.

◆ make_lss_id_non_config_request()

template<class F >
typename ::std::enable_if< compat::is_invocable<F, ::std::error_code, bool>::value, detail::LssIdNonConfigRequestWrapper<F>*>::type lely::canopen::make_lss_id_non_config_request ( ev_exec_t exec,
F &&  con 
)
inline

Creates an LSS 'identify non-configured remote slave' request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to an LSS master.

Parameters
execthe executor used to execute the completion task.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1291 of file lss_master.hpp.

◆ make_lss_slowscan_request()

template<class F >
typename ::std::enable_if< compat::is_invocable<F, ::std::error_code, LssAddress>::value, detail::LssSlowscanRequestWrapper<F>*>::type lely::canopen::make_lss_slowscan_request ( ev_exec_t exec,
const LssAddress lo,
const LssAddress hi,
F &&  con 
)
inline

Creates an 'LSS Slowscan' request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to an LSS master.

Parameters
execthe executor used to execute the completion task.
lothe lower bound of the LSS address of the slave device.
hithe upper bound of the LSS address of the slave device. The vendor-ID and product code MUST be equal to those in lo.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1313 of file lss_master.hpp.

◆ make_lss_fastscan_request()

template<class F >
typename ::std::enable_if< compat::is_invocable<F, ::std::error_code, LssAddress>::value, detail::LssFastscanRequestWrapper<F>*>::type lely::canopen::make_lss_fastscan_request ( ev_exec_t exec,
const LssAddress address,
const LssAddress mask,
F &&  con 
)
inline

Creates an 'LSS Fastscan' request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to an LSS master.

Parameters
execthe executor used to execute the completion task.
addressthe bits of the LSS address of a slave device which are already known and can be skipped during scanning.
maska mask specifying which bits in address are already known and can be skipped during scanning. If a bit in the mask is 1, the corresponding bit in address is not checked.
conthe confirmation function to be called on completion of the LSS request.

Definition at line 1338 of file lss_master.hpp.

◆ make_empty_sdo_future()

SdoFuture<void> lely::canopen::make_empty_sdo_future ( )
inline

Returns an SDO future with a shared state that is immediately ready, containing a successful result of type void.

See also
make_ready_sdo_future(), make_error_sdo_future()

Definition at line 73 of file sdo.hpp.

◆ make_ready_sdo_future()

template<class T , class V = typename ::std::decay<T>::type>
SdoFuture<V> lely::canopen::make_ready_sdo_future ( T &&  value)
inline

Returns an SDO future with a shared state that is immediately ready, containing a successful result constructed from std::forward<T>(value).

See also
make_empty_sdo_future(), make_error_sdo_future()

Definition at line 85 of file sdo.hpp.

◆ make_error_sdo_future() [1/3]

template<class T >
SdoFuture<T> lely::canopen::make_error_sdo_future ( uint8_t  id,
uint16_t  idx,
uint8_t  subidx,
::std::error_code  ec 
)
inline

Returns an SDO future with a shared state that is immediately ready, containing a failure result constructed with make_sdo_exception_ptr(uint8_t, uint16_t, uint8_t, ::std::error_code).

See also
make_empty_sdo_future(), make_ready_sdo_future()

Definition at line 99 of file sdo.hpp.

◆ make_error_sdo_future() [2/3]

template<class T >
SdoFuture<T> lely::canopen::make_error_sdo_future ( uint8_t  id,
uint16_t  idx,
uint8_t  subidx,
::std::error_code  ec,
const ::std::string &  what_arg 
)
inline

Returns an SDO future with a shared state that is immediately ready, containing a failure result constructed with make_sdo_exception_ptr(uint8_t, uint16_t, uint8_t, ::std::error_code, const ::std::string&).

See also
make_empty_sdo_future(), make_ready_sdo_future()

Definition at line 113 of file sdo.hpp.

◆ make_error_sdo_future() [3/3]

template<class T >
SdoFuture<T> lely::canopen::make_error_sdo_future ( uint8_t  id,
uint16_t  idx,
uint8_t  subidx,
::std::error_code  ec,
const char *  what_arg 
)
inline

Returns an SDO future with a shared state that is immediately ready, containing a failure result constructed with make_sdo_exception_ptr(uint8_t, uint16_t, uint8_t, ::std::error_code, const char*).

See also
make_empty_sdo_future(), make_ready_sdo_future()

Definition at line 128 of file sdo.hpp.

◆ make_sdo_download_request()

template<class T , class U , class F >
detail::SdoDownloadRequestWrapper<T>* lely::canopen::make_sdo_download_request ( ev_exec_t exec,
uint16_t  idx,
uint8_t  subidx,
U &&  value,
F &&  con,
const ::std::chrono::milliseconds &  timeout = {} 
)
inline

Creates an SDO download request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to a Client-SDO queue.

Parameters
execthe executor used to execute the completion task.
idxthe object index.
subidxthe object sub-index.
valuethe value to be written.
conthe confirmation function to be called on completion of the SDO request.
timeoutthe SDO timeout. If, after the request is initiated, the timeout expires before receiving a response from the server, the client aborts the transfer with abort code SdoErrc::TIMEOUT.
Returns
a pointer to a new SDO download request.

Definition at line 373 of file sdo.hpp.

◆ make_sdo_upload_request()

template<class T , class F >
detail::SdoUploadRequestWrapper<T>* lely::canopen::make_sdo_upload_request ( ev_exec_t exec,
uint16_t  idx,
uint8_t  subidx,
F &&  con,
const ::std::chrono::milliseconds &  timeout = {} 
)
inline

Creates an SDO upload request with a completion task.

The request deletes itself after it is completed, so it MUST NOT be deleted once it is submitted to a Client-SDO queue.

Parameters
execthe executor used to execute the completion task.
idxthe object index.
subidxthe object sub-index.
conthe confirmation function to be called on completion of the SDO request.
timeoutthe SDO timeout. If, after the request is initiated, the timeout expires before receiving a response from the server, the client aborts the transfer with abort code SdoErrc::TIMEOUT.
Returns
a pointer to a new SDO upload request.

Definition at line 400 of file sdo.hpp.

◆ make_sdo_exception_ptr() [1/3]

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.

Returns
an instance of std::exception_ptr holding a reference to the newly created exception object, or to an instance of std::bad_alloc or std::bad_exception if an exception was thrown during the construction of the exception object.

Definition at line 209 of file sdo_error.cpp.

◆ make_sdo_exception_ptr() [2/3]

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.

Returns
an instance of std::exception_ptr holding a reference to the newly created exception object, or to an instance of std::bad_alloc or std::bad_exception if an exception was thrown during the construction of the exception object.

Definition at line 222 of file sdo_error.cpp.

◆ make_sdo_exception_ptr() [3/3]

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.

Returns
an instance of std::exception_ptr holding a reference to the newly created exception object, or to an instance of std::bad_alloc or std::bad_exception if an exception was thrown during the construction of the exception object.

Definition at line 236 of file sdo_error.cpp.

◆ throw_sdo_error() [1/2]

void lely::canopen::throw_sdo_error ( uint8_t  id,
uint16_t  idx,
uint8_t  subidx,
::std::error_code  ec,
const ::std::string &  what_arg 
)
inline

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.

The string returned by the what() method of the resulting exception is guaranteed to contain what_arg as a substring.

Definition at line 234 of file sdo_error.hpp.

◆ throw_sdo_error() [2/2]

void lely::canopen::throw_sdo_error ( uint8_t  id,
uint16_t  idx,
uint8_t  subidx,
::std::error_code  ec,
const char *  what_arg 
)
inline

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.

The string returned by the what() method of the resulting exception is guaranteed to contain what_arg as a substring.

Definition at line 249 of file sdo_error.hpp.