public void RevisePortStatesTest01() { const int signature = 1; Lift02GInput target = new Lift02GInput(signature); long temp = (long)UInt32.MaxValue + 100; target.RevisePortStates(temp); Assert.IsFalse(target.PortStates[0]); }
public static Lift02GInput Create(int signature_i, Dictionary<int, string> value_dictionary) { Lift02GInput lift02GInput = new Lift02GInput(signature_i); lift02GInput.PortExplanation = value_dictionary; return lift02GInput; // TODO: Edit factory method of Lift02GInput // 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. }
/// <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); }
/// <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); }
public Lift02GInput ConstructorTest(int signature) { Lift02GInput target = new Lift02GInput(signature); return target; }