Skip to content

support new msgpack schema & UDP transport #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
itdaniher opened this issue Feb 16, 2014 · 2 comments
Closed

support new msgpack schema & UDP transport #1

itdaniher opened this issue Feb 16, 2014 · 2 comments

Comments

@itdaniher
Copy link
Member

Derived from the same capnproto schema in this repository, information's serialized as a reading containing an array containing an array of u64s, a u64 representing datatype, a u64 UID, a f64 measurement, and a f64 timestamp.

Readings are broadcast to 127.0.0.1:9999 via UDP. The following is a basic demo.

import socket, msgpack

s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

s.bind(("127.0.0.1", 9999))

while True:
      x = msgpack.loads(s.recv(1024))
      print x
      print dict(zip(x, ["Lower", "DataType", "UID", "Measurement", "Timestamp"]))
@madisonmay
Copy link

Ok, so we're migrating from Unix Domain Socket --> UDP. Sounds good to me.

@itdaniher
Copy link
Member Author

Yep! I'm pretty sure unix sockets are blocked by rust-lang/rust#12103 / rust-lang/rust#11201 - I had the code working fine using greenthreads, but using system threads I couldn't ever get the fifo object to actually be instantiated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants