#include <ethercat_hardware.h>
 | 
| void  | collectDiagnostics () | 
|   | Collects diagnotics from all devices.  More...
  | 
|   | 
|   | EthercatHardware (const std::string &name) | 
|   | Constructor.  More...
  | 
|   | 
| void  | init (char *interface, bool allow_unprogrammed) | 
|   | Initialize the EtherCAT Master Library.  More...
  | 
|   | 
| void  | printCounters (std::ostream &os=std::cout) | 
|   | 
| bool  | publishTrace (int position, const string &reason, unsigned level, unsigned delay) | 
|   | Ask one or all EtherCAT devices to publish (motor) traces.  More...
  | 
|   | 
| bool  | txandrx_PD (unsigned buffer_size, unsigned char *buffer, unsigned tries) | 
|   | Send process data.  More...
  | 
|   | 
| void  | update (bool reset, bool halt) | 
|   | Send most recent motor commands and retrieve updates. This command must be run at a sufficient rate or else the motors will be disabled.  More...
  | 
|   | 
|   | ~EthercatHardware () | 
|   | Destructor.  More...
  | 
|   | 
 | 
| static void  | changeState (EtherCAT_SlaveHandler *sh, EC_State new_state) | 
|   | 
| static void  | updateAccMax (double &max, const accumulator_set< double, stats< tag::max, tag::mean > > &acc) | 
|   | 
Definition at line 209 of file ethercat_hardware.h.
 
◆ EthercatHardware()
      
        
          | EthercatHardware::EthercatHardware  | 
          ( | 
          const std::string &  | 
          name | ) | 
           | 
        
      
 
 
