예제 #1
0
        internal StepType RelativeMoveTest(out SoapException ex, out int Timeout, string ProfileToken, PTZVector Translation, PTZSpeed Speed)
        {
            StepType res = StepType.None;

            Timeout = 0;
            ex      = null;
            bool   passed     = true;
            string logMessage = "";

            //Get step list for command
            XmlNodeList m_testList = m_TestCommon.GetStepsForCommand(string.Format("{0}.{1}", ServiceName, "RelativeMove"));

            if (m_testList != null)
            {
                //Get current step
                XmlNode test = m_testList[m_commandCount[RelativeMove]];

                #region Analyze request

                //ProfileToken
                CommonCompare.StringCompare("RequestParameters/ProfileToken", "ProfileToken", ProfileToken, ref logMessage, ref passed, test);

                //Translation
                CommonCompare.PTZPositionCompare("RequestParameters/Translation", "Translation", Translation, ref logMessage, ref passed, test);

                //Speed
                CommonCompare.PTZSpeedCompare("RequestParameters/Speed", "Speed", Speed, ref logMessage, ref passed, test);

                #endregion //Analyze request

                //Generate response
                res = m_TestCommon.GenerateResponseStepTypeVoid(test, out ex, out Timeout);

                //Log message
                m_TestCommon.writeToLog(test, logMessage, passed);

                Increment(m_testList.Count, RelativeMove);
            }
            else
            {
                res     = StepType.None;
                Timeout = 0;
                ex      = null;
                res     = StepType.None;
            }
            return(res);
        }