VrpnNet 1.0.2 (based on VRPN 7.18)
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.
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 are implemented. The current version exposes classes for VRPN Analog, AnalogOutput, Button, Dial, ForceDevice, Poser, TextSender, TextReceiver, and Tracker devices. Minimal wrapper classes for vectors, quaternions, and VRPN connection objects are also present.
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) will be included in the second major release of the project.
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. 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).
Future Development Plans
64-bit support for Visual C++ 2008 is coming at some point, but not in the immediate future.
Vrpn.Quaternion will be extended to support most Quatlib functionality, since Microsoft.WindowsMobile.DirectX is a requirement ill-suited to most VRPN projects and System.Windows.Media3D means WPF dependency.
vrpn_Imager_Remote is not currently scheduled for implementation.
Right now the source code assumes VRPN is installed to C:\Libs\vrpn and C:\Libs\quat. This will change in future; until then, adjust the VrpnNet project properties to point to other locations. You will also need to create a key pair if you wish to strong-name the VrpnNet assembly.
System Requirements
Binaries
Microsoft Visual C++ 2005 SP1 runtime libraries or 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 3.5 SP1
Source
Microsoft Visual C++ 2005 SP1 or Visual C++ 2008 SP1
Microsoft Windows XP SP2, Windows Server 2003 SP2, or Windows Vista SP1
Microsoft .NET Framework 2.0 SP1 or 3.5 SP1
VRPN 7.18 or newer installed to C:\Libs\vrpn and C:\Libs\quat
