This interface is designed for realtime modules that want to use EtherCAT. There are functions to request a master, to map process data, to communicate with slaves via CoE and to configure and activate the bus.
|
Functions |
| int | ecrt_slave_sdo_read (ec_slave_t *slave, uint16_t sdo_index, uint8_t sdo_subindex, uint8_t *target, size_t *size) |
| | Reads a CANopen SDO in normal mode.
|
| int | ecrt_slave_sdo_read_exp8 (ec_slave_t *slave, uint16_t sdo_index, uint8_t sdo_subindex, uint8_t *target) |
| | Reads an 8-bit SDO in expedited mode.
|
| int | ecrt_slave_sdo_read_exp16 (ec_slave_t *slave, uint16_t sdo_index, uint8_t sdo_subindex, uint16_t *target) |
| | Reads a 16-bit SDO in expedited mode.
|
| int | ecrt_slave_sdo_read_exp32 (ec_slave_t *slave, uint16_t sdo_index, uint8_t sdo_subindex, uint32_t *target) |
| | Reads a 32-bit SDO in expedited mode.
|
| int | ecrt_slave_sdo_write_exp8 (ec_slave_t *slave, uint16_t sdo_index, uint8_t sdo_subindex, uint8_t value) |
| | Writes an 8-bit SDO in expedited mode.
|
| int | ecrt_slave_sdo_write_exp16 (ec_slave_t *slave, uint16_t sdo_index, uint8_t sdo_subindex, uint16_t value) |
| | Writes a 16-bit SDO in expedited mode.
|
| int | ecrt_slave_sdo_write_exp32 (ec_slave_t *slave, uint16_t sdo_index, uint8_t sdo_subindex, uint32_t value) |
| | Writes a 32-bit SDO in expedited mode.
|
| ec_slave_t * | ecrt_domain_register_field (ec_domain_t *domain, const char *address, const char *vendor_name, const char *product_name, void **data_ptr, const char *field_name, unsigned int field_index, unsigned int field_count) |
| | Registers a data field in a domain.
|
| int | ecrt_domain_register_field_list (ec_domain_t *domain, const ec_field_init_t *fields) |
| | Registeres a bunch of data fields.
|
| void | ecrt_domain_queue (ec_domain_t *domain) |
| | Places all process data datagrams in the masters datagram queue.
|
| void | ecrt_domain_process (ec_domain_t *domain) |
| | Processes received process data.
|
| int | ecrt_domain_state (ec_domain_t *domain) |
| | Returns the state of a domain.
|
| ec_domain_t * | ecrt_master_create_domain (ec_master_t *master) |
| | Creates a domain.
|
| int | ecrt_master_activate (ec_master_t *master) |
| | Configures all slaves and leads them to the OP state.
|
| void | ecrt_master_deactivate (ec_master_t *master) |
| | Resets all slaves to INIT state.
|
| int | ecrt_master_fetch_sdo_lists (ec_master_t *master) |
| | Fetches the SDO dictionaries of all slaves.
|
| void | ecrt_master_sync_io (ec_master_t *master) |
| | Sends queued datagrams and waits for their reception.
|
| void | ecrt_master_async_send (ec_master_t *master) |
| | Asynchronous sending of datagrams.
|
| void | ecrt_master_async_receive (ec_master_t *master) |
| | Asynchronous receiving of datagrams.
|
| void | ecrt_master_prepare_async_io (ec_master_t *master) |
| | Prepares synchronous IO.
|
| void | ecrt_master_run (ec_master_t *master) |
| | Does all cyclic master work.
|
| ec_slave_t * | ecrt_master_get_slave (const ec_master_t *master, const char *address) |
| | Translates an ASCII coded bus-address to a slave pointer.
|
| void | ecrt_master_callbacks (ec_master_t *master, int(*request_cb)(void *), void(*release_cb)(void *), void *cb_data) |
| | Sets the locking callbacks.
|
| int | ecrt_master_start_eoe (ec_master_t *master) |
| | Starts Ethernet-over-EtherCAT processing for all EoE-capable slaves.
|
| void | ecrt_master_debug (ec_master_t *master, int level) |
| | Sets the debug level of the master.
|
| void | ecrt_master_print (const ec_master_t *master, unsigned int verbosity) |
| | Outputs all master information.
|
| ec_master_t * | ecrt_request_master (unsigned int master_index) |
| | Reserves an EtherCAT master for realtime operation.
|
| void | ecrt_release_master (ec_master_t *master) |
| | Releases a reserved EtherCAT master.
|
| int | ecrt_slave_write_alias (ec_slave_t *slave, uint16_t alias) |
| | Writes the "configured station alias" to the slave's EEPROM.
|
| int | ecrt_slave_field_size (ec_slave_t *slave, const char *field_name, unsigned int field_index, size_t size) |