当前位置: 首页>>代码示例>>C++>>正文


C++ xnLogVerbose函数代码示例

本文整理汇总了C++中xnLogVerbose函数的典型用法代码示例。如果您正苦于以下问题:C++ xnLogVerbose函数的具体用法?C++ xnLogVerbose怎么用?C++ xnLogVerbose使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了xnLogVerbose函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: xnLogVerbose

XnStatus XnSensorServer::RemoveSession(XnSessionsList::ConstIterator it)
{
	XnStatus nRetVal = XN_STATUS_OK;

	XnServerSession* pSession = *it;

	XnUInt32 nID = pSession->ID();
	xnLogVerbose(XN_MASK_SENSOR_SERVER, "Removing client %u...", nID);

	{
		XnAutoCSLocker locker(m_hSessionsLock);
		nRetVal = m_sessions.Remove(it);
		XN_IS_STATUS_OK(nRetVal);

		if (m_sessions.IsEmpty())
		{
			xnOSGetTimeStamp(&m_nLastSessionActivity);
		}
	}

	pSession->Free();
	XN_DELETE(pSession);

	xnLogVerbose(XN_MASK_SENSOR_SERVER, "Client %u removed", nID);

	return (XN_STATUS_OK);
}
开发者ID:02031991,项目名称:Sensor,代码行数:27,代码来源:XnSensorServer.cpp

示例2: xnLogVerbose

XnStatus XnSensorDepthStream::SetActualRead(XnBool bRead)
{
	XnStatus nRetVal = XN_STATUS_OK;

	if (m_ActualRead.GetValue() != bRead)
	{
		if (bRead)
		{
			xnLogVerbose(XN_MASK_DEVICE_SENSOR, "Creating USB depth read thread...");
			XnSpecificUsbDevice* pUSB = GetHelper()->GetPrivateData()->pSpecificDepthUsb;
			nRetVal = xnUSBInitReadThread(pUSB->pUsbConnection->UsbEp, pUSB->nChunkReadBytes, XN_SENSOR_USB_DEPTH_BUFFERS, pUSB->nTimeout, XnDeviceSensorProtocolUsbEpCb, pUSB);
			XN_IS_STATUS_OK(nRetVal);
		}
		else
		{
			xnLogVerbose(XN_MASK_DEVICE_SENSOR, "Shutting down USB depth read thread...");
			xnUSBShutdownReadThread(GetHelper()->GetPrivateData()->pSpecificDepthUsb->pUsbConnection->UsbEp);
		}

		nRetVal = m_ActualRead.UnsafeUpdateValue(bRead);
		XN_IS_STATUS_OK(nRetVal);
	}

	return (XN_STATUS_OK);
}
开发者ID:bouffa,项目名称:Sensor,代码行数:25,代码来源:XnSensorDepthStream.cpp

示例3: xnOSCreateSocket

XnStatus ServerSocketInConnection::ConnectSocket(XN_SOCKET_HANDLE& hSocket, const XnChar* strIP, XnUInt16 nPort)
{
	XnStatus nRetVal = XN_STATUS_OK;
	(void)strIP; //Ignore IP parameter - accept connections from any IP.

	XN_SOCKET_HANDLE hListenSocket = NULL;
	nRetVal = xnOSCreateSocket(XN_OS_TCP_SOCKET, "0.0.0.0", nPort, &hListenSocket);
	XN_IS_STATUS_OK_LOG_ERROR("Create data listen socket", nRetVal);
	nRetVal = xnOSBindSocket(hListenSocket);
	if (nRetVal != XN_STATUS_OK)
	{
		xnOSCloseSocket(hListenSocket);
		XN_IS_STATUS_OK_LOG_ERROR("Bind data listen socket", nRetVal);
	}

	nRetVal = xnOSListenSocket(hListenSocket);
	if (nRetVal != XN_STATUS_OK)
	{
		xnOSCloseSocket(hListenSocket);
		XN_IS_STATUS_OK_LOG_ERROR("Listen to data socket", nRetVal);
	}
	xnLogVerbose(XN_MASK_SOCKETS, "Server accepting %s:%u...", strIP, nPort);
	nRetVal = xnOSAcceptSocket(hListenSocket, &hSocket, XN_WAIT_INFINITE);
	xnOSCloseSocket(hListenSocket);
	XN_IS_STATUS_OK_LOG_ERROR("Accept data socket", nRetVal);
	xnLogVerbose(XN_MASK_SOCKETS, "Server accepted connection on port %u", nPort);

	return XN_STATUS_OK;
}
开发者ID:1170390,项目名称:OpenNI2,代码行数:29,代码来源:XnServerSocketInConnection.cpp

