This is wonderful, thanks!
There is a typo in the IO operators section: <lenght>
Also, it might be useful to include commands: https://github.com/hundredrabbits/Orca#commands
On an unrelated note, I went ahead with some experimentation using Python (as I was previously considering) to send and receive UDP for use with ORCA, but as my first experiment in attempting to issue commands from Python failed, I figured it might be easier to try and receive UDP from ORCA instead, hoping that might give some indication of the issue (wrongly formatted strings was my first thought). However, that doesn’t seem to be working either (just keeps waiting for a message, while the UDP operator bangs):
The script pictured:
testRx.py
import socket
import sys
# Create a UDP socket
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
# Bind the socket to the port
server_address = ('localhost', 49161)
print('starting up on {} port {}'.format(*server_address))
sock.bind(server_address)
while True:
print('\nwaiting to receive message')
data, address = sock.recvfrom(4096)
print('received {} bytes from {}'.format(
len(data), address))
print(data)
if data:
sent = sock.sendto(data, address)
print('sent {} bytes back to {}'.format(
sent, address))
was able to receive from this script:
testTx.py
import socket
import sys
# Create a UDP socket
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
server_address = ('localhost', 49161)
message = b"stop"
try:
# Send data
print('sending {!r}'.format(message))
sent = sock.sendto(message, server_address)
# Receive response
print('waiting to receive')
data, server = sock.recvfrom(4096)
print('received {!r}'.format(data))
finally:
print('closing socket')
sock.close()
Originally I tried different ways of formatting stop, and of course sent it over port 49160 to ORCA, but since I’m seemingly not able to receive anything from ORCA on port 49161, I suspect formatting probably isn’t at the root of the issue.
I was just wondering if there’s anything obvious that I’m missing, here. I think that if I manage to get this part figured, the rest should be fairly trivial.