Skip to content
Snippets Groups Projects
Commit a59c16d2 authored by Alexandra Bach's avatar Alexandra Bach
Browse files

Update python client documentation and create new lab

parent 86bb1c9b
No related branches found
No related tags found
No related merge requests found
Pipeline #1056062 passed
...@@ -26,3 +26,5 @@ After the socket is set up, the python client is ready to receive data. ...@@ -26,3 +26,5 @@ After the socket is set up, the python client is ready to receive data.
If data is received, the protobuf function ``ParseFromString`` is used so that the message can be printed in JSON format. If data is received, the protobuf function ``ParseFromString`` is used so that the message can be printed in JSON format.
Then the same message is send back using ``SerializeToString``. Then the same message is send back using ``SerializeToString``.
You can change the python client configration, e.g., to send constants back instead of the same message.
Example code is available in the [python-client-lab branch](https://github.com/VILLASframework/node/tree/python-client-lab/clients/python).
\ No newline at end of file
...@@ -55,8 +55,11 @@ paths = ( ...@@ -55,8 +55,11 @@ paths = (
``` ```
As already mentioned, the configuration files includes the data generator which is the signal node-type. As already mentioned, the configuration files includes the data generator which is the signal node-type.
Three samples are genereated with five values. Three samples are genereated with five values.
The udp node is a simple socket node-type and serves as interface to the python client so that data can be sent. The out part, especially the port number, must match with the python client configuration.
The udp node is a simple socket node-type and serves as interface to the python client so that data can be sent.
The output part, especially the port number, must match with the python client configuration.
It is important that the format type is protobuf, otherwise the udp node cannot decode data recevied by python client. It is important that the format type is protobuf, otherwise the udp node cannot decode data recevied by python client.
The last part of the configuration file specifies the paths. The first path ensures that generated data is send to udp node. The second path is responsible for receiving data from python client. The last part of the configuration file specifies the paths. The first path ensures that generated data is send to udp node. The second path is responsible for receiving data from python client.
## Python client configuration ## Python client configuration
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment