IgH EtherCAT Master  1.5.3
coe_emerg_ring.h File Reference

EtherCAT CoE emergency ring buffer structure. More...

Go to the source code of this file.

Data Structures

struct  ec_coe_emerg_msg_t
 EtherCAT CoE emergency message record. More...
 
struct  ec_coe_emerg_ring_t
 EtherCAT CoE emergency ring buffer. More...
 

Functions

void ec_coe_emerg_ring_init (ec_coe_emerg_ring_t *, ec_slave_config_t *)
 Emergency ring buffer constructor.
 
void ec_coe_emerg_ring_clear (ec_coe_emerg_ring_t *)
 Emergency ring buffer destructor.
 
int ec_coe_emerg_ring_size (ec_coe_emerg_ring_t *, size_t)
 Set the ring size. More...
 
void ec_coe_emerg_ring_push (ec_coe_emerg_ring_t *, const u8 *)
 Add a new emergency message.
 
int ec_coe_emerg_ring_pop (ec_coe_emerg_ring_t *, u8 *)
 Remove an emergency message from the ring. More...
 
int ec_coe_emerg_ring_clear_ring (ec_coe_emerg_ring_t *)
 Clear the ring. More...
 
int ec_coe_emerg_ring_overruns (ec_coe_emerg_ring_t *)
 Read the number of overruns. More...
 

Detailed Description

EtherCAT CoE emergency ring buffer structure.

Definition in file coe_emerg_ring.h.

Function Documentation

◆ ec_coe_emerg_ring_size()

int ec_coe_emerg_ring_size ( ec_coe_emerg_ring_t ring,
size_t  size 
)

Set the ring size.

Returns
Zero on success, otherwise a negative error code.
Parameters
ringEmergency ring.
sizeMaximum number of messages in the ring.

Definition at line 78 of file coe_emerg_ring.c.

◆ ec_coe_emerg_ring_pop()

int ec_coe_emerg_ring_pop ( ec_coe_emerg_ring_t ring,
u8 *  msg 
)

Remove an emergency message from the ring.

Returns
Zero on success, otherwise a negative error code.
Parameters
ringEmergency ring.
msgMemory to store the emergency message.

Definition at line 135 of file coe_emerg_ring.c.

◆ ec_coe_emerg_ring_clear_ring()

int ec_coe_emerg_ring_clear_ring ( ec_coe_emerg_ring_t ring)

Clear the ring.

Returns
Zero on success, otherwise a negative error code.
Parameters
ringEmergency ring.

Definition at line 155 of file coe_emerg_ring.c.

◆ ec_coe_emerg_ring_overruns()

int ec_coe_emerg_ring_overruns ( ec_coe_emerg_ring_t ring)

Read the number of overruns.

Returns
Number of overruns.
Parameters
ringEmergency ring.

Definition at line 170 of file coe_emerg_ring.c.