A CANopen SDO client.
More...
#include <can/CANOpenSDOClient.h>
|
virtual void | onDestructFuture (uint64 requestID) |
|
|
| CANOpenSDOClient (CANInterfacePtr iIfc) |
| The constructor. More...
|
|
virtual | ~CANOpenSDOClient () |
| The destructor. More...
|
|
|
template<typename T > |
SDOFuture< T > | read (uint8 node, uint16 index, uint8 subIndex) |
| Perform an expedited SDO upload (a read operation) More...
|
|
template<typename T > |
T | readSync (uint8 node, uint16 index, uint8 subIndex, Duration waitTime=Duration::milliseconds(50), uint32 maxTries=5) |
| Perform a synchronous SDO upload (read operation) More...
|
|
CANOpenNodeInfo | readNodeInfo (uint8 node) |
| Reads informations about a node via SDOs. More...
|
|
|
template<typename T > |
SDOFuture< void > | write (uint8 node, uint16 index, uint8 subIndex, T value) |
| Perform an expedited SDO download (a write operation) More...
|
|
template<typename T > |
SDOFuture< void > | writeSync (uint8 node, uint16 index, uint8 subIndex, T value, Duration waitTime=Duration::milliseconds(50), uint32 maxTries=5) |
| Perform a synchronous write operation. More...
|
|
A CANopen SDO client.
An implementation of a CANopen SDO client. This class is able to read and write service data objects (SDO) from other CANopen nodes.
◆ CANOpenSDOClient()
The constructor.
- Parameters
-
[in] | iIfc | The interface to the CAN bus |
◆ ~CANOpenSDOClient()
◆ read()
SDOFuture<T> read |
( |
uint8 |
node, |
|
|
uint16 |
index, |
|
|
uint8 |
subIndex |
|
) |
| |
|
inline |
Perform an expedited SDO upload (a read operation)
- Parameters
-
[in] | node | The requested CANopen node. |
[in] | index | The index of the requested SDO. |
[in] | subIndex | The requested sub-index. |
- Returns
- The boost future object, which must be used for getting the answer.
◆ readSync()
Perform a synchronous SDO upload (read operation)
- Parameters
-
[in] | node | The requested CANopen node. |
[in] | index | The index of the requested SDO. |
[in] | subIndex | The requested sub-index. |
[in] | waitTime | The wait time for the read operation. |
[in] | maxTries | The maximum number of tries. |
- Returns
- The value.
◆ readNodeInfo()
Reads informations about a node via SDOs.
- Parameters
-
- Returns
- Informations about the CANOpen node
◆ write()
SDOFuture<void> write |
( |
uint8 |
node, |
|
|
uint16 |
index, |
|
|
uint8 |
subIndex, |
|
|
T |
value |
|
) |
| |
|
inline |
Perform an expedited SDO download (a write operation)
- Parameters
-
[in] | node | The requested CANopen node. |
[in] | index | The index of the requested SDO. |
[in] | subIndex | The requested sub-index. |
[in] | value | The value to write. |
- Returns
- The boost future object, which must be used for getting the answer.
◆ writeSync()
Perform a synchronous write operation.
- Parameters
-
[in] | node | The requested CANopen node. |
[in] | index | The index of the requested SDO. |
[in] | subIndex | The requested sub-index. |
[in] | value | The value. |
[in] | waitTime | The wait time for the read operation. |
[in] | maxTries | The maximum number of tries. |
- Returns
- The boost future object, which must be used for getting the error code.
◆ onDestructFuture()
virtual void onDestructFuture |
( |
uint64 |
requestID | ) |
|
|
virtual |
The documentation for this class was generated from the following file: