Main Page   Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

vrpn_BaseClass Class Reference

Class from which all user-level (and other) classes that communicate with vrpn_Connections should derive. More...

#include <vrpn_BaseClass.h>

Class diagram for vrpn_BaseClass:

vrpn_BaseClassUnique vrpn_Tracker vrpn_Text_Sender vrpn_Text_Receiver vrpn_TempImager vrpn_Sound vrpn_Router vrpn_RedundantRemote vrpn_RedundantController vrpn_Poser vrpn_ForceDevice vrpn_Dial vrpn_Clock vrpn_Button vrpn_Analog_Output vrpn_Analog

List of all members.


Public Members

 vrpn_BaseClass (const char * name, vrpn_Connection * c = NULL)
Names the device and assigns or opens connection, calls registration methods. More...

virtual ~vrpn_BaseClass ()
virtual void mainloop () = 0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call d_connection->mainloop(). Server object mainloop() should service the device, and should not normally call d_connection->mainloop().

virtual vrpn_ConnectionconnectionPtr ()
Returns a pointer to the connection this object is using.


Protected Members

virtual int init (void)
Initialize things that the constructor can't. Returns 0 on success, -1 on failure. More...

virtual int register_senders (void)
Register the sender for this device (by default, the name of the device). Return 0 on success, -1 on fail. More...

virtual int register_types (void) = 0
Register the types of messages this device sends/receives. Return 0 on success, -1 on fail.


Detailed Description

Class from which all user-level (and other) classes that communicate with vrpn_Connections should derive.


Member Function Documentation

vrpn_BaseClass::vrpn_BaseClass (const char * name, vrpn_Connection * c = NULL)

Names the device and assigns or opens connection, calls registration methods.

If this succeeds, it calls the sender and type registration routines for the object. Sets the servicename field to be the part of the name coming before the "@" sign in the name.

vrpn_BaseClass::~vrpn_BaseClass () [virtual]

virtual void vrpn_BaseClass::mainloop (void) [pure virtual]

Called once through each main loop iteration to handle updates. Remote object mainloop() should call d_connection->mainloop(). Server object mainloop() should service the device, and should not normally call d_connection->mainloop().

Reimplemented in vrpn_5dt, vrpn_Analog_Output_Remote, vrpn_Analog_Output_Server, vrpn_Analog_Remote, vrpn_Analog_Server, vrpn_Button_Example_Server, vrpn_Button_PinchGlove, vrpn_Button_Python, vrpn_Button_Remote, vrpn_Button_SerialMouse, vrpn_Button_Server, vrpn_CerealBox, vrpn_Clock_Server, vrpn_Dial_Example_Server, vrpn_Dial_Remote, vrpn_ForceDevice_Remote, vrpn_ImmersionBox, vrpn_Joylin, vrpn_Joystick, vrpn_Magellan, vrpn_Nikon_Controls, vrpn_Poser_Analog, vrpn_Poser_Remote, vrpn_Poser_Server, vrpn_Radamec_SPI, vrpn_raw_SGIBox, vrpn_RedundantController, vrpn_RedundantRemote, vrpn_Router_Remote, vrpn_Router_Sierra_Server, vrpn_Sound_Client, vrpn_Spaceball, vrpn_TempImager_Remote, vrpn_TempImager_Server, vrpn_Text_Receiver, vrpn_Text_Sender, vrpn_Tng3, vrpn_Tracker_AnalogFly, vrpn_Tracker_Flock_Parallel, vrpn_Tracker_Flock_Parallel_Slave, vrpn_Tracker_InterSense, vrpn_Tracker_JoyFly, vrpn_Tracker_NULL, vrpn_Tracker_Remote, vrpn_Tracker_Serial, vrpn_Tracker_Server, vrpn_Wanda, and vrpn_Zaber.

virtual vrpn_Connection * vrpn_BaseClass::connectionPtr () [inline, virtual]

Returns a pointer to the connection this object is using.

virtual int vrpn_BaseClass::init (void) [protected, virtual]

Initialize things that the constructor can't. Returns 0 on success, -1 on failure.

This function needs to be called at the beginning of the derived class' constructor.

Reimplemented in vrpn_Joylin.

virtual int vrpn_BaseClass::register_senders (void) [protected, virtual]

Register the sender for this device (by default, the name of the device). Return 0 on success, -1 on fail.

@" sign). For example, the sender for Tracker0@mumble.cs.unc.edu is Tracker0. Both the remote device and the server device will register the same sender. If for some reason, there is a different sender or more than one sender, this function should be overridden by both the remote and server objects.

This routine returns 0 on success and -1 on failure.

Reimplemented in vrpn_Clock.

virtual int vrpn_BaseClass::register_types (void) [protected, pure virtual]

Register the types of messages this device sends/receives. Return 0 on success, -1 on fail.

Reimplemented in vrpn_Analog, vrpn_Analog_Output, vrpn_Button, vrpn_Clock, vrpn_Dial, vrpn_ForceDevice, vrpn_Poser, vrpn_RedundantController, vrpn_RedundantRemote, vrpn_Router, vrpn_Sound, vrpn_TempImager, vrpn_Text_Receiver, vrpn_Text_Sender, and vrpn_Tracker.


The documentation for this class was generated from the following files:
Generated at Fri Sep 13 15:03:58 2002 for vrpn by doxygen 1.0.0 written by Dimitri van Heesch, © 1997-1999