Esempio n. 1
0
Beeper *DeviceManager::getBeeper(void)
{
	IDevice *beeperDev = findFirstDeviceByType(DEVICE_TYPE_BEEPER);
	if (NULL == beeperDev)
	{
		beeperDev = new Beeper(mIo);
		beeperDev->init();
		mRunningDevices[mNumRunningDevices] = beeperDev;
		++mNumRunningDevices;
	}
	return (Beeper*)beeperDev;
}
Esempio n. 2
0
Agl *DeviceManager::getAgl(void)
{
	IDevice *aglDev = findFirstDeviceByType(DEVICE_TYPE_AGL);
	if (NULL == aglDev)
	{
		aglDev = new Agl(mIo);
		aglDev->init();
		mRunningDevices[mNumRunningDevices] = aglDev;
		++mNumRunningDevices;
	}
	return (Agl*)aglDev;
}
Esempio n. 3
0
Aoa *DeviceManager::getAoa(void)
{
	IDevice *aoaDev = findFirstDeviceByType(DEVICE_TYPE_AOA);
	if (NULL == aoaDev)
	{
		aoaDev = new Aoa(mIo);
		aoaDev->init();
		mRunningDevices[mNumRunningDevices] = aoaDev;
		++mNumRunningDevices;
	}
	return (Aoa*) aoaDev;
}
Esempio n. 4
0
ServoController *DeviceManager::getServoController(void)
{
	IDevice *scDev = findFirstDeviceByType(DEVICE_TYPE_SERVO_CONTROLLER);
	if (NULL == scDev)
	{
		scDev = new ServoController(mIo);
		scDev->init();
		mRunningDevices[mNumRunningDevices] = scDev;
		++mNumRunningDevices;
	}
	return (ServoController*) scDev;
}
Esempio n. 5
0
VirtualImu *DeviceManager::getVirtualImu(void)
{
	IDevice *virtualImuDev = findFirstDeviceByType(DEVICE_TYPE_VIRTUAL_IMU);
	if (NULL == virtualImuDev)
	{
		virtualImuDev = new VirtualImu(mIo);
		virtualImuDev->init();
		mRunningDevices[mNumRunningDevices] = virtualImuDev;
		++mNumRunningDevices;
	}
	return (VirtualImu*)virtualImuDev;
}
Esempio n. 6
0
Imu *DeviceManager::getImu(void)
{
	IDevice *imuDev = findFirstDeviceByType(DEVICE_TYPE_IMU);
	if (NULL == imuDev)
	{
		imuDev = new Imu(mIo);
		imuDev->init();
		cout<<"imu inited"<<endl;
		mRunningDevices[mNumRunningDevices] = imuDev;
		++mNumRunningDevices;
	}
	return (Imu*)imuDev;
}
Esempio n. 7
0
Radio *DeviceManager::getRadio(void)
{
	IDevice *radioDev = findFirstDeviceByType(DEVICE_TYPE_RADIO);

	if (NULL == radioDev)
	{
		radioDev = new Radio(mIo);
		radioDev->init();
		mRunningDevices[mNumRunningDevices] = radioDev;
		++mNumRunningDevices;
	}

	return (Radio*)radioDev;
}