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

EtherCAT Master Application Layer. More...

#include <ethercat_AL.h>

List of all members.

Public Member Functions

unsigned int get_num_slaves ()
 Get the number of slaves.
EtherCAT_SlaveHandlerget_slave_handler (EC_FixedStationAddress station_address)
 Get pointer to slaveHandler.
bool isReady ()
 Check the AL is ready (init was succesful)
 ~EtherCAT_AL ()
 Destructor.

Static Public Member Functions

static EtherCAT_ALinstance ()
 This class is a singleton.

Protected Member Functions

 EtherCAT_AL ()
 Constructor (protected)
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

EtherCAT_DataLinkLayerm_dll_instance
 DLL Instance.
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 succesful.
EtherCAT_SlaveDbm_slave_db
 Pointer to the slave database.
EtherCAT_SlaveHandler ** m_slave_handler
 Pointer to the slave Handlers.

Static Private Attributes

static EtherCAT_ALm_instance
 Instance.

Friends

class EtherCAT_Router

Detailed Description

EtherCAT Master Application Layer.

Definition at line 96 of file ethercat_AL.h.


Constructor & Destructor Documentation

Destructor.

EtherCAT_AL::EtherCAT_AL ( ) [protected]

Constructor (protected)


Member Function Documentation

unsigned int EtherCAT_AL::get_num_slaves ( ) [inline]

Get the number of slaves.

Returns:
the number of slaves

Definition at line 118 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...
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
static EtherCAT_AL* EtherCAT_AL::instance ( ) [static]

This class is a singleton.

Check the AL is ready (init was succesful)

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 succes
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 98 of file ethercat_AL.h.


Member Data Documentation

DLL Instance.

Definition at line 161 of file ethercat_AL.h.

Instance.

Definition at line 159 of file ethercat_AL.h.

Using commonly idx.

Definition at line 163 of file ethercat_AL.h.

unsigned int EtherCAT_AL::m_num_slaves [private]

Number of slaves in the setup.

Definition at line 181 of file ethercat_AL.h.

bool EtherCAT_AL::m_ready [private]

Set is init is succesful.

Definition at line 184 of file ethercat_AL.h.

Pointer to the slave database.

Definition at line 169 of file ethercat_AL.h.

Pointer to the slave Handlers.

Definition at line 166 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 Aug 27 2015 14:47:07