public BaseConnectors(Program program, WicoBlockMaster wbm, WicoIGC wicoIGC, WicoElapsedTime wicoElapsedTime)
            {
                _program         = program;
                _wicoBlockMaster = wbm;
                _wicoIGC         = wicoIGC;
                _wicoElapsedTime = wicoElapsedTime;

                _program.moduleName += " Base Connectors";
                _program.moduleList += "\nBase Connectors V4.0";

                _program.AddUpdateHandler(UpdateHandler);
                _program.AddTriggerHandler(ProcessTrigger);
                _program.AddLoadHandler(LoadHandler);
                _program.AddSaveHandler(SaveHandler);
                _program.AddPostInitHandler(PostInitHandler);
//                _program.AddResetMotionHandler(ResetMotionHandler);

                _wicoBlockMaster.AddLocalBlockChangedHandler(LocalGridChangedHandler);
                _wicoBlockMaster.AddLocalBlockHandler(BlockParseHandler);

//                _program._CustomDataIni.Get(sBaseSection, "BaseTransmitWait").ToDouble(dBaseTransmitWait);
//                _program._CustomDataIni.Set(sBaseSection, "BaseTransmitWait", dBaseTransmitWait);

                _wicoIGC.AddPublicHandler("BASE?", BroadcastHandler);
                _wicoIGC.AddPublicHandler("CON?", BroadcastHandler);
                _wicoIGC.AddPublicHandler("COND?", BroadcastHandler);

                // wicoControl.AddModeInitHandler(ModeInitHandler);
                // wicoControl.AddControlChangeHandler(ModeChangeHandler);

                _wicoElapsedTime.AddTimer(_BaseTransmit, 55, BaseTransmitTimerHandler);
                _wicoElapsedTime.StartTimer(_BaseTransmit);
            }
Exemplo n.º 2
0
            public Displays(Program program, WicoBlockMaster wicoBlockMaster, WicoElapsedTime wicoElapsedTime)
            {
                _program         = program;
                _wicoBlockMaster = wicoBlockMaster;
                _wicoElapsedTime = wicoElapsedTime;

                _wicoBlockMaster.AddLocalBlockHandler(BlockParseHandler);
                _wicoBlockMaster.AddLocalBlockChangedHandler(LocalGridChangedHandler);

                _program.AddPostInitHandler(PostInitHandler());

                _wicoElapsedTime.AddTimer(DisplayCheckTimer, DisplayInterval, ElapsedTimerHandler);
                _wicoElapsedTime.StartTimer(DisplayCheckTimer);
            }