Class LelyMasterBridge
- Defined in File lely_master_bridge.hpp 
Inheritance Relationships
Base Type
- public lely::canopen::AsyncMaster
Class Documentation
- 
class LelyMasterBridge : public lely::canopen::AsyncMaster
- Lely Master Bridge. - Creates services to pass values between the CANopen executor and ROS executor. This is important because certain functions can only be called from within the thread of the CANopen executor. - Public Functions - 
inline LelyMasterBridge(ev_exec_t *exec, lely::io::TimerBase &timer, lely::io::CanChannelBase &chan, const std::string &dcf_txt, const std::string &dcf_bin = "", uint8_t id = (uint8_t)255U)
- Construct a new Lely Master Bridge object. - Parameters:
- exec – [in] Pointer to the executor 
- timer – [in] Pointer to the timer 
- chan – [in] Pointer to the channel 
- dcf_txt – [in] Path to the DCF file 
- dcf_bin – [in] Path to the DCF bin file 
- id – [in] CANopen node id of the master 
 
 
 - 
std::future<bool> async_write_sdo(uint8_t id, COData data, uint8_t datatype)
- Asynchronous call for writing to an SDO. - Parameters:
- id – [in] CANopen node id of the target device 
- data – [in] Data to write 
- datatype – [in] Datatype of the data to write 
 
- Returns:
- std::future<bool> A future that indicates if the write Operation was successful. 
 
 - 
std::future<COData> async_read_sdo(uint8_t id, COData data, uint8_t datatype)
- Parameters:
- id – [in] CANopen node id of the target device 
- data – [in] Data to read, value is disregarded 
- datatype – [in] Datatype of the data to read 
 
- Returns:
- std::future<COData> A future that returns the read result once the process finished. 
 
 - 
std::future<bool> async_write_nmt(uint8_t id, uint8_t command)
- async_write_nmt - Parameters:
- id – 
- command – 
 
- Returns:
- std::future<bool> 
 
 - 
template<typename T>
 inline void submit_write_sdo(uint8_t id, uint16_t idx, uint8_t subidx, T value)
 - 
template<typename T>
 inline void submit_read_sdo(uint8_t id, uint16_t idx, uint8_t subidx)
 
- 
inline LelyMasterBridge(ev_exec_t *exec, lely::io::TimerBase &timer, lely::io::CanChannelBase &chan, const std::string &dcf_txt, const std::string &dcf_bin = "", uint8_t id = (uint8_t)255U)