NetStick API / Networked Joystick




I have working, on LinuxPCRobot.org, a networked joystick system composed of
a "joysender" and a "joyclient" class.

Communication, currently, is from the sender to the client. The sender sends
packets to the client. If no joystick event is available, a "keepalive"
event is sent.

The client code is C++, and events are handled via virtual member functions.

The client class has a configurable 0.2 seconds in which it must receive
some signal from the sender. The sender won't wait any more than 0.1
seconds without sending information. (These are probably a bit too
aggressive) If the time out elapses, there is a user overloadable
HandleDeadman(...) function that gets called for proper emergency shut
down.

The packets sent across the network contain a time, an event id, value
index, and value. In the case of a joystick, the event is AXIS or BUTTON,
the value index is which button or axis, the value is, obviously the value.
The joysender program also will send keystrokes to the joyclient
application via a KEY event.

There are two interfaces, Poll and Loop. A Poll interface relies that you
call Poll frequently. Loop probably requires an external thread.

If anyone is interested in this code, it is on my site:
http://www.linuxpcrobot.org.
.



Relevant Pages

  • Re: A Design Problem
    ... I want to provide a set of C++ classes which will enable client (of ... -> In each toolbar there will be some tools. ... It is the responsibility of whoever instantiates that relationship to ensure that it is only instantiated to Tools having the right properties. ... there should be no expectation in the sender implementation about what will happen in response to the message. ...
    (comp.object)
  • large number of files in a directory
    ... I have a directory shared out of a Solaris 2.8 box to a 2.8 client, ... directory has subdirs, each of these subdirs have minimum 25,000 files in ... destroy any hard copies and notify the sender. ... except where the message states otherwise and the sender ...
    (SunManagers)
  • Re: Mail Aliass
    ... > as the address that the sender has sent to. ... I have a client with a new SBS2k3 setup. ... Would it be a new SMTP entry for each user? ...
    (microsoft.public.windows.server.sbs)
  • Re: LibTomCrypt [v0.95]
    ... > No effort was made to verify the identity of the sender. ... > Tom St Denis writes: ... > Many crypto protocols have had errors discovered which rely on leakage ... a single-user client or a server may make good use of this. ...
    (sci.crypt)
  • Re: Modellflugsimulator
    ... Es gibt den kleinen Bruder des Aerofly, den Easyfly II. ...
    (de.rec.modelle.misc)