Changeset 59
- Timestamp:
- 01/20/09 11:32:15 (3 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
-
SConstruct (modified) (1 diff)
-
avango-build/src/avango/build/recipes.py (modified) (1 diff)
-
avango-daemon/SConscript (modified) (1 diff)
-
avango-daemon/include/avango/daemon/Config.h.in (modified) (1 diff)
-
avango-daemon/include/avango/daemon/SConscript (modified) (1 diff)
-
avango-daemon/include/avango/daemon/VRPNClient.h (added)
-
avango-daemon/python/__init__.py (modified) (3 diffs)
-
avango-daemon/python/_daemon.cpp (modified) (5 diffs)
-
avango-daemon/src/avango/daemon/Init.cpp (modified) (3 diffs)
-
avango-daemon/src/avango/daemon/SConscript (modified) (3 diffs)
-
avango-daemon/src/avango/daemon/VRPNClient.cpp (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/SConstruct
r56 r59 53 53 BoolOption('CONNECT_CSHARP_SUPPORT', 54 54 'Enable C# support for the connect module', 55 False), 56 BoolOption('VRPN_SUPPORT', 57 'Enable VRPN support for the AvangoDaemon module', 55 58 False), 56 59 ) -
trunk/avango-build/src/avango/build/recipes.py
r57 r59 74 74 #add common libs (plain) 75 75 _config_store.set('xerces', PlainConfig(libraries = ['xerces-c'])) 76 76 _config_store.set('vrpn', PlainConfig(libraries = ['vrpn'])) 77 77 78 # Dummy packages 78 79 _config_store.set('osgUtil', PlainConfig(libraries = [''])) -
trunk/avango-daemon/SConscript
r1 r59 33 33 'PREFIX': avango.build.get_prefix().abspath, 34 34 'AVANGO_DAEMON_DEBUG': int(daemon_env['DEBUG']), 35 'AVANGO_DAEMON_VRPN_SUPPORT': int(daemon_env['VRPN_SUPPORT']), 35 36 'PKG_CONFIG_REQUIRES': 'avango-core, avango-osg', 36 37 'AVANGO_DAEMON_VERSION': '1.90.0', -
trunk/avango-daemon/include/avango/daemon/Config.h.in
r1 r59 38 38 #endif 39 39 40 #if %(AVANGO_DAEMON_VRPN_SUPPORT)s 41 #define VRPN_SUPPORT 1 42 #else 43 #undef VRPN_SUPPORT 44 #endif 45 40 46 #define AVANGO_DAEMON_VERSION_MAJOR %(AVANGO_DAEMON_VERSION_MAJOR)s 41 47 #define AVANGO_DAEMON_VERSION_MINOR %(AVANGO_DAEMON_VERSION_MINOR)s -
trunk/avango-daemon/include/avango/daemon/SConscript
r1 r59 44 44 WiimoteActuator.h 45 45 ''') 46 47 if avango.build.Environment()['VRPN_SUPPORT']: 48 headers += Split(''' 49 VRPNClient.h 50 ''') 46 51 47 52 Alias('install-daemon', Install(avango.build.get_include_path('avango/daemon'), headers)) -
trunk/avango-daemon/python/__init__.py
r20 r59 59 59 To communicate with a Wacom tablet. 60 60 61 VRPNClient 62 A VRPN client consisting of vrpn_Tracker, vrpn_Button and vrpn_Analog devices. 63 Note: This device is linked to the vrpn library. 64 (http://www.cs.unc.edu/Research/vrpn) 65 61 66 62 67 Examples 63 68 ======== 64 69 65 There are some basic examples that show the configuration and usage of66 th ese input devices in examples/daemon within your Avango NG installation.70 There are some basic examples within your Avango NG installation, 71 that show the configuration and usage of these input devices. 67 72 ''' 68 73 … … 73 78 from _daemon import _WiimoteHelper 74 79 from _daemon import _DTrackHelper 80 from _daemon import _VRPNClientHelper 75 81 76 82 import avango.nodefactory … … 193 199 194 200 stations = property(StationProxy) 201 202 class VRPNClient(_VRPNClientHelper): 203 """Avango NG device for processing data sent by a VRPN server. This 204 client consists of vrpn_Tracker, vrpn_Button and vrpn_Analog devices.""" 205 def __init__(self): 206 super(VRPNClient, self).__init__() 207 self._station = None 208 209 def get_station(self): 210 return self._station 211 212 def set_station(self, st): 213 self._station = st 214 self.add_station(0, st.name) 215 216 station = property(get_station, set_station) -
trunk/avango-daemon/python/_daemon.cpp
r20 r59 24 24 \************************************************************************/ 25 25 26 #include <avango/daemon/Config.h> 26 27 #include <avango/daemon/DeviceDaemon.h> 27 28 #include <avango/daemon/DeviceSensor.h> … … 38 39 #include <boost/mpl/vector.hpp> 39 40 41 #ifdef VRPN_SUPPORT 42 #include <avango/daemon/VRPNClient.h> 43 #endif 44 40 45 using namespace boost::python; 41 46 using namespace av::python; … … 75 80 std::string getPortFeature(av::daemon::Device* self) { return self->queryFeature("port"); } 76 81 std::string getToggleResetFeature(av::daemon::Device* self) { return self->queryFeature("toggle-reset"); } 77 82 std::string getServerFeature(av::daemon::Device* self) { return self->queryFeature("server"); } 83 78 84 // wrapper for specialized configureFeature calls, required by .add_property 79 85 std::string parseBoolString(std::string value) … … 91 97 void setPortFeature(av::daemon::Device* self, std::string value) { self->configureFeature("port", value); } 92 98 void setToggleResetFeature(av::daemon::Device* self, std::string value) { self->configureFeature("toggle-reset", parseBoolString(value)); } 93 99 void setServerFeature(av::daemon::Device* self, std::string value) { self->configureFeature("server", value); } 100 94 101 // set LED states 95 102 void setLED(av::daemon::HIDInput* self, int number, int value) … … 199 206 ; 200 207 208 // Avango NG device: VRPNClient 209 class_<av::daemon::VRPNClient, av::Link<av::daemon::VRPNClient>, bases<av::daemon::Device>, boost::noncopyable >("_VRPNClientHelper", 210 "A helper class used to construct a concrete Python VRPN client device representation.") 211 .add_property("server", &::getServerFeature, &::setServerFeature) 212 ; 213 201 214 // start the daemon 202 215 def("run", &::run); -
trunk/avango-daemon/src/avango/daemon/Init.cpp
r1 r59 28 28 #include <avango/Logger.h> 29 29 30 #include <avango/daemon/Config.h> 30 31 #include <avango/daemon/Device.h> 31 32 #include <avango/daemon/DeviceActuator.h> … … 38 39 #include <avango/daemon/Wiimote.h> 39 40 #include <avango/daemon/WiimoteActuator.h> 41 42 #ifdef VRPN_SUPPORT 43 #include <avango/daemon/VRPNClient.h> 44 #endif 40 45 41 46 namespace … … 62 67 av::daemon::WiimoteActuator::initClass(); 63 68 69 #ifdef VRPN_SUPPORT 70 av::daemon::VRPNClient::initClass(); 71 #endif 72 64 73 AV_TYPED_INIT_ABSTRACT(av::Type::badType(), "av::daemon::Init", true); 65 74 } -
trunk/avango-daemon/src/avango/daemon/SConscript
r1 r59 26 26 import avango.build 27 27 28 daemon_env = avango.build.Environment() 29 28 30 # Sources section 29 31 lib_sources = Split(''' … … 46 48 ''') 47 49 50 if daemon_env['VRPN_SUPPORT']: 51 lib_sources += Split(''' 52 VRPNClient.cpp 53 ''') 54 48 55 # append external sources 49 56 lib_sources.append(Split(''' … … 54 61 55 62 # Rules section 56 daemon_env = avango.build.Environment()57 63 if 'icpc' in daemon_env['CXX']: 58 64 daemon_env.Append(CXXFLAGS='-wd593') 59 65 avango.build.add_library(daemon_env, 'avango-core') 60 66 avango.build.add_library(daemon_env, 'avango-osg') 67 68 if daemon_env['VRPN_SUPPORT']: 69 avango.build.add_library(daemon_env, 'vrpn') 70 61 71 lib = daemon_env.SharedLibrary('avangoDaemon', lib_sources) 62 72
Note: See TracChangeset
for help on using the changeset viewer.
