예제 #1
0
XnStatus XnServerSession::HandleSetRealProperty()
{
	XnStatus nRetVal = XN_STATUS_OK;

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

	XnStatus nActionResult = SetRealPropertyImpl(strModule, strProp, dValue);

	nRetVal = SendReply(XN_SENSOR_SERVER_MESSAGE_GENERAL_OP_RESPOND, nActionResult);
	XN_IS_STATUS_OK(nRetVal);

	return (XN_STATUS_OK);
}
예제 #2
0
XnStatus XnServerSession::HandleSetRealProperty()
{
	XnStatus nRetVal = XN_STATUS_OK;

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

	XnStatus nActionResult = SetRealPropertyImpl(strModule, strProp, dValue);
	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);
}