RflySimSDK v3.05
RflySimSDK说明文档
载入中...
搜索中...
未找到
vrpn_Flock_Parallel.h
1/*****************************************************************************\
2 vrpn_Flock_Parallel.h
3 --
4 Description : implements a class which runs an ascension flock of birds
5 tracker in multiple rs232 mode.
6
7 ----------------------------------------------------------------------------
8 Author: weberh
9 Created: Thu Mar 5 19:38:55 1998
10 Revised: Fri Mar 19 15:05:28 1999 by weberh
11\*****************************************************************************/
12#ifndef _VRPN_FLOCK_PARALLEL_H_
13#define _VRPN_FLOCK_PARALLEL_H_
14
15#include "vrpn_Configure.h" // for VRPN_API
16#include "vrpn_Flock.h" // for vrpn_Tracker_Flock, etc
17#include "vrpn_Types.h" // for vrpn_int32
18
19class VRPN_API vrpn_Connection;
20
21// This is a class which provides a server for an ascension
22// Flock of Birds tracker. The server will send out messages
23// at whatever rate the flock of bird's stream mode feeds them.
24// Default filtering is active.
25// The timestamp is the time when the first character was read
26// from the serial driver with "read". No adjustment is currently
27// made to this time stamp.
28
29// Adelstein, et al, "Dynamic response of electromagnetic spatial
30// displacement trackers", Presence 5(3) found that if all of the filters
31// are turned off, and the time required to transport the data to the
32// server is ignored, then the latency of the flock is about 2 ms for ori,
33// 7.5 ms for pos for the 0-4hz range (ie, when the data is ready to leave
34// the flock in stream mode, the pos is 7.5 ms old, and the ori is 2 ms
35// old). Later this data will be combined with the baud rate to provide a
36// more accurate time stamp for certain flock modes.
37
38// If this is running on a non-linux system, then the serial port driver
39// is probably adding more latency -- see the vrpn README for more info.
40
41// forward decl
43
44// this class acts as the master
45// these are both derived from vrpn_Tracker_Flock to take advantage
46// of some of the data and functionality, but they replace the major
47// functions
49
50 public:
51
52 // for parallel, you supply the master port and then the
53 // slave ports in a array with cSensors elements
54 vrpn_Tracker_Flock_Parallel(char *name, vrpn_Connection *c, int cSensors,
55 char *port, long baud,
56 char *slavePortArray[],
57 bool invertQuaternion = false);
58
60 virtual void mainloop();
61
62 protected:
63 virtual int get_report(void);
64 virtual void reset();
65
66 // slave ptrs
67 vrpn_Tracker_Flock_Parallel_Slave *rgSlaves[VRPN_FLOCK_MAX_SENSORS];
68};
69
70// the special args are the master's vrpn id and tracker pos msg id
71// The slave masquerades as the master when sending out reports
73public:
76 char *port,
77 long baud,
78 vrpn_int32 vrpnMasterID,
79 int iSensorID );
81 virtual void mainloop();
82
83 protected:
84 virtual void reset();
85
86 friend class VRPN_API vrpn_Tracker_Flock_Parallel;
87};
88
89#endif // _VRPN_FLOCK_PARALLEL_H_
Generic connection class not specific to the transport mechanism.
定义 vrpn_Connection.h:562
定义 vrpn_Flock_Parallel.h:72
virtual void reset()
Reset the tracker.
定义 vrpn_Flock_Parallel.h:48
virtual int get_report(void)
virtual void reset()
Reset the tracker.
定义 vrpn_Flock.h:38