AC.motion

August 04, 2006

Going wireless

Finally I wrote the IP implementation of the transport class. A Transport object is able to receive messages from a remote source (many), and send messages to a (single) remote target. Or should this be broken up into sender and receiver? Can't decide yet; splitting this up would be easy.

The Java networking tutorial had a nice example on how to use datagrams (UDP), and it took me only an hour or so to send and receive messages via UDP. So far I'm using serialized message objects as the wire protocol. Since the message size for "set value" and "heartbeat" messages is under 200 bytes I'll leave it there for the time being. I need to send a whole packet anyways, so there is no point in trying to decrease message size as long as the message fits into a single packet. Right? Or does the packet size "shrink to fit" the user data size?

Looked at the JXInput lib for accessing joysticks. The software makes a solid impression to me, and actually is used in space for the Canada Arm! Impressive. The (German) guy has implemented keyboard controls as well.

0 Comments:

Post a Comment

<< Home