object STARTSEARCH_OnPush_0(Object __EventInfo__)

        {
            Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
            try
            {
                SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
                CrestronString        SERVERIP;
                CrestronString        PORTNUM;
                CrestronString        DBNAME;
                CrestronString        NAMECOLUMN;
                CrestronString        USERNAME;
                CrestronString        USERPASS;
                CrestronString        NAMETOFIND;
                CrestronString        GOTBACK;
                SERVERIP   = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 20, this);
                PORTNUM    = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 6, this);
                DBNAME     = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 30, this);
                NAMECOLUMN = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 30, this);
                USERNAME   = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 80, this);
                USERPASS   = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 40, this);
                NAMETOFIND = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 100, this);
                GOTBACK    = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 1000, this);


                __context__.SourceCodeLine = 25;
                NAMETOFIND.UpdateValue(NAMETOQUERY);
                __context__.SourceCodeLine = 26;
                SERVERIP.UpdateValue(SERVERLOCATION);
                __context__.SourceCodeLine = 27;
                PORTNUM.UpdateValue(SERVERPORT);
                __context__.SourceCodeLine = 28;
                DBNAME.UpdateValue(SQL_DATABASE_NAME);
                __context__.SourceCodeLine = 29;
                NAMECOLUMN.UpdateValue(SQL_NAME_COLUMN);
                __context__.SourceCodeLine = 30;
                USERNAME.UpdateValue(SQL_USER_NAME);
                __context__.SourceCodeLine = 31;
                USERPASS.UpdateValue(SQL_USER_PASSWORD);
                __context__.SourceCodeLine = 33;
                try
                {
                    __context__.SourceCodeLine = 35;
                    GOTBACK.UpdateValue(MYSQLCONN.GetData(SERVERIP.ToString(), PORTNUM.ToString(), DBNAME.ToString(), NAMECOLUMN.ToString(), USERNAME.ToString(), USERPASS.ToString(), NAMETOFIND.ToString()));
                    __context__.SourceCodeLine = 36;
                    Trace("Returned Data = {0}", GOTBACK);
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);

                    __context__.SourceCodeLine = 40;
                    Trace("something broke");
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
        public override object FunctionMain(object __obj__)
        {
            try
            {
                SplusExecutionContext __context__ = SplusFunctionMainStartCode();

                __context__.SourceCodeLine = 277;
                WaitForInitializationComplete( );
                __context__.SourceCodeLine = 278;
                while (Functions.TestForTrue((1)))
                {
                    __context__.SourceCodeLine = 280;
                    try
                    {
                        __context__.SourceCodeLine = 282;
                        INITIALIZE(__context__);
                    }

                    catch (Exception __splus_exception__)
                    {
                        SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                    }

                    __context__.SourceCodeLine = 278;
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(); }
            return(__obj__);
        }
        object SAVE_CAMERA_PRESET_OnPush_1(Object __EventInfo__)

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

                __context__.SourceCodeLine = 208;
                try
                {
                    __context__.SourceCodeLine = 209;
                    Configuration.Obj.SaveCameraPreset((ushort)(CAMERA_NUMBER.Value), (ushort)((INDEX - 1)), CAMERA_PRESET_NAME_IN[INDEX].ToString());

                    __context__.SourceCodeLine = 210;
                    Configuration.Writer();
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                }

                __context__.SourceCodeLine = 211;
                ;
                __context__.SourceCodeLine = 212;
                PULLCONFIGURATION(__context__);
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Ejemplo n.º 4
0
        object FROMDEVICES_OnChange_1(Object __EventInfo__)

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

                __context__.SourceCodeLine = 233;
                try
                {
                    __context__.SourceCodeLine = 235;
                    while (Functions.TestForTrue((1)))
                    {
                        __context__.SourceCodeLine = 237;
                        TOCLIENT.UpdateValue(Functions.Gather("\r\n", FROMDEVICES));
                        __context__.SourceCodeLine = 235;
                    }
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
        object PULL_CONFIG_OnPush_0(Object __EventInfo__)

        {
            Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
            try
            {
                SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
                Configuration.Obj.PowerSequencerToArray();


                __context__.SourceCodeLine = 163;
                try
                {
                    __context__.SourceCodeLine = 164;
                    SEQUENCER_CH1_NAME.UpdateValue(Configuration.Obj.PowerSequencerArray [0].Channel_1_Name);
                    __context__.SourceCodeLine = 165;
                    SEQUENCER_CH2_NAME.UpdateValue(Configuration.Obj.PowerSequencerArray [0].Channel_2_Name);
                    __context__.SourceCodeLine = 166;
                    SEQUENCER_CH3_NAME.UpdateValue(Configuration.Obj.PowerSequencerArray [0].Channel_1_Name);
                    __context__.SourceCodeLine = 167;
                    SEQUENCER_CH4_NAME.UpdateValue(Configuration.Obj.PowerSequencerArray [0].Channel_1_Name);
                    __context__.SourceCodeLine = 168;
                    SEQUENCER_CH5_NAME.UpdateValue(Configuration.Obj.PowerSequencerArray [0].Channel_1_Name);
                    __context__.SourceCodeLine = 169;
                    SEQUENCER_CH6_NAME.UpdateValue(Configuration.Obj.PowerSequencerArray [0].Channel_1_Name);
                    __context__.SourceCodeLine = 170;
                    SEQUENCER_CH7_NAME.UpdateValue(Configuration.Obj.PowerSequencerArray [0].Channel_1_Name);
                    __context__.SourceCodeLine = 171;
                    SEQUENCER_CH8_NAME.UpdateValue(Configuration.Obj.PowerSequencerArray [0].Channel_1_Name);
                    __context__.SourceCodeLine = 172;
                    SEQUENCER_SSI_SEVERITY_MESSAGE.UpdateValue(Configuration.Obj.PowerSequencerArray [0].SSI_Equipment_Status.Severity_Message);
                    __context__.SourceCodeLine = 173;
                    SEQUENCER_SSI_ERROR_TEXT.UpdateValue(Configuration.Obj.PowerSequencerArray [0].SSI_Equipment_Status.Error_Text);
                    __context__.SourceCodeLine = 174;
                    SEQUENCER_SSI_OK_TEXT.UpdateValue(Configuration.Obj.PowerSequencerArray [0].SSI_Equipment_Status.Ok_Text);
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                }

                __context__.SourceCodeLine = 175;
                ;
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
        object PULL_CONFIG_OnPush_0(Object __EventInfo__)

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

                __context__.SourceCodeLine = 163;
                try
                {
                    __context__.SourceCodeLine = 164;
                    Configuration.Obj.DisplaysToArray();

                    __context__.SourceCodeLine = 165;
                    DISPLAY_NAME.UpdateValue(Configuration.Obj.DisplayArray [DISPLAY_NUMBER.Value].Name);
                    __context__.SourceCodeLine = 166;
                    DISPLAY_TYPE.UpdateValue(Configuration.Obj.DisplayArray [DISPLAY_NUMBER.Value].Type);
                    __context__.SourceCodeLine   = 167;
                    DISPLAY_SCREEN_ENABLED.Value = (ushort)(Configuration.Obj.DisplayArray[DISPLAY_NUMBER.Value].Screen_Enabled);
                    __context__.SourceCodeLine   = 168;
                    DISPLAY_SWITCHER_VALUE.Value = (ushort)(Configuration.Obj.DisplayArray[DISPLAY_NUMBER.Value].Switcher_Value);
                    __context__.SourceCodeLine   = 169;
                    DISPLAY_ICON_VALUE.Value     = (ushort)(Configuration.Obj.DisplayArray[DISPLAY_NUMBER.Value].Icon_Value);
                    __context__.SourceCodeLine   = 170;
                    DISPLAY_WARMING_TIME.Value   = (ushort)(Configuration.Obj.DisplayArray[DISPLAY_NUMBER.Value].Warming_Time);
                    __context__.SourceCodeLine   = 171;
                    DISPLAY_SSI_USAGE_NAME.UpdateValue(Configuration.Obj.DisplayArray [DISPLAY_NUMBER.Value].SSI_Display_Usage.Display_Name);
                    __context__.SourceCodeLine = 172;
                    DISPLAY_SSI_SEVERITY_MESSAGE.UpdateValue(Configuration.Obj.DisplayArray [DISPLAY_NUMBER.Value].SSI_Equipment_Status.Severity_Message);
                    __context__.SourceCodeLine = 173;
                    DISPLAY_SSI_ERROR_TEXT.UpdateValue(Configuration.Obj.DisplayArray [DISPLAY_NUMBER.Value].SSI_Equipment_Status.Error_Text);
                    __context__.SourceCodeLine = 174;
                    DISPLAY_SSI_OK_TEXT.UpdateValue(Configuration.Obj.DisplayArray [DISPLAY_NUMBER.Value].SSI_Equipment_Status.Ok_Text);
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                }

                __context__.SourceCodeLine = 175;
                ;
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Ejemplo n.º 7
0
        object PULL_CONFIG_OnPush_0(Object __EventInfo__)

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

                __context__.SourceCodeLine = 163;
                try
                {
                    __context__.SourceCodeLine = 164;
                    Configuration.Obj.PresentationToArray();

                    __context__.SourceCodeLine = 165;
                    PRESENTATION_NAME.UpdateValue(Configuration.Obj.PresentationInputArray [PRESENTATION_NUMBER.Value].Name);
                    __context__.SourceCodeLine = 166;
                    PRESENTATION_TYPE.UpdateValue(Configuration.Obj.PresentationInputArray [PRESENTATION_NUMBER.Value].Type);
                    __context__.SourceCodeLine = 167;
                    PRESENTATION_GENERIC_PAGE_TEXT.UpdateValue(Configuration.Obj.PresentationInputArray [PRESENTATION_NUMBER.Value].Generic_Page_Text);
                    __context__.SourceCodeLine        = 168;
                    PRESENTATION_SWITCHER_VALUE.Value = (ushort)(Configuration.Obj.PresentationInputArray[PRESENTATION_NUMBER.Value].Switcher_Value);
                    __context__.SourceCodeLine        = 169;
                    PRESENTATION_ICON_VALUE.Value     = (ushort)(Configuration.Obj.PresentationInputArray[PRESENTATION_NUMBER.Value].Icon_Value);
                    __context__.SourceCodeLine        = 170;
                    PRESENTATION_SSI_DEVICE_USAGE_TYPE.UpdateValue(Configuration.Obj.PresentationInputArray [PRESENTATION_NUMBER.Value].SSI_Device_Usage.Device_Type);
                    __context__.SourceCodeLine = 171;
                    PRESENTATION_SSI_DEVICE_USAGE_NAME.UpdateValue(Configuration.Obj.PresentationInputArray [PRESENTATION_NUMBER.Value].SSI_Device_Usage.Device_Name);
                    __context__.SourceCodeLine = 172;
                    PRESENTATION_SSI_SEVERITY_MESSAGE.UpdateValue(Configuration.Obj.PresentationInputArray [PRESENTATION_NUMBER.Value].SSI_Equipment_Status.Severity_Message);
                    __context__.SourceCodeLine = 173;
                    PRESENTATION_SSI_ERROR_TEXT.UpdateValue(Configuration.Obj.PresentationInputArray [PRESENTATION_NUMBER.Value].SSI_Equipment_Status.Error_Text);
                    __context__.SourceCodeLine = 174;
                    PRESENTATION_SSI_OK_TEXT.UpdateValue(Configuration.Obj.PresentationInputArray [PRESENTATION_NUMBER.Value].SSI_Equipment_Status.Ok_Text);
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                }

                __context__.SourceCodeLine = 175;
                ;
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
        object FROM_PROCESSOR__DOLLAR___OnChange_0(Object __EventInfo__)

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

                __context__.SourceCodeLine = 202;
                while (Functions.TestForTrue((1)))
                {
                    __context__.SourceCodeLine = 204;
                    try
                    {
                        __context__.SourceCodeLine = 206;
                        PARSEDMODULEMSG.UpdateValue(Functions.Gather(">", FROM_PROCESSOR__DOLLAR__));
                        __context__.SourceCodeLine = 208;
                        if (Functions.TestForTrue((CONTAINS(__context__, PARSEDMODULEMSG, FROM_PROCESSOR__DOLLAR__))))
                        {
                            __context__.SourceCodeLine = 209;
                            Functions.ClearBuffer(FROM_PROCESSOR__DOLLAR__);
                        }

                        __context__.SourceCodeLine = 211;
                        PROCESSPROCESSORMSG(__context__);
                    }

                    catch (Exception __splus_exception__)
                    {
                        SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);

                        __context__.SourceCodeLine = 215;
                        Print("Issue with Processor message handeling\r\n");
                    }

                    __context__.SourceCodeLine = 202;
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Ejemplo n.º 9
0
        object FROMMODULES_OnChange_2(Object __EventInfo__)

        {
            Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
            try
            {
                SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
                CrestronString        TEMPDATA;
                TEMPDATA = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 25, this);


                __context__.SourceCodeLine = 303;
                while (Functions.TestForTrue((1)))
                {
                    __context__.SourceCodeLine = 305;
                    try
                    {
                        __context__.SourceCodeLine = 307;
                        TEMPDATA.UpdateValue(Functions.Gather("\u000D\u000A", FROMMODULES));
                        __context__.SourceCodeLine = 308;
                        PROCESSMODULEDATA(__context__, TEMPDATA);
                        __context__.SourceCodeLine = 309;
                        TEMPDATA.UpdateValue("");
                    }

                    catch (Exception __splus_exception__)
                    {
                        SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);

                        __context__.SourceCodeLine = 313;
                        GenerateUserNotice("Somfy ILT3: fromDevice: Error: {0}", Functions.GetExceptionMessage(__splus_exceptionobj__));
                    }

                    __context__.SourceCodeLine = 303;
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
Ejemplo n.º 10
0
        object RX__DOLLAR___OnChange_12(Object __EventInfo__)

        {
            Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
            try
            {
                SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
                CrestronString        STEMP;
                STEMP = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 256, this);


                __context__.SourceCodeLine = 615;
                try
                {
                    __context__.SourceCodeLine = 617;
                    while (Functions.TestForTrue((1)))
                    {
                        __context__.SourceCodeLine = 619;
                        STEMP.UpdateValue(Functions.Gather("\u000D\u000A", RX__DOLLAR__));
                        __context__.SourceCodeLine = 620;
                        if (Functions.TestForTrue((Functions.BoolToInt(Functions.Length(STEMP) > 0))))
                        {
                            __context__.SourceCodeLine = 621;
                            PARSERESPONSE(__context__, STEMP);
                        }

                        __context__.SourceCodeLine = 617;
                    }
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
        object PULL_CONFIG_OnPush_0(Object __EventInfo__)

        {
            Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
            try
            {
                SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
                Configuration.Obj.Lighting.PresetToArray();


                __context__.SourceCodeLine = 164;
                try
                {
                    __context__.SourceCodeLine = 165;
                    LIGHTING_PRESET1_ID.UpdateValue(Configuration.Obj.Lighting.PresetsArray [0].Id);
                    __context__.SourceCodeLine = 166;
                    LIGHTING_PRESET1_NAME.UpdateValue(Configuration.Obj.Lighting.PresetsArray [0].Name);
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                }

                __context__.SourceCodeLine = 167;
                ;
                __context__.SourceCodeLine = 168;
                try
                {
                    __context__.SourceCodeLine = 169;
                    LIGHTING_PRESET2_ID.UpdateValue(Configuration.Obj.Lighting.PresetsArray [1].Id);
                    __context__.SourceCodeLine = 170;
                    LIGHTING_PRESET2_NAME.UpdateValue(Configuration.Obj.Lighting.PresetsArray [1].Name);
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                }

                __context__.SourceCodeLine = 171;
                ;
                __context__.SourceCodeLine = 172;
                try
                {
                    __context__.SourceCodeLine = 173;
                    LIGHTING_PRESET3_ID.UpdateValue(Configuration.Obj.Lighting.PresetsArray [2].Id);
                    __context__.SourceCodeLine = 174;
                    LIGHTING_PRESET3_NAME.UpdateValue(Configuration.Obj.Lighting.PresetsArray [2].Name);
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                }

                __context__.SourceCodeLine = 175;
                ;
                __context__.SourceCodeLine = 176;
                try
                {
                    __context__.SourceCodeLine = 177;
                    LIGHTING_PRESET4_ID.UpdateValue(Configuration.Obj.Lighting.PresetsArray [3].Id);
                    __context__.SourceCodeLine = 178;
                    LIGHTING_PRESET4_NAME.UpdateValue(Configuration.Obj.Lighting.PresetsArray [3].Name);
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                }

                __context__.SourceCodeLine = 179;
                ;
                __context__.SourceCodeLine = 180;
                try
                {
                    __context__.SourceCodeLine = 181;
                    LIGHTING_PRESET5_ID.UpdateValue(Configuration.Obj.Lighting.PresetsArray [4].Id);
                    __context__.SourceCodeLine = 182;
                    LIGHTING_PRESET5_NAME.UpdateValue(Configuration.Obj.Lighting.PresetsArray [4].Name);
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                }

                __context__.SourceCodeLine = 183;
                ;
                __context__.SourceCodeLine = 184;
                try
                {
                    __context__.SourceCodeLine = 185;
                    LIGHTING_PRESET6_ID.UpdateValue(Configuration.Obj.Lighting.PresetsArray [5].Id);
                    __context__.SourceCodeLine = 186;
                    LIGHTING_PRESET6_NAME.UpdateValue(Configuration.Obj.Lighting.PresetsArray [5].Name);
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                }

                __context__.SourceCodeLine = 187;
                ;
                __context__.SourceCodeLine = 188;
                LIGHTING_SSI_SEVERITY_MESSAGE.UpdateValue(Configuration.Obj.Lighting.SSI_Equipment_Status.Severity_Message);
                __context__.SourceCodeLine = 189;
                LIGHTING_SSI_ERROR_TEXT.UpdateValue(Configuration.Obj.Lighting.SSI_Equipment_Status.Error_Text);
                __context__.SourceCodeLine = 190;
                LIGHTING_SSI_OK_TEXT.UpdateValue(Configuration.Obj.Lighting.SSI_Equipment_Status.Ok_Text);
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }
        private void HANDLELOCALFILE(SplusExecutionContext __context__, CrestronString LOCALFILELOCATION)
        {
            ushort LASTEOL   = 0;
            ushort STEPCOUNT = 0;
            ushort X         = 0;
            ushort ROUND     = 0;

            short NFILEHANDLE = 0;
            short READERR     = 0;

            int POINTER = 0;

            CrestronString SEARCHING;

            CrestronString [] TEMPTEXT;
            CrestronString    SBUF;

            SEARCHING = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 100, this);
            SBUF      = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 4096, this);
            TEMPTEXT  = new CrestronString[51];
            for (uint i = 0; i < 51; i++)
            {
                TEMPTEXT [i] = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 4096, this);
            }


            __context__.SourceCodeLine = 163;
            StartFileOperations( );
            __context__.SourceCodeLine = 165;
            try
            {
                __context__.SourceCodeLine = 167;
                NFILEHANDLE = (short)(FileOpen(LOCALFILELOCATION, (ushort)Functions.BoolToInt((Functions.TestForTrue(0) || Functions.TestForTrue(32768)))));
                __context__.SourceCodeLine = 169;
                if (Functions.TestForTrue((Functions.BoolToInt(NFILEHANDLE >= 0))))
                {
                    __context__.SourceCodeLine = 171;
                    ROUND = (ushort)(1);
                    __context__.SourceCodeLine = 172;
                    POINTER = (int)(1);
                    __context__.SourceCodeLine = 174;
                    while (Functions.TestForTrue((Functions.BoolToInt(POINTER != 2147483647))))
                    {
                        __context__.SourceCodeLine = 176;
                        POINTER = (int)(FILLBUFCARTRIDGE(__context__, (ushort)(NFILEHANDLE), (ushort)(ROUND), (int)(POINTER)));
                        __context__.SourceCodeLine = 177;
                        ROUND = (ushort)((ROUND + 1));
                        __context__.SourceCodeLine = 174;
                    }

                    __context__.SourceCodeLine = 221;
                    Trace("last pointer found @ {0:d}", (int)POINTER);
                    __context__.SourceCodeLine = 230;
                    if (Functions.TestForTrue((Functions.BoolToInt(FileClose((short)(NFILEHANDLE)) != 0))))
                    {
                        __context__.SourceCodeLine = 232;
                        Trace("Error closing file\r\n");
                    }
                }
            }

            catch (Exception __splus_exception__)
            {
                SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);

                __context__.SourceCodeLine = 238;
                Trace("Error in File Operation. Check file location and name.");
            }

            __context__.SourceCodeLine = 241;
            EndFileOperations( );
        }
        private void PULLCONFIGURATION(SplusExecutionContext __context__)
        {
            __context__.SourceCodeLine = 131;
            try
            {
                __context__.SourceCodeLine = 132;
                Configuration.Obj.CameraToArray();
            }

            catch (Exception __splus_exception__)
            {
                SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
            }

            __context__.SourceCodeLine = 133;
            ;
            __context__.SourceCodeLine = 135;
            try
            {
                __context__.SourceCodeLine = 136;
                Configuration.Obj.CameraArray[CAMERA_NUMBER.Value].PresetToArray();
            }

            catch (Exception __splus_exception__)
            {
                SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
            }

            __context__.SourceCodeLine = 137;
            ;
            __context__.SourceCodeLine = 139;
            try
            {
                __context__.SourceCodeLine  = 140;
                CAMERA_SWITCHER_VALUE.Value = (ushort)(Configuration.Obj.CameraArray[CAMERA_NUMBER.Value].Switcher_Value);
            }

            catch (Exception __splus_exception__)
            {
                SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
            }

            __context__.SourceCodeLine = 141;
            ;
            __context__.SourceCodeLine = 143;
            try
            {
                __context__.SourceCodeLine = 144;
                CAMERA_PRESET1_ID.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].PresetsArray [0].Id);
                __context__.SourceCodeLine = 145;
                CAMERA_PRESET1_NAME.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].PresetsArray [0].Name);
            }

            catch (Exception __splus_exception__)
            {
                SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
            }

            __context__.SourceCodeLine = 146;
            ;
            __context__.SourceCodeLine = 147;
            try
            {
                __context__.SourceCodeLine = 148;
                CAMERA_PRESET2_ID.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].PresetsArray [1].Id);
                __context__.SourceCodeLine = 149;
                CAMERA_PRESET2_NAME.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].PresetsArray [1].Name);
            }

            catch (Exception __splus_exception__)
            {
                SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
            }

            __context__.SourceCodeLine = 150;
            ;
            __context__.SourceCodeLine = 151;
            try
            {
                __context__.SourceCodeLine = 152;
                CAMERA_PRESET3_ID.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].PresetsArray [2].Id);
                __context__.SourceCodeLine = 153;
                CAMERA_PRESET3_NAME.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].PresetsArray [2].Name);
            }

            catch (Exception __splus_exception__)
            {
                SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
            }

            __context__.SourceCodeLine = 154;
            ;
            __context__.SourceCodeLine = 155;
            try
            {
                __context__.SourceCodeLine = 156;
                CAMERA_PRESET4_ID.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].PresetsArray [3].Id);
                __context__.SourceCodeLine = 157;
                CAMERA_PRESET4_NAME.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].PresetsArray [3].Name);
            }

            catch (Exception __splus_exception__)
            {
                SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
            }

            __context__.SourceCodeLine = 158;
            ;
            __context__.SourceCodeLine = 159;
            try
            {
                __context__.SourceCodeLine = 160;
                CAMERA_PRESET5_ID.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].PresetsArray [4].Id);
                __context__.SourceCodeLine = 161;
                CAMERA_PRESET5_NAME.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].PresetsArray [4].Name);
            }

            catch (Exception __splus_exception__)
            {
                SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
            }

            __context__.SourceCodeLine = 162;
            ;
            __context__.SourceCodeLine = 163;
            try
            {
                __context__.SourceCodeLine = 164;
                CAMERA_PRESET6_ID.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].PresetsArray [5].Id);
                __context__.SourceCodeLine = 165;
                CAMERA_PRESET6_NAME.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].PresetsArray [5].Name);
            }

            catch (Exception __splus_exception__)
            {
                SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
            }

            __context__.SourceCodeLine = 166;
            ;
            __context__.SourceCodeLine = 167;
            CAMERA_SSI_SEVERITY_MESSAGE.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].SSI_Equipment_Status.Severity_Message);
            __context__.SourceCodeLine = 168;
            CAMERA_SSI_ERROR_TEXT.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].SSI_Equipment_Status.Error_Text);
            __context__.SourceCodeLine = 169;
            CAMERA_SSI_OK_TEXT.UpdateValue(Configuration.Obj.CameraArray [CAMERA_NUMBER.Value].SSI_Equipment_Status.Ok_Text);
        }
