yarp-devices
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
roboticslab::ReceivePdo Class Referencefinal

Representation of RPDO protocol.

#include <PdoProtocol.hpp>

Inheritance diagram for roboticslab::ReceivePdo:
roboticslab::PdoProtocol

Public Member Functions

 ReceivePdo (std::uint8_t id, std::uint16_t cob, unsigned int n, SdoClient *sdo, ICanSenderDelegate *sender=nullptr)
 Constructor, registers SDO and CAN sender handles.
 
void configureSender (ICanSenderDelegate *sender)
 Configure CAN sender delegate handle.
 
template<typename... Ts>
bool write (Ts... data)
 Send data to the drive. More...
 
- Public Member Functions inherited from roboticslab::PdoProtocol
 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.
 

Protected Member Functions

PdoType getType () const override
 Retrieve PDO type.
 

Private Member Functions

template<typename T >
void pack (const T *data, std::uint8_t *buff, unsigned int *count)
 
void packInternal (std::uint8_t *buff, const void *data, unsigned int size)
 
bool writeInternal (const std::uint8_t *data, unsigned int size)
 

Private Attributes

ICanSenderDelegatesender
 

Additional Inherited Members

- Protected Types inherited from roboticslab::PdoProtocol
enum class  PdoType { RPDO , TPDO }
 PDO type.
 
- Static Protected Member Functions inherited from roboticslab::PdoProtocol
template<typename... Tn>
static constexpr std::size_t size ()
 
- Protected Attributes inherited from roboticslab::PdoProtocol
std::uint8_t id
 
std::uint16_t cob
 
unsigned int n
 
SdoClientsdo
 

Member Function Documentation

◆ write()

template<typename... Ts>
bool roboticslab::ReceivePdo::write ( Ts...  data)
inline

Usually, you'll want to pass as many parameters 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: