RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
vrpn_Streaming_Arduino.h
1// Copyright 2015 by Russ Taylor, working for ReliaSolve.
2// Based on the vrpn_Tng3.h header file.
3// License: Standard VRPN.
4//
5// See the vrpn_streaming_arduino directory for a program that should be
6// loaded onto the Arduino and be running for this device to connect to.
7
8#pragma once
9#include "vrpn_Analog.h" // for vrpn_Serial_Analog
10#include "vrpn_Button.h" // for vrpn_Button_Filter
11#include <string>
12
15{
16 public:
17 vrpn_Streaming_Arduino(std::string name,
19 std::string port,
20 int numchannels = 1,
21 int baud = 115200);
22
24
25 // Called once through each main loop iteration to handle
26 // updates.
27 virtual void mainloop (void);
28
29 protected:
30 int m_status;
31 int m_numchannels; // How many analog channels to open
32
33 std::string m_buffer; // Characters read from the device.
34 struct timeval m_timestamp; // Time of the last report from the device
35
36 virtual int get_report(void); // Try to read a report from the device
37
38 // send report iff changed
39 virtual void report_changes (vrpn_uint32 class_of_service = vrpn_CONNECTION_LOW_LATENCY);
40 // send report whether or not changed
41 virtual void report (vrpn_uint32 class_of_service = vrpn_CONNECTION_LOW_LATENCY);
42
43 // NOTE: class_of_service is only applied to vrpn_Analog
44 // values, not vrpn_Button or vrpn_Dial
45
46 void clear_values();
47 int reset();
48
49 private:
50};
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)
定义 vrpn_Button.h:66
Generic connection class not specific to the transport mechanism.
定义 vrpn_Connection.h:562
定义 vrpn_Analog.h:63
定义 vrpn_Streaming_Arduino.h:15
virtual void mainloop(void)