Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

master.h File Reference


Detailed Description

EtherCAT master structure.

Definition in file master.h.

Go to the source code of this file.

Data Structures

struct  ec_stats_t
 Cyclic statistics. More...
struct  ec_master
 EtherCAT master. More...

Enumerations

enum  ec_master_mode_t { EC_MASTER_MODE_ORPHANED, EC_MASTER_MODE_IDLE, EC_MASTER_MODE_OPERATION }
 EtherCAT master mode.

Functions

int ec_master_init (ec_master_t *, unsigned int, unsigned int)
 Master constructor.
void ec_master_destroy (ec_master_t *)
 Master destructor.
int ec_master_enter_idle_mode (ec_master_t *)
void ec_master_leave_idle_mode (ec_master_t *)
int ec_master_enter_operation_mode (ec_master_t *)
void ec_master_leave_operation_mode (ec_master_t *)
void ec_master_eoe_start (ec_master_t *)
 Starts Ethernet-over-EtherCAT processing on demand.
void ec_master_eoe_stop (ec_master_t *)
 Stops the Ethernet-over-EtherCAT processing.
void ec_master_receive_datagrams (ec_master_t *, const uint8_t *, size_t)
 Processes a received frame.
void ec_master_queue_datagram (ec_master_t *, ec_datagram_t *)
 Places a datagram in the datagram queue.
void ec_master_output_stats (ec_master_t *)
 Output statistics in cyclic mode.
void ec_master_destroy_slaves (ec_master_t *)
 Destroy all slaves.
void ec_master_calc_addressing (ec_master_t *)
 Calculates Advanced Position Adresses.
void ec_sync_config (const ec_sii_sync_t *, const ec_slave_t *, uint8_t *)
 Initializes a sync manager configuration page with EEPROM data.
void ec_fmmu_config (const ec_fmmu_t *, const ec_slave_t *, uint8_t *)
 Initializes an FMMU configuration page.


Function Documentation

int ec_master_init ec_master_t master,
unsigned int  index,
unsigned int  eoeif_count
 

Master constructor.

Returns:
0 in case of success, else < 0
Parameters:
master  EtherCAT master
index  master index
eoeif_count  number of EoE interfaces

Definition at line 103 of file master.c.

void ec_master_destroy ec_master_t master  ) 
 

Master destructor.

Clears the kobj-hierarchy bottom up and frees the master.

Parameters:
master  EtherCAT master

Definition at line 225 of file master.c.

void ec_master_receive_datagrams ec_master_t master,
const uint8_t *  frame_data,
size_t  size
 

Processes a received frame.

This function is called by the network driver for every received frame.

Returns:
0 in case of success, else < 0
Parameters:
master  EtherCAT master
frame_data  frame data
size  size of the received data

Definition at line 604 of file master.c.

void ec_master_output_stats ec_master_t master  ) 
 

Output statistics in cyclic mode.

This function outputs statistical data on demand, but not more often than necessary. The output happens at most once a second.

Parameters:
master  EtherCAT master

Definition at line 693 of file master.c.

void ec_sync_config const ec_sii_sync_t sync,
const ec_slave_t slave,
uint8_t *  data
 

Initializes a sync manager configuration page with EEPROM data.

The referenced memory (data) must be at least EC_SYNC_SIZE bytes.

Parameters:
sync  sync manager
slave  EtherCAT slave
data  > configuration memory

Definition at line 763 of file master.c.

void ec_fmmu_config const ec_fmmu_t fmmu,
const ec_slave_t slave,
uint8_t *  data
 

Initializes an FMMU configuration page.

The referenced memory (data) must be at least EC_FMMU_SIZE bytes.

Parameters:
fmmu  FMMU
slave  EtherCAT slave
data  > configuration memory

Definition at line 792 of file master.c.


Generated on Tue Nov 7 15:03:37 2006 for IgH EtherCAT master by  doxygen 1.4.4