41#ifndef LIBETHERCAT_EOE_H
42#define LIBETHERCAT_EOE_H
44#include <libosal/types.h>
45#include <libosal/semaphore.h>
56#define LEC_EOE_MAC_LEN (6u)
57#define LEC_EOE_IP_ADDRESS_LEN (4u)
58#define LEC_EOE_SUBNET_LEN (4u)
59#define LEC_EOE_GATEWAY_LEN (4u)
60#define LEC_EOE_DNS_LEN (4u)
61#define LEC_EOE_DNS_NAME_LEN (128u)
66 osal_uint8_t
mac[LEC_EOE_MAC_LEN];
68 osal_uint8_t
subnet[LEC_EOE_SUBNET_LEN];
69 osal_uint8_t
gateway[LEC_EOE_GATEWAY_LEN];
70 osal_uint8_t
dns[LEC_EOE_DNS_LEN];
83 osal_semaphore_t send_sync;
142 osal_uint8_t *ip_address, osal_uint8_t *subnet, osal_uint8_t *gateway,
143 osal_uint8_t *dns, osal_char_t *dns_name);
160 osal_size_t frame_len);
ethercat master common stuff
osal_uint8_t subnet[LEC_EOE_SUBNET_LEN]
Subnet to configure (optional, maybe NULL).
Definition eoe.h:68
int ec_eoe_setup_tun(ec_t *pec)
osal_uint8_t ip_address[LEC_EOE_IP_ADDRESS_LEN]
IP address to configure (optional, maybe NULL).
Definition eoe.h:67
pool_t recv_pool
Mailbox message with EoE fragments received.
Definition eoe.h:75
osal_uint8_t mac[LEC_EOE_MAC_LEN]
MAC address to configure (mandatory)
Definition eoe.h:66
void ec_eoe_destroy_tun(ec_t *pec)
osal_uint8_t dns[LEC_EOE_DNS_LEN]
DNS to configure (optional, maybe NULL).
Definition eoe.h:70
osal_uint8_t gateway[LEC_EOE_GATEWAY_LEN]
Gateway to configure (optional, maybe NULL).
Definition eoe.h:69
void ec_eoe_init(ec_t *pec, osal_uint16_t slave)
initialize EoE structure
int ec_eoe_send_frame(ec_t *pec, osal_uint16_t slave, osal_uint8_t *frame, osal_size_t frame_len)
pool_entry_t free_frames[128]
Static Ethernet frames for Pool, do not use directly.
Definition eoe.h:78
pool_t eth_frames_recv_pool
Pool where to store Ethernet frames nobody cared so far.
Definition eoe.h:80
pool_t eth_frames_free_pool
Pool with Ethernet frames currently unused.
Definition eoe.h:79
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 use_eoe
Using EoE on actual slave.
Definition eoe.h:64
void ec_eoe_deinit(ec_t *pec, osal_uint16_t slave)
deinitialize EoE structure
osal_char_t dns_name[LEC_EOE_DNS_NAME_LEN]
DNS name to configure (optional, maybe NULL).
Definition eoe.h:71
ethercat master structure
Definition ec.h:188
Pool queue entry.
Definition pool.h:67
the datagram pool itself
Definition pool.h:81