Inherits from RokubiminiBusManager. It's used for managing an Ethercat bus. More...
#include <RokubiminiEthercatBusManager.hpp>

Public Member Functions | |
| virtual bool | addRokubiminiToBus (const std::shared_ptr< Rokubimini > &rokubimini) const |
| bool | addRokubiminiToBus (const std::shared_ptr< RokubiminiEthercat > &rokubimini, rokubimini::soem_interface::EthercatBusBase *bus) const |
| Adds a Rokubimini to Bus. More... | |
| bool | createRokubimini (const std::string &rokubiminiName) override |
| Creates an RokubiminiEthercat instance. More... | |
| bool | loadBusParameters () override |
| Loads ethercat bus parameters from parameter server. More... | |
| double | loadTimeStep () override |
| Loads the time_step from the Parameter Server. More... | |
| void | publishBusManagerRosDiagnostics () override |
| Publish the ROS Diagnostics of the Bus Manager. More... | |
| void | readBus () override |
| Calls update read on the bus. More... | |
| RokubiminiEthercatBusManager ()=delete | |
| Default constructor of RokubiminiEthercatBusManager. More... | |
| RokubiminiEthercatBusManager (const NodeHandlePtr &nh) | |
| RokubiminiEthercatBusManager (const std::string &busName, NodeHandlePtr nh) | |
| Constructor with initialization list for the name and NodeHandle. More... | |
| void | setBusOperational () |
| Sets bus to operational state. More... | |
| void | setBusPreOperational () |
| Sets bus to pre operational state. More... | |
| void | setBusSafeOperational () |
| Sets bus to safe operational state. More... | |
| void | setConfigMode () override |
| void | setRunMode () override |
| void | shutdownBus () override |
| Calls shutdown on the bus. More... | |
| bool | startupBus () |
| Starts up the bus and puts them in operational mode. More... | |
| bool | startupCommunication () override |
| Starts up the bus. More... | |
| void | waitForState (const uint16_t state, const uint16_t slave=0, const unsigned int maxRetries=40, const double retrySleep=0.001) |
| Waits for the slave to reach a state. More... | |
| void | writeToBus () override |
| Calls update write on the bus. More... | |
| ~RokubiminiEthercatBusManager () override=default | |
Public Member Functions inherited from rokubimini::RokubiminiBusManager | |
| virtual bool | addRokubiminiToBus (const std::shared_ptr< Rokubimini > &rokubimini) const |
| void | cleanup () override |
| void | createRokubiminiRosDiagnostics () const |
| void | createRokubiminiRosPublishers () const |
| void | createRokubiminiRosServices () const |
| virtual bool | createRokubiminisFromParamServer () |
| std::string | getName () const |
| std::shared_ptr< Rokubimini > | getRokubimini (const std::string &name) const |
| std::vector< std::shared_ptr< Rokubimini > > | getRokubiminis () const |
| bool | hasRokubimini (const std::string &name) |
| bool | init () override |
| virtual bool | load () |
| void | publishRokubiminiRosDiagnostics () const |
| void | publishRosMessages () const |
| RokubiminiBusManager ()=delete | |
| RokubiminiBusManager (const NodeHandlePtr &nh) | |
| RokubiminiBusManager (const std::string &busName, NodeHandlePtr nh) | |
| void | setNodeHandle (const NodeHandlePtr &nh) |
| virtual void | shutdown () |
| void | shutdownWithCommunication () const |
| void | shutdownWithoutCommunication () const |
| virtual bool | startup () |
| void | startupWithCommunication () const |
| void | startupWithoutCommunication () const |
| virtual bool | update (const bota_worker::WorkerEvent &event) |
| void | updateProcessReading () const |
| ~RokubiminiBusManager () override=default | |
Protected Attributes | |
| std::unique_ptr< rokubimini::soem_interface::EthercatBusBase > | bus_ |
| The Ethercat bus instance. More... | |
| std::recursive_mutex | busMutex_ |
| Mutex prohibiting simultaneous access to EtherCAT bus manager. More... | |
| std::string | ethercatBusName_ |
| The name of the Ethercat bus. More... | |
Protected Attributes inherited from rokubimini::RokubiminiBusManager | |
| std::atomic< bool > | isRunning_ |
| std::string | name_ |
| NodeHandlePtr | nh_ |
| std::vector< std::shared_ptr< Rokubimini > > | rokubiminis_ |
Additional Inherited Members | |
Public Types inherited from rokubimini::RokubiminiBusManager | |
| typedef std::shared_ptr< diagnostic_updater::Updater > | DiagnosticsUpdaterPtr |
| typedef std::shared_ptr< ros::NodeHandle > | NodeHandlePtr |
Inherits from RokubiminiBusManager. It's used for managing an Ethercat bus.
Definition at line 27 of file RokubiminiEthercatBusManager.hpp.
|
delete |
Default constructor of RokubiminiEthercatBusManager.
|
inlineexplicit |
Constructor with initialization list for the name and NodeHandle.
Definition at line 44 of file RokubiminiEthercatBusManager.hpp.
|
inlineexplicit |
Definition at line 53 of file RokubiminiEthercatBusManager.hpp.
|
overridedefault |
| virtual bool rokubimini::RokubiminiBusManager::addRokubiminiToBus |
| bool rokubimini::ethercat::RokubiminiEthercatBusManager::addRokubiminiToBus | ( | const std::shared_ptr< RokubiminiEthercat > & | rokubimini, |
| rokubimini::soem_interface::EthercatBusBase * | bus | ||
| ) | const |
Adds a Rokubimini to Bus.
This method is used for adding a Rokubimini Ethercat instance to the Ethercat Bus. This method also adds the EthercatSlave pointer to the Rokubimini Ethercat implementation.
| rokubimini | The RokubiminiEthercat instance. |
| bus | The bus to which the RokubiminiEthercat will be attached. |
Definition at line 66 of file RokubiminiEthercatBusManager.cpp.
|
overridevirtual |
Creates an RokubiminiEthercat instance.
This function creates a RokubiminiEthercat instance based on a given name and attaches it to the bus.
| rokubiminiName | The name of the Rokubimini. |
Implements rokubimini::RokubiminiBusManager.
Definition at line 35 of file RokubiminiEthercatBusManager.cpp.
|
overridevirtual |
Loads ethercat bus parameters from parameter server.
Implements rokubimini::RokubiminiBusManager.
Definition at line 51 of file RokubiminiEthercatBusManager.cpp.
|
overridevirtual |
Loads the time_step from the Parameter Server.
Implements rokubimini::RokubiminiBusManager.
Definition at line 7 of file RokubiminiEthercatBusManager.cpp.
|
inlineoverridevirtual |
Publish the ROS Diagnostics of the Bus Manager.
Implements rokubimini::RokubiminiBusManager.
Definition at line 194 of file RokubiminiEthercatBusManager.hpp.
|
overridevirtual |
Calls update read on the bus.
Reimplemented from rokubimini::RokubiminiBusManager.
Definition at line 156 of file RokubiminiEthercatBusManager.cpp.
| void rokubimini::ethercat::RokubiminiEthercatBusManager::setBusOperational | ( | ) |
Sets bus to operational state.
Definition at line 117 of file RokubiminiEthercatBusManager.cpp.
| void rokubimini::ethercat::RokubiminiEthercatBusManager::setBusPreOperational | ( | ) |
Sets bus to pre operational state.
Definition at line 124 of file RokubiminiEthercatBusManager.cpp.
| void rokubimini::ethercat::RokubiminiEthercatBusManager::setBusSafeOperational | ( | ) |
Sets bus to safe operational state.
Definition at line 131 of file RokubiminiEthercatBusManager.cpp.
|
overridevirtual |
Reimplemented from rokubimini::RokubiminiBusManager.
Definition at line 98 of file RokubiminiEthercatBusManager.cpp.
|
overridevirtual |
Reimplemented from rokubimini::RokubiminiBusManager.
Definition at line 104 of file RokubiminiEthercatBusManager.cpp.
|
overridevirtual |
Calls shutdown on the bus.
Reimplemented from rokubimini::RokubiminiBusManager.
Definition at line 168 of file RokubiminiEthercatBusManager.cpp.
| bool rokubimini::ethercat::RokubiminiEthercatBusManager::startupBus | ( | ) |
Starts up the bus and puts them in operational mode.
Definition at line 110 of file RokubiminiEthercatBusManager.cpp.
|
overridevirtual |
Starts up the bus.
Reimplemented from rokubimini::RokubiminiBusManager.
Definition at line 145 of file RokubiminiEthercatBusManager.cpp.
| void rokubimini::ethercat::RokubiminiEthercatBusManager::waitForState | ( | const uint16_t | state, |
| const uint16_t | slave = 0, |
||
| const unsigned int | maxRetries = 40, |
||
| const double | retrySleep = 0.001 |
||
| ) |
Waits for the slave to reach a state.
| [in] | state | Ethercat state |
| [in] | slave | Slave address, 0 = all slaves |
| [in] | maxRetries | The maximum retries |
| [in] | retrySleep | The retry sleep |
Definition at line 138 of file RokubiminiEthercatBusManager.cpp.
|
overridevirtual |
Calls update write on the bus.
Reimplemented from rokubimini::RokubiminiBusManager.
Definition at line 162 of file RokubiminiEthercatBusManager.cpp.
|
protected |
The Ethercat bus instance.
Definition at line 210 of file RokubiminiEthercatBusManager.hpp.
|
protected |
Mutex prohibiting simultaneous access to EtherCAT bus manager.
Definition at line 203 of file RokubiminiEthercatBusManager.hpp.
|
protected |
The name of the Ethercat bus.
Definition at line 218 of file RokubiminiEthercatBusManager.hpp.