Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import socket
- #set the address and port of the AirSpeed system
- HOST = '10.105.216.188'
- PORT = 59451
- #create and initializae the socket object
- s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- s.connect((HOST, PORT))
- #set the output buffer with the command for AirSpeed
- output_buffer = b"<?xml version=\"1.0\" encoding=\"UTF-8\"?><AMS><Configuration><GetConfigInfo/></Configuration></AMS>"
- #set the commnad
- s.send(out_buffer)
- #get amd print the result
- input_buffer = s.recv(2048)
- s.close()
- print (input_buffer.decode("utf-8"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement