CANOpen device wrapper class. More...
#include <canopen.h>
Inherits Sink< TPDO >, and Sink< SDO >.
Inherited by mcDSA.
Public Member Functions | |
| Device (Dispatch &canopen, uint8_t id) | |
| Construct new CANOpen Device on network with given ID. | |
| virtual void | callback (SDO rq) |
| implement the callback method to handle incoming data | |
| virtual void | callback (TPDO rq) |
| implement the callback method to handle incoming data | |
| void | read (uint16_t ix, uint8_t sub) |
| read DO with given index and subindex of this device | |
| void | w8 (uint16_t ix, uint8_t sub, uint8_t val) |
| write given value to DO at given index and subindex | |
| void | w16 (uint16_t ix, uint8_t sub, uint16_t val) |
| write given value to DO at given index and subindex | |
| void | w32 (uint16_t ix, uint8_t sub, uint32_t val) |
| write given value to DO at given index and subindex | |
| void | wPDO (const RPDO &rpdo) |
| send PDO | |
| void | enablePDO (RPDO &pdo) |
| enable receiving PDO on device | |
| void | disablePDO (RPDO &pdo) |
| disable receiving PDO on device | |
| void | enablePDO (TPDO &pdo) |
| enable sending PDO on device | |
| void | disablePDO (TPDO &pdo) |
| disable sending PDO on device | |
| bool | full () override |
| check if sink is full | |
| virtual void | push (const TPDO &t) |
| copy semantics does not check for space. guard by using 'if (!full) { ... }' | |
| virtual void | push (TPDO &&)=0 |
| move semantics does not check for space. guard by using 'if (!full) { ... }' | |
| void | trypush (TPDO &&t) |
| use this if you don't care if it's going to be successful. data gets discarded if sink is full. | |
| virtual void | push (const SDO &t) |
| copy semantics does not check for space. guard by using 'if (!full) { ... }' | |
| virtual void | push (SDO &&)=0 |
| move semantics does not check for space. guard by using 'if (!full) { ... }' | |
| void | trypush (SDO &&t) |
| use this if you don't care if it's going to be successful. data gets discarded if sink is full. | |
Public Attributes | |
| uint8_t const | id {} |
| CANOpen node ID [1 - 127]. | |
CANOpen device wrapper class.
inherit and implement callback to use this interface on a CANOpen network