GenericVRPNServer Class Reference
A class providing a very simple generic VRPN server capable of creating Analog and Button controls. More...
Public Member Functions | |
~GenericVRPNServer () | |
Public destructor. | |
void | loop () |
The loop() method has to be called periodically in order for vrpn to work. | |
void | addButton (std::string name, int buttonCount) |
void | changeButtonState (std::string name, int index, int state) |
int | getButtonState (std::string name, int index) |
void | addAnalog (std::string name, int channelCount) |
void | changeAnalogState (std::string name,...) |
double * | getAnalogChannels (std::string name) |
void | reportAnalogChanges (std::string name) |
Static Public Member Functions | |
static GenericVRPNServer * | getInstance (int port) |
Public singleton factory. | |
Detailed Description
A class providing a very simple generic VRPN server capable of creating Analog and Button controls.
Member Function Documentation
void addButton | ( | std::string | name, |
int | buttonCount | ||
) |
Creates a new button object within the VRPN server
- Parameters
-
name name of the vrpn peripheral buttonCount number of virtual buttons in the peripeheral
void changeButtonState | ( | std::string | name, |
int | index, | ||
int | state | ||
) |
Change the button state of a button inside a created VRPN peripheral
- Parameters
-
name name of the vrpn peripheral containing the button index index of the button (beginning by 0) state new state of the button 0 = off, 1 = on
int getButtonState | ( | std::string | name, |
int | index | ||
) |
Get the state of a button
- Parameters
-
name name of the vrpn peripheral containing the button index index of the button (beginning by 0)
- Returns
- the state of the button
void addAnalog | ( | std::string | name, |
int | channelCount | ||
) |
Creates a new analog object within the VRPN server
- Parameters
-
name name of the vrpn peripheral channelCount number of channels in the peripeheral
void changeAnalogState | ( | std::string | name, |
... | |||
) |
Change the state of channels of an analog VRPN peripheral
- Parameters
-
name name of the vrpn peripheral containing the analog control ellipsis list of the values (double)
double * getAnalogChannels | ( | std::string | name | ) |
Gets a pointer to the channel array
- Parameters
-
name name of the vrpn peripheral containing the analog control
- Returns
- pointer to the array containing the channels
void reportAnalogChanges | ( | std::string | name | ) |
Marks the selected analog server channels as modified so the values are sent in the next loop
- Parameters
-
name name of the vrpn peripheral containing the analog control
Generated on Tue Jun 26 2012 15:25:54 for Documentation by 1.7.4