Beispiel #1
0
XnStatus XnServerSession::HandleSetIntProperty()
{
	XnStatus nRetVal = XN_STATUS_OK;

	// read it
	XnChar strModule[XN_DEVICE_MAX_STRING_LENGTH];
	XnChar strProp[XN_DEVICE_MAX_STRING_LENGTH];
	XnUInt64 nValue;
	nRetVal = m_privateIncomingPacker.ReadProperty(strModule, strProp, &nValue);
	XN_IS_STATUS_OK(nRetVal);

	XnStatus nActionResult = SetIntPropertyImpl(strModule, strProp, nValue);
	
	nRetVal = SendReply(XN_SENSOR_SERVER_MESSAGE_GENERAL_OP_RESPOND, nActionResult);
	XN_IS_STATUS_OK(nRetVal);

	return (XN_STATUS_OK);
}
XnStatus XnServerSession::HandleSetIntProperty()
{
	XnStatus nRetVal = XN_STATUS_OK;

	// read it
	XnChar strModule[XN_DEVICE_MAX_STRING_LENGTH];
	XnChar strProp[XN_DEVICE_MAX_STRING_LENGTH];
	XnUInt64 nValue;
	nRetVal = m_privateIncomingPacker.ReadProperty(strModule, strProp, &nValue);
	XN_IS_STATUS_OK(nRetVal);

	XnStatus nActionResult = SetIntPropertyImpl(strModule, strProp, nValue);
	if (nActionResult != XN_STATUS_OK)
	{
		xnLogWarning(XN_MASK_SENSOR_SERVER, "Client %u failed to set property '%s.%s': %s", m_nID, strModule, strProp, xnGetStatusString(nActionResult));
	}
	
	nRetVal = SendReply(XN_SENSOR_SERVER_MESSAGE_GENERAL_OP_RESPOND, nActionResult);
	XN_IS_STATUS_OK(nRetVal);

	return (XN_STATUS_OK);
}