|
#define | LEC_EOE_MAC_LEN (6u) |
|
#define | LEC_EOE_IP_ADDRESS_LEN (4u) |
|
#define | LEC_EOE_SUBNET_LEN (4u) |
|
#define | LEC_EOE_GATEWAY_LEN (4u) |
|
#define | LEC_EOE_DNS_LEN (4u) |
|
#define | LEC_EOE_DNS_NAME_LEN (128u) |
|
|
void | ec_eoe_init (ec_t *pec, osal_uint16_t slave) |
| initialize EoE structure
|
|
void | ec_eoe_deinit (ec_t *pec, osal_uint16_t slave) |
| deinitialize EoE structure
|
|
void | ec_eoe_enqueue (ec_t *pec, osal_uint16_t slave, pool_entry_t *p_entry) |
| Enqueue EoE message received from slave.
|
|
int | ec_eoe_set_ip_parameter (ec_t *pec, osal_uint16_t slave, osal_uint8_t *mac, osal_uint8_t *ip_address, osal_uint8_t *subnet, osal_uint8_t *gateway, osal_uint8_t *dns, osal_char_t *dns_name) |
| Set IP parameters to slave with EoE support.
|
|
int | ec_eoe_send_frame (ec_t *pec, osal_uint16_t slave, osal_uint8_t *frame, osal_size_t frame_len) |
|
int | ec_eoe_setup_tun (ec_t *pec) |
|
void | ec_eoe_destroy_tun (ec_t *pec) |
|
|
int | ec_eoe_slave_config::use_eoe |
| Using EoE on actual slave.
|
|
osal_uint8_t | ec_eoe_slave_config::mac [LEC_EOE_MAC_LEN] |
| MAC address to configure (mandatory)
|
|
osal_uint8_t | ec_eoe_slave_config::ip_address [LEC_EOE_IP_ADDRESS_LEN] |
| IP address to configure (optional, maybe NULL).
|
|
osal_uint8_t | ec_eoe_slave_config::subnet [LEC_EOE_SUBNET_LEN] |
| Subnet to configure (optional, maybe NULL).
|
|
osal_uint8_t | ec_eoe_slave_config::gateway [LEC_EOE_GATEWAY_LEN] |
| Gateway to configure (optional, maybe NULL).
|
|
osal_uint8_t | ec_eoe_slave_config::dns [LEC_EOE_DNS_LEN] |
| DNS to configure (optional, maybe NULL).
|
|
osal_char_t | ec_eoe_slave_config::dns_name [LEC_EOE_DNS_NAME_LEN] |
| DNS name to configure (optional, maybe NULL).
|
|
pool_t | ec_eoe::recv_pool |
| Mailbox message with EoE fragments received.
|
|
pool_t | ec_eoe::response_pool |
|
pool_entry_t | ec_eoe::free_frames [128] |
| Static Ethernet frames for Pool, do not use directly.
|
|
pool_t | ec_eoe::eth_frames_free_pool |
| Pool with Ethernet frames currently unused.
|
|
pool_t | ec_eoe::eth_frames_recv_pool |
| Pool where to store Ethernet frames nobody cared so far.
|
|
osal_mutex_t | ec_eoe::lock |
|
osal_semaphore_t | ec_eoe::send_sync |
|
This modules contains functions on how to communicate via Ethernet over EtherCAT mailbox.
◆ ec_eoe_deinit()
void ec_eoe_deinit |
( |
ec_t * |
pec, |
|
|
osal_uint16_t |
slave |
|
) |
| |
deinitialize EoE structure
- Parameters
-
[in] | pec | Pointer to ethercat master structure, which you got from ec_open. |
[in] | slave | Number of ethercat slave. this depends on the physical order of the ethercat slaves (usually the n'th slave attached). |
◆ ec_eoe_destroy_tun()
void ec_eoe_destroy_tun |
( |
ec_t * |
pec | ) |
|
- Parameters
-
[in] | pec | Pointer to ethercat master structure, which you got from ec_open. |
◆ ec_eoe_enqueue()
Enqueue EoE message received from slave.
- Parameters
-
[in] | pec | Pointer to ethercat master structure, which you got from ec_open. |
[in] | slave | Number of ethercat slave. this depends on the physical order of the ethercat slaves (usually the n'th slave attached). |
[in] | p_entry | Pointer to pool entry containing received mailbox message from slave. |
◆ ec_eoe_init()
void ec_eoe_init |
( |
ec_t * |
pec, |
|
|
osal_uint16_t |
slave |
|
) |
| |
initialize EoE structure
- Parameters
-
[in] | pec | Pointer to ethercat master structure, which you got from ec_open. |
[in] | slave | Number of ethercat slave. this depends on the physical order of the ethercat slaves (usually the n'th slave attached). |
◆ ec_eoe_send_frame()
int ec_eoe_send_frame |
( |
ec_t * |
pec, |
|
|
osal_uint16_t |
slave, |
|
|
osal_uint8_t * |
frame, |
|
|
osal_size_t |
frame_len |
|
) |
| |
- Parameters
-
[in] | pec | Pointer to ethercat master structure, which you got from ec_open. |
[in] | slave | Number of ethercat slave. this depends on the physical order of the ethercat slaves (usually the n'th slave attached). |
[in] | frame | Ethernet frame buffer to be sent. |
[in] | frame_len | Length of Ethernet frame buffer. |
- Return values
-
EC_OK | EoE transfer was successfull. |
EC_ERROR_MAILBOX_NOT_SUPPORTED_EOE | No EoE support on slave's mailbox. |
EC_ERROR_MAILBOX_TIMEOUT | Got timeout waiting for message. |
◆ ec_eoe_set_ip_parameter()
int ec_eoe_set_ip_parameter |
( |
ec_t * |
pec, |
|
|
osal_uint16_t |
slave, |
|
|
osal_uint8_t * |
mac, |
|
|
osal_uint8_t * |
ip_address, |
|
|
osal_uint8_t * |
subnet, |
|
|
osal_uint8_t * |
gateway, |
|
|
osal_uint8_t * |
dns, |
|
|
osal_char_t * |
dns_name |
|
) |
| |
Set IP parameters to slave with EoE support.
- Parameters
-
[in] | pec | Pointer to ethercat master structure, which you got from ec_open. |
[in] | slave | Number of ethercat slave. this depends on the physical order of the ethercat slaves (usually the n'th slave attached). |
[in] | mac | MAC address to be set (6 byte) or NULL. |
[in] | ip_address | IP address to be set (4 byte) or NULL. |
[in] | subnet | Subnet mask to be set (4 byte) or NULL. |
[in] | gateway | Default gateway ip address (4 byte) or NULL. |
[in] | dns | Nameserver to set (4 byte) or NULL. |
[in] | dns_name | Hostname to be set (null-teminating) or NULL. |
- Return values
-
EC_OK | EoE transfer was successfull. |
EC_ERROR_MAILBOX_OUT_OF_SEND_BUFFERS | No more free send buffer available. |
EC_ERROR_MAILBOX_NOT_SUPPORTED_EOE | No EoE support on slave's mailbox. |
EC_ERROR_MAILBOX_TIMEOUT | Got timeout waiting for message. |
◆ ec_eoe_setup_tun()
int ec_eoe_setup_tun |
( |
ec_t * |
pec | ) |
|
- Parameters
-
[in] | pec | Pointer to ethercat master structure, which you got from ec_open. |
- Return values
-
EC_OK | EoE transfer was successfull. |
EC_ERROR_UNAVAILABLE | Setting up tun failed for some reason. |