0 Star 0 Fork 1

ianaxe/vrpn

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vrpn_Event_Analog.h 2.42 KB
一键复制 编辑 原始数据 按行查看 历史
/**************************************************************************************************/
/* */
/* Copyright (C) 2004 Bauhaus University Weimar */
/* Released into the public domain on 6/23/2007 as part of the VRPN project */
/* by Jan P. Springer. */
/* */
/**************************************************************************************************/
/* */
/* module : vrpn_Event_Analog.h */
/* project : */
/* description: base class for devices using event interface */
/* */
/**************************************************************************************************/
#ifndef _VRPN_EVENT_ANALOG_H_
#define _VRPN_EVENT_ANALOG_H_
// includes, system
#include <vector> // for vector
// includes, project
#include "vrpn_Analog.h" // for vrpn_Analog
#include "vrpn_Configure.h" // for VRPN_API
#include "vrpn_Event.h" // for input_event
class VRPN_API vrpn_Connection;
class VRPN_API vrpn_Event_Analog: public vrpn_Analog {
public:
// constructor
// evdev is the event file name
vrpn_Event_Analog( const char * name,
vrpn_Connection * connection,
const char * evdev_name);
~vrpn_Event_Analog();
protected:
// read available events
// returns number of structs read successfully
int read_available_data();
protected:
// typedefs for convenience
typedef std::vector<struct vrpn_Event::input_event> event_vector_t;
typedef event_vector_t::iterator event_iter_t;
// handle to the event interface
int fd;
// maximal number of event structs read at once
unsigned long max_num_events;
// container for the event structs read
event_vector_t event_data;
};
#endif // _VRPN_EVENT_ANALOG_H_
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/ianaxe/vrpn.git
git@gitee.com:ianaxe/vrpn.git
ianaxe
vrpn
vrpn
master

搜索帮助