libethercat - an embeddable realtime EtherCAT-master library
Communicate with EtherCAT slaves attached to a Network interface.
|
ethercat master structure More...
#include <ec.h>
Data Fields | |
struct hw_common * | phw |
pointer to hardware interface | |
pool_entry_t | dg_entries [LEC_MAX_DATAGRAMS] |
static datagrams for datagram pool. | |
pool_t | pool |
datagram pool | |
idx_queue_t | idx_q |
index queue | |
osal_int64_t | main_cycle_interval |
Expected timer increment of one EtherCAT cycle in [ns]. | |
pool_entry_t | mbx_mp_recv_free_entries [LEC_MAX_MBX_ENTRIES] |
static buffers for mailbox receive pool. | |
pool_entry_t | mbx_mp_send_free_entries [LEC_MAX_MBX_ENTRIES] |
static buffers for mailbox send pool. | |
pool_t | mbx_message_pool_recv_free |
Pool with free receive mailbox buffers. | |
pool_t | mbx_message_pool_send_free |
Pool with free send mailbox buffers. | |
osal_uint16_t | slave_cnt |
count of found EtherCAT slaves | |
ec_slave_t | slaves [LEC_MAX_SLAVES] |
array with EtherCAT slaves | |
osal_uint16_t | pd_group_cnt |
count of process data groups | |
ec_pd_group_t | pd_groups [LEC_MAX_GROUPS] |
array with process data groups | |
ec_dc_info_t | dc |
distributed clocks master settings | |
ec_async_loop_t | async_loop |
asynchronous message loop | |
int | tun_fd |
tun device file descriptor | |
osal_uint32_t | tun_ip |
tun device ip addres | |
osal_task_t | tun_tid |
tun device handler thread id. | |
int | tun_running |
tun device handler run flag. | |
int | eeprom_log |
flag whether to log eeprom to stdout | |
ec_state_t | master_state |
expected EtherCAT master state | |
int | state_transition_pending |
state transition is currently pending | |
int | threaded_startup |
running state machine in threads for slave | |
int | consecutive_max_miss |
max missed counter for receive frames before falling back to init | |
ec_cyclic_datagram_t | cdg_state |
Monitor EtherCAT AL Status from slaves. | |
void * | ec_log_func_user |
void(* | ec_log_func )(ec_t *pec, int lvl, const osal_char_t *format,...) |
ethercat master structure
ec_async_loop_t ec::async_loop |
asynchronous message loop
This loop receives asynchronous messages from the EtherCAT slave mailboxes. This may be e.g. emergency messages...
osal_int64_t ec::main_cycle_interval |
Expected timer increment of one EtherCAT cycle in [ns].
The index queue holds all available EtherCAT datagram indices. For every datagram one index will be taken out of the queue and returned to the queue if the frame with the datagram is received again by the master.
pool_t ec::pool |
datagram pool
All EtherCAT datagrams will be pre- allocated and available in the datagram pool. Theres no need to allocate datagrams at runtime.