IgH EtherCAT Master  1.6.0-rc1
ec_master Struct Reference

EtherCAT master. More...

Data Fields

unsigned int index
 Index. More...
 
unsigned int reserved
 True, if the master is in use. More...
 
ec_cdev_t cdev
 Master character device. More...
 
struct device * class_device
 Master class device. More...
 
ec_rtdm_dev_t rtdm_dev
 RTDM device. More...
 
ec_lock_t master_sem
 Master semaphore. More...
 
ec_device_t devices [EC_MAX_NUM_DEVICES]
 EtherCAT devices. More...
 
const uint8_t * macs [EC_MAX_NUM_DEVICES]
 Device MAC addresses. More...
 
ec_lock_t device_sem
 Device semaphore. More...
 
ec_device_stats_t device_stats
 Device statistics. More...
 
ec_fsm_master_t fsm
 Master state machine. More...
 
ec_datagram_t fsm_datagram
 Datagram used for state machines. More...
 
ec_master_phase_t phase
 Master phase. More...
 
unsigned int active
 Master has been activated. More...
 
unsigned int config_changed
 The configuration changed. More...
 
unsigned int injection_seq_fsm
 Datagram injection sequence number for the FSM side. More...
 
unsigned int injection_seq_rt
 Datagram injection sequence number for the realtime side. More...
 
ec_slave_tslaves
 Array of slaves on the bus. More...
 
unsigned int slave_count
 Number of slaves on the bus. More...
 
struct list_head configs
 List of slave configurations. More...
 
struct list_head domains
 List of domains. More...
 
ec_lock_t domains_lock
 Lock for access to domains list. More...
 
u64 app_time
 Time of the last ecrt_master_sync() call. More...
 
u64 dc_ref_time
 Common reference timestamp for DC start times. More...
 
u8 dc_offset_valid
 DC slaves have valid system time offsets.
 
ec_datagram_t ref_sync_datagram
 Datagram used for synchronizing the reference clock to the master clock. More...
 
ec_datagram_t sync_datagram
 Datagram used for DC drift compensation. More...
 
ec_datagram_t sync64_datagram
 Datagram used to retrieve 64bit ref slave system clock time. More...
 
ec_datagram_t sync_mon_datagram
 Datagram used for DC synchronisation monitoring. More...
 
ec_slave_config_tdc_ref_config
 Application-selected DC reference clock slave config. More...
 
ec_slave_tdc_ref_clock
 DC reference clock slave. More...
 
unsigned int scan_busy
 Current scan state. More...
 
unsigned int allow_scan
 True, if slave scanning is allowed. More...
 
ec_lock_t scan_sem
 Semaphore protecting the scan_busy variable and the allow_scan flag. More...
 
wait_queue_head_t scan_queue
 Queue for processes that wait for slave scanning. More...
 
unsigned int config_busy
 State of slave configuration. More...
 
ec_lock_t config_sem
 Semaphore protecting the config_busy variable and the allow_config flag. More...
 
wait_queue_head_t config_queue
 Queue for processes that wait for slave configuration. More...
 
struct list_head datagram_queue
 Datagram queue. More...
 
uint8_t datagram_index
 Current datagram index. More...
 
ec_lock_t io_sem
 Semaphore protecting the datagram_queue. More...
 
struct list_head ext_datagram_queue
 Queue for non-application datagrams. More...
 
ec_lock_t ext_queue_sem
 Semaphore protecting the ext_datagram_queue. More...
 
ec_datagram_t ext_datagram_ring [EC_EXT_RING_SIZE]
 External datagram ring. More...
 
unsigned int ext_ring_idx_rt
 Index in external datagram ring for RT side. More...
 
unsigned int ext_ring_idx_fsm
 Index in external datagram ring for FSM side. More...
 
unsigned int send_interval
 Interval between two calls to ecrt_master_send(). More...
 
size_t max_queue_size
 Maximum size of datagram queue.
 
ec_slave_tfsm_slave
 Slave that is queried next for FSM exec. More...
 
struct list_head fsm_exec_list
 Slave FSM execution list. More...
 
unsigned int fsm_exec_count
 Number of entries in execution list. More...
 
