ros2_canopen
master
C++ ROS CANopen Library
|
#include <node_canopen_proxy_driver.hpp>
Public Member Functions | |
NodeCanopenProxyDriver (NODETYPE *node) | |
virtual void | init (bool called_from_base) override |
Initialises the driver. More... | |
virtual bool | reset_node_nmt_command () |
virtual bool | start_node_nmt_command () |
virtual bool | tpdo_transmit (COData &data) |
virtual bool | sdo_write (COData &data) |
virtual bool | sdo_read (COData &data) |
![]() | |
NodeCanopenBaseDriver (NODETYPE *node) | |
virtual | ~NodeCanopenBaseDriver () |
virtual void | configure (bool called_from_base) |
Configure the driver. More... | |
virtual void | activate (bool called_from_base) |
Activates the driver. More... | |
virtual void | deactivate (bool called_from_base) |
Deactivates the driver. More... | |
virtual void | cleanup (bool called_from_base) |
Cleanup the driver. More... | |
virtual void | shutdown (bool called_from_base) |
Shuts down the driver. More... | |
virtual void | add_to_master () |
Add the driver to master. More... | |
virtual void | remove_from_master () |
Remove the driver from master. More... | |
void | register_nmt_state_cb (std::function< void(canopen::NmtState, uint8_t)> nmt_state_cb) |
Register a callback for NMT state change. More... | |
void | register_rpdo_cb (std::function< void(COData, uint8_t)> rpdo_cb) |
Register a callback for RPDO. More... | |
void | register_emcy_cb (std::function< void(COEmcy, uint8_t)> emcy_cb) |
Register a callback for EMCY. More... | |
![]() | |
NodeCanopenDriver (NODETYPE *node) | |
virtual void | set_master (std::shared_ptr< lely::ev::Executor > exec, std::shared_ptr< lely::canopen::AsyncMaster > master) |
Set Master. More... | |
void | init () |
Initialise the driver. More... | |
void | configure () |
Configure the driver. More... | |
void | activate () |
Activate the driver. More... | |
void | deactivate () |
Deactivate the driver. More... | |
void | cleanup () |
Cleanup the driver. More... | |
void | shutdown () |
Shutdown the driver. More... | |
virtual void | demand_set_master () |
Demand set Master. More... | |
![]() | |
NodeCanopenDriverInterface () | |
Protected Member Functions | |
virtual void | on_nmt (canopen::NmtState nmt_state) override |
virtual void | on_rpdo (COData data) override |
virtual void | on_tpdo (const canopen_interfaces::msg::COData::SharedPtr msg) |
virtual void | diagnostic_callback (diagnostic_updater::DiagnosticStatusWrapper &stat) override |
void | on_nmt_state_reset (const std_srvs::srv::Trigger::Request::SharedPtr request, std_srvs::srv::Trigger::Response::SharedPtr response) |
void | on_nmt_state_start (const std_srvs::srv::Trigger::Request::SharedPtr request, std_srvs::srv::Trigger::Response::SharedPtr response) |
void | on_sdo_read (const canopen_interfaces::srv::CORead::Request::SharedPtr request, canopen_interfaces::srv::CORead::Response::SharedPtr response) |
void | on_sdo_write (const canopen_interfaces::srv::COWrite::Request::SharedPtr request, canopen_interfaces::srv::COWrite::Response::SharedPtr response) |
![]() | |
virtual void | poll_timer_callback () |
void | nmt_listener () |
void | rdpo_listener () |
void | emcy_listener () |
virtual void | on_emcy (COEmcy emcy) |
Protected Attributes | |
rclcpp::Publisher< std_msgs::msg::String >::SharedPtr | nmt_state_publisher |
rclcpp::Publisher< canopen_interfaces::msg::COData >::SharedPtr | rpdo_publisher |
rclcpp::Subscription< canopen_interfaces::msg::COData >::SharedPtr | tpdo_subscriber |
rclcpp::Service< std_srvs::srv::Trigger >::SharedPtr | nmt_state_reset_service |
rclcpp::Service< std_srvs::srv::Trigger >::SharedPtr | nmt_state_start_service |
rclcpp::Service< canopen_interfaces::srv::CORead >::SharedPtr | sdo_read_service |
rclcpp::Service< canopen_interfaces::srv::COWrite >::SharedPtr | sdo_write_service |
std::mutex | sdo_mtex |
![]() | |
std::thread | nmt_state_publisher_thread_ |
std::thread | rpdo_publisher_thread_ |
std::thread | emcy_publisher_thread_ |
std::mutex | driver_mutex_ |
std::shared_ptr< ros2_canopen::LelyDriverBridge > | lely_driver_ |
uint32_t | period_ms_ |
int | sdo_timeout_ms_ |
bool | polling_ |
std::function< void(canopen::NmtState, uint8_t)> | nmt_state_cb_ |
std::function< void(COData, uint8_t)> | rpdo_cb_ |
std::function< void(COEmcy, uint8_t)> | emcy_cb_ |
std::shared_ptr< ros2_canopen::SafeQueue< ros2_canopen::COEmcy > > | emcy_queue_ |
std::shared_ptr< ros2_canopen::SafeQueue< ros2_canopen::COData > > | rpdo_queue_ |
rclcpp::TimerBase::SharedPtr | poll_timer_ |
std::atomic< bool > | diagnostic_enabled_ |
uint32_t | diagnostic_period_ms_ |
std::shared_ptr< diagnostic_updater::Updater > | diagnostic_updater_ |
std::shared_ptr< DiagnosticsCollector > | diagnostic_collector_ |
![]() | |
NODETYPE * | node_ |
std::shared_ptr< lely::ev::Executor > | exec_ |
std::shared_ptr< lely::canopen::AsyncMaster > | master_ |
std::shared_ptr< lely::canopen::BasicDriver > | driver_ |
std::chrono::milliseconds | non_transmit_timeout_ |
YAML::Node | config_ |
uint8_t | node_id_ |
std::string | container_name_ |
std::string | eds_ |
std::string | bin_ |
rclcpp::CallbackGroup::SharedPtr | client_cbg_ |
rclcpp::CallbackGroup::SharedPtr | timer_cbg_ |
std::atomic< bool > | master_set_ |
std::atomic< bool > | initialised_ |
std::atomic< bool > | configured_ |
std::atomic< bool > | activated_ |
NodeCanopenProxyDriver::NodeCanopenProxyDriver | ( | NODETYPE * | node | ) |
|
overrideprotectedvirtual |
Reimplemented from ros2_canopen::node_interfaces::NodeCanopenBaseDriver< NODETYPE >.
|
overrideprotectedvirtual |
Reimplemented from ros2_canopen::node_interfaces::NodeCanopenBaseDriver< NODETYPE >.
|
protectedvirtual |
|
overrideprotectedvirtual |
Reimplemented from ros2_canopen::node_interfaces::NodeCanopenBaseDriver< NODETYPE >.
Reimplemented in ros2_canopen::node_interfaces::NodeCanopen402Driver< NODETYPE >.
|
protected |
|
protected |
|
protected |
|
protected |
|
overridevirtual |
Initialises the driver.
This does not do anything, it is an empty function. it should be overridden by derived classes.
called_from_base |
Reimplemented from ros2_canopen::node_interfaces::NodeCanopenBaseDriver< NODETYPE >.
Reimplemented in ros2_canopen::node_interfaces::NodeCanopen402Driver< NODETYPE >.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |