Panda3D
vrpnAnalogDevice.h
1 // Filename: vrpnAnalogDevice.h
2 // Created by: drose (26Jan01)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef VRPNANALOGDEVICE_H
16 #define VRPNANALOGDEVICE_H
17 
18 #include "pandabase.h"
19 
20 #include "clientAnalogDevice.h"
21 
22 class VrpnClient;
23 class VrpnAnalog;
24 
25 ////////////////////////////////////////////////////////////////////
26 // Class : VrpnAnalogDevice
27 // Description : The Panda interface to a VRPN analog device. This
28 // object will be returned by VrpnClient::make_device(),
29 // for attaching to a AnalogNode.
30 //
31 // This class does not need to be exported from the DLL.
32 ////////////////////////////////////////////////////////////////////
34 public:
35  VrpnAnalogDevice(VrpnClient *client, const string &device_name,
36  VrpnAnalog *vrpn_analog);
37  virtual ~VrpnAnalogDevice();
38 
39  INLINE VrpnAnalog *get_vrpn_analog() const;
40 
41 private:
42  VrpnAnalog *_vrpn_analog;
43 
44 public:
45  static TypeHandle get_class_type() {
46  return _type_handle;
47  }
48  static void init_type() {
49  ClientAnalogDevice::init_type();
50  register_type(_type_handle, "VrpnAnalogDevice",
51  ClientAnalogDevice::get_class_type());
52  }
53  virtual TypeHandle get_type() const {
54  return get_class_type();
55  }
56  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
57 
58 private:
59  static TypeHandle _type_handle;
60 
61  friend class VrpnAnalog;
62 };
63 
64 #include "vrpnAnalogDevice.I"
65 
66 #endif
A specific ClientBase that connects to a VRPN server and records information on the connected VRPN de...
Definition: vrpnClient.h:38
The Panda interface to a VRPN analog device.
VrpnAnalog * get_vrpn_analog() const
Returns a pointer to the particular VrpnAnalog this device gets its data from.
A device, attached to the ClientBase by a AnalogNode, that records the data from a single named analo...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:85
This is the actual interface to a particular VRPN analog device, and all of its numbered controls...
Definition: vrpnAnalog.h:42