EtherCAT master structure.
|
Data Structures |
| struct | ec_stats_t |
| | Cyclic statistics. More...
|
| struct | ec_device_stats_t |
| | Device statistics. More...
|
| struct | ec_master |
| | EtherCAT master. More...
|
Defines |
| #define | EC_MASTER_INFO(master, fmt, args...) printk(KERN_INFO "EtherCAT %u: " fmt, master->index, ##args) |
| | Convenience macro for printing master-specific information to syslog.
|
| #define | EC_MASTER_ERR(master, fmt, args...) printk(KERN_ERR "EtherCAT ERROR %u: " fmt, master->index, ##args) |
| | Convenience macro for printing master-specific errors to syslog.
|
| #define | EC_MASTER_WARN(master, fmt, args...) printk(KERN_WARNING "EtherCAT WARNING %u: " fmt, master->index, ##args) |
| | Convenience macro for printing master-specific warnings to syslog.
|
| #define | EC_MASTER_DBG(master, level, fmt, args...) |
| | Convenience macro for printing master-specific debug messages to syslog.
|
| #define | EC_EXT_RING_SIZE 32 |
| | Size of the external datagram ring.
|
|
#define | ec_master_num_devices(MASTER) 1 |
| | Number of Ethernet devices.
|
Enumerations |
| enum | ec_master_phase_t { EC_ORPHANED,
EC_IDLE,
EC_OPERATION
} |
| | EtherCAT master phase. More...
|
Functions |
|
void | ec_master_init_static (void) |
| | Static variables initializer.
|
| int | ec_master_init (ec_master_t *, unsigned int, const uint8_t *, const uint8_t *, dev_t, struct class *, unsigned int) |
| | Master constructor.
|
|
void | ec_master_clear (ec_master_t *) |
| | Destructor.
|
| int | ec_master_enter_idle_phase (ec_master_t *) |
| | Transition function from ORPHANED to IDLE phase.
|
|
void | ec_master_leave_idle_phase (ec_master_t *) |
| | Transition function from IDLE to ORPHANED phase.
|
| int | ec_master_enter_operation_phase (ec_master_t *) |
| | Transition function from IDLE to OPERATION phase.
|
|
void | ec_master_leave_operation_phase (ec_master_t *) |
| | Transition function from OPERATION to IDLE phase.
|
|
void | ec_master_eoe_start (ec_master_t *) |
| | Starts Ethernet over EtherCAT processing on demand.
|
|
void | ec_master_eoe_stop (ec_master_t *) |
| | Stops the Ethernet over EtherCAT processing.
|
| void | ec_master_receive_datagrams (ec_master_t *, ec_device_t *, const uint8_t *, size_t) |
| | Processes a received frame.
|
|
void | ec_master_queue_datagram (ec_master_t *, ec_datagram_t *) |
| | Places a datagram in the datagram queue.
|
|
void | ec_master_queue_datagram_ext (ec_master_t *, ec_datagram_t *) |
| | Places a datagram in the non-application datagram queue.
|
|
void | ec_master_set_send_interval (ec_master_t *, unsigned int) |
| | Sets the expected interval between calls to ecrt_master_send and calculates the maximum amount of data to queue.
|
|
void | ec_master_attach_slave_configs (ec_master_t *) |
| | Attaches the slave configurations to the slaves.
|
| ec_slave_t * | ec_master_find_slave (ec_master_t *, uint16_t, uint16_t) |
| | Finds a slave in the bus, given the alias and position.
|
| const ec_slave_t * | ec_master_find_slave_const (const ec_master_t *, uint16_t, uint16_t) |
| | Finds a slave in the bus, given the alias and position.
|
| void | ec_master_output_stats (ec_master_t *) |
| | Output master statistics.
|
|
void | ec_master_clear_eoe_handlers (ec_master_t *) |
| | Clear and free all EoE handlers.
|
|
void | ec_master_clear_slaves (ec_master_t *) |
| | Clear all slaves.
|
| unsigned int | ec_master_config_count (const ec_master_t *) |
| | Get the number of slave configurations provided by the application.
|
| ec_slave_config_t * | ec_master_get_config (const ec_master_t *, unsigned int) |
| | Get a slave configuration via its position in the list.
|
| const ec_slave_config_t * | ec_master_get_config_const (const ec_master_t *, unsigned int) |
| | Get a slave configuration via its position in the list.
|
| unsigned int | ec_master_domain_count (const ec_master_t *) |
| | Get the number of domains.
|
| ec_domain_t * | ec_master_find_domain (ec_master_t *, unsigned int) |
| | Get a domain via its position in the list.
|
| const ec_domain_t * | ec_master_find_domain_const (const ec_master_t *, unsigned int) |
| | Get a domain via its position in the list.
|
| uint16_t | ec_master_eoe_handler_count (const ec_master_t *) |
| | Get the number of EoE handlers.
|
| const ec_eoe_t * | ec_master_get_eoe_handler_const (const ec_master_t *, uint16_t) |
| | Get an EoE handler via its position in the list.
|
| int | ec_master_debug_level (ec_master_t *, unsigned int) |
| | Set the debug level.
|
| ec_domain_t * | ecrt_master_create_domain_err (ec_master_t *) |
| | Same as ecrt_master_create_domain(), but with ERR_PTR() return value.
|
|
ec_slave_config_t * | ecrt_master_slave_config_err (ec_master_t *, uint16_t, uint16_t, uint32_t, uint32_t) |
| | Same as ecrt_master_slave_config(), but with ERR_PTR() return value.
|
|
void | ec_master_calc_dc (ec_master_t *) |
| | Distributed-clocks calculations.
|
|
void | ec_master_request_op (ec_master_t *) |
| | Request OP state for configured slaves.
|
|
void | ec_master_internal_send_cb (void *) |
| | Internal sending callback.
|
|
void | ec_master_internal_receive_cb (void *) |
| | Internal receiving callback.
|
Variables |
|
const unsigned int | rate_intervals [EC_RATE_COUNT] |
| | List of intervals for statistics [s].
|
EtherCAT master structure.