unsigned int debug_level
 Master debug level. More...
 
ec_stats_t stats
 Cyclic statistics. More...
 
struct task_struct * thread
 Master thread. More...
 
struct task_struct * eoe_thread
 EoE thread. More...
 
struct list_head eoe_handlers
 Ethernet over EtherCAT handlers. More...
 
void(* send_cb )(void *)
 Current send datagrams callback. More...
 
void(* receive_cb )(void *)
 Current receive datagrams callback. More...
 
void * cb_data
 Current callback data. More...
 
void(* app_send_cb )(void *)
 Application's send datagrams callback. More...
 
void(* app_receive_cb )(void *)
 Application's receive datagrams callback. More...
 
void * app_cb_data
 Application callback data. More...
 
struct list_head sii_requests
 SII write requests. More...
 
struct list_head emerg_reg_requests
 Emergency register access requests. More...
 
wait_queue_head_t request_queue
 Wait queue for external requests from user space. More...
 

Detailed Description

EtherCAT master.

Manages slaves, domains and IO.

Definition at line 189 of file master.h.

Field Documentation

unsigned int ec_master::index

Index.

Definition at line 190 of file master.h.

unsigned int ec_master::reserved

True, if the master is in use.

Definition at line 191 of file master.h.

ec_cdev_t ec_master::cdev

Master character device.

Definition at line 193 of file master.h.

struct device* ec_master::class_device

Master class device.

Definition at line 195 of file master.h.

ec_rtdm_dev_t ec_master::rtdm_dev

RTDM device.

Definition at line 201 of file master.h.

ec_lock_t ec_master::master_sem

Master semaphore.

Definition at line 204 of file master.h.

ec_device_t ec_master::devices[EC_MAX_NUM_DEVICES]

EtherCAT devices.

Definition at line 206 of file master.h.

const uint8_t* ec_master::macs[EC_MAX_NUM_DEVICES]

Device MAC addresses.

Definition at line 207 of file master.h.

ec_lock_t ec_master::device_sem

Device semaphore.

Definition at line 213 of file master.h.

ec_device_stats_t ec_master::device_stats

Device statistics.

Definition at line 214 of file master.h.

ec_fsm_master_t ec_master::fsm

Master state machine.

Definition at line 216 of file master.h.

ec_datagram_t ec_master::fsm_datagram

Datagram used for state machines.

Definition at line 217 of file master.h.

ec_master_phase_t ec_master::phase

Master phase.

Definition at line 218 of file master.h.

unsigned int ec_master::active

Master has been activated.

Definition at line 219 of file master.h.

unsigned int ec_master::config_changed

The configuration changed.

Definition at line 220 of file master.h.

unsigned int ec_master::injection_seq_fsm

Datagram injection sequence number for the FSM side.

Definition at line 221 of file master.h.

unsigned int ec_master::injection_seq_rt

Datagram injection sequence number for the realtime side.

Definition at line 223 of file master.h.

ec_slave_t* ec_master::slaves

Array of slaves on the bus.

Definition at line 226 of file master.h.

unsigned int ec_master::slave_count

Number of slaves on the bus.

Definition at line 227 of file master.h.

struct list_head ec_master::configs

List of slave configurations.

Definition at line 230 of file master.h.

struct list_head ec_master::domains

List of domains.

Definition at line 231 of file master.h.

ec_lock_t ec_master::domains_lock

Lock for access to domains list.

Definition at line 232 of file master.h.

u64 ec_master::app_time

Time of the last ecrt_master_sync() call.

Definition at line 234 of file master.h.

u64 ec_master::dc_ref_time

Common reference timestamp for DC start times.

Definition at line 235 of file master.h.

ec_datagram_t ec_master::ref_sync_datagram

Datagram used for synchronizing the reference clock to the master clock.

Definition at line 237 of file master.h.

ec_datagram_t ec_master::sync_datagram

Datagram used for DC drift compensation.

Definition at line 239 of file master.h.

ec_datagram_t ec_master::sync64_datagram

Datagram used to retrieve 64bit ref slave system clock time.

Definition at line 241 of file master.h.

ec_datagram_t ec_master::sync_mon_datagram

