IgH EtherCAT Master  1.5.2
rtdm-ioctl.c File Reference

EtherCAT master character device. More...

Go to the source code of this file.

Macros

#define DEBUG_LATENCY   0
 Set to 1 to enable ioctl() latency tracing. More...
 
#define ATTRIBUTES
 Optional compiler attributes fo ioctl() functions.
 
#define ec_ioctl_lock_down_interruptible(p)   ec_lock_down_interruptible(p)
 Ioctl locking is disabled for RTDM as the RT app needs to use RTAI locks.
 
#define ec_ioctl_lock_up(p)   ec_lock_up(p)
 
#define EC_IOCTL   ec_ioctl
 ioctl() function to use.
 

Functions

static void ec_ioctl_strcpy (char *target, const char *source)
 Copies a string to an ioctl structure. More...
 
static ATTRIBUTES int ec_ioctl_module (void *arg)
 Get module information. More...
 
static ATTRIBUTES int ec_ioctl_master (ec_master_t *master, void *arg)
 Get master information. More...
 
static ATTRIBUTES int ec_ioctl_slave (ec_master_t *master, void *arg)
 Get slave information. More...
 
static ATTRIBUTES int ec_ioctl_slave_sync (ec_master_t *master, void *arg)
 Get slave sync manager information. More...
 
static ATTRIBUTES int ec_ioctl_slave_sync_pdo (ec_master_t *master, void *arg)
 Get slave sync manager PDO information. More...
 
static ATTRIBUTES int ec_ioctl_slave_sync_pdo_entry (ec_master_t *master, void *arg)
 Get slave sync manager PDO entry information. More...
 
static ATTRIBUTES int ec_ioctl_domain (ec_master_t *master, void *arg)
 Get domain information. More...
 
static ATTRIBUTES int ec_ioctl_domain_fmmu (ec_master_t *master, void *arg)
 Get domain FMMU information. More...
 
static ATTRIBUTES int ec_ioctl_domain_data (ec_master_t *master, void *arg)
 Get domain data. More...
 
static ATTRIBUTES int ec_ioctl_pcap_data (ec_master_t *master, void *arg)
 Get pcap data. More...
 
static ATTRIBUTES int ec_ioctl_master_debug (ec_master_t *master, void *arg)
 Set master debug level. More...
 
static ATTRIBUTES int ec_ioctl_master_rescan (ec_master_t *master, void *arg)
 Issue a bus scan. More...
 
static ATTRIBUTES int ec_ioctl_slave_state (ec_master_t *master, void *arg)
 Set slave state. More...
 
static ATTRIBUTES int ec_ioctl_slave_reboot (ec_master_t *master, void *arg)
 Reboot a slave (if supported). More...
 
static ATTRIBUTES int ec_ioctl_slave_sdo (ec_master_t *master, void *arg)
 Get slave SDO information. More...
 
static ATTRIBUTES int ec_ioctl_slave_sdo_entry (ec_master_t *master, void *arg)
 Get slave SDO entry information. More...
 
static ATTRIBUTES int ec_ioctl_slave_sdo_upload (ec_master_t *master, void *arg)
 Upload SDO. More...
 
static ATTRIBUTES int ec_ioctl_slave_sdo_download (ec_master_t *master, void *arg)
 Download SDO. More...
 
static ATTRIBUTES int ec_ioctl_slave_sii_read (ec_master_t *master, void *arg)
 Read a slave's SII. More...
 
static ATTRIBUTES int ec_ioctl_slave_sii_write (ec_master_t *master, void *arg)
 Write a slave's SII. More...
 
static ATTRIBUTES int ec_ioctl_slave_reg_read (ec_master_t *master, void *arg)
 Read a slave's registers. More...
 
static ATTRIBUTES int ec_ioctl_slave_reg_write (ec_master_t *master, void *arg)
 Write a slave's registers. More...
 
static ATTRIBUTES int ec_ioctl_slave_reg_readwrite (ec_master_t *master, void *arg)
 Read & Write a slave's registers. More...
 
static ATTRIBUTES int ec_ioctl_config (ec_master_t *master, void *arg)
 Get slave configuration information. More...
 
static ATTRIBUTES int ec_ioctl_config_pdo (ec_master_t *master, void *arg)
 Get slave configuration PDO information. More...
 
static ATTRIBUTES int ec_ioctl_config_pdo_entry (ec_master_t *master, void *arg)
 Get slave configuration PDO entry information. More...
 
static ATTRIBUTES int ec_ioctl_config_sdo (ec_master_t *master, void *arg)
 Get slave configuration SDO information. More...
 
static ATTRIBUTES int ec_ioctl_config_idn (ec_master_t *master, void *arg)
 Get slave configuration IDN information. More...
 
static ATTRIBUTES int ec_ioctl_eoe_handler (ec_master_t *master, void *arg)
 Get EoE handler information. More...
 
