This Network Proxy FMU can receive SensorView and SensorData via TCP/IP using ZeroMQ. The received data is directly given to the FMU output. The proxy can also send SensorView oder SensorData received as FMU input via TCP/IP to a given IP address and port.
The following FMI parameters can be set.
Either sender or receiver have to be set to true.
Otherwise, the FMU will return with an error.
| Type | Parameter | Default | Description |
|---|---|---|---|
| Boolean | sender |
true | Set if Proxy shall send data via TCP/IP |
| Boolean | receiver |
false | Set if Proxy shall receive data via TCP/IP |
| Boolean | pushpull |
false | If true, use Push/Pull ZeroMQ configuration, if false, use Client/Server config. |
| String | ip |
127.0.0.1 | IP address of TCP connection |
| String | port |
3456 | Port of TCP connection |
| Integer | wait_time_in_s |
5 | In Client/Server configuration: wait time to receive message after request. When the network proxy does not receive a message in this wait time, it will throw an error. If this is set to 0, the network proxy will wait indefinitely. |
The Proxy can receive SensorView or SensorData as input.
-
Clone this repository with submodules:
git clone https://github.com/openMSL/sl-5-3-osmp-network-proxy.git --recurse-submodules
-
Install dependencies:
sudo apt install libzmq3-dev
-
Build the model by executing in the extracted project root directory:
mkdir cmake-build cd cmake-build # If FMU_INSTALL_DIR is not set, CMAKE_BINARY_DIR is used cmake -DCMAKE_BUILD_TYPE=Release -DFMU_INSTALL_DIR:PATH=/tmp .. make
-
Take FMU from
FMU_INSTALL_DIR