IgH EtherCAT Master  1.6.2
ethernet.h File Reference

Ethernet over EtherCAT (EoE) More...

Go to the source code of this file.

Data Structures

struct  ec_eoe_frame_t
 Queued frame structure. More...
 
struct  ec_eoe
 Ethernet over EtherCAT (EoE) handler. More...
 

Typedefs

typedef struct ec_eoe ec_eoe_t
 

Enumerations

enum  {
  EC_EOE_FRAMETYPE_INIT_REQ = 0x00, EC_EOE_FRAMETYPE_SET_IP_REQ = 0x02, EC_EOE_FRAMETYPE_SET_IP_RES = 0x03, EC_EOE_FRAMETYPE_FILT_REQ = 0x04,
  EC_EOE_FRAMETYPE_FILT_RES = 0x05
}
 EoE frame types. More...
 

Functions

int ec_eoe_init (ec_eoe_t *, ec_slave_t *)
 EoE constructor. More...
 
void ec_eoe_clear (ec_eoe_t *)
 EoE destructor. More...
 
void ec_eoe_run (ec_eoe_t *)
 Runs the EoE state machine.
 
void ec_eoe_queue (ec_eoe_t *)
 Queues the datagram, if necessary.
 
int ec_eoe_is_open (const ec_eoe_t *)
 Returns the state of the device. More...
 
int ec_eoe_is_idle (const ec_eoe_t *)
 Returns the idle state. More...
 

Detailed Description

Ethernet over EtherCAT (EoE)

Definition in file ethernet.h.

Typedef Documentation

◆ ec_eoe_t

typedef struct ec_eoe ec_eoe_t
See also
ec_eoe

Definition at line 66 of file ethernet.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

EoE frame types.

Enumerator
EC_EOE_FRAMETYPE_SET_IP_REQ 

Initiate EoE Request.

EC_EOE_FRAMETYPE_SET_IP_RES 

Set IP Parameter Request.

EC_EOE_FRAMETYPE_FILT_REQ 

Set IP Parameter Response.

EC_EOE_FRAMETYPE_FILT_RES 

Set Address Filter Request.

Definition at line 43 of file ethernet.h.

Function Documentation

◆ ec_eoe_init()

int ec_eoe_init ( ec_eoe_t eoe,
ec_slave_t slave 
)

EoE constructor.

Initializes the EoE handler, creates a net_device and registers it.

Returns
Zero on success, otherwise a negative error code.
Parameters
eoeEoE handler
slaveEtherCAT slave

Definition at line 111 of file ethernet.c.

◆ ec_eoe_clear()

void ec_eoe_clear ( ec_eoe_t eoe)

EoE destructor.

Unregisteres the net_device and frees allocated memory.

Parameters
eoeEoE handler

Definition at line 223 of file ethernet.c.

◆ ec_eoe_is_open()

int ec_eoe_is_open ( const ec_eoe_t eoe)

Returns the state of the device.

Returns
1 if the device is "up", 0 if it is "down"
Parameters
eoeEoE handler

Definition at line 385 of file ethernet.c.

◆ ec_eoe_is_idle()

int ec_eoe_is_idle ( const ec_eoe_t eoe)

Returns the idle state.

Return values
1The device is idle.
0The device is busy.
Parameters
eoeEoE handler

Definition at line 397 of file ethernet.c.