public static LiftMainBoardInput Create(long signature_l, Dictionary<int, string> value_dictionary) { LiftMainBoardInput liftMainBoardInput = new LiftMainBoardInput(signature_l); liftMainBoardInput.PortExplanation = value_dictionary; return liftMainBoardInput; // TODO: Edit factory method of LiftMainBoardInput // 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); }