示例4: xnLogVerbose

void Context::shutdown()
{
	--m_initializationCounter;
	if (m_initializationCounter > 0)
	{
		xnLogVerbose(XN_MASK_ONI_CONTEXT, "Shutdown: still need %d more shutdown calls (to match initializations)", m_initializationCounter);
		return;
	}
	if (!s_valid)
	{
		return;
	}

	s_valid = FALSE;

	m_cs.Lock();

    // Close all recorders.
    while (m_recorders.Begin() != m_recorders.End())
    {
        Recorder* pRecorder = *m_recorders.Begin();
        recorderClose(pRecorder);
    }

	// Destroy all streams
	while (m_streams.Begin() != m_streams.End())
	{
		VideoStream* pStream = *m_streams.Begin();
		streamDestroy(pStream);
	}

	// Close all devices
	while (m_devices.Begin() != m_devices.End())
	{
		Device* pDevice = *m_devices.Begin();
		m_devices.Remove(pDevice);
		pDevice->close();
		XN_DELETE(pDevice);
	}

	for (xnl::List<DeviceDriver*>::Iterator iter = m_deviceDrivers.Begin(); iter != m_deviceDrivers.End(); ++iter)
	{
		DeviceDriver* pDriver = *iter;
		XN_DELETE(pDriver);
	}
	m_deviceDrivers.Clear();

	m_cs.Unlock();

	xnLogVerbose(XN_MASK_ONI_CONTEXT, "Shutdown: successful.");
	xnLogClose();
}
开发者ID:quintona,项目名称:openni2,代码行数:52,代码来源:OniContext.cpp

示例5: xnOSCreateSocket

XnStatus ClientSocketInConnection::ConnectSocket(XN_SOCKET_HANDLE& hSocket, const XnChar* strIP, XnUInt16 nPort)
{
	XnStatus nRetVal = XN_STATUS_OK;

	nRetVal = xnOSCreateSocket(XN_OS_TCP_SOCKET, strIP, nPort, &hSocket);
	XN_IS_STATUS_OK_LOG_ERROR("Create input socket", nRetVal);

	xnLogVerbose(XN_MASK_SOCKETS, "Client connecting to %s:%u...", strIP, nPort);
	nRetVal = xnOSConnectSocket(hSocket, CONNECT_TIMEOUT);
	XN_IS_STATUS_OK_LOG_ERROR("Connect input socket", nRetVal);
	xnLogVerbose(XN_MASK_SOCKETS, "Client connected to %s:%u", strIP, nPort);

	return XN_STATUS_OK;
}
开发者ID:1170390,项目名称:OpenNI2,代码行数:14,代码来源:XnClientSocketInConnection.cpp

示例6: AngleBetweenVectors

XnBool XnVPushDetector::IsPushDetected(const XnV3DVector& vImmediateVelocity, const XnV3DVector& vPreviousVelocity, XnFloat& fZAngle)
{
	// Check if current motion is too slow
	if (vImmediateVelocity.Magnitude() < m_fPushImmediateMinVelocity)
	{
		return false;
	}

	if (vPreviousVelocity.Magnitude() < m_fPushPreviousMinVelocity)
	{
		fZAngle = AngleBetweenVectors(vImmediateVelocity, XnV3DVector(0,0,-1));

		if (fZAngle < m_fPushMaxAngleFromZ)
		{
			xnLogVerbose(XNV_NITE_MASK_EVENTS,	"Push Detector %s [0x%08x]: "
												"Immediate Velocity %5.3f over threshold %5.3f in the last %d ms (%d ms offset), "
												"Previous  Velocity %5.3f under threshold %5.3f in the last %d ms (%d ms offset), "
												"Angle between Immediate and the Z Axis is %5.3f, under the threshold of %5.3f",
												GetListenerName(), this,
												vImmediateVelocity.Magnitude(), m_fPushImmediateMinVelocity, m_nPushImmediateDuration, m_nPushImmediateOffset,
												vPreviousVelocity.Magnitude(), m_fPushPreviousMinVelocity, m_nPushPreviousDuration, m_nPushPreviousOffset,
												fZAngle, m_fPushMaxAngleFromZ);
			return true;
		}
		return false;
	}

	XnFloat fAngle = AngleBetweenVectors(vPreviousVelocity, vImmediateVelocity);
	if (fAngle > m_fPushMinAngleImmediateAndPrevious)
	{
		fZAngle = AngleBetweenVectors(vImmediateVelocity, XnV3DVector(0,0,-1));
		if (fZAngle < m_fPushMaxAngleFromZ)
		{
			xnLogVerbose(XNV_NITE_MASK_EVENTS,	"Push Detector %s [0x%08x]: "
				"Immediate Velocity %5.3f over threshold %5.3f in the last %d ms (%d ms offset), "
				"Previous  Velocity %5.3f over threshold %5.3f in the last %d ms (%d ms offset), "
				"Angle between Immediate and the Z Axis is %5.3f, under the threshold of %5.3f, "
				"Angle between Immediate and Previous direction is %5.3f, over the threshold of %5.3f",
				GetListenerName(), this,
				vImmediateVelocity.Magnitude(), m_fPushImmediateMinVelocity, m_nPushImmediateDuration, m_nPushImmediateOffset,
				vPreviousVelocity.Magnitude(), m_fPushPreviousMinVelocity, m_nPushPreviousDuration, m_nPushPreviousOffset,
				fZAngle, m_fPushMaxAngleFromZ,
				fAngle, m_fPushMinAngleImmediateAndPrevious);
			return true;
		}
	}

	return false;
} // XnVPushDetector::IsPushDetected
开发者ID:DZW314,项目名称:NiTEControls,代码行数:49,代码来源:XnVPushDetector.cpp

