1#ifndef VRPN_RADAMEC_SPI_H
2#define VRPN_RADAMEC_SPI_H
14 const char * port,
int baud = 38400);
32 virtual int reset(
void);
38 unsigned char compute_crc(
const unsigned char *head,
int len);
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)
55 double int_to_orientation(vrpn_uint32 val);
59 int send_command(
const unsigned char *cmd,
int len);
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 void mainloop()=0
Called once through each main loop iteration to handle updates. Remote object mainloop() should call ...
Generic connection class not specific to the transport mechanism.
unsigned char compute_crc(const unsigned char *head, int len)
Compute the CRC for the message or report starting at head with length len.
double int_to_pan(vrpn_uint32 val)
----------------— Conversion of encoder indices to values -------------— Pan and tilt axis have an en...
vrpn_int32 convert_16bit_unsigned(const unsigned char *buf)
Convert a 16-bit unsigned value from a buffer into an integer.
unsigned char _buffer[512]
vrpn_Radamec_SPI(const char *name, vrpn_Connection *c, const char *port, int baud=38400)
double int_to_X(vrpn_uint32 mm, vrpn_uint32 frac)
Convert from the millimeter and fraction-of-millimeter values returned by the device into meters.
double int_to_tilt(vrpn_uint32 val)
virtual int get_report(void)
double int_to_Y(vrpn_uint32 mm, vrpn_uint32 frac)
vrpn_uint32 convert_24bit_unsigned(const unsigned char *buf)
Convert a 24-bit value from a buffer into an unsigned integer value.
virtual void clear_values(void)
vrpn_Serial_Analog(const char *name, vrpn_Connection *connection, const char *port, int baud=9600, int bits=8, vrpn_SER_PARITY parity=vrpn_SER_PARITY_NONE, bool rts_flow=false)
const vrpn_uint32 vrpn_CONNECTION_LOW_LATENCY