Representation of TPDO protocol.
#include <PdoProtocol.hpp>
|
bool | accept (const std::uint8_t *data, unsigned int size) |
| Invoke registered callback on raw CAN message data.
|
|
template<typename... Ts, typename Fn > |
void | registerHandler (Fn &&fn) |
| Register callback. More...
|
|
void | unregisterHandler () |
| Unregister callback.
|
|
| PdoProtocol (std::uint8_t id, std::uint16_t cob, unsigned int n, SdoClient *sdo) |
| Constructor, registers SDO client handle.
|
|
| PdoProtocol (std::uint8_t id, std::uint16_t cob, unsigned int n, SdoClient *sdo) |
| Constructor, registers SDO client handle.
|
|
virtual | ~PdoProtocol ()=default |
| Virtual destructor.
|
|
std::uint16_t | getCobId () const |
| Retrieve COB ID.
|
|
bool | configure (const PdoConfiguration &config) |
| Configure this PDO drive-side via SDO packages.
|
|
|
using | HandlerFn = std::function< bool(const std::uint8_t *data, unsigned int size)> |
|
|
template<typename T > |
T | unpack (const std::uint8_t *buff, unsigned int *count) |
|
void | unpackInternal (void *data, const std::uint8_t *buff, unsigned int size) |
|
|
enum class | PdoType { RPDO
, TPDO
} |
| PDO type.
|
|
template<typename... Tn> |
static constexpr std::size_t | size () |
|
std::uint8_t | id |
|
std::uint16_t | cob |
|
unsigned int | n |
|
SdoClient * | sdo |
|
◆ registerHandler()
template<typename... Ts, typename Fn >
void roboticslab::TransmitPdo::registerHandler |
( |
Fn && |
fn | ) |
|
|
inline |
Usually, you'll want to pass as many parameters to the callback function as CAN dictionary objects have been mapped. Only integral types allowed, cumulative size cannot exceed 8 bytes.
The documentation for this class was generated from the following files:
- libraries/CanOpenNodeLib/PdoProtocol.hpp
- libraries/CanOpenNodeLib/PdoProtocol.cpp