VILLASframework
Modular co-simulation framework
|
The socket node-type is the most comprehensive and complex one. It allows to send and receive simulation data over the network. Internally it uses the well known BSD socket API.
Please note that only datagram / packet, connection-less based network protocols are supported. This means that there's currently no support for TCP!
The implementation supports multiple protocols / OSI layers:
This node-type does not have any special library dependencies. It is always available.
Optionally, libnl3 is used to setup network emulation as described in section node-type-socket-netem.
The source code of the node-type is available here: https://git.rwth-aachen.de/acs/public/villas/node/blob/master/lib/nodes/socket.cpp
Every socket
node supports the following special settings:
The payload format which is used to encode and decode exchanged messages.
See: Format-types
The local address and port number this node should listen for incoming packets.
Use *
to listen on all interfaces: local = "*:12000"
.
The remote address and port number to which this node will send data.
Select the network layer which should be used for the socket. Please note that eth
can only be used locally in a LAN as it contains no routing information for the internet.
Check if source address of incoming packets matches the remote address.
Enables and configures the network emulation qeueing discipline.
For information see also: Network Emulation
The Sockets support sending and receiving IP / UDP packets to and from multicast addresses.
Note: Multicast is only supported by IPv4 addressing. Using these settings with layer = eth
or IPv6 adresses will fail!
Weather or not multicast group subscription is active.
The multicast group. Must be within 224.0.0.0/4
The IP address of the interface which should receive multicast packets.
The time to live for outgoing multicast packets.