Exemplo n.º 1
0
        object INIT_OnPush_0(Object __EventInfo__)

        {
            Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
            try
            {
                SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
                ushort I = 0;


                __context__.SourceCodeLine = 81;
                if (Functions.TestForTrue((Functions.BoolToInt(GetSymbolReferenceName() == "DEBUG"))))
                {
                    __context__.SourceCodeLine = 81;
                    MYBRIDGE.DebugOn           = (ushort)(1);
                }

                __context__.SourceCodeLine       = 82;
                MYBRIDGE.SymbolName              = ("P" + Functions.ItoA((int)(GetProgramNumber())) + ":" + GetSymbolInstanceName( )).ToString();
                __context__.SourceCodeLine       = 83;
                MYBRIDGE.FriendlyId              = (ushort)(SOURCE_NUM.Value);
                __context__.SourceCodeLine       = 84;
                MYBRIDGE.FriendlyName            = (SOURCE_NAME + Functions.ItoA((int)(SOURCE_NUM.Value))).ToString();
                __context__.SourceCodeLine       = 85;
                MYBRIDGE.AccessLevel             = (ushort)(ACCESS_LEVEL.Value);
                __context__.SourceCodeLine       = 86;
                MYBRIDGE.ReadAtBootup            = (READ_AT_BOOTUP).ToString();
                __context__.SourceCodeLine       = 87;
                MYBRIDGE.DefaultAudioSwitcherId  = (ushort)(AUDIO_SWITCHER.Value);
                __context__.SourceCodeLine       = 88;
                MYBRIDGE.DefaultAudioInputNumber = (ushort)(AUDIO_INPUT.Value);
                __context__.SourceCodeLine       = 89;
                MYBRIDGE.DefaultVideoSwitcherId  = (ushort)(VIDEO_SWITCHER.Value);
                __context__.SourceCodeLine       = 90;
                MYBRIDGE.DefaultVideoInputNumber = (ushort)(VIDEO_INPUT.Value);
                __context__.SourceCodeLine       = 92;
                MYBRIDGE.HandheldPageNum         = (ushort)(PD_Const.cHandheldInfoOnlyPage);
                __context__.SourceCodeLine       = 93;
                MYBRIDGE.NumListControls         = (ushort)(4);
                __context__.SourceCodeLine       = 95;
                MYBRIDGE.NumSerials              = (ushort)(4);
                __context__.SourceCodeLine       = 96;
                MYBRIDGE.NumListSerials          = (ushort)(4);
                __context__.SourceCodeLine       = 97;
                MYBRIDGE.NumQuickSerials         = (ushort)(4);
                __context__.SourceCodeLine       = 99;
                // RegisterEvent( MYBRIDGE , ONREFRESHINPUTSEVENT , HANDLEREFRESHCHANGE )
                try { g_criticalSection.Enter(); MYBRIDGE.OnRefreshInputsEvent += HANDLEREFRESHCHANGE; } finally { g_criticalSection.Leave(); }
                ;
                __context__.SourceCodeLine = 100;
                // RegisterEvent( MYBRIDGE , SETINUSECHANGE , HANDLEINUSECHANGE )
                try { g_criticalSection.Enter(); MYBRIDGE.SetInUseChange += HANDLEINUSECHANGE; } finally { g_criticalSection.Leave(); }
                ;
                __context__.SourceCodeLine = 102;
                MYBRIDGE.RegisterWithCore( );
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Exemplo n.º 2
0
        object INIT_OnPush_0(Object __EventInfo__)

        {
            Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
            try
            {
                SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
                ushort I = 0;


                __context__.SourceCodeLine = 108;
                if (Functions.TestForTrue((Functions.BoolToInt(GetSymbolReferenceName() == "DEBUG"))))
                {
                    __context__.SourceCodeLine = 108;
                    MYBRIDGE.DebugOn           = (ushort)(1);
                }

                __context__.SourceCodeLine       = 109;
                MYBRIDGE.SymbolName              = ("P" + Functions.ItoA((int)(GetProgramNumber())) + ":" + GetSymbolInstanceName( )).ToString();
                __context__.SourceCodeLine       = 110;
                MYBRIDGE.FriendlyId              = (ushort)(SOURCE_ID.Value);
                __context__.SourceCodeLine       = 111;
                MYBRIDGE.FriendlyName            = (SOURCE_NAME + Functions.ItoA((int)(SOURCE_ID.Value))).ToString();
                __context__.SourceCodeLine       = 112;
                MYBRIDGE.AccessLevel             = (ushort)(ACCESS_LEVEL.Value);
                __context__.SourceCodeLine       = 113;
                MYBRIDGE.ReadAtBootup            = (READ_AT_BOOTUP).ToString();
                __context__.SourceCodeLine       = 114;
                MYBRIDGE.DefaultAudioSwitcherId  = (ushort)(AUDIO_SWITCHER.Value);
                __context__.SourceCodeLine       = 115;
                MYBRIDGE.DefaultAudioInputNumber = (ushort)(AUDIO_INPUT.Value);
                __context__.SourceCodeLine       = 116;
                MYBRIDGE.DefaultVideoSwitcherId  = (ushort)(VIDEO_SWITCHER.Value);
                __context__.SourceCodeLine       = 117;
                MYBRIDGE.DefaultVideoInputNumber = (ushort)(VIDEO_INPUT.Value);
                __context__.SourceCodeLine       = 118;
                MYBRIDGE.HandheldPageNum         = (ushort)(PD_Const.cHandheldFullListPage);
                __context__.SourceCodeLine       = 120;
                MYBRIDGE.NumListDigitals         = (ushort)(50);
                __context__.SourceCodeLine       = 121;
                MYBRIDGE.NumListAnalogs          = (ushort)(50);
                __context__.SourceCodeLine       = 122;
                MYBRIDGE.NumListSerials          = (ushort)(50);
                __context__.SourceCodeLine       = 123;
                MYBRIDGE.NumQuickDigitals        = (ushort)(50);
                __context__.SourceCodeLine       = 124;
                MYBRIDGE.NumQuickAnalogs         = (ushort)(50);
                __context__.SourceCodeLine       = 125;
                MYBRIDGE.NumQuickSerials         = (ushort)(50);
                __context__.SourceCodeLine       = 127;
                // RegisterEvent( MYBRIDGE , ONREFRESHINPUTSEVENT , HANDLEREFRESHCHANGE )
                try { g_criticalSection.Enter(); MYBRIDGE.OnRefreshInputsEvent += HANDLEREFRESHCHANGE; } finally { g_criticalSection.Leave(); }
                ;
                __context__.SourceCodeLine = 128;
                // RegisterEvent( MYBRIDGE , SETINUSECHANGE , HANDLEINUSECHANGE )
                try { g_criticalSection.Enter(); MYBRIDGE.SetInUseChange += HANDLEINUSECHANGE; } finally { g_criticalSection.Leave(); }
                ;
                __context__.SourceCodeLine = 130;
                // RegisterEvent( MYBRIDGE , ONDIGITALOUTPUTCHANGE , HANDLEDIGITALOUTPUT )
                try { g_criticalSection.Enter(); MYBRIDGE.OnDigitalOutputChange += HANDLEDIGITALOUTPUT; } finally { g_criticalSection.Leave(); }
                ;
                __context__.SourceCodeLine = 132;
                // RegisterEvent( MYBRIDGE , SETQUICKCONTROLCHANGE , HANDLEQUICKCONTROLCHANGE )
                try { g_criticalSection.Enter(); MYBRIDGE.SetQuickControlChange += HANDLEQUICKCONTROLCHANGE; } finally { g_criticalSection.Leave(); }
                ;
                __context__.SourceCodeLine = 133;
                // RegisterEvent( MYBRIDGE , SETLISTDIGITALCONTROLCHANGE , HANDLELISTDIGITALCONTROLCHANGE )
                try { g_criticalSection.Enter(); MYBRIDGE.SetListDigitalControlChange += HANDLELISTDIGITALCONTROLCHANGE; } finally { g_criticalSection.Leave(); }
                ;
                __context__.SourceCodeLine = 135;
                ushort __FN_FORSTART_VAL__1 = (ushort)(300);
                ushort __FN_FOREND_VAL__1   = (ushort)1;
                int    __FN_FORSTEP_VAL__1  = (int)Functions.ToLongInteger(-(1));
                for (I = __FN_FORSTART_VAL__1; (__FN_FORSTEP_VAL__1 > 0)  ? ((I >= __FN_FORSTART_VAL__1) && (I <= __FN_FOREND_VAL__1)) : ((I <= __FN_FORSTART_VAL__1) && (I >= __FN_FOREND_VAL__1)); I += (ushort)__FN_FORSTEP_VAL__1)
                {
                    __context__.SourceCodeLine = 137;
                    if (Functions.TestForTrue((IsSignalDefined(D_OUT[I]))))
                    {
                        __context__.SourceCodeLine = 139;
                        GINUMDIGITALS = (ushort)(I);
                        __context__.SourceCodeLine = 140;
                        break;
                    }

                    __context__.SourceCodeLine = 135;
                }

                __context__.SourceCodeLine = 144;
                ushort __FN_FORSTART_VAL__2 = (ushort)(100);
                ushort __FN_FOREND_VAL__2   = (ushort)1;
                int    __FN_FORSTEP_VAL__2  = (int)Functions.ToLongInteger(-(1));
                for (I = __FN_FORSTART_VAL__2; (__FN_FORSTEP_VAL__2 > 0)  ? ((I >= __FN_FORSTART_VAL__2) && (I <= __FN_FOREND_VAL__2)) : ((I <= __FN_FORSTART_VAL__2) && (I >= __FN_FOREND_VAL__2)); I += (ushort)__FN_FORSTEP_VAL__2)
                {
                    __context__.SourceCodeLine = 146;
                    if (Functions.TestForTrue((IsSignalDefined(S_IN[I]))))
                    {
                        __context__.SourceCodeLine = 148;
                        GINUMSERIALS = (ushort)(I);
                        __context__.SourceCodeLine = 149;
                        break;
                    }

                    __context__.SourceCodeLine = 144;
                }

                __context__.SourceCodeLine = 153;
                MYBRIDGE.NumDigitals       = (ushort)(GINUMDIGITALS);
                __context__.SourceCodeLine = 154;
                MYBRIDGE.NumSerials        = (ushort)(GINUMSERIALS);
                __context__.SourceCodeLine = 156;
                MYBRIDGE.RegisterWithCore( );
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }