|
| SdoClient (std::uint8_t id, std::uint16_t cobRx, std::uint16_t cobTx, double timeout, ICanSenderDelegate *sender=nullptr) |
| Constructor, registers CAN sender handle.
|
|
std::uint16_t | getCobIdRx () const |
| Retrieve COB ID of SDO packages received by the drive.
|
|
std::uint16_t | getCobIdTx () const |
| Retrieve COB ID of SDO packages sent by the drive.
|
|
void | configureSender (ICanSenderDelegate *sender) |
| Configure CAN sender delegate handle.
|
|
bool | notify (const std::uint8_t *raw) |
| Notify observers on an SDO package sent by the drive.
|
|
bool | ping () |
| Test whether the node is available or not.
|
|
template<typename T > |
bool | upload (const std::string &name, T *data, std::uint16_t index, std::uint8_t subindex=0x00) |
| Request an SDO package from the drive, only integral types. More...
|
|
template<typename T , typename Fn > |
bool | upload (const std::string &name, Fn &&fn, std::uint16_t index, std::uint8_t subindex=0x00) |
| Request an SDO package from the drive with callback, only integral types. More...
|
|
template<typename T > |
bool | download (const std::string &name, T data, std::uint16_t index, std::uint8_t subindex=0x00) |
| Send an SDO package to the drive, only integral types. More...
|
|
bool | upload (const std::string &name, std::string &s, std::uint16_t index, std::uint8_t subindex=0x00) |
| Request an SDO package from the drive, only string type. More...
|
|
template<typename Fn > |
bool | upload (const std::string &name, Fn &&fn, std::uint16_t index, std::uint8_t subindex=0x00) |
| Request an SDO package from the drive with callback, only string type. More...
|
|
bool | download (const std::string &name, const std::string &s, std::uint16_t index, std::uint8_t subindex=0x00) |
| Send an SDO package to the drive, only string type. More...
|
|
bool | download (const std::string &name, const char *s, std::uint16_t index, std::uint8_t subindex=0x00) |
| String literal overload, overrides templated variant.
|
|
|
bool | send (const std::uint8_t *msg) |
|
bool | uploadInternal (const std::string &name, void *data, std::uint32_t size, std::uint16_t index, std::uint8_t subindex) |
|
bool | downloadInternal (const std::string &name, const void *data, std::uint32_t size, std::uint16_t index, std::uint8_t subindex) |
|
bool | performTransfer (const std::string &name, const std::uint8_t *req, std::uint8_t *resp) |
|
Provides access to SDO reads and writes in a user-friendly manner, sparing clients the need of building char arrays and such. Uses CAN terminology ("upload" means reads from the drive, "downloads" means writes to the drive). Supports normal (segmented) and expedited transfers. Obtains data size from the upload/download data type and takes care of managing the handshake. SDO transfers block with timeout and always wait for the response or confirm message from the drive, signalizing failures accordingly. Also supports SDO abort protocol.