9 parser = argparse.ArgumentParser(description=
"Send UDP test data.")
10 parser.add_argument(
"--address", default=
"127.0.0.1", help=
"UDP address")
11 parser.add_argument(
"--port", default=9870, type=int, help=
"UDP port")
12 args = parser.parse_args()
14 sock = socket.socket(socket.AF_INET,
25 "cos": math.cos(time),
29 sock.sendto( json.dumps(data).encode(), (args.address, args.port) )
41 \"volt\": 24.852617263793945 \
46 sock.sendto( test_str.encode(
"utf-8"), (args.address, args.port) )