◆ ~EthercatHardware()
      
        
          | EthercatHardware::~EthercatHardware  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ changeState()
  
  
      
        
          | void EthercatHardware::changeState  | 
          ( | 
          EtherCAT_SlaveHandler *  | 
          sh,  | 
         
        
           | 
           | 
          EC_State  | 
          new_state  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
staticprivate   | 
  
 
 
◆ collectDiagnostics()
      
        
          | void EthercatHardware::collectDiagnostics  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ configNonEthercatDevice()
◆ configSlave()
◆ haltMotors()
  
  
      
        
          | void EthercatHardware::haltMotors  | 
          ( | 
          bool  | 
          error,  | 
         
        
           | 
           | 
          const char *  | 
          reason  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
private   | 
  
 
 
◆ init()
      
        
          | void EthercatHardware::init  | 
          ( | 
          char *  | 
          interface,  | 
        
        
           | 
           | 
          bool  | 
          allow_unprogrammed  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Initialize the EtherCAT Master Library. 
- Parameters
 - 
  
    | interface | The socket interface that is connected to the EtherCAT devices (e.g., eth0)  | 
    | allow_unprogrammed | A boolean indicating if the driver should treat the discovery of unprogrammed boards as a fatal error. Set to 'true' during board configuration, and set to 'false' otherwise.  | 
  
   
Definition at line 124 of file ethercat_hardware.cpp.
 
 
◆ loadNonEthercatDevices()
  
  
      
        
          | void EthercatHardware::loadNonEthercatDevices  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
 
◆ printCounters()
      
        
          | void EthercatHardware::printCounters  | 
          ( | 
          std::ostream &  | 
          os = std::cout | ) | 
           | 
        
      
 
 
◆ publishDiagnostics()
  
  
      
        
          | void EthercatHardware::publishDiagnostics  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
private   | 
  
 
Collects raw diagnostics data and passes it to diagnostics_publisher. 
Definition at line 692 of file ethercat_hardware.cpp.
 
 
◆ publishTrace()
      
        
          | bool EthercatHardware::publishTrace  | 
          ( | 
          int  | 
          position,  | 
        
        
           | 
           | 
          const string &  | 
          reason,  | 
        
        
           | 
           | 
          unsigned  | 
          level,  | 
        
        
           | 
           | 
          unsigned  | 
          delay  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Ask one or all EtherCAT devices to publish (motor) traces. 
- Parameters
 - 
  
    | position | device ring position to publish trace for. Use -1 to trigger all devices.  | 
    | reason | Message to put in trace as reason.  | 
    | level | Level to put in trace (aka ERROR=2, WARN=1, OK=0)  | 
    | delay | Publish trace after delay cyles. For 1kHz realtime loop 1cycle = 1ms.  | 
  
   
- Returns
 - Return true if device supports publishing trace. False, if not. 
 If all devices are triggered, returns true if any device publishes trace.  
Definition at line 1000 of file ethercat_hardware.cpp.
 
 
◆ txandrx_PD()
      
        
          | bool EthercatHardware::txandrx_PD  | 
          ( | 
          unsigned  | 
          buffer_size,  | 
        
        
           | 
           | 
          unsigned char *  | 
          buffer,  | 
        
        
           | 
           | 
          unsigned  | 
          tries  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ update()
      
        
          | void EthercatHardware::update  | 
          ( | 
          bool  | 
          reset,  | 
        
        
           | 
           | 
          bool  | 
          halt  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Send most recent motor commands and retrieve updates. This command must be run at a sufficient rate or else the motors will be disabled. 
- Parameters
 - 
  
    | reset | A boolean indicating if the motor controller boards should be reset  | 
    | halt | A boolean indicating if the motors should be halted  | 
  
   
Definition at line 551 of file ethercat_hardware.cpp.
 
 
◆ updateAccMax()
  
  
      
        
          | void EthercatHardware::updateAccMax  | 
          ( | 
          double &  | 
          max,  | 
         
        
           | 
           | 
          const accumulator_set< double, stats< tag::max, tag::mean > > &  | 
          acc  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
staticprivate   | 
  
 
 
◆ al_
  
  
      
        
          | EtherCAT_AL* EthercatHardware::al_ | 
         
       
   | 
  
private   | 
  
 
 
◆ buffer_size_
  
  
      
        
          | unsigned int EthercatHardware::buffer_size_ | 
         
       
   | 
  
private   | 
  
 
 
◆ buffers_
  
  
      
        
          | unsigned char* EthercatHardware::buffers_ | 
         
       
   | 
  
private   | 
  
 
 
◆ device_loader_
◆ diagnostics_
◆ diagnostics_publisher_
◆ em_
  
  
      
        
          | EtherCAT_Master* EthercatHardware::em_ | 
         
       
   | 
  
private   | 
  
 
 
◆ halt_motors_
  
  
      
        
          | bool EthercatHardware::halt_motors_ | 
         
       
   | 
  
private   | 
  
 
 
◆ hw_
◆ interface_
  
  
      
        
          | string EthercatHardware::interface_ | 
         
       
   | 
  
private   | 
  
 
 
◆ last_published_
◆ last_reset_
◆ max_pd_retries_
  
  
      
        
          | unsigned EthercatHardware::max_pd_retries_ | 
         
       
   | 
  
private   | 
  
 
Max number of times to retry sending process data before halting motors. 
Definition at line 290 of file ethercat_hardware.h.
 
 
◆ motor_publisher_
◆ ni_
  
  
      
        
          | struct netif* EthercatHardware::ni_ | 
         
       
   | 
  
private   | 
  
 
 
◆ node_
◆ num_ethercat_devices_
  
  
      
        
          | unsigned int EthercatHardware::num_ethercat_devices_ | 
         
       
   | 
  
private   | 
  
 
 
◆ oob_com_
◆ prev_buffer_
  
  
      
        
          | unsigned char* EthercatHardware::prev_buffer_ | 
         
       
   | 
  
private   | 
  
 
 
◆ reset_state_
  
  
      
        
          | unsigned int EthercatHardware::reset_state_ | 
         
       
   | 
  
private   | 
  
 
 
◆ slaves_
◆ this_buffer_
  
  
      
        
          | unsigned char* EthercatHardware::this_buffer_ | 
         
       
   | 
  
private   | 
  
 
 
◆ timeout_
  
  
      
        
          | unsigned EthercatHardware::timeout_ | 
         
       
   | 
  
private   | 
  
 
Timeout (in microseconds) to used for sending/recieving packets once in realtime mode. 
Definition at line 289 of file ethercat_hardware.h.
 
 
The documentation for this class was generated from the following files: