9#include "vrpn_Analog.h"
10#include "vrpn_Analog_Output.h"
11#include "vrpn_Configure.h"
12#include "vrpn_Connection.h"
13#include "vrpn_Shared.h"
14#include "vrpn_Types.h"
16#if defined(VRPN_USE_LIBUSB_1_0)
38class vrpn_LUDL_USBMAC6000 :
43 vrpn_LUDL_USBMAC6000(
const char *name,
vrpn_Connection *c = 0,
bool do_recenter =
false);
44 virtual ~vrpn_LUDL_USBMAC6000();
49 struct libusb_context *_context;
50 struct libusb_device_handle *_device_handle;
51 struct timeval _timestamp;
57 static const unsigned _INBUFFER_SIZE = 1024;
58 vrpn_uint8 _inbuffer[_INBUFFER_SIZE];
60 bool check_for_data();
61 bool interpret_usbmac_ascii_response(
const vrpn_uint8 *buffer,
69 void report_changes (vrpn_uint32 class_of_service = vrpn_CONNECTION_RELIABLE);
71 void report (vrpn_uint32 class_of_service = vrpn_CONNECTION_RELIABLE);
79 static int VRPN_CALLBACK handle_request_message(
void *userdata,
vrpn_HANDLERPARAM p);
82 static int VRPN_CALLBACK handle_request_channels_message(
void *userdata,
vrpn_HANDLERPARAM p);
85 static int VRPN_CALLBACK handle_connect_message(
void *userdata,
vrpn_HANDLERPARAM p);
89 void flush_input_from_ludl(
void);
90 bool send_usbmac_command(
unsigned device,
unsigned command,
unsigned index,
int value);
92 bool ludl_axis_moving(
unsigned axis);
93 bool move_axis_to_position(
int axis,
int position);
95 bool ludl_axis_position(
unsigned axis, vrpn_int32 *position_return);
102 vrpn_float64 *_axis_destination;
定义 vrpn_Analog_Output.h:26
virtual void report(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
virtual void report_changes(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY, const struct timeval time=vrpn_ANALOG_NOW)
virtual int register_types(void)
virtual void mainloop()=0
Generic connection class not specific to the transport mechanism.
定义 vrpn_Connection.h:562
This structure is what is passed to a vrpn_Connection message callback.
定义 vrpn_Connection.h:41