Пример #1
0
mitk::ServiceProperties mitk::USDevice::ConstructServiceProperties()
{
  ServiceProperties props;
  std::string yes = "true";
  std::string no = "false";

  if(this->GetIsActive())
    props[mitk::USDevice::US_PROPKEY_ISACTIVE] = yes;
  else
    props[mitk::USDevice::US_PROPKEY_ISACTIVE] = no;

  std::string isActive;
  if (GetIsActive()) isActive = " (Active)";
  else isActive = " (Inactive)";
  // e.g.: Zonare MyLab5 (Active)
  props[ mitk::USDevice::US_PROPKEY_LABEL] = m_Metadata->GetDeviceManufacturer() + " " + m_Metadata->GetDeviceModel() + isActive;

  if( m_Calibration.IsNotNull() )
    props[ mitk::USImageMetadata::PROP_DEV_ISCALIBRATED ] = yes;
  else
    props[ mitk::USImageMetadata::PROP_DEV_ISCALIBRATED ] = no;

  props[ mitk::USDevice::US_PROPKEY_CLASS ] = GetDeviceClass();
  props[ mitk::USImageMetadata::PROP_DEV_MANUFACTURER ] = m_Metadata->GetDeviceManufacturer();
  props[ mitk::USImageMetadata::PROP_DEV_MODEL ] = m_Metadata->GetDeviceModel();
  props[ mitk::USImageMetadata::PROP_DEV_COMMENT ] = m_Metadata->GetDeviceComment();
  props[ mitk::USImageMetadata::PROP_PROBE_NAME ] = m_Metadata->GetProbeName();
  props[ mitk::USImageMetadata::PROP_PROBE_FREQUENCY ] = m_Metadata->GetProbeFrequency();
  props[ mitk::USImageMetadata::PROP_ZOOM ] = m_Metadata->GetZoom();

  return props;
}
Пример #2
0
us::ServiceProperties mitk::USDevice::ConstructServiceProperties()
{
  mitk::USDevice::PropertyKeys propertyKeys = mitk::USDevice::GetPropertyKeys();

  us::ServiceProperties props;

  props[propertyKeys.US_PROPKEY_ISCONNECTED] =
    this->GetIsConnected() ? "true" : "false";
  props[propertyKeys.US_PROPKEY_ISACTIVE] =
    this->GetIsActive() ? "true" : "false";

  props[propertyKeys.US_PROPKEY_LABEL] = this->GetServicePropertyLabel();

  // get identifier of selected probe if there is one selected
  mitk::USControlInterfaceProbes::Pointer probesControls =
    this->GetControlInterfaceProbes();
  if (probesControls.IsNotNull() && probesControls->GetIsActive())
  {
    mitk::USProbe::Pointer probe = probesControls->GetSelectedProbe();
    if (probe.IsNotNull())
    {
      props[propertyKeys.US_PROPKEY_PROBES_SELECTED] = probe->GetName();
    }
  }

  props[propertyKeys.US_PROPKEY_CLASS] = GetDeviceClass();
  props[propertyKeys.US_PROPKEY_MANUFACTURER] = m_Manufacturer;
  props[propertyKeys.US_PROPKEY_NAME] = m_Name;
  props[propertyKeys.US_PROPKEY_COMMENT] = m_Comment;

  m_ServiceProperties = props;

  return props;
}
Пример #3
0
void QBtLocalDevicePrivate::SetDeviceClass(QBtDevice::DeviceMajor classId)
{
    BTUINT32 devClass;
    BTINT32 result = BTSDK_FALSE;
    result = Btsdk_GetLocalDeviceClass(&devClass);

    if(result != BTSDK_OK)
        return;

    QBtDevice::DeviceMajor currentDeviceClass = GetDeviceClass();

    BTUINT32 newDevClass = (devClass ^ (currentDeviceClass * 0x100)) | (classId * 0x100);

    Btsdk_SetLocalDeviceClass(newDevClass);
}
Пример #4
0
String ColorProfile::GetDeviceClassName() const
{
	switch (GetDeviceClass())
	{
	case icSigInputClass:
		return _T("Input Device");
	case icSigDisplayClass:
		return _T("Display Device");
	case icSigOutputClass:
		return _T("Output Device");
	case icSigLinkClass:
		return _T("Link");
	case icSigAbstractClass:
		return _T("Abstract");
	case icSigColorSpaceClass:
		return _T("Color Space");
	case icSigNamedColorClass:
		return _T("Named Color");
	default:
		return _T("Unknown");
	}
}
Пример #5
0
CDeviceClass *CDeviceDescList::GetNamedDevice (DeviceNames iDev) const

//	GetNamedDevice
//
//	Returns the named device (or NULL if not found)

	{
	int i;
	ItemCategories iCatToFind = CDeviceClass::GetItemCategory(iDev);

	for (i = 0; i < m_iCount; i++)
		{
		CDeviceClass *pDevice = GetDeviceClass(i);

		//	See if this is the category that we want to find

		if (pDevice->GetCategory() == iCatToFind)
			return pDevice;
		}

	return NULL;
	}