static ATTRIBUTES int ec_ioctl_slave_eoe_ip_param (ec_master_t *master, void *arg)
 Request EoE IP parameter setting. More...
 
static ATTRIBUTES int ec_ioctl_request (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Request the master from userspace. More...
 
static ATTRIBUTES int ec_ioctl_create_domain (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Create a domain. More...
 
static ATTRIBUTES int ec_ioctl_create_slave_config (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Create a slave configuration. More...
 
static ATTRIBUTES int ec_ioctl_select_ref_clock (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Select the DC reference clock. More...
 
static ATTRIBUTES int ec_ioctl_setup_domain_memory (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Sets up domain memory. More...
 
static ATTRIBUTES int ec_ioctl_activate (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Activates the master. More...
 
static ATTRIBUTES int ec_ioctl_deactivate_slaves (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Deactivates the slaves. More...
 
static ATTRIBUTES int ec_ioctl_deactivate (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Deactivates the master. More...
 
static ATTRIBUTES int ec_ioctl_set_send_interval (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Set max. More...
 
static ATTRIBUTES int ec_ioctl_send (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Send frames. More...
 
static ATTRIBUTES int ec_ioctl_receive (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Receive frames. More...
 
static ATTRIBUTES int ec_ioctl_master_state (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Get the master state. More...
 
static ATTRIBUTES int ec_ioctl_master_link_state (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Get the link state. More...
 
static ATTRIBUTES int ec_ioctl_app_time (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Set the master DC application time. More...
 
static ATTRIBUTES int ec_ioctl_sync_ref (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Sync the reference clock. More...
 
static ATTRIBUTES int ec_ioctl_sync_ref_to (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Sync the reference clock. More...
 
static ATTRIBUTES int ec_ioctl_sync_slaves (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Sync the slave clocks. More...
 
static ATTRIBUTES int ec_ioctl_ref_clock_time (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Get the system time of the reference clock. More...
 
static ATTRIBUTES int ec_ioctl_64bit_ref_clock_time_queue (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Queue the 64bit dc reference slave clock datagram. More...
 
static ATTRIBUTES int ec_ioctl_64bit_ref_clock_time (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Get the 64bit system time of the reference clock. More...
 
static ATTRIBUTES int ec_ioctl_sync_mon_queue (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Queue the sync monitoring datagram. More...
 
static ATTRIBUTES int ec_ioctl_sync_mon_process (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Processes the sync monitoring datagram. More...
 
static ATTRIBUTES int ec_ioctl_rt_slave_requests (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Call to set whether processing slave requests explicitly from the application is active or not. More...
 
static ATTRIBUTES int ec_ioctl_exec_slave_requests (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Call to process slave requests explicitly from application. More...
 
static ATTRIBUTES int ec_ioctl_reset (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Reset configuration. More...
 
static ATTRIBUTES int ec_ioctl_sc_sync (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Configure a sync manager. More...
 
static ATTRIBUTES int ec_ioctl_sc_watchdog (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Configure a slave's watchdogs. More...
 
static ATTRIBUTES int ec_ioctl_sc_allow_overlapping_pdos (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Configure wether a slave allows overlapping PDOs. More...
 
static ATTRIBUTES int ec_ioctl_sc_add_pdo (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Add a PDO to the assignment. More...
 
static ATTRIBUTES int ec_ioctl_sc_clear_pdos (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Clears the PDO assignment. More...
 
static ATTRIBUTES int ec_ioctl_sc_add_entry (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Add an entry to a PDO's mapping. More...
 
static ATTRIBUTES int ec_ioctl_sc_clear_entries (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Clears the mapping of a PDO. More...
 
static ATTRIBUTES int ec_ioctl_sc_reg_pdo_entry (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Registers a PDO entry. More...
 
static ATTRIBUTES int ec_ioctl_sc_reg_pdo_pos (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Registers a PDO entry by its position. More...
 
static ATTRIBUTES int ec_ioctl_sc_dc (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Sets the DC AssignActivate word and the sync signal times. More...
 
static ATTRIBUTES int ec_ioctl_sc_sdo (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Configures an SDO. More...
 
static ATTRIBUTES int ec_ioctl_sc_emerg_size (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Set the emergency ring buffer size. More...
 
static ATTRIBUTES int ec_ioctl_sc_emerg_pop (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Get an emergency message from the ring. More...
 
static ATTRIBUTES int ec_ioctl_sc_emerg_clear (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Clear the emergency ring. More...
 
static ATTRIBUTES int ec_ioctl_sc_emerg_overruns (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Get the number of emergency overruns. More...
 
static ATTRIBUTES int ec_ioctl_sc_create_sdo_request (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Create an SDO request. More...
 
static ATTRIBUTES int ec_ioctl_sc_create_foe_request (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Create an FoE request. More...
 
static ATTRIBUTES int ec_ioctl_sc_create_reg_request (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Create a register request. More...
 
static ATTRIBUTES int ec_ioctl_sc_create_voe_handler (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Create a VoE handler. More...
 
static ATTRIBUTES int ec_ioctl_sc_state (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Get the slave configuration's state. More...
 
static ATTRIBUTES int ec_ioctl_sc_idn (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Configures an IDN. More...
 
static ATTRIBUTES int ec_ioctl_domain_size (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Gets the domain's data size. More...
 
static ATTRIBUTES int ec_ioctl_domain_offset (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Gets the domain's offset in the total process data. More...
 
static ATTRIBUTES int ec_ioctl_domain_process (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Process the domain. More...
 
static ATTRIBUTES int ec_ioctl_domain_queue (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Queue the domain. More...
 
static ATTRIBUTES int ec_ioctl_domain_state (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Get the domain state. More...
 
static ATTRIBUTES int ec_ioctl_sdo_request_index (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Sets an SDO request's SDO index and subindex. More...
 
static ATTRIBUTES int ec_ioctl_sdo_request_timeout (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Sets an SDO request's timeout. More...
 
static ATTRIBUTES int ec_ioctl_sdo_request_state (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Gets an SDO request's state. More...
 
static ATTRIBUTES int ec_ioctl_sdo_request_read (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Starts an SDO read operation. More...
 
static ATTRIBUTES int ec_ioctl_sdo_request_write (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Starts an SDO write operation. More...
 
static ATTRIBUTES int ec_ioctl_sdo_request_data (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Read SDO data. More...
 
static ATTRIBUTES int ec_ioctl_foe_request_file (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Sets an FoE request's FoE filename and password. More...
 
static ATTRIBUTES int ec_ioctl_foe_request_timeout (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Sets an FoE request's timeout. More...
 
static ATTRIBUTES int ec_ioctl_foe_request_state (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Gets an FoE request's state. More...
 
static ATTRIBUTES int ec_ioctl_foe_request_read (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Starts an FoE read operation. More...
 
static ATTRIBUTES int ec_ioctl_foe_request_write (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Starts an FoE write operation. More...
 
static ATTRIBUTES int ec_ioctl_foe_request_data (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Read FoE data. More...
 
static ATTRIBUTES int ec_ioctl_reg_request_data (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Read register data. More...
 
static ATTRIBUTES int ec_ioctl_reg_request_state (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Gets an register request's state. More...
 
static ATTRIBUTES int ec_ioctl_reg_request_write (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Starts an register write operation. More...
 
static ATTRIBUTES int ec_ioctl_reg_request_read (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Starts an register read operation. More...
 
static ATTRIBUTES int ec_ioctl_reg_request_readwrite (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Starts an register read-write operation. More...
 
static ATTRIBUTES int ec_ioctl_voe_send_header (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Sets the VoE send header. More...
 
static ATTRIBUTES int ec_ioctl_voe_rec_header (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Gets the received VoE header. More...
 
static ATTRIBUTES int ec_ioctl_voe_read (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Starts a VoE read operation. More...
 
static ATTRIBUTES int ec_ioctl_voe_read_nosync (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Starts a VoE read operation without sending a sync message first. More...
 
static ATTRIBUTES int ec_ioctl_voe_write (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Starts a VoE write operation. More...
 
static ATTRIBUTES int ec_ioctl_voe_exec (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Executes the VoE state machine. More...
 
static ATTRIBUTES int ec_ioctl_voe_data (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Reads the received VoE data. More...
 
static ATTRIBUTES int ec_ioctl_slave_foe_read (ec_master_t *master, void *arg)
 Read a file from a slave via FoE. More...
 
static ATTRIBUTES int ec_ioctl_slave_foe_write (ec_master_t *master, void *arg)
 Write a file to a slave via FoE. More...
 
static ATTRIBUTES int ec_ioctl_slave_soe_read (ec_master_t *master, void *arg)
 Read an SoE IDN. More...
 
static ATTRIBUTES int ec_ioctl_slave_soe_write (ec_master_t *master, void *arg)
 Write an IDN to a slave via SoE. More...
 
static ATTRIBUTES int ec_ioctl_slave_dict_upload (ec_master_t *master, void *arg)
 Upload Dictionary. More...
 
static ATTRIBUTES int ec_ioctl_eoe_addif (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 add an EOE interface More...
 
static ATTRIBUTES int ec_ioctl_eoe_delif (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 delete an EOE interface More...
 
static ATTRIBUTES int ec_ioctl_mbox_gateway (ec_master_t *master, void *arg, ec_ioctl_context_t *ctx)
 Process an EtherCAT Mailbox Gateway message. More...
 
long EC_IOCTL (ec_master_t *master, ec_ioctl_context_t *ctx, unsigned int cmd, void *arg)
 Called when an ioctl() command is issued. More...
 

Detailed Description

EtherCAT master character device.

Definition in file rtdm-ioctl.c.

Macro Definition Documentation

◆ DEBUG_LATENCY

#define DEBUG_LATENCY   0

Set to 1 to enable ioctl() latency tracing.

Requires CPU timestamp counter!

Definition at line 50 of file rtdm-ioctl.c.

Function Documentation

◆ ec_ioctl_strcpy()

static void ec_ioctl_strcpy ( char *  target,
const char *  source 
)
static

Copies a string to an ioctl structure.

Parameters
targetTarget.
sourceSource.

Definition at line 74 of file rtdm-ioctl.c.

◆ ec_ioctl_module()

static ATTRIBUTES int ec_ioctl_module ( void *  arg)
static

Get module information.

Returns
Zero on success, otherwise a negative error code.
Parameters
argUserspace address to store the results.

Definition at line 93 of file rtdm-ioctl.c.

◆ ec_ioctl_master()

static ATTRIBUTES int ec_ioctl_master ( ec_master_t master,
void *  arg 
)
static

Get master information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argUserspace address to store the results.

Definition at line 114 of file rtdm-ioctl.c.

◆ ec_ioctl_slave()

static ATTRIBUTES int ec_ioctl_slave ( ec_master_t master,
void *  arg 
)
static

Get slave information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argUserspace address to store the results.

Definition at line 216 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_sync()

static ATTRIBUTES int ec_ioctl_slave_sync ( ec_master_t master,
void *  arg 
)
static

Get slave sync manager information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argUserspace address to store the results.

Definition at line 339 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_sync_pdo()

static ATTRIBUTES int ec_ioctl_slave_sync_pdo ( ec_master_t master,
void *  arg 
)
static

Get slave sync manager PDO information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argUserspace address to store the results.

Definition at line 403 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_sync_pdo_entry()

static ATTRIBUTES int ec_ioctl_slave_sync_pdo_entry ( ec_master_t master,
void *  arg 
)
static

Get slave sync manager PDO entry information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argUserspace address to store the results.

Definition at line 471 of file rtdm-ioctl.c.

◆ ec_ioctl_domain()

static ATTRIBUTES int ec_ioctl_domain ( ec_master_t master,
void *  arg 
)
static

Get domain information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argUserspace address to store the results.

Definition at line 550 of file rtdm-ioctl.c.

◆ ec_ioctl_domain_fmmu()

static ATTRIBUTES int ec_ioctl_domain_fmmu ( ec_master_t master,
void *  arg 
)
static

Get domain FMMU information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argUserspace address to store the results.

Definition at line 595 of file rtdm-ioctl.c.

◆ ec_ioctl_domain_data()

static ATTRIBUTES int ec_ioctl_domain_data ( ec_master_t master,
void *  arg 
)
static

Get domain data.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argUserspace address to store the results.

Definition at line 647 of file rtdm-ioctl.c.

◆ ec_ioctl_pcap_data()

static ATTRIBUTES int ec_ioctl_pcap_data ( ec_master_t master,
void *  arg 
)
static

Get pcap data.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argUserspace address to store the results.

Definition at line 692 of file rtdm-ioctl.c.

◆ ec_ioctl_master_debug()

static ATTRIBUTES int ec_ioctl_master_debug ( ec_master_t master,
void *  arg 
)
static

Set master debug level.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 766 of file rtdm-ioctl.c.

◆ ec_ioctl_master_rescan()

static ATTRIBUTES int ec_ioctl_master_rescan ( ec_master_t master,
void *  arg 
)
static

Issue a bus scan.

Returns
Always zero (success).
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 780 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_state()

static ATTRIBUTES int ec_ioctl_slave_state ( ec_master_t master,
void *  arg 
)
static

Set slave state.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 795 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_reboot()

static ATTRIBUTES int ec_ioctl_slave_reboot ( ec_master_t master,
void *  arg 
)
static

Reboot a slave (if supported).

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 830 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_sdo()

static ATTRIBUTES int ec_ioctl_slave_sdo ( ec_master_t master,
void *  arg 
)
static

Get slave SDO information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 870 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_sdo_entry()

static ATTRIBUTES int ec_ioctl_slave_sdo_entry ( ec_master_t master,
void *  arg 
)
static

Get slave SDO entry information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 919 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_sdo_upload()

static ATTRIBUTES int ec_ioctl_slave_sdo_upload ( ec_master_t master,
void *  arg 
)
static

Upload SDO.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 999 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_sdo_download()

static ATTRIBUTES int ec_ioctl_slave_sdo_download ( ec_master_t master,
void *  arg 
)
static

Download SDO.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 1051 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_sii_read()

static ATTRIBUTES int ec_ioctl_slave_sii_read ( ec_master_t master,
void *  arg 
)
static

Read a slave's SII.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 1099 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_sii_write()

static ATTRIBUTES int ec_ioctl_slave_sii_write ( ec_master_t master,
void *  arg 
)
static

Write a slave's SII.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 1152 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_reg_read()

static ATTRIBUTES int ec_ioctl_slave_reg_read ( ec_master_t master,
void *  arg 
)
static

Read a slave's registers.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 1240 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_reg_write()

static ATTRIBUTES int ec_ioctl_slave_reg_write ( ec_master_t master,
void *  arg 
)
static

Write a slave's registers.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 1319 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_reg_readwrite()

static ATTRIBUTES int ec_ioctl_slave_reg_readwrite ( ec_master_t master,
void *  arg 
)
static

Read & Write a slave's registers.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 1404 of file rtdm-ioctl.c.

◆ ec_ioctl_config()

static ATTRIBUTES int ec_ioctl_config ( ec_master_t master,
void *  arg 
)
static

Get slave configuration information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 1493 of file rtdm-ioctl.c.

◆ ec_ioctl_config_pdo()

static ATTRIBUTES int ec_ioctl_config_pdo ( ec_master_t master,
void *  arg 
)
static

Get slave configuration PDO information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 1551 of file rtdm-ioctl.c.

◆ ec_ioctl_config_pdo_entry()

static ATTRIBUTES int ec_ioctl_config_pdo_entry ( ec_master_t master,
void *  arg 
)
static

Get slave configuration PDO entry information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 1607 of file rtdm-ioctl.c.

◆ ec_ioctl_config_sdo()

static ATTRIBUTES int ec_ioctl_config_sdo ( ec_master_t master,
void *  arg 
)
static

Get slave configuration SDO information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 1672 of file rtdm-ioctl.c.

◆ ec_ioctl_config_idn()

static ATTRIBUTES int ec_ioctl_config_idn ( ec_master_t master,
void *  arg 
)
static

Get slave configuration IDN information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 1736 of file rtdm-ioctl.c.

◆ ec_ioctl_eoe_handler()

static ATTRIBUTES int ec_ioctl_eoe_handler ( ec_master_t master,
void *  arg 
)
static

Get EoE handler information.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 1802 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_eoe_ip_param()

static ATTRIBUTES int ec_ioctl_slave_eoe_ip_param ( ec_master_t master,
void *  arg 
)
static

Request EoE IP parameter setting.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 1881 of file rtdm-ioctl.c.

◆ ec_ioctl_request()

static ATTRIBUTES int ec_ioctl_request ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Request the master from userspace.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 1965 of file rtdm-ioctl.c.

◆ ec_ioctl_create_domain()

static ATTRIBUTES int ec_ioctl_create_domain ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Create a domain.

Returns
Domain index on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2034 of file rtdm-ioctl.c.

◆ ec_ioctl_create_slave_config()

static ATTRIBUTES int ec_ioctl_create_slave_config ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Create a slave configuration.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2058 of file rtdm-ioctl.c.

◆ ec_ioctl_select_ref_clock()

static ATTRIBUTES int ec_ioctl_select_ref_clock ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Select the DC reference clock.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2104 of file rtdm-ioctl.c.

◆ ec_ioctl_setup_domain_memory()

static ATTRIBUTES int ec_ioctl_setup_domain_memory ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Sets up domain memory.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2145 of file rtdm-ioctl.c.

◆ ec_ioctl_activate()

static ATTRIBUTES int ec_ioctl_activate ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Activates the master.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2231 of file rtdm-ioctl.c.

◆ ec_ioctl_deactivate_slaves()

static ATTRIBUTES int ec_ioctl_deactivate_slaves ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Deactivates the slaves.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2323 of file rtdm-ioctl.c.

◆ ec_ioctl_deactivate()

static ATTRIBUTES int ec_ioctl_deactivate ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Deactivates the master.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2342 of file rtdm-ioctl.c.

◆ ec_ioctl_set_send_interval()

static ATTRIBUTES int ec_ioctl_set_send_interval ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Set max.

number of databytes in a cycle

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2361 of file rtdm-ioctl.c.

◆ ec_ioctl_send()

static ATTRIBUTES int ec_ioctl_send ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Send frames.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2393 of file rtdm-ioctl.c.

◆ ec_ioctl_receive()

static ATTRIBUTES int ec_ioctl_receive ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Receive frames.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2435 of file rtdm-ioctl.c.

◆ ec_ioctl_master_state()

static ATTRIBUTES int ec_ioctl_master_state ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Get the master state.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2501 of file rtdm-ioctl.c.

◆ ec_ioctl_master_link_state()

static ATTRIBUTES int ec_ioctl_master_link_state ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Get the link state.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2523 of file rtdm-ioctl.c.

◆ ec_ioctl_app_time()

static ATTRIBUTES int ec_ioctl_app_time ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Set the master DC application time.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2555 of file rtdm-ioctl.c.

◆ ec_ioctl_sync_ref()

static ATTRIBUTES int ec_ioctl_sync_ref ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Sync the reference clock.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2580 of file rtdm-ioctl.c.

◆ ec_ioctl_sync_ref_to()

static ATTRIBUTES int ec_ioctl_sync_ref_to ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Sync the reference clock.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2600 of file rtdm-ioctl.c.

◆ ec_ioctl_sync_slaves()

static ATTRIBUTES int ec_ioctl_sync_slaves ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Sync the slave clocks.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2625 of file rtdm-ioctl.c.

◆ ec_ioctl_ref_clock_time()

static ATTRIBUTES int ec_ioctl_ref_clock_time ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Get the system time of the reference clock.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2645 of file rtdm-ioctl.c.

◆ ec_ioctl_64bit_ref_clock_time_queue()

static ATTRIBUTES int ec_ioctl_64bit_ref_clock_time_queue ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Queue the 64bit dc reference slave clock datagram.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2676 of file rtdm-ioctl.c.

◆ ec_ioctl_64bit_ref_clock_time()

static ATTRIBUTES int ec_ioctl_64bit_ref_clock_time ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Get the 64bit system time of the reference clock.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2696 of file rtdm-ioctl.c.

◆ ec_ioctl_sync_mon_queue()

static ATTRIBUTES int ec_ioctl_sync_mon_queue ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Queue the sync monitoring datagram.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2727 of file rtdm-ioctl.c.

◆ ec_ioctl_sync_mon_process()

static ATTRIBUTES int ec_ioctl_sync_mon_process ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Processes the sync monitoring datagram.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2747 of file rtdm-ioctl.c.

◆ ec_ioctl_rt_slave_requests()

static ATTRIBUTES int ec_ioctl_rt_slave_requests ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Call to set whether processing slave requests explicitly from the application is active or not.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2773 of file rtdm-ioctl.c.

◆ ec_ioctl_exec_slave_requests()

static ATTRIBUTES int ec_ioctl_exec_slave_requests ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Call to process slave requests explicitly from application.

Returns
Always zero (success).
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2806 of file rtdm-ioctl.c.

◆ ec_ioctl_reset()

static ATTRIBUTES int ec_ioctl_reset ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Reset configuration.

Returns
Always zero (success).
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2827 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_sync()

static ATTRIBUTES int ec_ioctl_sc_sync ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Configure a sync manager.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2845 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_watchdog()

static ATTRIBUTES int ec_ioctl_sc_watchdog ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Configure a slave's watchdogs.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2898 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_allow_overlapping_pdos()

static ATTRIBUTES int ec_ioctl_sc_allow_overlapping_pdos ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Configure wether a slave allows overlapping PDOs.

Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2941 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_add_pdo()

static ATTRIBUTES int ec_ioctl_sc_add_pdo ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Add a PDO to the assignment.

Returns
Zero on success, otherwise a negative error code.
Todo:
sc could be invalidated
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 2985 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_clear_pdos()

static ATTRIBUTES int ec_ioctl_sc_clear_pdos ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Clears the PDO assignment.

Returns
Zero on success, otherwise a negative error code.
Todo:
sc could be invalidated
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3019 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_add_entry()

static ATTRIBUTES int ec_ioctl_sc_add_entry ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Add an entry to a PDO's mapping.

Returns
Zero on success, otherwise a negative error code.
Todo:
sc could be invalidated
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3054 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_clear_entries()

static ATTRIBUTES int ec_ioctl_sc_clear_entries ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Clears the mapping of a PDO.

Returns
Zero on success, otherwise a negative error code.
Todo:
sc could be invalidated
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3089 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_reg_pdo_entry()

static ATTRIBUTES int ec_ioctl_sc_reg_pdo_entry ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Registers a PDO entry.

Returns
Process data offset on success, otherwise a negative error code.
Todo:
sc or domain could be invalidated
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3124 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_reg_pdo_pos()

static ATTRIBUTES int ec_ioctl_sc_reg_pdo_pos ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Registers a PDO entry by its position.

Returns
Process data offset on success, otherwise a negative error code.
Todo:
sc or domain could be invalidated
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3171 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_dc()

static ATTRIBUTES int ec_ioctl_sc_dc ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Sets the DC AssignActivate word and the sync signal times.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3221 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_sdo()

static ATTRIBUTES int ec_ioctl_sc_sdo ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Configures an SDO.

Returns
Zero on success, otherwise a negative error code.
Todo:
sc could be invalidated
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3261 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_emerg_size()

static ATTRIBUTES int ec_ioctl_sc_emerg_size ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Set the emergency ring buffer size.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3320 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_emerg_pop()

static ATTRIBUTES int ec_ioctl_sc_emerg_pop ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Get an emergency message from the ring.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3358 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_emerg_clear()

static ATTRIBUTES int ec_ioctl_sc_emerg_clear ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Clear the emergency ring.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3402 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_emerg_overruns()

static ATTRIBUTES int ec_ioctl_sc_emerg_overruns ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Get the number of emergency overruns.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3435 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_create_sdo_request()

static ATTRIBUTES int ec_ioctl_sc_create_sdo_request ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Create an SDO request.

Returns
Zero on success, otherwise a negative error code.
Todo:
sc could be invalidated
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3480 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_create_foe_request()

static ATTRIBUTES int ec_ioctl_sc_create_foe_request ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Create an FoE request.

Returns
Zero on success, otherwise a negative error code.
Todo:
sc could be invalidated
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3531 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_create_reg_request()

static ATTRIBUTES int ec_ioctl_sc_create_reg_request ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Create a register request.

Returns
Zero on success, otherwise a negative error code.
Todo:
sc could be invalidated
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3581 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_create_voe_handler()

static ATTRIBUTES int ec_ioctl_sc_create_voe_handler ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Create a VoE handler.

Returns
Zero on success, otherwise a negative error code.
Todo:
sc could be invalidated
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3635 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_state()

static ATTRIBUTES int ec_ioctl_sc_state ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Get the slave configuration's state.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3685 of file rtdm-ioctl.c.

◆ ec_ioctl_sc_idn()

static ATTRIBUTES int ec_ioctl_sc_idn ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Configures an IDN.

Returns
Zero on success, otherwise a negative error code.
Todo:
sc could be invalidated
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3723 of file rtdm-ioctl.c.

◆ ec_ioctl_domain_size()

static ATTRIBUTES int ec_ioctl_domain_size ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Gets the domain's data size.

Returns
Domain size, or a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3777 of file rtdm-ioctl.c.

◆ ec_ioctl_domain_offset()

static ATTRIBUTES int ec_ioctl_domain_offset ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Gets the domain's offset in the total process data.

Returns
Domain offset, or a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3811 of file rtdm-ioctl.c.

◆ ec_ioctl_domain_process()

static ATTRIBUTES int ec_ioctl_domain_process ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Process the domain.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3845 of file rtdm-ioctl.c.

◆ ec_ioctl_domain_queue()

static ATTRIBUTES int ec_ioctl_domain_queue ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Queue the domain.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3878 of file rtdm-ioctl.c.

◆ ec_ioctl_domain_state()

static ATTRIBUTES int ec_ioctl_domain_state ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Get the domain state.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3912 of file rtdm-ioctl.c.

◆ ec_ioctl_sdo_request_index()

static ATTRIBUTES int ec_ioctl_sdo_request_index ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Sets an SDO request's SDO index and subindex.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3950 of file rtdm-ioctl.c.

◆ ec_ioctl_sdo_request_timeout()

static ATTRIBUTES int ec_ioctl_sdo_request_timeout ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Sets an SDO request's timeout.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 3991 of file rtdm-ioctl.c.

◆ ec_ioctl_sdo_request_state()

static ATTRIBUTES int ec_ioctl_sdo_request_state ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Gets an SDO request's state.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4028 of file rtdm-ioctl.c.

◆ ec_ioctl_sdo_request_read()

static ATTRIBUTES int ec_ioctl_sdo_request_read ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Starts an SDO read operation.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4073 of file rtdm-ioctl.c.

◆ ec_ioctl_sdo_request_write()

static ATTRIBUTES int ec_ioctl_sdo_request_write ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Starts an SDO write operation.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4110 of file rtdm-ioctl.c.

◆ ec_ioctl_sdo_request_data()

static ATTRIBUTES int ec_ioctl_sdo_request_data ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Read SDO data.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4161 of file rtdm-ioctl.c.

◆ ec_ioctl_foe_request_file()

static ATTRIBUTES int ec_ioctl_foe_request_file ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Sets an FoE request's FoE filename and password.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4201 of file rtdm-ioctl.c.

◆ ec_ioctl_foe_request_timeout()

static ATTRIBUTES int ec_ioctl_foe_request_timeout ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Sets an FoE request's timeout.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4238 of file rtdm-ioctl.c.

◆ ec_ioctl_foe_request_state()

static ATTRIBUTES int ec_ioctl_foe_request_state ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Gets an FoE request's state.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4275 of file rtdm-ioctl.c.

◆ ec_ioctl_foe_request_read()

static ATTRIBUTES int ec_ioctl_foe_request_read ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Starts an FoE read operation.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4323 of file rtdm-ioctl.c.

◆ ec_ioctl_foe_request_write()

static ATTRIBUTES int ec_ioctl_foe_request_write ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Starts an FoE write operation.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4360 of file rtdm-ioctl.c.

◆ ec_ioctl_foe_request_data()

static ATTRIBUTES int ec_ioctl_foe_request_data ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Read FoE data.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4405 of file rtdm-ioctl.c.

◆ ec_ioctl_reg_request_data()

static ATTRIBUTES int ec_ioctl_reg_request_data ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Read register data.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4445 of file rtdm-ioctl.c.

◆ ec_ioctl_reg_request_state()

static ATTRIBUTES int ec_ioctl_reg_request_state ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Gets an register request's state.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4492 of file rtdm-ioctl.c.

◆ ec_ioctl_reg_request_write()

static ATTRIBUTES int ec_ioctl_reg_request_write ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Starts an register write operation.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4538 of file rtdm-ioctl.c.

◆ ec_ioctl_reg_request_read()

static ATTRIBUTES int ec_ioctl_reg_request_read ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Starts an register read operation.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4586 of file rtdm-ioctl.c.

◆ ec_ioctl_reg_request_readwrite()

static ATTRIBUTES int ec_ioctl_reg_request_readwrite ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Starts an register read-write operation.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4629 of file rtdm-ioctl.c.

◆ ec_ioctl_voe_send_header()

static ATTRIBUTES int ec_ioctl_voe_send_header ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Sets the VoE send header.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4677 of file rtdm-ioctl.c.

◆ ec_ioctl_voe_rec_header()

static ATTRIBUTES int ec_ioctl_voe_rec_header ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Gets the received VoE header.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4722 of file rtdm-ioctl.c.

◆ ec_ioctl_voe_read()

static ATTRIBUTES int ec_ioctl_voe_read ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Starts a VoE read operation.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4770 of file rtdm-ioctl.c.

◆ ec_ioctl_voe_read_nosync()

static ATTRIBUTES int ec_ioctl_voe_read_nosync ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Starts a VoE read operation without sending a sync message first.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4807 of file rtdm-ioctl.c.

◆ ec_ioctl_voe_write()

static ATTRIBUTES int ec_ioctl_voe_write ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Starts a VoE write operation.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4844 of file rtdm-ioctl.c.

◆ ec_ioctl_voe_exec()

static ATTRIBUTES int ec_ioctl_voe_exec ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Executes the VoE state machine.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4890 of file rtdm-ioctl.c.

◆ ec_ioctl_voe_data()

static ATTRIBUTES int ec_ioctl_voe_data ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Reads the received VoE data.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 4935 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_foe_read()

static ATTRIBUTES int ec_ioctl_slave_foe_read ( ec_master_t master,
void *  arg 
)
static

Read a file from a slave via FoE.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 4975 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_foe_write()

static ATTRIBUTES int ec_ioctl_slave_foe_write ( ec_master_t master,
void *  arg 
)
static

Write a file to a slave via FoE.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 5072 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_soe_read()

static ATTRIBUTES int ec_ioctl_slave_soe_read ( ec_master_t master,
void *  arg 
)
static

Read an SoE IDN.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 5160 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_soe_write()

static ATTRIBUTES int ec_ioctl_slave_soe_write ( ec_master_t master,
void *  arg 
)
static

Write an IDN to a slave via SoE.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 5209 of file rtdm-ioctl.c.

◆ ec_ioctl_slave_dict_upload()

static ATTRIBUTES int ec_ioctl_slave_dict_upload ( ec_master_t master,
void *  arg 
)
static

Upload Dictionary.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.

Definition at line 5254 of file rtdm-ioctl.c.

◆ ec_ioctl_eoe_addif()

static ATTRIBUTES int ec_ioctl_eoe_addif ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

add an EOE interface

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 5279 of file rtdm-ioctl.c.

◆ ec_ioctl_eoe_delif()

static ATTRIBUTES int ec_ioctl_eoe_delif ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

delete an EOE interface

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 5303 of file rtdm-ioctl.c.

◆ ec_ioctl_mbox_gateway()

static ATTRIBUTES int ec_ioctl_mbox_gateway ( ec_master_t master,
void *  arg,
ec_ioctl_context_t *  ctx 
)
static

Process an EtherCAT Mailbox Gateway message.

Returns
Zero on success, otherwise a negative error code.
Parameters
masterEtherCAT master.
argioctl() argument.
ctxPrivate data structure of file handle.

Definition at line 5329 of file rtdm-ioctl.c.

◆ EC_IOCTL()

long EC_IOCTL ( ec_master_t master,
ec_ioctl_context_t *  ctx,
unsigned int  cmd,
void *  arg 
)

Called when an ioctl() command is issued.

Returns
ioctl() return code.
Parameters
masterEtherCAT master.
ctxDevice context.
cmdioctl() command identifier.
argioctl() argument.

Definition at line 5401 of file rtdm-ioctl.c.