Lely core libraries 2.3.4
lely::canopen::SdoDownloadDcfRequest Class Reference

A series of SDO download (i.e., write) requests corresponding to the entries in a concise DCF. More...

#include <sdo.hpp>

Inheritance diagram for lely::canopen::SdoDownloadDcfRequest:
Collaboration diagram for lely::canopen::SdoDownloadDcfRequest:

Public Types

using Signature = void(uint8_t id, uint16_t idx, uint8_t subidx, ::std::error_code ec)
 The signature of the callback function invoked when all SDO download requests are successfully completed, or when an error occurs.
 

Public Member Functions

template<class F >
 SdoDownloadDcfRequest (ev_exec_t *exec, F &&con)
 Constructs an empty SDO download DCF request.
 
- Public Member Functions inherited from lely::canopen::detail::SdoDownloadDcfRequestBase
void Read (const char *path)
 Reads a concise DCF from the specified path.
 
- 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::SdoDownloadDcfRequestBase
const uint8_tbegin {nullptr}
 A pointer the the first byte in a concise DCF (see object 1F22 in CiA 302-3 version 4.1.0).
 
const uint8_tend {nullptr}
 A pointer to one past the last byte in the concise DCF.
 
- 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.
 
bool block {false}
 A flag specifying whether the request should use a block SDO instead of a segmented (or expedited) SDO.
 
::std::chrono::milliseconds timeout
 The SDO timeout.
 
::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

A series of SDO download (i.e., write) requests corresponding to the entries in a concise DCF.

Definition at line 318 of file sdo.hpp.

Member Typedef Documentation

◆ Signature

The signature of the callback function invoked when all SDO download requests are successfully completed, or when an error occurs.

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 of the last SDO download request, whether it completed successfully (ec == 0) or not (ec != 0). idx may be 0 in case of an error in the DCF.
subidxthe object sub-index of the last SDO download request. subidx may be 0 in case of an error in the DCF.
ecthe SDO abort code (0 on success). If the concise DCF is incomplete, the client aborts the transfer with abort code SdoErrc::TYPE_LEN_LO.

Definition at line 337 of file sdo.hpp.

Constructor & Destructor Documentation

◆ SdoDownloadDcfRequest()

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

Constructs an empty SDO download DCF request.

The concise DCF and, optionally, the SDO timeout have to be set before the request can be submitted.

See also
SdoDownloadDcfRequestBase::Read()

Definition at line 348 of file sdo.hpp.


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