Ejemplo n.º 14
0
        object FROMCLIENT_OnChange_0(Object __EventInfo__)

        {
            Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
            try
            {
                SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
                CrestronString        FORPARSING__DOLLAR__;
                FORPARSING__DOLLAR__ = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 256, this);

                CrestronString TOSEND__DOLLAR__;
                TOSEND__DOLLAR__ = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 256, this);

                CrestronString JUNK__DOLLAR__;
                JUNK__DOLLAR__ = new CrestronString(Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 256, this);


                __context__.SourceCodeLine = 163;
                try
                {
                    __context__.SourceCodeLine = 165;
                    while (Functions.TestForTrue((1)))
                    {
                        __context__.SourceCodeLine = 169;
                        FORPARSING__DOLLAR__.UpdateValue(Functions.Gather("\r\n", FROMCLIENT));
                        __context__.SourceCodeLine = 172;
                        if (Functions.TestForTrue((Functions.Find("login_failed", FORPARSING__DOLLAR__))))
                        {
                            __context__.SourceCodeLine = 174;
                            ILOGGEDIN = (ushort)(0);
                            __context__.SourceCodeLine = 175;
                            CONNECTFTODEVICES.Value    = (ushort)(0);
                            __context__.SourceCodeLine = 176;
                            CONNECT.Value = (ushort)(0);
                            __context__.SourceCodeLine = 177;
                            CreateWait("__SPLS_TMPVAR__WAITLABEL_1__", 10, __SPLS_TMPVAR__WAITLABEL_1___Callback);
                        }

                        else
                        {
                            __context__.SourceCodeLine = 184;
                            if (Functions.TestForTrue((Functions.Find("login_success", FORPARSING__DOLLAR__))))
                            {
                                __context__.SourceCodeLine = 186;
                                ILOGGEDIN = (ushort)(1);
                                __context__.SourceCodeLine = 187;
                                CONNECTFTODEVICES.Value    = (ushort)(1);
                            }

                            else
                            {
                                __context__.SourceCodeLine = 191;
                                if (Functions.TestForTrue((Functions.Find("login_required", FORPARSING__DOLLAR__))))
                                {
                                    __context__.SourceCodeLine = 193;
                                    ILOGGEDIN = (ushort)(0);
                                    __context__.SourceCodeLine = 194;
                                    CONNECTFTODEVICES.Value    = (ushort)(0);
                                    __context__.SourceCodeLine = 196;
                                    TOSEND__DOLLAR__.UpdateValue("login " + SPUSERNAME + " " + SPPIN + "\r\n");
                                    __context__.SourceCodeLine = 197;
                                    SENDTOQSYS(__context__, TOSEND__DOLLAR__);
                                }

                                else
                                {
                                    __context__.SourceCodeLine = 200;
                                    if (Functions.TestForTrue((Functions.Find("bad_id", FORPARSING__DOLLAR__))))
                                    {
                                        __context__.SourceCodeLine = 202;
                                        ILOGGEDIN = (ushort)(1);
                                        __context__.SourceCodeLine = 203;
                                        CONNECTFTODEVICES.Value    = (ushort)(1);
                                    }

                                    else
                                    {
                                        __context__.SourceCodeLine = 207;
                                        if (Functions.TestForTrue((Functions.Find("sr", FORPARSING__DOLLAR__))))
                                        {
                                            __context__.SourceCodeLine = 209;
                                            JUNK__DOLLAR__.UpdateValue(Functions.Remove("\"", FORPARSING__DOLLAR__));
                                            __context__.SourceCodeLine = 210;
                                            SDESIGNNAME.UpdateValue(Functions.Remove("\" \"", FORPARSING__DOLLAR__));
                                            __context__.SourceCodeLine = 211;
                                            SDESIGNNAME.UpdateValue(Functions.Left(SDESIGNNAME, (int)((Functions.Length(SDESIGNNAME) - 3))));
                                            __context__.SourceCodeLine = 212;
                                            SDESIGNID.UpdateValue(Functions.Remove("\" ", FORPARSING__DOLLAR__));
                                            __context__.SourceCodeLine = 213;
                                            SDESIGNID.UpdateValue(Functions.Left(SDESIGNID, (int)((Functions.Length(SDESIGNID) - 2))));
                                            __context__.SourceCodeLine = 214;
                                            IPRIMARY = (ushort)(Functions.Atoi(Functions.Remove(" ", FORPARSING__DOLLAR__)));
                                            __context__.SourceCodeLine = 215;
                                            IACTIVE = (ushort)(Functions.Atoi(Functions.Remove(" ", FORPARSING__DOLLAR__)));
                                        }

                                        else
                                        {
                                            __context__.SourceCodeLine = 221;
                                            TODEVICES.UpdateValue(FORPARSING__DOLLAR__);
                                            __context__.SourceCodeLine = 222;
                                            Functions.ProcessLogic( );
                                        }
                                    }
                                }
                            }
                        }

                        __context__.SourceCodeLine = 165;
                    }
                }

                catch (Exception __splus_exception__)
                {
                    SimplPlusException __splus_exceptionobj__ = new SimplPlusException(__splus_exception__, this);
                }
            }
            catch (Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler(__SignalEventArg__); }
            return(this);
        }