Changeset 122 in flair-src for trunk/lib/FlairSensorActuator/src/VrpnClient.cpp
- Timestamp:
- 01/06/17 13:56:26 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairSensorActuator/src/VrpnClient.cpp
r15 r122 26 26 using namespace flair::gui; 27 27 28 namespace { 29 flair::sensor::VrpnClient *singleton = NULL; 30 } 31 32 28 33 namespace flair { 29 34 namespace sensor { 30 35 31 VrpnClient::VrpnClient(const FrameworkManager *parent, string name, 36 VrpnClient *GetVrpnClient(void) { return singleton; } 37 38 VrpnClient::VrpnClient(string name, 32 39 string address, uint16_t us_period, uint8_t priority) 33 : Thread(parent, name, priority) { 40 : Thread(getFrameworkManager(), name, priority) { 41 if (singleton != NULL) { 42 Err("VrpnClient must be instanced only one time\n"); 43 return; 44 } 45 46 singleton = this; 34 47 pimpl_ = new VrpnClient_impl(this, name, address, us_period); 35 48 } 36 49 37 VrpnClient::VrpnClient( const FrameworkManager *parent,string name,50 VrpnClient::VrpnClient(string name, 38 51 SerialPort *serialport, uint16_t us_period, 39 52 uint8_t priority) 40 : Thread(parent, name, priority) { 53 : Thread(getFrameworkManager(), name, priority) { 54 if (singleton != NULL) { 55 Err("VrpnClient must be instanced only one time\n"); 56 return; 57 } 58 59 singleton = this; 41 60 pimpl_ = new VrpnClient_impl(this, name, serialport, us_period); 42 61 }
Note:
See TracChangeset
for help on using the changeset viewer.