1#ifndef VRPN_RADAMEC_SPI_H
2#define VRPN_RADAMEC_SPI_H
4#include "vrpn_Analog.h"
5#include "vrpn_Configure.h"
6#include "vrpn_Connection.h"
7#include "vrpn_Shared.h"
14 const char * port,
int baud = 38400);
26 unsigned _expected_chars;
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);
46 double int_to_pan(vrpn_uint32 val);
47 double int_to_tilt(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);
63 (vrpn_uint32 class_of_service = vrpn_CONNECTION_LOW_LATENCY);
66 (vrpn_uint32 class_of_service = vrpn_CONNECTION_LOW_LATENCY);
Generic connection class not specific to the transport mechanism.
定义 vrpn_Connection.h:562
定义 vrpn_Analog_Radamec_SPI.h:11
int send_command(const unsigned char *cmd, int len)
vrpn_uint32 convert_24bit_unsigned(const unsigned char *buf)
Convert a 24-bit value from a buffer into an unsigned integer value
virtual void mainloop()
Called once through each main loop iteration to handle updates.
vrpn_int32 convert_16bit_unsigned(const unsigned char *buf)
Convert a 16-bit unsigned value from a buffer into an integer
virtual void report(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY)
send report whether or not changed
unsigned char compute_crc(const unsigned char *head, int len)
Compute the CRC for the message or report starting at head with length len.
virtual void report_changes(vrpn_uint32 class_of_service=vrpn_CONNECTION_LOW_LATENCY)
send report iff changed