UDP.Send, UDP.Receive

Scripts and programs to automate Astroart
Post Reply
Forum_2016
Posts: 219
Joined: 08 Dec 2018, 13:30

UDP.Send, UDP.Receive

Post by Forum_2016 »

Using virtual serial ports, an external program could easily 'talk' to a script and hence control AA. Instead of a piece of hardware at the other end, a program could be used to send requests, e.g., to load an image, process it and then save it. The virtual serial ports can be setup using a program like Eltima Serial Port Driver (http://www.eltima.com/products/vspdxp/) or similar. This would still restrict external programs to those running on the same PC as AA (though there are other tricks that can be used to extend a virtual serial port over a network.

But a better way is to use networking UDP similar to how a serial port is used. AA would need to add UDP networking (a simple component depending on the language it is written in) to receive UDP messages on a port assigned by the user (settings menu). Messages received could be placed in a queue and if the queue gets too full, the oldest is dropped. Each message would include the IP address and UDP port of the sender. A script can call the function "udp.receive' which would get all of the messages on the queue. A script could then process the udp messages and reply using "udp.send(IP address, port, message).

Using UDP packets means the programs involved can operate over a network. UDP does not require TCP session management and is a lot simpler to implement, in fact very similar to a serial port.

Forum_2016
Posts: 219
Joined: 08 Dec 2018, 13:30

Re: UDP.Send, UDP.Receive

Post by Forum_2016 »

Thinking more about this, most if not all users will access a remote telescope using VNC, therefore there is really no need for a UDP interface if a serial port interface is already available. I therefore retract my request for a UDP send and receive function. The serial port interface can be opened on a virtual serial port and listens for requests. An external program will then send a request to the script over the virtual serial link. The script will process the request and send back a reply over the same link.

Post Reply