public static Message Update(this MessageUpdater updater, Dictionary <int, Message> dict, int key) { Message value = dict[key]; MessageUpdater.Update(ref value); return(dict[key]); }
/*#--------------------------------------------------------------------------#*/ /* Description: FiddleYardAppInit() * Constructor * * * Input(s) : * * Output(s) : * * Returns : * * Pre.Cond. : * * Post.Cond. : * * Notes : */ /*#--------------------------------------------------------------------------#*/ public FiddleYardAppInit(FiddleYardIOHandleVariables FYIOHandleVar, FiddleYardApplicationVariables FYAppVar, FiddleYardMip50 FYMIP50, FiddleYardTrainDetection FYTDT, Log2LoggingFile FiddleYardApplicationLogging) { m_FYIOHandleVar = FYIOHandleVar; m_FYAppVar = FYAppVar; m_FYMIP50 = FYMIP50; m_FYTDT = FYTDT; m_FYAppLog = FiddleYardApplicationLogging; FiddleYardInitStarted = new MessageUpdater(); State_Machine = State.Idle; Message Msg_uControllerReady = new Message("uControllerReady", " uControllerReady ", (name, log) => SetMessage(name, log)); // initialize and subscribe readback action, Message m_FYIOHandleVar.uControllerReady.Attach(Msg_uControllerReady); }
/*#--------------------------------------------------------------------------#*/ /* Description: FiddleYardAppInit() * Constructor * * * Input(s) : * * Output(s) : * * Returns : * * Pre.Cond. : * * Post.Cond. : * * Notes : */ /*#--------------------------------------------------------------------------#*/ public FiddleYardAppInit(iFiddleYardApplication iFYApp) { m_iFYApp = iFYApp; FiddleYardInitStarted = new MessageUpdater(); State_Machine = State.Idle; }
/*#--------------------------------------------------------------------------#*/ /* Description: FiddleYardIOHandle * Constructor * * * * Input(s) : * * Output(s) : * * Returns : * * Pre.Cond. : * * Post.Cond. : * * Notes : */ /*#--------------------------------------------------------------------------#*/ public FiddleYardIOHandle(int FYReceivingPort, bool FYSimulatorActive, iFiddleYardController iFYCtrl) { m_FYReceivingPort = FYReceivingPort; m_FYSimulatorActive = FYSimulatorActive; m_iFYCtrl = iFYCtrl; // connect to FYController interface, save interface in variable FYreceiver = new Receiver(m_FYReceivingPort); FYreceiver.Start(); #region Instantiate Sensors/Actuators TOP/BOT--------------------------------------------------------------------------------------- // Instantiate sensors TOP CL10Heart = new SensorUpdater(); F11 = new SensorUpdater(); EOS10 = new SensorUpdater(); EOS11 = new SensorUpdater(); F13 = new SensorUpdater(); F12 = new SensorUpdater(); Block5B = new SensorUpdater(); Block8A = new SensorUpdater(); TrackPowerTop = new SensorUpdater(); Block5BIn = new SensorUpdater(); Block6In = new SensorUpdater(); Block7In = new SensorUpdater(); ResistorTop = new SensorUpdater(); Track1Top = new SensorUpdater(); Track2Top = new SensorUpdater(); Track3Top = new SensorUpdater(); Track4Top = new SensorUpdater(); Track5Top = new SensorUpdater(); Track6Top = new SensorUpdater(); Track7Top = new SensorUpdater(); Track8Top = new SensorUpdater(); Track9Top = new SensorUpdater(); Track10Top = new SensorUpdater(); Track11Top = new SensorUpdater(); Block6 = new SensorUpdater(); Block7 = new SensorUpdater(); F10 = new SensorUpdater(); M10 = new SensorUpdater(); TrackNoTop = new SensorUpdater(); // Instantiate messages TOP FiddleOneLeftTop = new MessageUpdater(); FiddleOneRightTop = new MessageUpdater(); FiddleMultipleLeftTop = new MessageUpdater(); FiddleMultipleRightTop = new MessageUpdater(); TrainDetectionTop = new MessageUpdater(); TrainDriveOutFinishedTop = new MessageUpdater(); TrainDriveInFinishedTop = new MessageUpdater(); InitDoneTop = new MessageUpdater(); InitStartedTop = new MessageUpdater(); TrainOn5BTop = new MessageUpdater(); TrainDriveInStartTop = new MessageUpdater(); TrainOn8ATop = new MessageUpdater(); TrainDriveOutStartTop = new MessageUpdater(); //FiddleYardStartTop = new MessageUpdater(); --> moved to FYapplication //FiddleYardStoppedTop = new MessageUpdater(); --> moved to FYapplication FiddleYardResetTop = new MessageUpdater(); OccfromBlock6Top = new MessageUpdater(); SensorF12HighTop = new MessageUpdater(); OccfromBlock6AndSensorF12Top = new MessageUpdater(); TrainDriveInFailedF12Top = new MessageUpdater(); LastTrackTop = new MessageUpdater(); UniversalErrorTop = new MessageUpdater(); CollectFinishedFYFullTop = new MessageUpdater(); CollectOnTop = new MessageUpdater(); CollectOffTop = new MessageUpdater(); TrainDriveOutCancelledTop = new MessageUpdater(); TargetAliveTop = new MessageUpdater(); // Instantiate sensors BOT CL20Heart = new SensorUpdater(); F21 = new SensorUpdater(); EOS20 = new SensorUpdater(); EOS21 = new SensorUpdater(); F23 = new SensorUpdater(); F22 = new SensorUpdater(); Block16B = new SensorUpdater(); Block19A = new SensorUpdater(); TrackPowerBot = new SensorUpdater(); Block16BIn = new SensorUpdater(); Block17In = new SensorUpdater(); Block18In = new SensorUpdater(); ResistorBot = new SensorUpdater(); Track1Bot = new SensorUpdater(); Track2Bot = new SensorUpdater(); Track3Bot = new SensorUpdater(); Track4Bot = new SensorUpdater(); Track5Bot = new SensorUpdater(); Track6Bot = new SensorUpdater(); Track7Bot = new SensorUpdater(); Track8Bot = new SensorUpdater(); Track9Bot = new SensorUpdater(); Track10Bot = new SensorUpdater(); Track11Bot = new SensorUpdater(); Block17 = new SensorUpdater(); Block18 = new SensorUpdater(); F20 = new SensorUpdater(); M20 = new SensorUpdater(); TrackNoBot = new SensorUpdater(); // Instantiate messages BOT FiddleOneLeftBot = new MessageUpdater(); FiddleOneRightBot = new MessageUpdater(); FiddleMultipleLeftBot = new MessageUpdater(); FiddleMultipleRightBot = new MessageUpdater(); TrainDetectionBot = new MessageUpdater(); TrainDriveOutFinishedBot = new MessageUpdater(); TrainDriveInFinishedBot = new MessageUpdater(); InitDoneBot = new MessageUpdater(); InitStartedBot = new MessageUpdater(); TrainOn5BBot = new MessageUpdater(); TrainDriveInStartBot = new MessageUpdater(); TrainOn8ABot = new MessageUpdater(); TrainDriveOutStartBot = new MessageUpdater(); FiddleYardSoftStartBot = new MessageUpdater(); FiddleYardStoppedBot = new MessageUpdater(); FiddleYardResetBot = new MessageUpdater(); OccfromBlock6Bot = new MessageUpdater(); SensorF12HighBot = new MessageUpdater(); OccfromBlock6AndSensorF12Bot = new MessageUpdater(); TrainDriveInFailedF12Bot = new MessageUpdater(); LastTrackBot = new MessageUpdater(); UniversalErrorBot = new MessageUpdater(); CollectFinishedFYFullBot = new MessageUpdater(); CollectOnBot = new MessageUpdater(); CollectOffBot = new MessageUpdater(); TrainDriveOutCancelledBot = new MessageUpdater(); TargetAliveBot = new MessageUpdater(); // Instantiate sensors TOP/BOT TrackPower15V = new SensorUpdater(); #endregion Instantiate Sensors/Actuators TOP/BOT--------------------------------------------------------------------------------------- }
public MessageUpdater uControllerReady; // ready for next command, C# has to assume ucontroller is busy after sending a command #endregion Fields #region Constructors //public MessageUpdater EndOffStroke11Assert; //public MessageUpdater EndOffStroke10Assert; //public MessageUpdater FiddleYardMoveAndF12Assert; //public MessageUpdater FiddleYardMoveAndF13Assert; /*#--------------------------------------------------------------------------#*/ /* Description: FiddleYardVariables constructor * * Input(s) : * * Output(s) : * * Returns : * * Pre.Cond. : * * Post.Cond. : * * Notes : * */ /*#--------------------------------------------------------------------------#*/ public FiddleYardIOHandleVariables() { CL10Heart = new SensorUpdater(); F11 = new SensorUpdater(); EOS10 = new SensorUpdater(); EOS11 = new SensorUpdater(); F13 = new SensorUpdater(); F12 = new SensorUpdater(); Block5B = new SensorUpdater(); Block8A = new SensorUpdater(); TrackPower = new SensorUpdater(); Block5BIn = new SensorUpdater(); Block6In = new SensorUpdater(); Block7In = new SensorUpdater(); Resistor = new SensorUpdater(); Block6 = new SensorUpdater(); Block7 = new SensorUpdater(); F10 = new SensorUpdater(); M10 = new SensorUpdater(); TrackNo = new SensorUpdater(); TrackPower15V = new SensorUpdater(); CmdBusy = new SensorUpdater(); Mip50Rec = new SensorUpdater(); // Instantiate messages //FiddleOneLeft = new MessageUpdater(); //FiddleOneRight = new MessageUpdater(); //FiddleMultipleLeft = new MessageUpdater(); //FiddleMultipleRight = new MessageUpdater(); //TrainDetection = new MessageUpdater(); //TrainOn5B = new MessageUpdater(); //TrainOn8A = new MessageUpdater(); FiddleYardReset = new MessageUpdater(); //OccfromBlock6 = new MessageUpdater(); //SensorF12High = new MessageUpdater(); //OccfromBlock6AndSensorF12 = new MessageUpdater(); //LastTrack = new MessageUpdater(); //UniversalError = new MessageUpdater(); uControllerReady = new MessageUpdater(); TrackPower15VDown = new MessageUpdater(); //EndOffStroke11Assert = new MessageUpdater(); //EndOffStroke10Assert = new MessageUpdater(); //FiddleYardMoveAndF12Assert = new MessageUpdater(); //FiddleYardMoveAndF13Assert = new MessageUpdater(); }
private FiddleYardIOHandleVariables m_FYIOHandleVar; // connect variable to connect to FYIOH class for defined variables #endregion Fields #region Constructors /*#--------------------------------------------------------------------------#*/ /* Description: FiddleYardVariables constructor * * Input(s) : * * Output(s) : * * Returns : * * Pre.Cond. : * * Post.Cond. : * * Notes : * */ /*#--------------------------------------------------------------------------#*/ public FiddleYardApplicationVariables(FiddleYardIOHandleVariables FYIOHandleVar) { m_FYIOHandleVar = FYIOHandleVar; // Instantiate Commands from FYFORM CmdFiddleOneLeft = new CommandUpdater(); CmdFiddleOneRight = new CommandUpdater(); CmdCouple = new CommandUpdater(); CmdUncouple = new CommandUpdater(); CmdFiddleGo1 = new CommandUpdater(); CmdFiddleGo2 = new CommandUpdater(); CmdFiddleGo3 = new CommandUpdater(); CmdFiddleGo4 = new CommandUpdater(); CmdFiddleGo5 = new CommandUpdater(); CmdFiddleGo6 = new CommandUpdater(); CmdFiddleGo7 = new CommandUpdater(); CmdFiddleGo8 = new CommandUpdater(); CmdFiddleGo9 = new CommandUpdater(); CmdFiddleGo10 = new CommandUpdater(); CmdFiddleGo11 = new CommandUpdater(); CmdTrainDetect = new CommandUpdater(); CmdFYStart = new CommandUpdater(); CmdFYStop = new CommandUpdater(); CmdReset = new CommandUpdater(); CmdOcc5BOnTrue = new CommandUpdater(); CmdOcc5BOnFalse = new CommandUpdater(); CmdOcc6OnTrue = new CommandUpdater(); CmdOcc6OnFalse = new CommandUpdater(); CmdOcc7OnTrue = new CommandUpdater(); CmdOcc7OnFalse = new CommandUpdater(); CmdCollect = new CommandUpdater(); CmdHomeFY = new CommandUpdater(); // Instantiate actuators for sending command out to the target or simulator FiddleOneLeft = new ActuatorUpdater(); FiddleOneRight = new ActuatorUpdater(); Couple = new ActuatorUpdater(); Uncouple = new ActuatorUpdater(); //FiddleGo1 = new ActuatorUpdater(); //FiddleGo2 = new ActuatorUpdater(); //FiddleGo3 = new ActuatorUpdater(); //FiddleGo4 = new ActuatorUpdater(); //FiddleGo5 = new ActuatorUpdater(); //FiddleGo6 = new ActuatorUpdater(); //FiddleGo7 = new ActuatorUpdater(); //FiddleGo8 = new ActuatorUpdater(); //FiddleGo9 = new ActuatorUpdater(); //FiddleGo10 = new ActuatorUpdater(); //FiddleGo11 = new ActuatorUpdater(); TrainDetect = new ActuatorUpdater(); FYStart = new ActuatorUpdater(); FYStop = new ActuatorUpdater(); Reset = new ActuatorUpdater(); Occ5BOnTrue = new ActuatorUpdater(); Occ5BOnFalse = new ActuatorUpdater(); Occ6OnTrue = new ActuatorUpdater(); Occ6OnFalse = new ActuatorUpdater(); Occ7OnTrue = new ActuatorUpdater(); Occ7OnFalse = new ActuatorUpdater(); HomeFY = new ActuatorUpdater(); Collect = new ActuatorUpdater(); CL10Heart = new SensorUpdater(); F11 = new SensorUpdater(); EOS10 = new SensorUpdater(); EOS11 = new SensorUpdater(); F13 = new SensorUpdater(); F12 = new SensorUpdater(); Block5B = new SensorUpdater(); Block8A = new SensorUpdater(); TrackPower = new SensorUpdater(); Block5BIn = new SensorUpdater(); Block6In = new SensorUpdater(); Block7In = new SensorUpdater(); Resistor = new SensorUpdater(); // Trackx sensor is used internally in C#, not from target anymore Track1 = new SensorUpdater(); Track2 = new SensorUpdater(); Track3 = new SensorUpdater(); Track4 = new SensorUpdater(); Track5 = new SensorUpdater(); Track6 = new SensorUpdater(); Track7 = new SensorUpdater(); Track8 = new SensorUpdater(); Track9 = new SensorUpdater(); Track10 = new SensorUpdater(); Track11 = new SensorUpdater(); Block6 = new SensorUpdater(); Block7 = new SensorUpdater(); F10 = new SensorUpdater(); M10 = new SensorUpdater(); TrackNo = new SensorUpdater(); TrackPower15V = new SensorUpdater(); CmdBusy = new SensorUpdater(); TrainDriveOutPointer = new SensorUpdater(); ReceivedDataFromMip50 = new SensorUpdater(); FiddleYardStopped = new MessageUpdater(); FiddleYardStart = new MessageUpdater(); FiddleYardNotHomed = new MessageUpdater(); FiddleYardTrainObstruction = new MessageUpdater(); FiddleYardTrackAligned = new MessageUpdater(); TrainHasLeftFiddleYardSuccessfully = new MessageUpdater(); EMOPressed15VTrackPowerDown = new MessageUpdater(); EMOPressed15VTrackPowerUp = new MessageUpdater(); FiddleYardAutoModeStart = new MessageUpdater(); FiddleYardInit = new MessageUpdater(); FiddleYardAutoModeIsGoingToStop = new MessageUpdater(); FiddleYardReset = new MessageUpdater(); FiddleYardInitFinished = new MessageUpdater(); FiddleYardApplicationRunning = new MessageUpdater(); FiddleYardAutoModeIsStopped = new MessageUpdater(); CollectingTrainsEnabled = new MessageUpdater(); CollectingTrainsDisabled = new MessageUpdater(); FYNotHomed = new MessageUpdater(); TrainDetection = new MessageUpdater(); FiddleYardHomingFinished = new MessageUpdater(); TrainDetectionStarted = new MessageUpdater(); FormCollect = new CommandUpdater(); //Sensors Sensor Sns_CL_10_Heart = new Sensor("CL10Heart", " CL 10 Heart ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.CL10Heart.Attach(Sns_CL_10_Heart); Sensor Sns_F11 = new Sensor("F11", " F11 ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.F11.Attach(Sns_F11); Sensor Sns_EOS10 = new Sensor("EOS10", " EOS 10 ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.EOS10.Attach(Sns_EOS10); Sensor Sns_EOS11 = new Sensor("EOS11", " EOS 11 ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.EOS11.Attach(Sns_EOS11); Sensor Sns_F13 = new Sensor("F13", " F13 ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.F13.Attach(Sns_F13); Sensor Sns_F12 = new Sensor("F12", " F12 ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.F12.Attach(Sns_F12); Sensor Sns_Block5B = new Sensor("Block5B", " Occupied from 5B ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.Block5B.Attach(Sns_Block5B); Sensor Sns_Block8A = new Sensor("Block8A", " Occupied from 8A ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.Block8A.Attach(Sns_Block8A); Sensor Sns_TrackPower = new Sensor("TrackPower", " Enable Track ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.TrackPower.Attach(Sns_TrackPower); Sensor Sns_Block5BIn = new Sensor("Block5BIn", " Occupied to 5B ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.Block5BIn.Attach(Sns_Block5BIn); Sensor Sns_Block6In = new Sensor("Block6In", " Occupied to 6 ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.Block6In.Attach(Sns_Block6In); Sensor Sns_Block7In = new Sensor("Block7In", " Occupied to 7 ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.Block7In.Attach(Sns_Block7In); Sensor Sns_Resistor = new Sensor("Resistor", " Occupied Resistor ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.Resistor.Attach(Sns_Resistor); //Sensor Sns_Track1 = new Sensor("Track1", " Train On Fiddle Yard Track1 ", 0, (name, val, log) => UpdateTrainsOnFY(name, val, log)); // initialize and subscribe sensors //m_FYIOHandleVar.Track1.Attach(Sns_Track1); //Sensor Sns_Track2 = new Sensor("Track2", " Train On Fiddle Yard Track2 ", 0, (name, val, log) => UpdateTrainsOnFY(name, val, log)); // initialize and subscribe sensors //m_FYIOHandleVar.Track2.Attach(Sns_Track2); //Sensor Sns_Track3 = new Sensor("Track3", " Train On Fiddle Yard Track3 ", 0, (name, val, log) => UpdateTrainsOnFY(name, val, log)); // initialize and subscribe sensors //m_FYIOHandleVar.Track3.Attach(Sns_Track3); //Sensor Sns_Track4 = new Sensor("Track4", " Train On Fiddle Yard Track4 ", 0, (name, val, log) => UpdateTrainsOnFY(name, val, log)); // initialize and subscribe sensors //m_FYIOHandleVar.Track4.Attach(Sns_Track4); //Sensor Sns_Track5 = new Sensor("Track5", " Train On Fiddle Yard Track5 ", 0, (name, val, log) => UpdateTrainsOnFY(name, val, log)); // initialize and subscribe sensors //m_FYIOHandleVar.Track5.Attach(Sns_Track5); //Sensor Sns_Track6 = new Sensor("Track6", " Train On Fiddle Yard Track6 ", 0, (name, val, log) => UpdateTrainsOnFY(name, val, log)); // initialize and subscribe sensors //m_FYIOHandleVar.Track6.Attach(Sns_Track6); //Sensor Sns_Track7 = new Sensor("Track7", " Train On Fiddle Yard Track7 ", 0, (name, val, log) => UpdateTrainsOnFY(name, val, log)); // initialize and subscribe sensors //m_FYIOHandleVar.Track7.Attach(Sns_Track7); //Sensor Sns_Track8 = new Sensor("Track8", " Train On Fiddle Yard Track8 ", 0, (name, val, log) => UpdateTrainsOnFY(name, val, log)); // initialize and subscribe sensors //m_FYIOHandleVar.Track8.Attach(Sns_Track8); //Sensor Sns_Track9 = new Sensor("Track9", " Train On Fiddle Yard Track9 ", 0, (name, val, log) => UpdateTrainsOnFY(name, val, log)); // initialize and subscribe sensors //m_FYIOHandleVar.Track9.Attach(Sns_Track9); //Sensor Sns_Track10 = new Sensor("Track10", " Train On Fiddle Yard Track10 ", 0, (name, val, log) => UpdateTrainsOnFY(name, val, log)); // initialize and subscribe sensors //m_FYIOHandleVar.Track10.Attach(Sns_Track10); //Sensor Sns_Track11 = new Sensor("Track11", " Train On Fiddle Yard Track11 ", 0, (name, val, log) => UpdateTrainsOnFY(name, val, log)); // initialize and subscribe sensors //m_FYIOHandleVar.Track11.Attach(Sns_Track11); Sensor Sns_Block6 = new Sensor("Block6", " Occupied from 6 ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.Block6.Attach(Sns_Block6); Sensor Sns_Block7 = new Sensor("Block7", " Occupied from 7 ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.Block7.Attach(Sns_Block7); Sensor Sns_F10 = new Sensor("F10", " F10 ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.F10.Attach(Sns_F10); Sensor Sns_M10 = new Sensor("M10", " M10 ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.M10.Attach(Sns_M10); Sensor Sns_TrackNo = new Sensor("Track_No", " Track Nr ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.TrackNo.Attach(Sns_TrackNo); Sensor Sns_CmdBusy = new Sensor("CmdBusy", " uController busy ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.CmdBusy.Attach(Sns_CmdBusy); Sensor Sns_TrackPower15V = new Sensor("TrackPower15V", " 15V Track Power ", 0, (name, val, log) => SetLedIndicator(name, val, log)); // initialize and subscribe sensors m_FYIOHandleVar.TrackPower15V.Attach(Sns_TrackPower15V); Command Act_Collect = new Command(" Collect ", (name) => FormCmd(name)); // Catch Form command pass to subscribers CmdCollect.Attach(Act_Collect); Colorc Clr_FYTrackOccupiedColorSetting = new Colorc(Color.Transparent, "Clr_FYTrackOccupiedColorSetting", (NewColor, log) => SetColorIndicator(NewColor, log)); Siebwalde_Application.Properties.Settings.Default.SWSetColorTrainOccupied.Attach(Clr_FYTrackOccupiedColorSetting); Colorc Clr_FYTrackNotInitializedColorSetting = new Colorc(Color.Transparent, "Clr_FYTrackNotInitializedColorSetting", (NewColor, log) => SetColorIndicator(NewColor, log)); Siebwalde_Application.Properties.Settings.Default.SWSetColorTrackNotInitialized.Attach(Clr_FYTrackNotInitializedColorSetting); Colorc Clr_FYTrackNotActiveColorSetting = new Colorc(Color.Transparent, "Clr_FYTrackNotActiveColorSetting", (NewColor, log) => SetColorIndicator(NewColor, log)); Siebwalde_Application.Properties.Settings.Default.SWSetColorTrackNotActive.Attach(Clr_FYTrackNotActiveColorSetting); Colorc Clr_FYTrackDisabledColorSetting = new Colorc(Color.Transparent, "Clr_FYTrackDisabledColorSetting", (NewColor, log) => SetColorIndicator(NewColor, log)); Siebwalde_Application.Properties.Settings.Default.SWSetColorTrackDisabled.Attach(Clr_FYTrackDisabledColorSetting); Colorc Clr_FYTrackDisabledNotOccupiedColorSetting = new Colorc(Color.Transparent, "Clr_FYTrackDisabledNotOccupiedColorSetting", (NewColor, log) => SetColorIndicator(NewColor, log)); Siebwalde_Application.Properties.Settings.Default.SWSetColorTrackDisabledNotOccupied.Attach(Clr_FYTrackDisabledNotOccupiedColorSetting); for (int i = 1; i < 12; i++) { icheckBoxTrack[i] = 1; // Init all tracks disabled } FYHomed.BoolVariable = false; // Init variable }
/*#--------------------------------------------------------------------------#*/ /* Description: FiddleYardApplication constructor * * Input(s) : * * Output(s) : * * Returns : * * Pre.Cond. : * * Post.Cond. : * * Notes : * */ /*#--------------------------------------------------------------------------#*/ public FiddleYardApplication(string Instance, iFiddleYardController iFYCtrl) { m_instance = Instance; m_iFYCtrl = iFYCtrl; // Sub programs FYAppInit = new FiddleYardAppInit(this);//, iFYCtrl.GetFYFormTop); // Instantiate actuators for sending command out to the target or simulator FiddleOneLeft = new ActuatorUpdater(); FiddleOneRight = new ActuatorUpdater(); Couple = new ActuatorUpdater(); Uncouple = new ActuatorUpdater(); FiddleGo1 = new ActuatorUpdater(); FiddleGo2 = new ActuatorUpdater(); FiddleGo3 = new ActuatorUpdater(); FiddleGo4 = new ActuatorUpdater(); FiddleGo5 = new ActuatorUpdater(); FiddleGo6 = new ActuatorUpdater(); FiddleGo7 = new ActuatorUpdater(); FiddleGo8 = new ActuatorUpdater(); FiddleGo9 = new ActuatorUpdater(); FiddleGo10 = new ActuatorUpdater(); FiddleGo11 = new ActuatorUpdater(); TrainDetect = new ActuatorUpdater(); FYStart = new ActuatorUpdater(); FYStop = new ActuatorUpdater(); Reset = new ActuatorUpdater(); Occ5BOnTrue = new ActuatorUpdater(); Occ5BOnFalse = new ActuatorUpdater(); Occ6OnTrue = new ActuatorUpdater(); Occ6OnFalse = new ActuatorUpdater(); Occ7OnTrue = new ActuatorUpdater(); Occ7OnFalse = new ActuatorUpdater(); Recoverd = new ActuatorUpdater(); Collect = new ActuatorUpdater(); Track1 = new SensorUpdater(); Track2 = new SensorUpdater(); Track3 = new SensorUpdater(); Track4 = new SensorUpdater(); Track5 = new SensorUpdater(); Track6 = new SensorUpdater(); Track7 = new SensorUpdater(); Track8 = new SensorUpdater(); Track9 = new SensorUpdater(); Track10 = new SensorUpdater(); Track11 = new SensorUpdater(); FiddleYardStopped = new MessageUpdater(); FiddleYardStart = new MessageUpdater(); }