1#ifndef VRPN_YEI_3SPACE_H
2#define VRPN_YEI_3SPACE_H
27 double frames_per_second = 50,
28 const char *reset_commands[] = NULL);
41 void init(
bool calibrate_gyros_on_setup
43 ,
double red_LED_color
44 ,
double green_LED_color
45 ,
double blue_LED_color
59 virtual int reset(
void);
127 bool calibrate_gyros_on_setup =
false,
128 bool tare_on_setup =
false,
129 double frames_per_second = 50,
130 double red_LED_color = 0,
131 double green_LED_color = 0,
132 double blue_LED_color = 0,
134 const char *reset_commands[] = NULL);
200 bool calibrate_gyros_on_setup =
false,
201 bool tare_on_setup =
false,
202 double frames_per_second = 50,
203 double red_LED_color = 0,
204 double green_LED_color = 0,
205 double blue_LED_color = 0,
207 const char *reset_commands[] = NULL);
231 int serial_file_descriptor,
232 bool calibrate_gyros_on_setup =
false,
233 bool tare_on_setup =
false,
234 double frames_per_second = 50,
235 double red_LED_color = 0,
236 double green_LED_color = 0,
237 double blue_LED_color = 0,
239 const char *reset_commands[] = NULL);
257 virtual bool set_logical_id(vrpn_uint8 logical_id, vrpn_int32 serial_number);
vrpn_Analog(const char *name, vrpn_Connection *c=NULL)
virtual void report(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
Send a report whether something has changed or not (for servers) Optionally, tell what time to stamp ...
virtual void report_changes(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
Send a report only if something has changed (for servers) Optionally, tell what time to stamp the val...
virtual int init(void)
Initialize things that the constructor can't. Returns 0 on success, -1 on failure.
Generic connection class not specific to the transport mechanism.
virtual void mainloop()
This function should be called each time through app mainloop.
vrpn_Tracker_Server(const char *name, vrpn_Connection *c, vrpn_int32 sensors=1)
int get_serial_file_descriptor(void) const
Reports the serial_fd that was opened, so that additional sensors that use the same wireless dongle c...
virtual bool set_logical_id(vrpn_uint8 logical_id, vrpn_int32 serial_number)
Insert our serial number into the specified slot.
bool receive_LED_values_response(struct timeval *timeout=NULL)
Read and parse the response to an LED-values request command. NULL timeout pointer means wait forever...
bool send_ascii_command(const char *cmd)
Put a ':' character at the front and ' ' at the end and then send the resulting command as an ASCII c...
virtual bool configure_dongle(void)
Configure the dongle (called if we are the first one)
bool receive_LED_mode_response(struct timeval *timeout=NULL)
Read and parse the response to an LED-state request command. NULL timeout pointer means wait forever....
vrpn_YEI_3Space_Sensor_Wireless(const char *name, vrpn_Connection *c, int logical_id, const char *port, int baud=115200, bool calibrate_gyros_on_setup=false, bool tare_on_setup=false, double frames_per_second=50, double red_LED_color=0, double green_LED_color=0, double blue_LED_color=0, int LED_mode=1, const char *reset_commands[]=NULL)
Constructor for the first device, which will open the serial port and configure the dongle.
virtual void flush_input(void)
Flush any incoming characters in the communications channel.
virtual bool get_report(void)
Get and handle a report from the device if one is available. Return true if one was available,...
bool send_binary_command(const unsigned char *cmd, int len)
Compute the CRC for the message, append it, and send message. Returns true on success,...
bool send_binary_command_to_dongle(const unsigned char *cmd, int len)
Compute the CRC for the message, append it, and send message to the dongle directly (not a wireless c...
bool receive_LED_values_response(struct timeval *timeout=NULL)
Read and parse the response to an LED-values request command. NULL timeout pointer means wait forever...
virtual bool get_report(void)
virtual void flush_input(void)
Flush any incoming characters in the communications channel.
bool receive_LED_mode_response(struct timeval *timeout=NULL)
Read and parse the response to an LED-state request command. NULL timeout pointer means wait forever....
bool send_ascii_command(const char *cmd)
Put a ':' character at the front and ' ' at the end and then send the resulting command as an ASCII c...
bool send_binary_command(const unsigned char *cmd, int len)
Compute the CRC for the message, append it, and send message. Returns true on success,...
vrpn_YEI_3Space_Sensor(const char *name, vrpn_Connection *c, const char *port, int baud=115200, bool calibrate_gyros_on_setup=false, bool tare_on_setup=false, double frames_per_second=50, double red_LED_color=0, double green_LED_color=0, double blue_LED_color=0, int LED_mode=1, const char *reset_commands[]=NULL)
Constructor.
virtual bool receive_LED_values_response(struct timeval *timeout=NULL)=0
Read and parse the response to an LED-values request command. NULL timeout pointer means wait forever...
virtual void handle_report(unsigned char *report)
vrpn_float32 d_LED_color[3]
double d_frames_per_second
virtual void report(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY)
send report whether or not changed
vrpn_YEI_3Space(const char *name, vrpn_Connection *c, double frames_per_second=50, const char *reset_commands[]=NULL)
Constructor.
virtual bool receive_LED_mode_response(struct timeval *timeout=NULL)=0
Read and parse the response to an LED-state request command. NULL timeout pointer means wait forever....
virtual bool get_report(void)=0
virtual bool send_ascii_command(const char *cmd)=0
Put a ':' character at the front and ' ' at the end and then send the resulting command as an ASCII c...
unsigned d_expected_characters
int d_reset_command_count
unsigned d_characters_read
virtual void flush_input(void)=0
Flush any incoming characters in the communications channel.
virtual bool send_binary_command(const unsigned char *cmd, int len)=0
Compute the CRC for the message, append it, and send message. Returns true on success,...
unsigned char d_buffer[128]
const vrpn_uint32 vrpn_CONNECTION_LOW_LATENCY