Exemplo n.º 1
0
 public void RevisePortStatesTest01()
 {
     Lift02HOutput target = new Lift02HOutput(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 Lift02HOutput Create(int signature_i, Dictionary<int, string> value_dictionary)
        {
            Lift02HOutput lift02HOutput = new Lift02HOutput(signature_i);
            lift02HOutput.PortExplanation = value_dictionary;
            return lift02HOutput;

            // TODO: Edit factory method of Lift02HOutput
            // 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.
        }
Exemplo n.º 3
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.º 4
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);
        }
Exemplo n.º 5
0
 public Lift02HOutput ConstructorTest(int signature)
 {
     Lift02HOutput target = new Lift02HOutput(signature);
     return target;
     // TODO: 将断言添加到 方法 Lift02HOutputTest.ConstructorTest(Int32)
 }