30 #include <linux/slab.h> unsigned int write_index
Write index.
u8 data[EC_COE_EMERGENCY_MSG_SIZE]
Message data.
ec_coe_emerg_msg_t * msgs
Message ring.
EtherCAT CoE emergency ring buffer structure.
EtherCAT CoE emergency ring buffer.
void ec_coe_emerg_ring_init(ec_coe_emerg_ring_t *ring, ec_slave_config_t *sc)
Emergency ring buffer constructor.
int ec_coe_emerg_ring_clear_ring(ec_coe_emerg_ring_t *ring)
Clear the ring.
EtherCAT CoE emergency message record.
void ec_coe_emerg_ring_push(ec_coe_emerg_ring_t *ring, const u8 *msg)
Add a new emergency message.
void ec_coe_emerg_ring_clear(ec_coe_emerg_ring_t *ring)
Emergency ring buffer destructor.
unsigned int overruns
Number of overruns since last reset.
int ec_coe_emerg_ring_overruns(const ec_coe_emerg_ring_t *ring)
Read the number of overruns.
unsigned int read_index
Read index.
ec_slave_config_t * sc
Slave configuration owning the ring.
EtherCAT slave configuration.
#define EC_COE_EMERGENCY_MSG_SIZE
Size of a CoE emergency message in byte.
int ec_coe_emerg_ring_size(ec_coe_emerg_ring_t *ring, size_t size)
Set the ring size.
int ec_coe_emerg_ring_pop(ec_coe_emerg_ring_t *ring, u8 *msg)
Remove an emergency message from the ring.