本文整理汇总了C++中XnDeviceModule::AddProperties方法的典型用法代码示例。如果您正苦于以下问题:C++ XnDeviceModule::AddProperties方法的具体用法?C++ XnDeviceModule::AddProperties怎么用?C++ XnDeviceModule::AddProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XnDeviceModule
的用法示例。
在下文中一共展示了XnDeviceModule::AddProperties方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateDeviceModule
XnStatus XnSensor::CreateDeviceModule(XnDeviceModuleHolder** ppModuleHolder)
{
XnStatus nRetVal = XN_STATUS_OK;
nRetVal = XnDeviceBase::CreateDeviceModule(ppModuleHolder);
XN_IS_STATUS_OK(nRetVal);
// add sensor properties
XnDeviceModule* pModule = (*ppModuleHolder)->GetModule();
XnProperty* pProps[] =
{
&m_ErrorState, &m_ResetSensorOnStartup, &m_Interface, &m_ReadFromEP1,
&m_ReadFromEP2, &m_ReadFromEP3, &m_ReadData, &m_NumberOfBuffers, &m_FirmwareParam,
&m_CmosBlankingUnits, &m_CmosBlankingTime, &m_Reset, &m_FirmwareMode, &m_Version,
&m_FixedParam, &m_FrameSync, &m_CloseStreamsOnShutdown, &m_InstancePointer, &m_ID,
&m_USBPath, &m_DeviceName, &m_VendorSpecificData,
};
nRetVal = pModule->AddProperties(pProps, sizeof(pProps)/sizeof(XnProperty*));
if (nRetVal != XN_STATUS_OK)
{
DestroyModule(*ppModuleHolder);
*ppModuleHolder = NULL;
return (nRetVal);
}
// configure it from global file
if (m_strGlobalConfigFile[0] != '\0')
{
nRetVal = pModule->LoadConfigFromFile(m_strGlobalConfigFile);
XN_IS_STATUS_OK(nRetVal);
}
return (XN_STATUS_OK);
}
示例2: CreateDeviceModule
XnStatus XnSensorClient::CreateDeviceModule(XnDeviceModuleHolder** ppModuleHolder)
{
XnStatus nRetVal = XN_STATUS_OK;
nRetVal = XnDeviceBase::CreateDeviceModule(ppModuleHolder);
XN_IS_STATUS_OK(nRetVal);
// add sensor properties
XnDeviceModule* pModule = (*ppModuleHolder)->GetModule();
XnProperty* pProps[] = { &m_InstancePointer, &m_ErrorState };
nRetVal = pModule->AddProperties(pProps, sizeof(pProps)/sizeof(XnProperty*));
if (nRetVal != XN_STATUS_OK)
{
DestroyModule(*ppModuleHolder);
*ppModuleHolder = NULL;
return (nRetVal);
}
return (XN_STATUS_OK);
}
示例3: CreateDeviceModule
XnStatus XnDeviceFileReader::CreateDeviceModule(XnDeviceModuleHolder** ppModuleHolder)
{
XnStatus nRetVal = XN_STATUS_OK;
nRetVal = XnStreamReaderDevice::CreateDeviceModule(ppModuleHolder);
XN_IS_STATUS_OK(nRetVal);
XnDeviceModule* pModule = (*ppModuleHolder)->GetModule();
// add sensor properties
XnProperty* pProps[] = { &m_FrameDelay, &m_InstancePointer };
nRetVal = pModule->AddProperties(pProps, sizeof(pProps)/sizeof(XnProperty*));
if (nRetVal != XN_STATUS_OK)
{
DestroyModule(*ppModuleHolder);
*ppModuleHolder = NULL;
return (nRetVal);
}
return (XN_STATUS_OK);
}
示例4: CreateDeviceModule
XnStatus XnDeviceBase::CreateDeviceModule(XnDeviceModuleHolder** ppModuleHolder)
{
XnStatus nRetVal = XN_STATUS_OK;
// create module
nRetVal = CreateModule(XN_MODULE_NAME_DEVICE, ppModuleHolder);
XN_IS_STATUS_OK(nRetVal);
XnDeviceModule* pModule = (*ppModuleHolder)->GetModule();
// add device properties
XnProperty* pProps[] = { &m_DeviceMirror };
nRetVal = pModule->AddProperties(pProps, sizeof(pProps)/sizeof(XnProperty*));
if (nRetVal != XN_STATUS_OK)
{
DestroyModule(*ppModuleHolder);
*ppModuleHolder = NULL;
return (nRetVal);
}
return XN_STATUS_OK;
}
示例5: CreateDeviceModule
XnStatus XnDeviceBase::CreateDeviceModule(XnDeviceModuleHolder** ppModuleHolder)
{
XnStatus nRetVal = XN_STATUS_OK;
// create module
nRetVal = CreateModule(XN_MODULE_NAME_DEVICE, ppModuleHolder);
XN_IS_STATUS_OK(nRetVal);
XnDeviceModule* pModule = (*ppModuleHolder)->GetModule();
// add device properties
XnProperty* pProps[] = { &m_ReadWriteMode, &m_SharingMode, &m_PrimaryStream, &m_DeviceMirror,
&m_SDKVersionProp, &m_HighResTimestamps, &m_DeviceName };
nRetVal = pModule->AddProperties(pProps, sizeof(pProps)/sizeof(XnProperty*));
if (nRetVal != XN_STATUS_OK)
{
DestroyModule(*ppModuleHolder);
*ppModuleHolder = NULL;
return (nRetVal);
}
return XN_STATUS_OK;
}