Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | Friends
EtherCAT_AL Class Reference

EtherCAT Master Application Layer. More...

#include <ethercat_AL.h>

List of all members.

Public Member Functions

 EtherCAT_AL (EtherCAT_DataLinkLayer *m_dll_instance, EC_Logic *m_logic_instance, EtherCAT_PD_Buffer *_pd_buffer_)
unsigned int get_num_slaves ()
 Get the number of slaves.
EtherCAT_SlaveHandlerget_slave_handler (EC_FixedStationAddress station_address)
 Get pointer to slaveHandler.
EtherCAT_SlaveHandler ** get_slaves ()
 Get an array of pointers to slaves.
bool isReady ()
 Check the AL is ready (init was successful)
 ~EtherCAT_AL ()

Public Attributes

EtherCAT_DataLinkLayerm_dll_instance
 DLL Instance.

Protected Member Functions

bool init (void)
 Init of EtherCAT network.
bool put_slaves_in_init (void)
 Put all slaves in their init state.
bool reset_slaves (void)
 Reset slaves.
bool scan_slaves (void)
 Scan the slave network, create the necessary slave Handlers.

Private Member Functions

bool read_SII (uint16_t slave_adp, uint32_t address, unsigned char *a_buffer)
 Get information from the SII (in Autoincrement mode)

Private Attributes

EC_Logicm_logic_instance
 Using commonly idx.
unsigned int m_num_slaves
 Number of slaves in the setup.
bool m_ready
 Set is init is successful.
EtherCAT_SlaveHandler ** m_slave_handler
 Pointer to the slave Handlers.
EtherCAT_PD_Bufferpd_buffer_

Friends

class EtherCAT_Router

Detailed Description

EtherCAT Master Application Layer.

Definition at line 94 of file ethercat_AL.h.


Constructor & Destructor Documentation

EtherCAT_AL::EtherCAT_AL ( EtherCAT_DataLinkLayer m_dll_instance,
EC_Logic m_logic_instance,
EtherCAT_PD_Buffer _pd_buffer_ 
)

Member Function Documentation

unsigned int EtherCAT_AL::get_num_slaves ( ) [inline]

Get the number of slaves.

Returns:
the number of slaves

Definition at line 113 of file ethercat_AL.h.

Get pointer to slaveHandler.

Returns:
pointer to the slaveHandler if it exist, or NULL otherwise
Todo:
As implemented right now, this is an O(N) operation. Try to use some kind of mapping/hash table...

Get an array of pointers to slaves.

Returns:
array of pointers to slaves

Definition at line 121 of file ethercat_AL.h.

bool EtherCAT_AL::init ( void  ) [protected]

Init of EtherCAT network.

Counts and identifies the number of slaves in the network, and resets the slaves configuration.

Returns:
true if success

Check the AL is ready (init was successful)

Returns:
true if ready
bool EtherCAT_AL::put_slaves_in_init ( void  ) [protected]

Put all slaves in their init state.

Returns:
true if success
bool EtherCAT_AL::read_SII ( uint16_t  slave_adp,
uint32_t  address,
unsigned char *  a_buffer 
) [private]

Get information from the SII (in Autoincrement mode)

Parameters:
slave_adpaddress pointer of the slave to read in autoincrement mode
addressaddress of the EEPROM that should be read
a_bufferbuffer to put the data in
Returns:
reading succeeded?
bool EtherCAT_AL::reset_slaves ( void  ) [protected]

Reset slaves.

Returns:
true if success
bool EtherCAT_AL::scan_slaves ( void  ) [protected]

Scan the slave network, create the necessary slave Handlers.

Returns:
true if success
Todo:
if 2 slaves have the same product code and revision, they will get the same address!!

Friends And Related Function Documentation

friend class EtherCAT_Router [friend]

Definition at line 96 of file ethercat_AL.h.


Member Data Documentation

DLL Instance.

Definition at line 133 of file ethercat_AL.h.

Using commonly idx.

Definition at line 162 of file ethercat_AL.h.

unsigned int EtherCAT_AL::m_num_slaves [private]

Number of slaves in the setup.

Definition at line 179 of file ethercat_AL.h.

bool EtherCAT_AL::m_ready [private]

Set is init is successful.

Definition at line 182 of file ethercat_AL.h.

Pointer to the slave Handlers.

Definition at line 165 of file ethercat_AL.h.

Definition at line 167 of file ethercat_AL.h.


The documentation for this class was generated from the following file:


ros_ethercat_eml
Author(s): Tom Panis, Klaas Gadeyne, Bob Koninckx, Austin Hendrix, Manos Nikolaidis
autogenerated on Thu Jul 4 2019 20:01:50