Lely core libraries  2.2.5
lely::canopen::SdoUploadRequest< T > Class Template Reference

An SDO upload (i.e., read) request. More...

#include <sdo.hpp>

Inheritance diagram for lely::canopen::SdoUploadRequest< T >:
Collaboration diagram for lely::canopen::SdoUploadRequest< T >:

Public Types

using Signature = void(uint8_t id, uint16_t idx, uint8_t subidx, ::std::error_code ec, T value)
 The signature of the callback function invoked on completion of an SDO upload request. More...
 

Public Member Functions

template<class F >
 SdoUploadRequest (ev_exec_t *exec, F &&con)
 Constructs an empty SDO upload request. More...
 
- Public Member Functions inherited from lely::canopen::detail::SdoRequestBase
ev::Executor GetExecutor () const noexcept
 Returns the executor to which the completion task is (to be) submitted.
 

Additional Inherited Members

- Data Fields inherited from lely::canopen::detail::SdoUploadRequestBase< T >
value {}
 The value received from the SDO server.
 
- Data Fields inherited from lely::canopen::detail::SdoRequestBase
uint8_t id {0}
 The node-ID.
 
uint16_t idx {0}
 The object index.
 
uint8_t subidx {0}
 The object sub-index.
 
::std::chrono::milliseconds timeout
 The SDO timeout. More...
 
::std::error_code ec
 The SDO abort code (0 on success).
 
- Data Fields inherited from ev_task
ev_exec_texec
 A pointer to the executor to which the task is (to be) submitted.
 
ev_task_func_tfunc
 The function to be invoked when the task is run.
 

Detailed Description

template<class T>
class lely::canopen::SdoUploadRequest< T >

An SDO upload (i.e., read) request.

Definition at line 273 of file sdo.hpp.

Member Typedef Documentation

◆ Signature

template<class T>
using lely::canopen::SdoUploadRequest< T >::Signature = void(uint8_t id, uint16_t idx, uint8_t subidx, ::std::error_code ec, T value)

The signature of the callback function invoked on completion of an SDO upload request.

Note that the callback function SHOULD NOT throw exceptions. Since it is invoked from C, any exception that is thrown cannot be caught and will result in a call to std::terminate().

Parameters
idthe node-ID.
idxthe object index.
subidxthe object sub-index.
ecthe SDO abort code (0 on success).
valuethe value received from the SDO server.

Definition at line 288 of file sdo.hpp.

Constructor & Destructor Documentation

◆ SdoUploadRequest()

template<class T>
template<class F >
lely::canopen::SdoUploadRequest< T >::SdoUploadRequest ( ev_exec_t exec,
F &&  con 
)
inline

Constructs an empty SDO upload request.

The object index and sub-index and, optionally, the SDO timeout have to be set before the request can be submitted.

Definition at line 296 of file sdo.hpp.


The documentation for this class was generated from the following files: