7#ifndef VRPN_TRACKER_LIBERTYHS_H
8#define VRPN_TRACKER_LIBERTYHS_H
19#if defined(VRPN_USE_LIBUSB_1_0)
22static const vrpn_uint16 LIBERTYHS_VENDOR_ID = 0x0f44;
23static const vrpn_uint16 LIBERTYHS_PRODUCT_ID = 0xff20;
26static const vrpn_uint8 LIBERTYHS_WRITE_EP = 0x04;
27static const vrpn_uint8 LIBERTYHS_READ_EP = 0x88;
51 long baud = 115200,
int enable_filtering = 1,
53 int receptoridx = 1,
const char *additional_reset_commands = NULL,
91 int read_usb_data(
void* data,
int maxlen,
unsigned int timeout = 50);
Generic connection class not specific to the transport mechanism.
struct timeval liberty_zerotime
vrpn_Tracker_LibertyHS(const char *name, vrpn_Connection *c, long baud=115200, int enable_filtering=1, int numstations=vrpn_LIBERTYHS_MAX_STATIONS, int receptoridx=1, const char *additional_reset_commands=NULL, int whoamilen=288)
The constructor is given the name of the tracker (the name of the sender it should use),...
struct timeval liberty_timestamp
int write_usb_data(void *data, int len)
Writes len bytes from data buffer to USB device.
int launch_markers()
Returns the number of detected and lauched trackers.
int set_sensor_output_format(int sensor=-1)
Augments the basic LibertyHS format.
int read_usb_data(void *data, int maxlen, unsigned int timeout=50)
Reads at most maxlen bytes from USB device and copy them into data buffer. Returns the number of read...
int report_length(int sensor)
Augments the basic LibertyHS report length.
void flush_usb_data()
Empties the USB read buffer.
int test_markers()
Launches num_stations markers using receptor receptor_index to detect them.
vrpn_Tracker_USB(const char *name, vrpn_Connection *c, vrpn_uint16 vendor, vrpn_uint16 product, long baud=115200)
virtual void reset(void)=0
Reset the tracker.
virtual int get_report(void)=0
Gets reports if some are available, returns 0 if not, 1 if complete report(s).
const int vrpn_LIBERTYHS_MAX_STATIONS
const int vrpn_LIBERTYHS_MAX_MARKERMAP_LEN
const int vrpn_LIBERTYHS_MAX_WHOAMI_LEN
class VRPN_API vrpn_Connection