예제 #1
0
        public override void AccessDoor(string Token, bool UseExtendedTime, [System.Xml.Serialization.XmlIgnoreAttribute()] bool UseExtendedTimeSpecified, [System.Xml.Serialization.XmlElementAttribute(DataType = "duration")] string AccessTime, [System.Xml.Serialization.XmlElementAttribute(DataType = "duration")] string OpenTooLongTime, [System.Xml.Serialization.XmlElementAttribute(DataType = "duration")] string PreAlarmTime, AccessDoorExtension Extension)
        {
            TestSuitInit();
            int           timeOut;
            SoapException ex;

            StepType stepType = m_DoorServiceTest.AccessDoorTest(out ex, out timeOut, Token, UseExtendedTime, UseExtendedTimeSpecified, AccessTime, OpenTooLongTime, PreAlarmTime, Extension);

            StepTypeProcessing(stepType, ex, timeOut);
        }
예제 #2
0
 public abstract void AccessDoor(string Token, bool UseExtendedTime, [System.Xml.Serialization.XmlIgnoreAttribute()] bool UseExtendedTimeSpecified, [System.Xml.Serialization.XmlElementAttribute(DataType = "duration")] string AccessTime, [System.Xml.Serialization.XmlElementAttribute(DataType = "duration")] string OpenTooLongTime, [System.Xml.Serialization.XmlElementAttribute(DataType = "duration")] string PreAlarmTime, AccessDoorExtension Extension);
예제 #3
0
        //***************************************************************************************

        #region DoorControl

        internal StepType AccessDoorTest(out SoapException ex, out int Timeout, string Token, bool UseExtendedTime, bool UseExtendedTimeSpecified, string AccessTime, string OpenTooLongTime, string PreAlarmTime, AccessDoorExtension Extension)
        {
            StepType res = StepType.None;

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

            string tmpCommandName   = "AccessDoor";
            int    tmpCommandNumber = AccessDoor;

            //Get step list for command
            XmlNodeList m_testList = m_TestCommon.GetStepsForCommand(ServiceName + "." + tmpCommandName);

            if (m_testList.Count != 0)
            {
                //Get current step
                XmlNode test = m_testList[m_commandCount[tmpCommandNumber]];

                #region Analyze request

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

                //UseExtendedTime
                if (CommonCompare.Exist2("RequestParameters/UseExtendedTime", "UseExtendedTime", UseExtendedTimeSpecified, ref logMessage, ref passed, test))
                {
                    CommonCompare.StringCompare("RequestParameters/UseExtendedTime", "UseExtendedTime", UseExtendedTime.ToString(), ref logMessage, ref passed, test);
                }

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

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

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

                //Extension
                //TODO

                #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, tmpCommandNumber);
            }
            else
            {
                throw new SoapException("NO " + ServiceName + "." + tmpCommandName + " COMMAND IN SCRIPT", SoapException.ServerFaultCode);
            }
            return(res);
        }