This is an Android server implementation. It has as members a
vrpn_Button_Server
and some number of
vrpn_Analog_Servers
, as determined by the Java side. This
implementation also has vrpn_Button_Remote
and
vrpn_Analog_Remote
clients for the sole purpose of testing. All
data from the Android is represented here as either Analogs or Buttons.
All interaction between this class and the Java side are handled by the jni layer.
It's worth noting that it is possible to pipe stdout to the Android log -
directions for doing so are in the manual for this project - and all output is
in the form of: fprintf(stderr, "...")
, which we've found to be
more reliable than other methods, including fprintf(stdout, "...")
.
vrpn_Android_Server(vrpn_int32 num_analogs, vrpn_int32 *
analog_sizes, vrpn_int32 num_buttons, vrpn_int32 port);
~vrpn_Android_Server();
void mainloop();
mainloop()
functions of the member servers.
void set_analog(vrpn_int32 analog_id, vrpn_int32 channel,
vrpn_float64 val);
void set_button(vrpn_int32 button_id, vrpn_int32
state);
void report_analog_chg(vrpn_int32 analog_id);
void initialize(vrpn_int32 num_analogs, vrpn_int32 * analog_sizes,
vrpn_int32 num_buttons);
const char * ANALOG_SERVER_NAME;
const char * BUTTON_SERVER_NAME;
vrpn_int32 num_analogs;
vrpn_int32 * analog_sizes;
vrpn_Analog_Server ** analog_server;
vrpn_Button_Server * button_server;
vrpn_Analog_Remote ** analog_client;
vrpn_Button_Remote * button_client;
vrpn_Connection * connection;
vrpn_int32 port;
vrpn_Connection
communicates