IgH EtherCAT Master  1.5.2
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...
 
struct semaphore 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...
 
struct semaphore 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...
 
u64 app_time
 Time of the last ecrt_master_sync() call. More...
 
u64 dc_ref_time
 Common reference timestamp for DC start times. More...
 
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 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...
 
struct semaphore 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...
 
struct semaphore 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...
 
struct list_head ext_datagram_queue
 Queue for non-application datagrams. More...
 
struct semaphore 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...
 
unsigned int run_on_cpu
 bind kernel threads to this cpu
 
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...
 
struct semaphore io_sem
 Semaphore used in IDLE phase. 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 194 of file master.h.

Field Documentation

unsigned int ec_master::index

Index.

Definition at line 195 of file master.h.

unsigned int ec_master::reserved

True, if the master is in use.

Definition at line 196 of file master.h.

ec_cdev_t ec_master::cdev

Master character device.

Definition at line 198 of file master.h.

struct device* ec_master::class_device

Master class device.

Definition at line 200 of file master.h.

struct semaphore ec_master::master_sem

Master semaphore.

Definition at line 209 of file master.h.

ec_device_t ec_master::devices[EC_MAX_NUM_DEVICES]

EtherCAT devices.

Definition at line 211 of file master.h.

const uint8_t* ec_master::macs[EC_MAX_NUM_DEVICES]

Device MAC addresses.

Definition at line 212 of file master.h.

struct semaphore ec_master::device_sem

Device semaphore.

Definition at line 218 of file master.h.

ec_device_stats_t ec_master::device_stats

Device statistics.

Definition at line 219 of file master.h.

ec_fsm_master_t ec_master::fsm

Master state machine.

Definition at line 221 of file master.h.

ec_datagram_t ec_master::fsm_datagram

Datagram used for state machines.

Definition at line 222 of file master.h.

ec_master_phase_t ec_master::phase

Master phase.

Definition at line 223 of file master.h.

unsigned int ec_master::active

Master has been activated.

Definition at line 224 of file master.h.

unsigned int ec_master::config_changed

The configuration changed.

Definition at line 225 of file master.h.

unsigned int ec_master::injection_seq_fsm

Datagram injection sequence number for the FSM side.

Definition at line 226 of file master.h.

unsigned int ec_master::injection_seq_rt

Datagram injection sequence number for the realtime side.

Definition at line 228 of file master.h.

ec_slave_t* ec_master::slaves

Array of slaves on the bus.

Definition at line 231 of file master.h.

unsigned int ec_master::slave_count

Number of slaves on the bus.

Definition at line 232 of file master.h.

struct list_head ec_master::configs

List of slave configurations.

Definition at line 235 of file master.h.

struct list_head ec_master::domains

List of domains.

Definition at line 236 of file master.h.

u64 ec_master::app_time

Time of the last ecrt_master_sync() call.

Definition at line 238 of file master.h.

u64 ec_master::dc_ref_time

Common reference timestamp for DC start times.

Definition at line 239 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 240 of file master.h.

ec_datagram_t ec_master::sync_datagram

Datagram used for DC drift compensation.

Definition at line 242 of file master.h.

ec_datagram_t ec_master::sync_mon_datagram

Datagram used for DC synchronisation monitoring.

Definition at line 244 of file master.h.

ec_slave_config_t* ec_master::dc_ref_config

Application-selected DC reference clock slave config.

Definition at line 246 of file master.h.

ec_slave_t* ec_master::dc_ref_clock

DC reference clock slave.

Definition at line 248 of file master.h.

unsigned int ec_master::scan_busy

Current scan state.

Definition at line 250 of file master.h.

unsigned int ec_master::allow_scan

True, if slave scanning is allowed.

Definition at line 251 of file master.h.

struct semaphore ec_master::scan_sem

Semaphore protecting the scan_busy variable and the allow_scan flag.

Definition at line 252 of file master.h.

wait_queue_head_t ec_master::scan_queue

Queue for processes that wait for slave scanning.

Definition at line 254 of file master.h.

unsigned int ec_master::config_busy

State of slave configuration.

Definition at line 257 of file master.h.

struct semaphore ec_master::config_sem

Semaphore protecting the config_busy variable and the allow_config flag.

Definition at line 258 of file master.h.

wait_queue_head_t ec_master::config_queue

Queue for processes that wait for slave configuration.

Definition at line 260 of file master.h.

struct list_head ec_master::datagram_queue

Datagram queue.

Definition at line 263 of file master.h.

uint8_t ec_master::datagram_index

Current datagram index.

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.

struct semaphore 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 287 of file master.h.

struct task_struct* ec_master::thread

Master thread.

Definition at line 289 of file master.h.

struct task_struct* ec_master::eoe_thread

EoE thread.

Definition at line 292 of file master.h.

struct list_head ec_master::eoe_handlers

Ethernet over EtherCAT handlers.

Definition at line 293 of file master.h.

struct semaphore ec_master::io_sem

Semaphore used in IDLE phase.

Definition at line 296 of file master.h.

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

Current send datagrams callback.

Definition at line 298 of file master.h.

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

Current receive datagrams callback.

Definition at line 299 of file master.h.

void* ec_master::cb_data

Current callback data.

Definition at line 300 of file master.h.

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

Application's send datagrams callback.

Definition at line 301 of file master.h.

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

Application's receive datagrams callback.

Definition at line 303 of file master.h.

void* ec_master::app_cb_data

Application callback data.

Definition at line 305 of file master.h.

struct list_head ec_master::sii_requests

SII write requests.

Definition at line 307 of file master.h.

struct list_head ec_master::emerg_reg_requests

Emergency register access requests.

Definition at line 308 of file master.h.

wait_queue_head_t ec_master::request_queue

Wait queue for external requests from user space.

Definition at line 311 of file master.h.