1 Star 0 Fork 1

upczap/vrpn

forked from ianaxe/vrpn 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vrpn_Dyna.h 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
#ifndef INCLUDED_DYNA
#define INCLUDED_DYNA
#include "vrpn_Configure.h" // for VRPN_API
#include "vrpn_Serial.h"
#include "vrpn_Tracker.h" // for vrpn_Tracker_Serial
class VRPN_API vrpn_Connection;
// only 13 receivers allowed in normal addressing mode
#define VRPN_DYNA_MAX_SENSORS 13
// This is a class which provides a server for an ascension
// DynaSight. The server will send out messages
// The timestamp is the time when the first character was read
// from the serial driver with "read". No adjustment is currently
// made to this time stamp.
// If this is running on a non-linux system, then the serial port driver
// is probably adding more latency -- see the vrpn README for more info.
class VRPN_API vrpn_Tracker_Dyna: public vrpn_Tracker_Serial {
private:
unsigned reportLength;
unsigned totalReportLength;
public:
vrpn_Tracker_Dyna(char *name, vrpn_Connection *c, int cSensors=1,
const char *port = "/dev/ttyd3", long baud = 38400);
virtual ~vrpn_Tracker_Dyna();
private:
void my_flush() {
// clear the input data buffer
unsigned char foo[128];
while (vrpn_read_available_characters(serial_fd, foo, 1) > 0) ;
}
int valid_report();
int decode_record();
int get_status();
protected:
virtual int get_report(void);
virtual void reset();
void printError(unsigned char uchErrCode, unsigned char uchExpandedErrCode);
int checkError();
int cResets;
int cSensors;
};
#endif
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/jari/vrpn.git
[email protected]:jari/vrpn.git
jari
vrpn
vrpn
master

搜索帮助