1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*!
This module provide the trait [EthercatSocket], and several implementors allowing to use different physical layers for ethercat communication.
- UDP socket allows to run multiple master, one ethercat segment each, on the same ethernet network (and same machine ethernet port). But exposes the ethercat network to possible delays due to ethernet packet collisions.
- Raw socket allows one only master with one only ethercat segment on the ethernet network. It ensure no communication delay with an ethercat segment.
Both socket types allows the use of the same master ethernet port for other ethernet protocols such as normal internet operations.
| socket type | allowed masters on network | allowed EC segments on network | possible jitter | other protocols allowed on same network |
|-------------|----------------------------------------|-------------------------------------------|------------------|------------------------------------------|
| [EthernetSocket] | 1 | 1 | none | all non-ethercat protocols |
| [UdpSocket] | 2^32 | 2^32 | depend on trafic | all |
*/
pub use UdpSocket;
pub use EthernetSocket;
use ;
use io;
/**
trait implementing the ethercat frame encapsulation into some medium
This allows to send or receive ethercat frames over any network, but according to ETG 1000.4, only Ethernet and UDP are officially supported
*/