41#ifndef LIBETHERCAT_EOE_H
42#define LIBETHERCAT_EOE_H
44#include <libosal/types.h>
45#include <libosal/mutex.h>
46#include <libosal/semaphore.h>
57#define LEC_EOE_MAC_LEN (6u)
58#define LEC_EOE_IP_ADDRESS_LEN (4u)
59#define LEC_EOE_SUBNET_LEN (4u)
60#define LEC_EOE_GATEWAY_LEN (4u)
61#define LEC_EOE_DNS_LEN (4u)
62#define LEC_EOE_DNS_NAME_LEN (128u)
67 osal_uint8_t
mac[LEC_EOE_MAC_LEN];
69 osal_uint8_t
subnet[LEC_EOE_SUBNET_LEN];
70 osal_uint8_t
gateway[LEC_EOE_GATEWAY_LEN];
71 osal_uint8_t
dns[LEC_EOE_DNS_LEN];
84 osal_semaphore_t send_sync;
143 osal_uint8_t *ip_address, osal_uint8_t *subnet, osal_uint8_t *gateway,
144 osal_uint8_t *dns, osal_char_t *dns_name);
161 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:69
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:68
pool_t recv_pool
Mailbox message with EoE fragments received.
Definition eoe.h:76
osal_uint8_t mac[LEC_EOE_MAC_LEN]
MAC address to configure (mandatory)
Definition eoe.h:67
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:71
osal_uint8_t gateway[LEC_EOE_GATEWAY_LEN]
Gateway to configure (optional, maybe NULL).
Definition eoe.h:70
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:79
pool_t eth_frames_recv_pool
Pool where to store Ethernet frames nobody cared so far.
Definition eoe.h:81
pool_t eth_frames_free_pool
Pool with Ethernet frames currently unused.
Definition eoe.h:80
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:65
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:72
ethercat master structure
Definition ec.h:192
Pool queue entry.
Definition pool.h:67
the datagram pool itself
Definition pool.h:84