MIRA
Classes | Public Member Functions | List of all members
CANOpenSDOClient Class Reference

A CANopen SDO client. More...

#include <can/CANOpenSDOClient.h>

Inheritance diagram for CANOpenSDOClient:
Inheritance graph
[legend]

Public Member Functions

virtual void onDestructFuture (uint64 requestID)
 
Constructors and destructor
 CANOpenSDOClient (CANInterfacePtr iIfc)
 The constructor. More...
 
virtual ~CANOpenSDOClient ()
 The destructor. More...
 
Expedited SDO uploads for standard data types.
template<typename T >
SDOFuture< T > read (uint8 node, uint16 index, uint8 subIndex)
 Perform an expedited SDO upload (a read operation) More...
 
template<typename 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...
 
Expedited SDO downloads for standard data types.
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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ CANOpenSDOClient()

The constructor.

Parameters
[in]iIfcThe interface to the CAN bus

◆ ~CANOpenSDOClient()

virtual ~CANOpenSDOClient ( )
virtual

The destructor.

Member Function Documentation

◆ read()

SDOFuture<T> read ( uint8  node,
uint16  index,
uint8  subIndex 
)
inline

Perform an expedited SDO upload (a read operation)

Parameters
[in]nodeThe requested CANopen node.
[in]indexThe index of the requested SDO.
[in]subIndexThe requested sub-index.
Returns
The boost future object, which must be used for getting the answer.

◆ readSync()

T readSync ( uint8  node,
uint16  index,
uint8  subIndex,
Duration  waitTime = Duration::milliseconds(50),
uint32  maxTries = 5 
)
inline

Perform a synchronous SDO upload (read operation)

Parameters
[in]nodeThe requested CANopen node.
[in]indexThe index of the requested SDO.
[in]subIndexThe requested sub-index.
[in]waitTimeThe wait time for the read operation.
[in]maxTriesThe maximum number of tries.
Returns
The value.

◆ readNodeInfo()

CANOpenNodeInfo readNodeInfo ( uint8  node)

Reads informations about a node via SDOs.

Parameters
[in]nodeID of the node
Returns
Informations about the CANOpen node

◆ write()

SDOFuture<void> write ( uint8  node,
uint16  index,
uint8  subIndex,
value 
)
inline

Perform an expedited SDO download (a write operation)

Parameters
[in]nodeThe requested CANopen node.
[in]indexThe index of the requested SDO.
[in]subIndexThe requested sub-index.
[in]valueThe value to write.
Returns
The boost future object, which must be used for getting the answer.

◆ writeSync()

SDOFuture<void> writeSync ( uint8  node,
uint16  index,
uint8  subIndex,
value,
Duration  waitTime = Duration::milliseconds(50),
uint32  maxTries = 5 
)
inline

Perform a synchronous write operation.

Parameters
[in]nodeThe requested CANopen node.
[in]indexThe index of the requested SDO.
[in]subIndexThe requested sub-index.
[in]valueThe value.
[in]waitTimeThe wait time for the read operation.
[in]maxTriesThe 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

Implements SDOClientBase.


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