Lely core libraries 2.3.4
|
A series of SDO download (i.e., write) requests corresponding to the entries in a concise DCF. More...
#include <sdo.hpp>
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. | |
![]() | |
void | Read (const char *path) |
Reads a concise DCF from the specified path. | |
![]() | |
ev::Executor | GetExecutor () const noexcept |
Returns the executor to which the completion task is (to be) submitted. | |
Additional Inherited Members | |
![]() | |
const uint8_t * | begin {nullptr} |
A pointer the the first byte in a concise DCF (see object 1F22 in CiA 302-3 version 4.1.0). | |
const uint8_t * | end {nullptr} |
A pointer to one past the last byte in the concise DCF. | |
![]() | |
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). | |
![]() | |
ev_exec_t * | exec |
A pointer to the executor to which the task is (to be) submitted. | |
ev_task_func_t * | func |
The function to be invoked when the task is run. | |
A series of SDO download (i.e., write) requests corresponding to the entries in a concise DCF.
using lely::canopen::SdoDownloadDcfRequest::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.
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()
.
id | the node-ID. |
idx | the 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. |
subidx | the object sub-index of the last SDO download request. subidx may be 0 in case of an error in the DCF. |
ec | the SDO abort code (0 on success). If the concise DCF is incomplete, the client aborts the transfer with abort code SdoErrc::TYPE_LEN_LO. |