예제 #1
0
        public EquipmentState(EquipmentBase equipment)
        {
            Name = this.GetType().Name;
            Equipment = equipment;
            CustomActions = new List<CustomActionDelegate>();

            OnChangedState +=
                delegate(object sender, FALibrary.FAGenericEventArgs<EquipmentState> e)
                {
                    string oldStatusName = "Null";
                    if (e.Value != null)
                        oldStatusName = e.Value.Name;
                    Manager.LogManager.Instance.WriteTraceLog(Equipment, string.Format("Equipment State Change. {0} -> {1}", oldStatusName, this.Name));
                };
        }
 public SuspendState(EquipmentBase equipment)
     : base(equipment)
 {
     Name = "SuspendState";
 }
 public WarningState(EquipmentBase equipment)
     : base(equipment)
 {
     Name = "WarningState";
 }
 public RunState(EquipmentBase equipment)
     : base(equipment)
 {
     Name = "RunState";
 }
 public StopState(EquipmentBase equipment)
     : base(equipment)
 {
 }
 public PreStopState(EquipmentBase equipment)
     : base(equipment)
 {
     Name = "PreStopState";
 }
 public PreInitializeState(EquipmentBase equipment)
     : base(equipment)
 {
     Name = "PreInitializeState";
 }
 public PreEmergencyState(EquipmentBase equipment)
     : base(equipment)
 {
     Name = "PreEmergencyState";
 }
 public PreAlarmState(EquipmentBase equipment)
     : base(equipment)
 {
     Name = "PreAlarmState";
 }
 public EmergencyResetState(EquipmentBase equipment)
     : base(equipment)
 {
     Name = "EmergencyResetState";
 }