public void RevisePortStatesTest769()
 {
     LiftMainBoardOutput liftMainBoardOutput;
     liftMainBoardOutput = new LiftMainBoardOutput(int.MinValue);
     liftMainBoardOutput.PortExplanation = (Dictionary<int, string>)null;
     this.RevisePortStatesTest((LiftPort)liftMainBoardOutput, 0L);
 }
 public void RevisePortStatesTest01()
 {
     LiftMainBoardOutput target = new LiftMainBoardOutput(1);
     long code = 15;
     target.RevisePortStates(code);
     Assert.IsTrue(target.PortStates[0]);
     code = ((long)(UInt32.MaxValue) + 100);
     target.RevisePortStates(code);
     Assert.IsFalse(target.PortStates[0]);
 }
        public static LiftMainBoardOutput Create(int signature_i, Dictionary<int, string> value_dictionary)
        {
            LiftMainBoardOutput liftMainBoardOutput = new LiftMainBoardOutput(signature_i);
            liftMainBoardOutput.PortExplanation = value_dictionary;
            return liftMainBoardOutput;

            // TODO: Edit factory method of LiftMainBoardOutput
            // This method should be able to configure the object in all possible ways.
            // Add as many parameters as needed,
            // and assign their values to each field by using the API.
        }
 public LiftMainBoardOutput ConstructorTest(int signature)
 {
     LiftMainBoardOutput target = new LiftMainBoardOutput(signature);
     return target;
     // TODO: 将断言添加到 方法 LiftMainBoardOutputTest.ConstructorTest(Int32)
 }
Exemplo n.º 5
0
        /// <summary>
        /// 初始化函数
        /// 初始化为相应楼层电梯和故障数量
        /// </summary>
        /// <param name="floor">楼层</param>
        /// <param name="faultNum">故障数量</param>
        public LiftState(int floor, int faultNum)
        {
            if (floor > 64 || floor < 0)
                floor = 64;

            if (faultNum > 200 || faultNum < 0)
                faultNum = 30;
            //可变
            LiftFaultCode = new LiftCommonFault380[faultNum];
            //与楼层有关
            LiftFloor = floor;
            LiftInstrucion = new bool[floor];
            LiftUpCall = new bool[floor];
            LiftDownCall = new bool[floor];
            LiftFlatValue = new byte[floor];
            LiftHoistwaydata = new int[floor];
            LiftFloorDisplayCode = new string[floor];
            //固定值
            LiftParamter = new int[256];
            MainBoardInput = new LiftMainBoardInput(0);
            L02GInput = new Lift02GInput(0);
            L02HInput = new Lift02HInput(0);
            MainBoardOutput = new LiftMainBoardOutput(0);
            L02HOutput = new Lift02HOutput(0);
        }
Exemplo n.º 6
0
        /// <summary>
        /// 初始化函数 
        /// 默认48层
        /// </summary>
        public LiftState()
        {
            //可变
            LiftFaultCode = new LiftCommonFault380[30];
            //与楼层有关
            LiftFloor = 48;
            LiftInstrucion = new bool[48];
            LiftUpCall = new bool[48];
            LiftDownCall = new bool[48];
            LiftFlatValue = new byte[48];
            LiftHoistwaydata = new int[48];
            LiftFloorDisplayCode = new string[48];
            //固定值
            LiftParamter = new int[256];

            MainBoardInput = new LiftMainBoardInput(0);
            L02GInput = new Lift02GInput(0);
            L02HInput = new Lift02HInput(0);
            MainBoardOutput = new LiftMainBoardOutput(0);
            L02HOutput = new Lift02HOutput(0);
        }