Example of usage of UDP
Take NBSN95 mod1 as an example
After logging into the interface click '+' to create a flow
Rename the stream
Drag UDP in to the arrow area
Drag the function and debug to the blank area in the same way as above
configure UDP in
Write to the UDP port that the device node sends to the server
Example My UDP device node sends to server port 8585
just write 8585
Note that the port that is already in use cannot be used. If the receiving fails, you need to check whether the port of the server is occupied. The sending port of the device node should not use the default port used by the server, such as a common port such as 8080.
In order to avoid data confusion, different types of nodes do not use the same UDP port, because different nodes have different data formats and different functions.
About function
If you are familiar with JS code, you can write it yourself
If you are not familiar, we have the JS code for each type of node, you just need to copy and paste it into it