示例7: XnDeviceManagerLoadAllDevices

XnStatus XnDeviceManagerLoadAllDevices(const XnChar* strDir)
{
	XnStatus nRetVal = XN_STATUS_OK;

	XnChar cpSearchString[XN_FILE_MAX_PATH] = "";

	if (strDir == NULL)
	{
		strDir = XN_FILE_LOCAL_DIR;
	}

	// Build the search pattern string
	XN_VALIDATE_STR_APPEND(cpSearchString, strDir, XN_FILE_MAX_PATH, nRetVal);
	XN_VALIDATE_STR_APPEND(cpSearchString, XN_FILE_DIR_SEP, XN_FILE_MAX_PATH, nRetVal);
	XN_VALIDATE_STR_APPEND(cpSearchString, XN_SHARED_LIBRARY_PREFIX, XN_FILE_MAX_PATH, nRetVal);
	XN_VALIDATE_STR_APPEND(cpSearchString, XN_DEVICE_FILE_PREFIX, XN_FILE_MAX_PATH, nRetVal);
	XN_VALIDATE_STR_APPEND(cpSearchString, XN_FILE_ALL_WILDCARD, XN_FILE_MAX_PATH, nRetVal);
	XN_VALIDATE_STR_APPEND(cpSearchString, XN_SHARED_LIBRARY_POSTFIX, XN_FILE_MAX_PATH, nRetVal);

	// Get a file list of Xiron devices
	XnChar acsFileList[XN_DEVICE_MANAGER_MAX_NUMBER_OF_DEVICES][XN_FILE_MAX_PATH];
	XnUInt32 nFileCount = 0;

	xnLogVerbose(XN_MASK_DEVICE_MANAGER, "Searching for %s...", cpSearchString);
	nRetVal = xnOSGetFileList(cpSearchString, NULL, acsFileList, XN_DEVICE_MANAGER_MAX_NUMBER_OF_DEVICES, &nFileCount);
	if ((nRetVal != XN_STATUS_OS_FILE_NOT_FOUND) && (nRetVal != XN_STATUS_OK))
	{
		return (nRetVal);
	}

	// now try to load each file
	for (XnUInt32 nIndex = 0; nIndex < nFileCount; ++nIndex)
	{
		xnLogVerbose(XN_MASK_DEVICE_MANAGER, "Trying to load a device '%s'...", acsFileList[nIndex]);
		nRetVal = XnDeviceManagerLoadDevice(acsFileList[nIndex], &g_pDeviceManager->aDevices[g_pDeviceManager->nDevicesCount]);
		if (nRetVal != XN_STATUS_OK)
		{
			xnLogWarning(XN_MASK_DEVICE_MANAGER, "'%s' is not a valid device: %s", acsFileList[nIndex], xnGetStatusString(nRetVal));
		}
		else
		{
			xnLogInfo(XN_MASK_DEVICE_MANAGER, "device '%s' loaded.", acsFileList[nIndex]);
			g_pDeviceManager->nDevicesCount++;
		}
	}

	return (XN_STATUS_OK);
}
开发者ID:0pascal0,项目名称:SensorKinect,代码行数:48,代码来源:XnDeviceManager.cpp

示例8: xnLogVerbose

XnVideoStream::~XnVideoStream()
{
	xnLogVerbose(XN_MASK_FILTER, "Destroying pin...");
	CAutoLock cAutoLock(m_pFilter->pStateLock());
	m_imageGen.Release();
	xnFPSFree(&m_FPS);
}
开发者ID:Wessi,项目名称:OpenNI,代码行数:7,代码来源:XnVideoStream.cpp

