libethercat - an embeddable realtime EtherCAT-master library
Communicate with EtherCAT slaves attached to a Network interface.
Loading...
Searching...
No Matches
mbx_gateway.h
Go to the documentation of this file.
1
12/*
13 * This file is part of libethercat.
14 *
15 * libethercat is free software; you can redistribute it and/or
16 * modify it under the terms of the GNU Lesser General Public
17 * License as published by the Free Software Foundation; either
18 * version 3 of the License, or (at your option) any later version.
19 *
20 * libethercat is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * Lesser General Public License for more details.
24 *
25 * You should have received a copy of the GNU Lesser General Public
26 * License along with libethercat (LICENSE.LGPL-V3); if not, write
27 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
28 * Floor, Boston, MA 02110-1301, USA.
29 *
30 * Please note that the use of the EtherCAT technology, the EtherCAT
31 * brand name and the EtherCAT logo is only permitted if the property
32 * rights of Beckhoff Automation GmbH are observed. For further
33 * information please contact Beckhoff Automation GmbH & Co. KG,
34 * Hülshorstweg 20, D-33415 Verl, Germany (www.beckhoff.com) or the
35 * EtherCAT Technology Group, Ostendstraße 196, D-90482 Nuremberg,
36 * Germany (ETG, www.ethercat.org).
37 *
38 */
39
40#ifndef LIBETHERCAT_MBX_GATEWAY_H
41#define LIBETHERCAT_MBX_GATEWAY_H
42
43#include "libosal/types.h"
44
52// forward declarations
53struct ec;
54struct pool_entry;
55
56struct echdr {
57 osal_uint16_t length : 11;
58 osal_uint16_t reserved : 1;
59 osal_uint16_t data_type : 4;
60};
61
62#ifdef __cplusplus
63extern "C" {
64#endif
65
67
71void ec_mbx_gateway_init(struct ec *pec);
72
74
78void ec_mbx_gateway_deinit(struct ec *pec);
79
81
87void ec_mbx_gateway_enqueue(struct ec *pec, struct pool_entry *p_entry);
88
90
99int ec_mbx_gateway_handle(struct ec *pec, struct echdr *echdr, size_t len);
100
101#ifdef __cplusplus
102};
103#endif
104
107#endif // LIBETHERCAT_MBX_GATEWAY_H
108
void ec_mbx_gateway_enqueue(struct ec *pec, struct pool_entry *p_entry)
Enqueue MBX Gateway message received from slave.
void ec_mbx_gateway_deinit(struct ec *pec)
deinitialize MBX Gateway structure
int ec_mbx_gateway_handle(struct ec *pec, struct echdr *echdr, size_t len)
Handle a mailbox gateway request.
void ec_mbx_gateway_init(struct ec *pec)
Initialize MBX Gateway structure.
ethercat master structure
Definition ec.h:197
Definition mbx_gateway.h:56
Pool queue entry.
Definition pool.h:67