Datagram used for DC synchronisation monitoring.

Definition at line 243 of file master.h.

ec_slave_config_t* ec_master::dc_ref_config

Application-selected DC reference clock slave config.

Definition at line 245 of file master.h.

ec_slave_t* ec_master::dc_ref_clock

DC reference clock slave.

Definition at line 247 of file master.h.

unsigned int ec_master::scan_busy

Current scan state.

Definition at line 249 of file master.h.

unsigned int ec_master::allow_scan

True, if slave scanning is allowed.

Definition at line 250 of file master.h.

ec_lock_t ec_master::scan_sem

Semaphore protecting the scan_busy variable and the allow_scan flag.

Definition at line 251 of file master.h.

wait_queue_head_t ec_master::scan_queue

Queue for processes that wait for slave scanning.

Definition at line 253 of file master.h.

unsigned int ec_master::config_busy

State of slave configuration.

Definition at line 256 of file master.h.

ec_lock_t ec_master::config_sem

Semaphore protecting the config_busy variable and the allow_config flag.

Definition at line 257 of file master.h.

wait_queue_head_t ec_master::config_queue

Queue for processes that wait for slave configuration.

Definition at line 259 of file master.h.

struct list_head ec_master::datagram_queue

Datagram queue.

Definition at line 262 of file master.h.

uint8_t ec_master::datagram_index

Current datagram index.

Definition at line 263 of file master.h.

ec_lock_t ec_master::io_sem

Semaphore protecting the datagram_queue.

Definition at line 264 of file master.h.

struct list_head ec_master::ext_datagram_queue

Queue for non-application datagrams.

Definition at line 266 of file master.h.

ec_lock_t ec_master::ext_queue_sem

Semaphore protecting the ext_datagram_queue.

Definition at line 268 of file master.h.

ec_datagram_t ec_master::ext_datagram_ring[EC_EXT_RING_SIZE]

External datagram ring.

Definition at line 271 of file master.h.

unsigned int ec_master::ext_ring_idx_rt

Index in external datagram ring for RT side.

Definition at line 273 of file master.h.

unsigned int ec_master::ext_ring_idx_fsm

Index in external datagram ring for FSM side.

Definition at line 275 of file master.h.

unsigned int ec_master::send_interval

Interval between two calls to ecrt_master_send().

Definition at line 277 of file master.h.

ec_slave_t* ec_master::fsm_slave

Slave that is queried next for FSM exec.

Definition at line 281 of file master.h.

struct list_head ec_master::fsm_exec_list

Slave FSM execution list.

Definition at line 282 of file master.h.

unsigned int ec_master::fsm_exec_count

Number of entries in execution list.

Definition at line 283 of file master.h.

unsigned int ec_master::debug_level

Master debug level.

Definition at line 285 of file master.h.

ec_stats_t ec_master::stats

Cyclic statistics.

Definition at line 286 of file master.h.

struct task_struct* ec_master::thread

Master thread.

Definition at line 288 of file master.h.

struct task_struct* ec_master::eoe_thread

EoE thread.

Definition at line 291 of file master.h.

struct list_head ec_master::eoe_handlers

Ethernet over EtherCAT handlers.

Definition at line 292 of file master.h.

void(* ec_master::send_cb) (void *)

Current send datagrams callback.

Definition at line 295 of file master.h.

void(* ec_master::receive_cb) (void *)

Current receive datagrams callback.

Definition at line 296 of file master.h.

void* ec_master::cb_data

Current callback data.

Definition at line 297 of file master.h.

void(* ec_master::app_send_cb) (void *)

Application's send datagrams callback.

Definition at line 298 of file master.h.

void(* ec_master::app_receive_cb) (void *)

Application's receive datagrams callback.

Definition at line 300 of file master.h.

void* ec_master::app_cb_data

Application callback data.

Definition at line 302 of file master.h.

struct list_head ec_master::sii_requests

SII write requests.

Definition at line 304 of file master.h.

struct list_head ec_master::emerg_reg_requests

Emergency register access requests.

Definition at line 305 of file master.h.

wait_queue_head_t ec_master::request_queue

Wait queue for external requests from user space.

Definition at line 308 of file master.h.