示例9: xnLogVerbose

void XnVFlowRouter::OpenNewSession()
{
	if (m_pActive == NULL)
	{
		return;
	}

	xnLogVerbose(XNV_NITE_MASK_CONNECT, "Router %s [0x%08x]: Connecting %s [0x%08x] as active",
		GetListenerName(), this, m_pActive->GetListenerName(), m_pActive);

	XnVMultipleHands newHands;

	XnVMultipleHands* pLocalHands;
	XnValue value;
	m_pProperties->Get(FR_PROPERTY_HANDS, value);
	pLocalHands = (XnVMultipleHands*)value;

	// Create a Multiple Hands object with the same hands, indicating all of them are new
	pLocalHands->Clone(newHands);
	newHands.ClearLists();
	for (XnVMultipleHands::Iterator iter = newHands.begin(); iter != newHands.end(); ++iter)
	{
		newHands.MarkActive((*iter)->nID);
		newHands.MarkNew((*iter)->nID);
	}

	// Send an Activation Message
	XnVActivationMessage activate(true);
	m_pActive->BaseUpdate(&activate);

	// Send the 'all-new' Point Message to to listener that's being activated
	XnVPointMessage pointMessage(&newHands);
	m_pActive->BaseUpdate(&pointMessage);
} // XnVFlowRouter::OpenNewSession
开发者ID:DZW314,项目名称:NiTEControls,代码行数:34,代码来源:XnVFlowRouter.cpp

示例10: local

XnVMessageListener::~XnVMessageListener()
{
	if (m_bInternalThreadAlive)
	{
		XnAutoCSLocker local(m_hListenerCS);

		m_bInternalThreadKill = true;
		XnStatus rc = xnOSWaitForThreadExit(m_hActivityThread, 1000);
		if (rc != XN_STATUS_OK)
		{
			xnOSTerminateThread(&m_hActivityThread);
		}
		else
		{
			xnOSCloseThread(&m_hActivityThread);
		}
	}

	xnLogVerbose(XNV_NITE_MASK_CREATE, "Listener %s [0x%08x]: Destroy", m_strListenerName, this);

	XnVMessageListener::ClearQueue();

	if (m_strListenerName != NULL)
	{
		xnOSFree(m_strListenerName);
	}
	XN_DELETE(m_pMessageQueue);
	XN_DELETE(m_pUpdateCBs);
	XN_DELETE(m_pActivateCBs);
	XN_DELETE(m_pDeactivateCBs);
	xnOSCloseCriticalSection(&m_hListenerCS);
} // XnVMessageListener::~XnVMessageListener
开发者ID:DZW314,项目名称:NiTEControls,代码行数:32,代码来源:XnVMessageListener.cpp

示例11: m_bInternalThreadAlive

XnVMessageListener::XnVMessageListener(const XnChar* strName) :
	m_bInternalThreadAlive(false),
	m_bInternalThreadKill(false),
	m_bThreadProtectionQueueMode(false)
{
	xnLogVerbose(XNV_NITE_MASK_CREATE, "Listener %s [0x%08x]: Create", strName, this);

	xnOSCreateCriticalSection(&m_hListenerCS);

	SetCurrentThread();
	m_bThreadProtectionQueueMode = false;

	m_strListenerName = (XnChar*)xnOSCalloc(strlen(strName)+1, sizeof(XnChar));
	if (m_strListenerName != NULL)
	{
		xnOSStrCopy(m_strListenerName, strName, strlen(strName)+1);
	}

	m_pMessageQueue = XN_NEW(XnVMessageQueue);
	m_pMessageQueue->Init();

	m_pUpdateCBs = XN_NEW(XnVMessageSpecificEvent);
	m_pActivateCBs = XN_NEW(XnVEvent);
	m_pDeactivateCBs = XN_NEW(XnVEvent);
} // XnVMessageListener::XnVMessageListener
开发者ID:DZW314,项目名称:NiTEControls,代码行数:25,代码来源:XnVMessageListener.cpp

示例12: xnLogVerbose

