Esempio n. 1
0
MouseButtons::~MouseButtons(void)
	{
	/* Stop device thread (mouse button device cannot be disabled): */
	{
	Threads::Mutex::Lock buttonStateLock(buttonStateMutex);
	stopDeviceThread();
	}
	}
Esempio n. 2
0
PCWand::~PCWand(void)
{
    /* Stop device thread (dedicated PC cannot be disabled): */
    {
        Threads::Mutex::Lock deviceValuesLock(deviceValuesMutex);
        stopDeviceThread();
    }
}
FakespacePinchGlove::~FakespacePinchGlove(void)
	{
	/* Stop device thread (pinch glove device cannot be disabled): */
	{
	Threads::Mutex::Lock pinchMaskLock(pinchMaskMutex);
	stopDeviceThread();
	}
	}
Esempio n. 4
0
void RemoteDevice::stop(void)
	{
	/* Deactivate device server: */
	pipe.writeMessage(Vrui::VRDevicePipe::STOPSTREAM_REQUEST);
	pipe.writeMessage(Vrui::VRDevicePipe::DEACTIVATE_REQUEST);
	
	/* Stop device communication thread: */
	stopDeviceThread();
	}
Esempio n. 5
0
void HIDDevice::stop(void)
{
	if ( cfRunLoop ) {
		CFRunLoopStop ( cfRunLoop ) ;
		Threads::Mutex::Lock stateLock ( runLoopMutex ) ;
		(*hidQueueInterface) -> stop ( hidQueueInterface ) ;
		stopDeviceThread ( ) ;
	}
}
RazerHydraDevice::~RazerHydraDevice(void)
	{
	/* Stop device thread (Razer Hydra device cannot be suspended and runs the entire time): */
	keepRunning=false;
	stopDeviceThread(false);
	
	/* Close the Razer Hydra device: */
	delete hydra;
	}
Esempio n. 7
0
void SpaceBallRaw::stop(void)
	{
	/* Disable automatic device updates: */
	#ifdef VERBOSE
	printf("SpaceBallRaw: Disabling automatic update mode\n");
	fflush(stdout);
	#endif
	devicePort.writeString("-\r");
	
	/* Stop device communication thread: */
	stopDeviceThread();
	}
Esempio n. 8
0
void PolhemusFastrak::stop(void)
	{
	/* Disable continuous mode: */
	#ifdef VERBOSE
	printf("PolhemusFastrak: Disabling continuous mode\n");
	fflush(stdout);
	#endif
	devicePort.writeByte('c');
	
	/* Stop device communication thread: */
	stopDeviceThread();
	}
Esempio n. 9
0
void ViconTarsus::stop(void)
	{
	/* Deactivate streaming: */
	#ifdef VERBOSE
	printf("ViconTarsus: Stopping continuous update mode\n");
	#endif
	pipe.write<int>(4);
	pipe.write<int>(0);
	
	/* Stop device communication thread: */
	stopDeviceThread();
	}
Esempio n. 10
0
void InterSense::stop(void)
	{
	/* Disable continuous mode: */
	#ifdef VERBOSE
	printf("InterSense: Disabling continuous mode\n");
	fflush(stdout);
	#endif
	serialPort.writeByte('c');
	
	/* Stop device communication thread: */
	stopDeviceThread();
	}
Esempio n. 11
0
Joystick::~Joystick(void)
{
    /* Stop device thread (joystick device cannot be disabled): */
    {
        Threads::Mutex::Lock stateLock(stateMutex);
        stopDeviceThread();
    }
    delete[] buttonStates;
    delete[] valuatorStates;
    delete[] axisGains;
    close(joystickDeviceFd);
}
Esempio n. 12
0
VRPNClient::~VRPNClient(void)
	{
	/* Stop device communication thread: */
	{
	Threads::Mutex::Lock stateLock(stateMutex);
	stopDeviceThread();
	}
	
	delete[] trackerStates;
	delete[] buttonStates;
	delete[] valuatorStates;
	}
Esempio n. 13
0
HIDDevice::~HIDDevice ( void )
{
	{
		CFRunLoopStop ( cfRunLoop ) ;
		Threads::Mutex::Lock stateLock ( runLoopMutex ) ;
		stopDeviceThread ( ) ;
	}

	(*hidQueueInterface) -> stop ( hidQueueInterface ) ;
	(*hidQueueInterface) -> dispose ( hidQueueInterface ) ;
	(*hidQueueInterface) -> Release ( hidQueueInterface ) ;

	(*hidDeviceInterface) -> close ( hidDeviceInterface ) ;
	(*hidDeviceInterface) -> Release ( hidDeviceInterface ) ;
}
Esempio n. 14
0
HIDDevice::~HIDDevice(void)
	{
	/* Stop device thread (HID device cannot be disabled): */
	{
	Threads::Mutex::Lock stateLock(stateMutex);
	stopDeviceThread();
	}
	delete[] buttonStates;
	delete[] valuatorStates;
	delete[] keyMap;
	delete[] absAxisMap;
	delete[] relAxisMap;
	delete[] axisConverters;
	if(deviceFd>=0)
		close(deviceFd);
	}
void AscensionFlockOfBirds::stop(void)
	{
	/* Put birds to sleep: */
	#ifdef VERBOSE
	printf("AscensionFlockOfBirds: Disabling stream mode\n");
	fflush(stdout);
	#endif
	devicePort.writeByte(0xf0|masterId); // Talk to FOB master
	devicePort.writeByte(0x42); // Point
	delay(0.25);
	
	#ifdef VERBOSE
	printf("AscensionFlockOfBirds: Disabling tracker device\n");
	fflush(stdout);
	#endif
	devicePort.writeByte(0xf0|masterId); // Talk to FOB master
	devicePort.writeByte(0x47); // Sleep
	
	/* Stop device communication thread: */
	stopDeviceThread();
	}
Esempio n. 16
0
void LedDeviceWrapper::createLedDevice(const QJsonObject& config)
{
	if(_ledDevice != nullptr)
	 {
		 stopDeviceThread();
	 }

	 // create thread and device
	 QThread* thread = new QThread(this);
	 _ledDevice = LedDeviceFactory::construct(config);
	 _ledDevice->moveToThread(thread);
	 // setup thread management
	 connect(thread, &QThread::started, _ledDevice, &LedDevice::start);
	 connect(thread, &QThread::finished, thread, &QObject::deleteLater);
	 connect(thread, &QThread::finished, _ledDevice, &QObject::deleteLater);

	 // further signals
	 connect(this, &LedDeviceWrapper::write, _ledDevice, &LedDevice::write);
	 connect(_ledDevice, &LedDevice::enableStateChanged, this, &LedDeviceWrapper::handleInternalEnableState);

	 // start the thread
	 thread->start();
}
Esempio n. 17
0
void DummyDevice::stop(void)
	{
	/* Stop device update thread: */
	stopDeviceThread();
	}
Esempio n. 18
0
LedDeviceWrapper::~LedDeviceWrapper()
{
	stopDeviceThread();
}