#include <vrpnAnalog.h>
Public Member Functions | |
VrpnAnalog (const string &analog_name, vrpn_Connection *connection) | |
~VrpnAnalog () | |
const string & | get_analog_name () const |
Returns the name of the analog device that was used to create this VrpnAnalog. | |
bool | is_empty () const |
Returns true if no VrpnAnalogDevices reference this VrpnAnalog, or false otherwise. | |
void | mark (VrpnAnalogDevice *device) |
Adds the indicated VrpnAnalogDevice to the list of devices that are sharing this VrpnAnalog. | |
void | unmark (VrpnAnalogDevice *device) |
Removes the indicated VrpnAnalogDevice from the list of devices that are sharing this VrpnAnalog. | |
void | poll () |
Polls the connected device. | |
void | output (ostream &out) const |
void | write (ostream &out, int indent_level=0) const |
Private Types | |
typedef pvector< VrpnAnalogDevice * > | Devices |
Static Private Member Functions | |
void | vrpn_analog_callback (void *userdata, const vrpn_ANALOGCB info) |
Receives the analog event data from the VRPN code and sends it to any interested VrpnAnalogDevices. | |
Private Attributes | |
string | _analog_name |
vrpn_Analog_Remote * | _analog |
Devices | _devices |
A pointer to this object is stored in the VrpnClient class for each differently-named VRPN analog device we connect to.
The VRPN callbacks go here, which in turn get vectored out to any VrpnAnalogDevice objects that register with this. When the last VrpnAnalogDevice object unregisters, the VrpnAnalog will be deleted by the VrpnClient.
This class does not need to be exported from the DLL.
Definition at line 64 of file vrpnAnalog.h.
|
Definition at line 88 of file vrpnAnalog.h. |
|
Definition at line 39 of file vrpnAnalog.cxx. |
|
Definition at line 55 of file vrpnAnalog.cxx. References _devices. |
|
Returns the name of the analog device that was used to create this VrpnAnalog.
Definition at line 33 of file vrpnAnalog.I. |
|
Returns true if no VrpnAnalogDevices reference this VrpnAnalog, or false otherwise.
Definition at line 48 of file vrpnAnalog.I. |
|
Adds the indicated VrpnAnalogDevice to the list of devices that are sharing this VrpnAnalog.
Definition at line 70 of file vrpnAnalog.cxx. References _devices. |
|
Definition at line 109 of file vrpnAnalog.cxx. References _devices. |
|
Polls the connected device. Normally you should not call this directly; this will be called by the VrpnClient. Definition at line 65 of file vrpnAnalog.I. Referenced by VrpnClient::disconnect_device(). |
|
Removes the indicated VrpnAnalogDevice from the list of devices that are sharing this VrpnAnalog.
Definition at line 88 of file vrpnAnalog.cxx. References _analog_name. |
|
Receives the analog event data from the VRPN code and sends it to any interested VrpnAnalogDevices.
Definition at line 140 of file vrpnAnalog.cxx. |
|
Definition at line 121 of file vrpnAnalog.cxx. |
|
Definition at line 86 of file vrpnAnalog.h. Referenced by is_empty(). |
|
Definition at line 85 of file vrpnAnalog.h. Referenced by unmark(). |
|
Definition at line 89 of file vrpnAnalog.h. Referenced by get_analog_name(), mark(), output(), and ~VrpnAnalog(). |