cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
osa3Dconnexion.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 /*
4 
5  Author(s): Simon Leonard
6  Created on: Jan 11 2012
7 
8  (C) Copyright 2008 Johns Hopkins University (JHU), All Rights
9  Reserved.
10 
11 --- begin cisst license - do not edit ---
12 
13 This software is provided "as is" under an open source license, with
14 no warranty. The complete license can be found in license.txt and
15 http://www.cisst.org/cisst/license.txt.
16 
17 --- end cisst license ---
18 */
19 
20 #ifndef _osa3Dconnexion_h
21 #define _osa3Dconnexion_h
22 
24 #include <string>
25 
27 
28  public:
29 
30  enum Errno{ ESUCCESS, EFAILURE };
31 
32  struct Event{
33 
34  enum Type { UNKNOWN, MOTION, BUTTON_PRESSED, BUTTON_RELEASED };
35  enum Button { BUTTON1, BUTTON2 };
36  typedef long long Data[6];
37 
40  Data data;
41  unsigned int timestamp;
42 
43  };
44 
45  private:
46 
47  struct Internals;
48  osa3Dconnexion::Internals* internals;
49 
50  osa3Dconnexion::Errno LEDOn();
51  osa3Dconnexion::Errno LEDOff();
52 
53  public:
54 
56  ~osa3Dconnexion();
57 
58  osa3Dconnexion::Errno Open( const std::string& filename = "" );
59  osa3Dconnexion::Errno Close();
60 
61  osa3Dconnexion::Event WaitForEvent();
62 
63 };
64 
65 #endif
Definition: osa3Dconnexion.h:34
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
Errno
Definition: osa3Dconnexion.h:30
unsigned int timestamp
Definition: osa3Dconnexion.h:41
Button
Definition: osa3Dconnexion.h:35
Definition: osa3Dconnexion.h:30
Type type
Definition: osa3Dconnexion.h:38
Button button
Definition: osa3Dconnexion.h:39
Definition: osa3Dconnexion.h:26
Definition: osa3Dconnexion.h:32
Data data
Definition: osa3Dconnexion.h:40
Type
Definition: osa3Dconnexion.h:34