1 #ifndef VRPN_RADAMEC_SPI_H 2 #define VRPN_RADAMEC_SPI_H 14 const char * port,
int baud = 38400);
27 unsigned char _buffer[512];
30 struct timeval timestamp;
32 virtual int reset(
void);
33 virtual int get_report(
void);
35 virtual void clear_values(
void);
38 unsigned char compute_crc(
const unsigned char *head,
int len);
41 vrpn_uint32 convert_24bit_unsigned(
const unsigned char *buf);
44 vrpn_int32 convert_16bit_unsigned(
const unsigned char *buf);
46 double int_to_pan(vrpn_uint32 val);
48 {
return int_to_pan(val); };
49 double int_to_zoom(vrpn_uint32 val);
50 double int_to_focus(vrpn_uint32 val);
51 double int_to_height(vrpn_uint32 val);
52 double int_to_X(vrpn_uint32 mm, vrpn_uint32 frac);
53 double int_to_Y(vrpn_uint32 mm, vrpn_uint32 frac)
54 {
return int_to_X(mm, frac); };
55 double int_to_orientation(vrpn_uint32 val);
59 int send_command(
const unsigned char *cmd,
int len);
const vrpn_uint32 vrpn_CONNECTION_LOW_LATENCY
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...
Generic connection class not specific to the transport mechanism.
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 mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
double int_to_tilt(vrpn_uint32 val)
double int_to_Y(vrpn_uint32 mm, vrpn_uint32 frac)