XnStatus XnDeviceBase::CloseAllStreams()
{
	XnStatus nRetVal = XN_STATUS_OK;

	xnLogVerbose(XN_MASK_DDK, "Closing all streams...");

	// go over modules list, and look for closed streams
	for (XnStringsHash::Iterator it = m_Modules.begin(); it != m_Modules.end(); ++it)
	{
		XnDeviceModuleHolder* pModuleHolder = (XnDeviceModuleHolder*)it.Value();
		if (IsStream(pModuleHolder->GetModule()))
		{
			XnDeviceStream* pStream = (XnDeviceStream*)pModuleHolder->GetModule();
			if (pStream->IsOpen())
			{
				nRetVal = pStream->Close();
				XN_IS_STATUS_OK(nRetVal);
			}
		}
	}

	xnLogInfo(XN_MASK_DDK, "All streams are closed.");

	return XN_STATUS_OK;
}
开发者ID:0pascal0,项目名称:SensorKinect,代码行数:25,代码来源:XnDeviceBase.cpp

示例13: xnLogInfo

XnStatus XnDeviceBase::DestroyStream(const XnChar* StreamName)
{
	XnStatus nRetVal = XN_STATUS_OK;

	xnLogInfo(XN_MASK_DDK, "Destroying stream '%s'...", StreamName);

	// keep the stream name (we now delete the module, so the name will be lost)
	XnChar strStreamName[XN_DEVICE_MAX_STRING_LENGTH];
	strncpy(strStreamName, StreamName, XN_DEVICE_MAX_STRING_LENGTH);

	// Find the stream
	XnDeviceModuleHolder* pStreamHolder;
	nRetVal = FindStream(strStreamName, &pStreamHolder);
	XN_IS_STATUS_OK(nRetVal);

	// remove it from map
	nRetVal = RemoveModule(strStreamName);
	XN_IS_STATUS_OK(nRetVal);

	// and free it's memory
	DestroyStreamModule(pStreamHolder);

	// free memory of registered properties to this stream
	FreeModuleRegisteredProperties(StreamName);

	// raise event
	m_OnStreamsChangeEvent.Raise(GetDeviceHandle(), strStreamName, XN_DEVICE_STREAM_DELETED);

	xnLogVerbose(XN_MASK_DDK, "'%s' stream destroyed.", strStreamName);

	return XN_STATUS_OK;
}
开发者ID:0pascal0,项目名称:SensorKinect,代码行数:32,代码来源:XnDeviceBase.cpp

示例14: while

XnStatus XnIONetworkStream::ReadData(XnUChar *pData, XnUInt32 nDataSize)
{
    XnStatus nRetVal = XN_STATUS_OK;

    XnUInt32 nTotalRead = 0;

    // read until we get all the data we want
    while (nTotalRead < nDataSize)
    {
        XnUInt32 nReadSize = nDataSize - nTotalRead;
        nRetVal = xnOSReceiveNetworkBuffer(m_hSocket, (XnChar*)(pData + nTotalRead), &nReadSize, m_nReadTimeout);
        if (nRetVal != XN_STATUS_OK)
        {
            if (nRetVal == XN_STATUS_OS_NETWORK_CONNECTION_CLOSED)
            {
                xnLogVerbose(XN_MASK_IO_NET_STREAM, "Network connection was closed gracefully");
                m_bIsConnected = FALSE;
            }
            else if (nRetVal != XN_STATUS_OS_NETWORK_TIMEOUT)
            {
                xnLogError(XN_MASK_IO_NET_STREAM, "Got an error while reading network buffer: %s", xnGetStatusString(nRetVal));
                m_bIsConnected = FALSE;
            }
            return (nRetVal);
        }

        nTotalRead += nReadSize;
    }

    return (XN_STATUS_OK);
}
开发者ID:RobertNickens,项目名称:OpenNI2,代码行数:31,代码来源:XnIONetworkStream.cpp

示例15: GetName

XnStatus XnDeviceModule::LoadConfigFromFile(const XnChar* csINIFilePath, const XnChar* strSectionName /* = NULL */)
{
	XnStatus nRetVal = XN_STATUS_OK;

	if (strSectionName == NULL)
	{
		strSectionName = GetName();
	}

	xnLogVerbose(XN_MASK_DDK, "Configuring module '%s' from section '%s' in file '%s'...", GetName(), strSectionName, csINIFilePath);

	for (XnPropertiesHash::Iterator it = m_Properties.Begin(); it != m_Properties.End(); ++it)
	{
		XnProperty* pProp = it->Value();

		// only read writable properties
		if (!pProp->IsReadOnly())
		{
			nRetVal = pProp->ReadValueFromFile(csINIFilePath, strSectionName);
			XN_IS_STATUS_OK(nRetVal);
		}
	}

	xnLogInfo(XN_MASK_DDK, "Module '%s' configuration was loaded from file.", GetName());

	return (XN_STATUS_OK);
}
开发者ID:DogfishLab88,项目名称:debian-openni-sensor-avin2-sensorkinect,代码行数:27,代码来源:XnDeviceModule.cpp


注:本文中的xnLogVerbose函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。