VrpnNet 1.1.1 (based on VRPN 7.21)

About VrpnNet

VrpnNet is an addon to VRPN, the Virtual Reality Peripheral Network, exposing its functionality to CLR applications written in C#, Visual Basic .NET, and other .NET languages. Think of it as an unofficial counterpart to the Java bindings shipped with VRPN itself. VrpnNet is under the MIT license, which makes it suitable for commercial and non-commercial uses alike.

Download it now!

Please send bug reports and feature requests to the project maintainer. I also watch the VRPN mailing list; see VRPN.org for subscription instructions.

What's Included

Currently only the high-level client interface classes and some of the servers are implemented. The current version exposes classes for VRPN Analog, AnalogOutput, Button, Dial, ForceDevice, Mutex, Poser, TextSender, TextReceiver, and Tracker devices. Minimal wrapper classes for vectors, quaternions, and VRPN connection objects are also present.

Server support is limited to Analog, Button, and Mutex servers. An early version of TrackerServer is included in the latest release for people to start playing with, but I haven't tested it or converted the full VRPN API yet.

What's Not Included

Basically every class not listed above. Specific VRPN device drivers (e.g., vrpn_Tracker_Intersense or vrpn_XKeys) will not be included in this project; you have them already in the core VRPN package. Generic VRPN server classes (e.g., vrpn_Analog_Server) are en route.

Adapting Your Code

.NET assemblies using VrpnNet do not need to link to VRPN or Quatlib explicitly; the relevant code is contained within VrpnNet.dll. C++/CLI programs using VrpnNet do not need the header files; they should instead use #using <VrpnNet.dll> to import the class metadata.

While .NET naming conventions have been lightly dusted over the source classes, this is not an attempt to provide a radically different API to VRPN. Most classes are still not thread-safe. While mainloop() is now Update(), it's still a blocking call. That said, most callback structures are now descended from System.EventArgs, and the callbacks themselves are now events and are manipulated as such.

Most error-code-returning functions have been replaced by void functions. If an error actually occurs (and is signaled by the original C++ return value), an instance of VrpnException is thrown instead. As any error messages usually go straight to stderr, there is little that can be done safely when catching VrpnException other than aborting.

vrpn_get_connection_by_name is now Connection.GetConnectionByName. vrpn_create_server_connection is now Connection.CreateServerConnection. Connection objects are minimal wrappers around vrpn_Connection.

vrpn_BaseClass is no more, though you can get a similar generic-object effect using IVrpnObject. This new interface exposes GetConnection(), Update(), and the MuteWarnings property (aka vrpn_BaseClass::shutup).

System Requirements


Microsoft Visual C++ 2008 SP1 runtime binaries
Microsoft Windows XP SP2, Windows Server 2003 SP2, or Windows Vista SP1
Microsoft .NET Framework 2.0 SP1 or later


Microsoft Visual C++ 2008 SP1
Microsoft Windows XP SP2, Windows Server 2003 SP2, or Windows Vista SP1
Microsoft .NET Framework 2.0 SP1 or later
VRPN 7.20 or newer installed to C:\Libs\vrpn and C:\Libs\quat