using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Threading;
using System.Linq;
using Crestron;
using Crestron.Logos.SplusLibrary;
using Crestron.Logos.SplusObjects;
using Crestron.SimplSharp;
using Clock_Audio;
using CCI.SimplSharp.Library.Comm.Model;
using CCI.SimplSharp.Library.Comm.Priority;
using CCI.SimplSharp.Library.Comm.Common;
using CCI.SimplSharp.Library.Comm.Equality;
using CCI.SimplSharp.Library.IO.Utilities;
using CCI.SimplSharp.Library.IO.Common;

namespace UserModule_CLOCK_AUDIO_DEVICE_V3_4_1
{
    public class UserModuleClass_CLOCK_AUDIO_DEVICE_V3_4_1 : SplusObject
    {
        static CCriticalSection g_criticalSection = new CCriticalSection();
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        Crestron.Logos.SplusObjects.DigitalInput REINITIALIZE;
        Crestron.Logos.SplusObjects.DigitalInput ENABLE_DEBUG;
        Crestron.Logos.SplusObjects.DigitalInput POLL;
        Crestron.Logos.SplusObjects.DigitalInput ENABLE_PASSBACK;
        Crestron.Logos.SplusObjects.DigitalInput ARM_C_MIC_DOWN;
        Crestron.Logos.SplusObjects.DigitalInput ARM_C_MIC_UP;
        Crestron.Logos.SplusObjects.DigitalInput ARM_C_MIC_TOGGLE;
        Crestron.Logos.SplusObjects.DigitalInput PRESET_SAVE;
        Crestron.Logos.SplusObjects.DigitalInput PRESET_LOAD;
        Crestron.Logos.SplusObjects.DigitalInput PHANTOM_ALL_OFF;
        Crestron.Logos.SplusObjects.DigitalInput PHANTOM_ALL_ON;
        Crestron.Logos.SplusObjects.DigitalInput LED_R_ALL_OFF;
        Crestron.Logos.SplusObjects.DigitalInput LED_R_ALL_ON;
        Crestron.Logos.SplusObjects.DigitalInput LED_G_ALL_OFF;
        Crestron.Logos.SplusObjects.DigitalInput LED_G_ALL_ON;
        Crestron.Logos.SplusObjects.DigitalInput LED_B_ALL_OFF;
        Crestron.Logos.SplusObjects.DigitalInput LED_B_ALL_ON;
        Crestron.Logos.SplusObjects.DigitalInput IDENTIFY_UNIT_OFF;
        Crestron.Logos.SplusObjects.DigitalInput IDENTIFY_UNIT_ON;
        Crestron.Logos.SplusObjects.DigitalInput IDENTIFY_UNIT_TOGGLE;
        Crestron.Logos.SplusObjects.DigitalInput FIND_UNIT;
        Crestron.Logos.SplusObjects.DigitalInput DEFAULTS;
        Crestron.Logos.SplusObjects.DigitalInput TRACKING_OFF;
        Crestron.Logos.SplusObjects.DigitalInput TRACKING_ON;
        Crestron.Logos.SplusObjects.DigitalInput TRACKING_TOGGLE;
        Crestron.Logos.SplusObjects.DigitalInput NOISESUP_OFF;
        Crestron.Logos.SplusObjects.DigitalInput NOISESUP_ON;
        Crestron.Logos.SplusObjects.DigitalInput NOISESUP_TOGGLE;
        InOutArray<Crestron.Logos.SplusObjects.DigitalInput> APT_SET;
        InOutArray<Crestron.Logos.SplusObjects.DigitalInput> PHANTOM_OFF;
        InOutArray<Crestron.Logos.SplusObjects.DigitalInput> PHANTOM_ON;
        InOutArray<Crestron.Logos.SplusObjects.DigitalInput> PHANTOM_TOGGLE;
        InOutArray<Crestron.Logos.SplusObjects.DigitalInput> LED_R_OFF;
        InOutArray<Crestron.Logos.SplusObjects.DigitalInput> LED_R_ON;
        InOutArray<Crestron.Logos.SplusObjects.DigitalInput> LED_R_TOGGLE;
        InOutArray<Crestron.Logos.SplusObjects.DigitalInput> LED_G_OFF;
        InOutArray<Crestron.Logos.SplusObjects.DigitalInput> LED_G_ON;
        InOutArray<Crestron.Logos.SplusObjects.DigitalInput> LED_G_TOGGLE;
        InOutArray<Crestron.Logos.SplusObjects.DigitalInput> LED_B_OFF;
        InOutArray<Crestron.Logos.SplusObjects.DigitalInput> LED_B_ON;
        InOutArray<Crestron.Logos.SplusObjects.DigitalInput> LED_B_TOGGLE;
        Crestron.Logos.SplusObjects.StringInput PASSTHROUGH_TEXT;
        Crestron.Logos.SplusObjects.AnalogInput LED_R_ALL_BRIGHT_SET;
        Crestron.Logos.SplusObjects.AnalogInput LED_G_ALL_BRIGHT_SET;
        Crestron.Logos.SplusObjects.AnalogInput LED_B_ALL_BRIGHT_SET;
        InOutArray<Crestron.Logos.SplusObjects.AnalogInput> EQ_SET;
        InOutArray<Crestron.Logos.SplusObjects.AnalogInput> LED_R_BRIGHT_SET;
        InOutArray<Crestron.Logos.SplusObjects.AnalogInput> LED_G_BRIGHT_SET;
        InOutArray<Crestron.Logos.SplusObjects.AnalogInput> LED_B_BRIGHT_SET;
        Crestron.Logos.SplusObjects.DigitalOutput IS_COMMUNICATING;
        Crestron.Logos.SplusObjects.DigitalOutput IS_INITIALIZED;
        Crestron.Logos.SplusObjects.DigitalOutput DEBUG_ENABLED;
        Crestron.Logos.SplusObjects.DigitalOutput UNUSED;
        Crestron.Logos.SplusObjects.DigitalOutput PASSBACK_ENABLED;
        Crestron.Logos.SplusObjects.DigitalOutput ARM_C_MIC_IS_UP;
        Crestron.Logos.SplusObjects.DigitalOutput PRESET_SAVED;
        Crestron.Logos.SplusObjects.DigitalOutput IDENTIFY_UNIT_IS_ON;
        Crestron.Logos.SplusObjects.DigitalOutput TRACKING_IS_ON;
        Crestron.Logos.SplusObjects.DigitalOutput NOISESUP_IS_ON;
        InOutArray<Crestron.Logos.SplusObjects.DigitalOutput> APT_IS_ACTIVE;
        InOutArray<Crestron.Logos.SplusObjects.DigitalOutput> PHANTOM_IS_ON;
        InOutArray<Crestron.Logos.SplusObjects.DigitalOutput> LED_R_IS_ON;
        InOutArray<Crestron.Logos.SplusObjects.DigitalOutput> LED_G_IS_ON;
        InOutArray<Crestron.Logos.SplusObjects.DigitalOutput> LED_B_IS_ON;
        InOutArray<Crestron.Logos.SplusObjects.DigitalOutput> SWITCH_CH1_IS_ON;
        InOutArray<Crestron.Logos.SplusObjects.DigitalOutput> SWITCH_CH2_IS_ON;
        InOutArray<Crestron.Logos.SplusObjects.DigitalOutput> SWITCH_CH3_IS_ON;
        InOutArray<Crestron.Logos.SplusObjects.DigitalOutput> SWITCH_CH4_IS_ON;
        InOutArray<Crestron.Logos.SplusObjects.DigitalOutput> BUTTON_PRESSED;
        Crestron.Logos.SplusObjects.StringOutput SWITCH_ADDRESS_TEXT;
        Crestron.Logos.SplusObjects.StringOutput IP_ADDRESS_TEXT;
        Crestron.Logos.SplusObjects.StringOutput PASSBACK_TEXT;
        InOutArray<Crestron.Logos.SplusObjects.AnalogOutput> EQ_LEVEL;
        InOutArray<Crestron.Logos.SplusObjects.AnalogOutput> LED_R_BRIGHT_LEVEL;
        InOutArray<Crestron.Logos.SplusObjects.AnalogOutput> LED_G_BRIGHT_LEVEL;
        InOutArray<Crestron.Logos.SplusObjects.AnalogOutput> LED_B_BRIGHT_LEVEL;
        UShortParameter DEVICE_TYPE;
        UShortParameter IP_PORT;
        UShortParameter ADAPTER_TYPE;
        UShortParameter BRIGHTNESS_TYPE;
        StringParameter IP_ADDRESS;
        StringParameter ADAPTER_IP_OVERRIDE;
        Clock_Audio.ClockAudioDevice DEVICE;
        ushort [] EQLEVEL;
        ushort [] LEDREDLEVEL;
        ushort [] LEDGREENLEVEL;
        ushort [] LEDBLUELEVEL;
        CrestronString SWITCHADDRESS;
        CrestronString IPADDRESS;
        private void RESETALLINFO (  SplusExecutionContext __context__ ) 
            { 
            ushort I = 0;
            
            
            __context__.SourceCodeLine = 177;
            IS_COMMUNICATING  .Value = (ushort) ( 0 ) ; 
            __context__.SourceCodeLine = 178;
            IS_INITIALIZED  .Value = (ushort) ( 0 ) ; 
            __context__.SourceCodeLine = 179;
            DEBUG_ENABLED  .Value = (ushort) ( 0 ) ; 
            __context__.SourceCodeLine = 180;
            PASSBACK_ENABLED  .Value = (ushort) ( 0 ) ; 
            __context__.SourceCodeLine = 181;
            ARM_C_MIC_IS_UP  .Value = (ushort) ( 0 ) ; 
            __context__.SourceCodeLine = 182;
            PRESET_SAVED  .Value = (ushort) ( 0 ) ; 
            __context__.SourceCodeLine = 183;
            IDENTIFY_UNIT_IS_ON  .Value = (ushort) ( 0 ) ; 
            __context__.SourceCodeLine = 184;
            TRACKING_IS_ON  .Value = (ushort) ( 0 ) ; 
            __context__.SourceCodeLine = 185;
            NOISESUP_IS_ON  .Value = (ushort) ( 0 ) ; 
            __context__.SourceCodeLine = 187;
            ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
            ushort __FN_FOREND_VAL__1 = (ushort)4; 
            int __FN_FORSTEP_VAL__1 = (int)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 = 189;
                APT_IS_ACTIVE [ I]  .Value = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 187;
                } 
            
            __context__.SourceCodeLine = 192;
            ushort __FN_FORSTART_VAL__2 = (ushort) ( 1 ) ;
            ushort __FN_FOREND_VAL__2 = (ushort)4; 
            int __FN_FORSTEP_VAL__2 = (int)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 = 194;
                PHANTOM_IS_ON [ I]  .Value = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 192;
                } 
            
            __context__.SourceCodeLine = 197;
            ushort __FN_FORSTART_VAL__3 = (ushort) ( 1 ) ;
            ushort __FN_FOREND_VAL__3 = (ushort)15; 
            int __FN_FORSTEP_VAL__3 = (int)1; 
            for ( I  = __FN_FORSTART_VAL__3; (__FN_FORSTEP_VAL__3 > 0)  ? ( (I  >= __FN_FORSTART_VAL__3) && (I  <= __FN_FOREND_VAL__3) ) : ( (I  <= __FN_FORSTART_VAL__3) && (I  >= __FN_FOREND_VAL__3) ) ; I  += (ushort)__FN_FORSTEP_VAL__3) 
                { 
                __context__.SourceCodeLine = 199;
                LED_R_IS_ON [ I]  .Value = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 200;
                LED_G_IS_ON [ I]  .Value = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 201;
                LED_B_IS_ON [ I]  .Value = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 197;
                } 
            
            __context__.SourceCodeLine = 204;
            ushort __FN_FORSTART_VAL__4 = (ushort) ( 1 ) ;
            ushort __FN_FOREND_VAL__4 = (ushort)3; 
            int __FN_FORSTEP_VAL__4 = (int)1; 
            for ( I  = __FN_FORSTART_VAL__4; (__FN_FORSTEP_VAL__4 > 0)  ? ( (I  >= __FN_FORSTART_VAL__4) && (I  <= __FN_FOREND_VAL__4) ) : ( (I  <= __FN_FORSTART_VAL__4) && (I  >= __FN_FOREND_VAL__4) ) ; I  += (ushort)__FN_FORSTEP_VAL__4) 
                { 
                __context__.SourceCodeLine = 206;
                SWITCH_CH1_IS_ON [ I]  .Value = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 207;
                SWITCH_CH2_IS_ON [ I]  .Value = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 208;
                SWITCH_CH3_IS_ON [ I]  .Value = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 209;
                SWITCH_CH4_IS_ON [ I]  .Value = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 204;
                } 
            
            __context__.SourceCodeLine = 213;
            ushort __FN_FORSTART_VAL__5 = (ushort) ( 1 ) ;
            ushort __FN_FOREND_VAL__5 = (ushort)15; 
            int __FN_FORSTEP_VAL__5 = (int)1; 
            for ( I  = __FN_FORSTART_VAL__5; (__FN_FORSTEP_VAL__5 > 0)  ? ( (I  >= __FN_FORSTART_VAL__5) && (I  <= __FN_FOREND_VAL__5) ) : ( (I  <= __FN_FORSTART_VAL__5) && (I  >= __FN_FOREND_VAL__5) ) ; I  += (ushort)__FN_FORSTEP_VAL__5) 
                { 
                __context__.SourceCodeLine = 215;
                LED_R_BRIGHT_LEVEL [ I]  .Value = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 216;
                LED_G_BRIGHT_LEVEL [ I]  .Value = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 217;
                LED_B_BRIGHT_LEVEL [ I]  .Value = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 219;
                LEDREDLEVEL [ I] = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 220;
                LEDGREENLEVEL [ I] = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 221;
                LEDBLUELEVEL [ I] = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 213;
                } 
            
            __context__.SourceCodeLine = 224;
            ushort __FN_FORSTART_VAL__6 = (ushort) ( 1 ) ;
            ushort __FN_FOREND_VAL__6 = (ushort)3; 
            int __FN_FORSTEP_VAL__6 = (int)1; 
            for ( I  = __FN_FORSTART_VAL__6; (__FN_FORSTEP_VAL__6 > 0)  ? ( (I  >= __FN_FORSTART_VAL__6) && (I  <= __FN_FOREND_VAL__6) ) : ( (I  <= __FN_FORSTART_VAL__6) && (I  >= __FN_FOREND_VAL__6) ) ; I  += (ushort)__FN_FORSTEP_VAL__6) 
                { 
                __context__.SourceCodeLine = 226;
                EQ_LEVEL [ I]  .Value = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 227;
                EQLEVEL [ I] = (ushort) ( 0 ) ; 
                __context__.SourceCodeLine = 224;
                } 
            
            __context__.SourceCodeLine = 231;
            PASSBACK_TEXT  .UpdateValue ( ""  ) ; 
            __context__.SourceCodeLine = 233;
            ushort __FN_FORSTART_VAL__7 = (ushort) ( 1 ) ;
            ushort __FN_FOREND_VAL__7 = (ushort)15; 
            int __FN_FORSTEP_VAL__7 = (int)1; 
            for ( I  = __FN_FORSTART_VAL__7; (__FN_FORSTEP_VAL__7 > 0)  ? ( (I  >= __FN_FORSTART_VAL__7) && (I  <= __FN_FOREND_VAL__7) ) : ( (I  <= __FN_FORSTART_VAL__7) && (I  >= __FN_FOREND_VAL__7) ) ; I  += (ushort)__FN_FORSTEP_VAL__7) 
                { 
                __context__.SourceCodeLine = 235;
                SWITCH_ADDRESS_TEXT  .UpdateValue ( ""  ) ; 
                __context__.SourceCodeLine = 236;
                IP_ADDRESS_TEXT  .UpdateValue ( ""  ) ; 
                __context__.SourceCodeLine = 238;
                SWITCHADDRESS  .UpdateValue ( ""  ) ; 
                __context__.SourceCodeLine = 239;
                IPADDRESS  .UpdateValue ( ""  ) ; 
                __context__.SourceCodeLine = 233;
                } 
            
            
            }
            
        public void ONDEBUGCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.StringEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 248;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 250;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    {
                    __context__.SourceCodeLine = 251;
                    Trace( "{0}", ARGS . payload ) ; 
                    }
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONCOMMUNICATINGCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.IntegerEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 257;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 259;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    {
                    __context__.SourceCodeLine = 260;
                    IS_COMMUNICATING  .Value = (ushort) ( ARGS.payload ) ; 
                    }
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONINITIALIZEDCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.IntegerEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 266;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 268;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    {
                    __context__.SourceCodeLine = 269;
                    IS_INITIALIZED  .Value = (ushort) ( ARGS.payload ) ; 
                    }
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONDEBUGENABLECHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.IntegerEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 275;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 277;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    {
                    __context__.SourceCodeLine = 278;
                    DEBUG_ENABLED  .Value = (ushort) ( ARGS.payload ) ; 
                    }
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONPASSBACKENABLECHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.IntegerEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 284;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 286;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    {
                    __context__.SourceCodeLine = 287;
                    PASSBACK_ENABLED  .Value = (ushort) ( ARGS.payload ) ; 
                    }
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONADDRESSCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.AddressStateEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            CrestronString IP;
            CrestronString ADDRESS;
            CrestronString DEVICEIP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            ADDRESS  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            DEVICEIP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 294;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 296;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    { 
                    __context__.SourceCodeLine = 298;
                    ADDRESS  .UpdateValue ( ARGS . payload . GetSwitchAddress ( )  ) ; 
                    __context__.SourceCodeLine = 299;
                    DEVICEIP  .UpdateValue ( ARGS . payload . GetIpAddress ( )  ) ; 
                    __context__.SourceCodeLine = 301;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt (ADDRESS != SWITCHADDRESS))  ) ) 
                        { 
                        __context__.SourceCodeLine = 303;
                        MakeString ( SWITCH_ADDRESS_TEXT , "{0}", ADDRESS ) ; 
                        __context__.SourceCodeLine = 304;
                        SWITCHADDRESS  .UpdateValue ( ADDRESS  ) ; 
                        } 
                    
                    __context__.SourceCodeLine = 307;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt (DEVICEIP != IPADDRESS))  ) ) 
                        { 
                        __context__.SourceCodeLine = 309;
                        MakeString ( IP_ADDRESS_TEXT , "{0}", DEVICEIP ) ; 
                        __context__.SourceCodeLine = 310;
                        IPADDRESS  .UpdateValue ( DEVICEIP  ) ; 
                        } 
                    
                    } 
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONARMCCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.ArmStateEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 319;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 321;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    {
                    __context__.SourceCodeLine = 322;
                    ARM_C_MIC_IS_UP  .Value = (ushort) ( ARGS.payload.GetState() ) ; 
                    }
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONPHANTOMCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.PhantomStateEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            ushort I = 0;
            
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 330;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 332;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    { 
                    __context__.SourceCodeLine = 334;
                    ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
                    ushort __FN_FOREND_VAL__1 = (ushort)4; 
                    int __FN_FORSTEP_VAL__1 = (int)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 = 336;
                        PHANTOM_IS_ON [ I]  .Value = (ushort) ( ARGS.payload.GetState( (ushort)( I ) ) ) ; 
                        __context__.SourceCodeLine = 334;
                        } 
                    
                    } 
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONLEDCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.LedStateEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            ushort I = 0;
            ushort REDLEVEL = 0;
            ushort GREENLEVEL = 0;
            ushort BLUELEVEL = 0;
            
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 346;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 348;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    { 
                    __context__.SourceCodeLine = 350;
                    ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
                    ushort __FN_FOREND_VAL__1 = (ushort)15; 
                    int __FN_FORSTEP_VAL__1 = (int)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 = 352;
                        LED_R_IS_ON [ I]  .Value = (ushort) ( ARGS.payload.GetState( (ushort)( I ) , (ushort)( 1 ) ) ) ; 
                        __context__.SourceCodeLine = 353;
                        LED_G_IS_ON [ I]  .Value = (ushort) ( ARGS.payload.GetState( (ushort)( I ) , (ushort)( 2 ) ) ) ; 
                        __context__.SourceCodeLine = 354;
                        LED_B_IS_ON [ I]  .Value = (ushort) ( ARGS.payload.GetState( (ushort)( I ) , (ushort)( 3 ) ) ) ; 
                        __context__.SourceCodeLine = 356;
                        REDLEVEL = (ushort) ( ARGS.payload.GetBrightness( (ushort)( I ) , (ushort)( 1 ) ) ) ; 
                        __context__.SourceCodeLine = 357;
                        GREENLEVEL = (ushort) ( ARGS.payload.GetBrightness( (ushort)( I ) , (ushort)( 2 ) ) ) ; 
                        __context__.SourceCodeLine = 358;
                        BLUELEVEL = (ushort) ( ARGS.payload.GetBrightness( (ushort)( I ) , (ushort)( 3 ) ) ) ; 
                        __context__.SourceCodeLine = 360;
                        if ( Functions.TestForTrue  ( ( Functions.BoolToInt (REDLEVEL != LEDREDLEVEL[ I ]))  ) ) 
                            { 
                            __context__.SourceCodeLine = 362;
                            LED_R_BRIGHT_LEVEL [ I]  .Value = (ushort) ( REDLEVEL ) ; 
                            __context__.SourceCodeLine = 363;
                            LEDREDLEVEL [ I] = (ushort) ( REDLEVEL ) ; 
                            } 
                        
                        __context__.SourceCodeLine = 366;
                        if ( Functions.TestForTrue  ( ( Functions.BoolToInt (GREENLEVEL != LEDGREENLEVEL[ I ]))  ) ) 
                            { 
                            __context__.SourceCodeLine = 368;
                            LED_G_BRIGHT_LEVEL [ I]  .Value = (ushort) ( GREENLEVEL ) ; 
                            __context__.SourceCodeLine = 369;
                            LEDGREENLEVEL [ I] = (ushort) ( GREENLEVEL ) ; 
                            } 
                        
                        __context__.SourceCodeLine = 372;
                        if ( Functions.TestForTrue  ( ( Functions.BoolToInt (BLUELEVEL != LEDBLUELEVEL[ I ]))  ) ) 
                            { 
                            __context__.SourceCodeLine = 374;
                            LED_B_BRIGHT_LEVEL [ I]  .Value = (ushort) ( BLUELEVEL ) ; 
                            __context__.SourceCodeLine = 375;
                            LEDBLUELEVEL [ I] = (ushort) ( BLUELEVEL ) ; 
                            } 
                        
                        __context__.SourceCodeLine = 350;
                        } 
                    
                    } 
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONSWITCHCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.SwitchStateEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            ushort I = 0;
            
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 386;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 388;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    { 
                    __context__.SourceCodeLine = 390;
                    ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
                    ushort __FN_FOREND_VAL__1 = (ushort)3; 
                    int __FN_FORSTEP_VAL__1 = (int)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 = 392;
                        SWITCH_CH1_IS_ON [ I]  .Value = (ushort) ( ARGS.payload.GetState( (ushort)( 1 ) , (ushort)( I ) ) ) ; 
                        __context__.SourceCodeLine = 393;
                        SWITCH_CH2_IS_ON [ I]  .Value = (ushort) ( ARGS.payload.GetState( (ushort)( 2 ) , (ushort)( I ) ) ) ; 
                        __context__.SourceCodeLine = 394;
                        SWITCH_CH3_IS_ON [ I]  .Value = (ushort) ( ARGS.payload.GetState( (ushort)( 3 ) , (ushort)( I ) ) ) ; 
                        __context__.SourceCodeLine = 395;
                        SWITCH_CH4_IS_ON [ I]  .Value = (ushort) ( ARGS.payload.GetState( (ushort)( 4 ) , (ushort)( I ) ) ) ; 
                        __context__.SourceCodeLine = 390;
                        } 
                    
                    } 
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONPRESETCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.IntegerEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            ushort PRESET = 0;
            
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 405;
                PRESET = (ushort) ( ARGS.payload ) ; 
                __context__.SourceCodeLine = 406;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 408;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    {
                    __context__.SourceCodeLine = 409;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt (PRESET == 0))  ) ) 
                        {
                        __context__.SourceCodeLine = 410;
                        Functions.Pulse ( 10, PRESET_SAVED ) ; 
                        }
                    
                    }
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONPASSBACKCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.StringEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            ushort I = 0;
            
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 418;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 420;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    {
                    __context__.SourceCodeLine = 421;
                    MakeString ( PASSBACK_TEXT , "{0}", ARGS . payload ) ; 
                    }
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONTRACKINGCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.IntegerEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 427;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 429;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    {
                    __context__.SourceCodeLine = 430;
                    TRACKING_IS_ON  .Value = (ushort) ( ARGS.payload ) ; 
                    }
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONAPTCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.AptStateEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            ushort I = 0;
            ushort APT = 0;
            
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 438;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 440;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    { 
                    __context__.SourceCodeLine = 442;
                    APT = (ushort) ( ARGS.payload.GetState() ) ; 
                    __context__.SourceCodeLine = 444;
                    ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
                    ushort __FN_FOREND_VAL__1 = (ushort)4; 
                    int __FN_FORSTEP_VAL__1 = (int)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 = 446;
                        APT_IS_ACTIVE [ I]  .Value = (ushort) ( Functions.BoolToInt (APT == I) ) ; 
                        __context__.SourceCodeLine = 444;
                        } 
                    
                    } 
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONEQCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.EQStateEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            ushort I = 0;
            ushort EQ = 0;
            
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 456;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 458;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    { 
                    __context__.SourceCodeLine = 460;
                    ushort __FN_FORSTART_VAL__1 = (ushort) ( 1 ) ;
                    ushort __FN_FOREND_VAL__1 = (ushort)3; 
                    int __FN_FORSTEP_VAL__1 = (int)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 = 462;
                        EQ = (ushort) ( ARGS.payload.GetLevel( (ushort)( I ) ) ) ; 
                        __context__.SourceCodeLine = 464;
                        if ( Functions.TestForTrue  ( ( Functions.BoolToInt (EQ != EQLEVEL[ I ]))  ) ) 
                            { 
                            __context__.SourceCodeLine = 466;
                            EQ_LEVEL [ I]  .Value = (ushort) ( EQ ) ; 
                            __context__.SourceCodeLine = 467;
                            EQLEVEL [ I] = (ushort) ( EQ ) ; 
                            } 
                        
                        __context__.SourceCodeLine = 460;
                        } 
                    
                    } 
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONNOISESUPCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.IntegerEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 476;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 478;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    {
                    __context__.SourceCodeLine = 479;
                    NOISESUP_IS_ON  .Value = (ushort) ( ARGS.payload ) ; 
                    }
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        public void ONBUTTONCHANGE ( object __sender__ /*Clock_Audio.ClockAudioDevice SENDER */, Clock_Audio.ButtonStateEventArgs ARGS ) 
            { 
            ClockAudioDevice  SENDER  = (ClockAudioDevice )__sender__;
            ushort I = 0;
            
            CrestronString IP;
            IP  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
            
            try
            {
                SplusExecutionContext __context__ = SplusSimplSharpDelegateThreadStartCode();
                
                __context__.SourceCodeLine = 487;
                IP  .UpdateValue ( SENDER . GetIP ( )  ) ; 
                __context__.SourceCodeLine = 489;
                if ( Functions.TestForTrue  ( ( Functions.BoolToInt (IP == IP_ADDRESS ))  ) ) 
                    { 
                    __context__.SourceCodeLine = 491;
                    I = (ushort) ( ARGS.payload.GetIndex() ) ; 
                    __context__.SourceCodeLine = 493;
                    if ( Functions.TestForTrue  ( ( Functions.BoolToInt ( (Functions.TestForTrue ( Functions.BoolToInt ( I > 0 ) ) && Functions.TestForTrue ( Functions.BoolToInt ( I <= 12 ) )) ))  ) ) 
                        {
                        __context__.SourceCodeLine = 494;
                        BUTTON_PRESSED [ I]  .Value = (ushort) ( ARGS.payload.GetState() ) ; 
                        }
                    
                    } 
                
                
                
            }
            finally { ObjectFinallyHandler(); }
            }
            
        object REINITIALIZE_OnPush_0 ( Object __EventInfo__ )
        
            { 
            Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
            try
            {
                SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
                
                __context__.SourceCodeLine = 506;
                DEVICE . Reinitialize ( ) ; 
                
                
            }
            catch(Exception e) { ObjectCatchHandler(e); }
            finally { ObjectFinallyHandler( __SignalEventArg__ ); }
            return this;
            
        }
        
    object ENABLE_DEBUG_OnPush_1 ( Object __EventInfo__ )
    
        { 
        Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
        try
        {
            SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
            
            __context__.SourceCodeLine = 511;
            DEVICE . SetDebug ( (ushort)( 1 )) ; 
            
            
        }
        catch(Exception e) { ObjectCatchHandler(e); }
        finally { ObjectFinallyHandler( __SignalEventArg__ ); }
        return this;
        
    }
    
object ENABLE_DEBUG_OnRelease_2 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 516;
        DEVICE . SetDebug ( (ushort)( 0 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object POLL_OnPush_3 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 521;
        DEVICE . Poll ( ) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object ENABLE_PASSBACK_OnPush_4 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 526;
        DEVICE . SetPassback ( (ushort)( 1 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object ENABLE_PASSBACK_OnRelease_5 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 531;
        DEVICE . SetPassback ( (ushort)( 0 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object ARM_C_MIC_DOWN_OnPush_6 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 538;
        DEVICE . SetArmC ( (ushort)( 0 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object ARM_C_MIC_UP_OnPush_7 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 543;
        DEVICE . SetArmC ( (ushort)( 1 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object ARM_C_MIC_TOGGLE_OnPush_8 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 548;
        DEVICE . ToggleArmC ( ) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object PRESET_SAVE_OnPush_9 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 555;
        DEVICE . SavePreset ( ) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object PRESET_LOAD_OnPush_10 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 560;
        DEVICE . LoadPreset ( ) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object PHANTOM_ALL_OFF_OnPush_11 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 567;
        DEVICE . SetPhantomAll ( (ushort)( 0 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object PHANTOM_ALL_ON_OnPush_12 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 572;
        DEVICE . SetPhantomAll ( (ushort)( 1 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object PHANTOM_OFF_OnPush_13 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 578;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 580;
        DEVICE . SetPhantom ( (ushort)( INDEX ), (ushort)( 0 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object PHANTOM_ON_OnPush_14 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 586;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 588;
        DEVICE . SetPhantom ( (ushort)( INDEX ), (ushort)( 1 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object PHANTOM_TOGGLE_OnPush_15 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 594;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 596;
        DEVICE . TogglePhantom ( (ushort)( INDEX )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_R_ALL_OFF_OnPush_16 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 603;
        DEVICE . SetLedStateAll ( (ushort)( 1 ), (ushort)( 0 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_R_ALL_ON_OnPush_17 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 608;
        DEVICE . SetLedStateAll ( (ushort)( 1 ), (ushort)( 1 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_R_OFF_OnPush_18 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 614;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 616;
        DEVICE . SetLedState ( (ushort)( INDEX ), (ushort)( 1 ), (ushort)( 0 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_R_ON_OnPush_19 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 622;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 624;
        DEVICE . SetLedState ( (ushort)( INDEX ), (ushort)( 1 ), (ushort)( 1 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_R_TOGGLE_OnPush_20 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 630;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 632;
        DEVICE . ToggleLedState ( (ushort)( INDEX ), (ushort)( 1 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_G_ALL_OFF_OnPush_21 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 637;
        DEVICE . SetLedStateAll ( (ushort)( 2 ), (ushort)( 0 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_G_ALL_ON_OnPush_22 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 642;
        DEVICE . SetLedStateAll ( (ushort)( 2 ), (ushort)( 1 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_G_OFF_OnPush_23 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 648;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 650;
        DEVICE . SetLedState ( (ushort)( INDEX ), (ushort)( 2 ), (ushort)( 0 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_G_ON_OnPush_24 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 656;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 658;
        DEVICE . SetLedState ( (ushort)( INDEX ), (ushort)( 2 ), (ushort)( 1 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_G_TOGGLE_OnPush_25 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 664;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 666;
        DEVICE . ToggleLedState ( (ushort)( INDEX ), (ushort)( 2 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_B_ALL_OFF_OnPush_26 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 671;
        DEVICE . SetLedStateAll ( (ushort)( 3 ), (ushort)( 0 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_B_ALL_ON_OnPush_27 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 676;
        DEVICE . SetLedStateAll ( (ushort)( 3 ), (ushort)( 1 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_B_OFF_OnPush_28 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 682;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 684;
        DEVICE . SetLedState ( (ushort)( INDEX ), (ushort)( 3 ), (ushort)( 0 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_B_ON_OnPush_29 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 690;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 692;
        DEVICE . SetLedState ( (ushort)( INDEX ), (ushort)( 3 ), (ushort)( 1 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_B_TOGGLE_OnPush_30 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 698;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 700;
        DEVICE . ToggleLedState ( (ushort)( INDEX ), (ushort)( 3 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_R_ALL_BRIGHT_SET_OnChange_31 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 707;
        DEVICE . SetLedBrightAll ( (ushort)( 1 ), (ushort)( LED_R_ALL_BRIGHT_SET  .UshortValue )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_R_BRIGHT_SET_OnChange_32 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 713;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 715;
        DEVICE . SetLedBright ( (ushort)( INDEX ), (ushort)( 1 ), (ushort)( LED_R_BRIGHT_SET[ INDEX ] .UshortValue )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_G_ALL_BRIGHT_SET_OnChange_33 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 720;
        DEVICE . SetLedBrightAll ( (ushort)( 2 ), (ushort)( LED_G_ALL_BRIGHT_SET  .UshortValue )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_G_BRIGHT_SET_OnChange_34 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 726;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 728;
        DEVICE . SetLedBright ( (ushort)( INDEX ), (ushort)( 2 ), (ushort)( LED_G_BRIGHT_SET[ INDEX ] .UshortValue )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_B_ALL_BRIGHT_SET_OnChange_35 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 733;
        DEVICE . SetLedBrightAll ( (ushort)( 3 ), (ushort)( LED_B_ALL_BRIGHT_SET  .UshortValue )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object LED_B_BRIGHT_SET_OnChange_36 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 739;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 741;
        DEVICE . SetLedBright ( (ushort)( INDEX ), (ushort)( 3 ), (ushort)( LED_B_BRIGHT_SET[ INDEX ] .UshortValue )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object PASSTHROUGH_TEXT_OnChange_37 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 748;
        DEVICE . Passthrough ( PASSTHROUGH_TEXT .ToString()) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object IDENTIFY_UNIT_OFF_OnPush_38 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 755;
        DEVICE . SetIdentify ( (ushort)( 0 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object IDENTIFY_UNIT_ON_OnPush_39 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 760;
        DEVICE . SetIdentify ( (ushort)( 1 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object IDENTIFY_UNIT_TOGGLE_OnPush_40 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object FIND_UNIT_OnPush_41 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 771;
        DEVICE . SetFind ( ) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object DEFAULTS_OnPush_42 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 778;
        DEVICE . SetDefaults ( ) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object TRACKING_OFF_OnPush_43 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 785;
        DEVICE . SetTracking ( (ushort)( 0 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object TRACKING_ON_OnPush_44 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 790;
        DEVICE . SetTracking ( (ushort)( 1 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object TRACKING_TOGGLE_OnPush_45 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 795;
        DEVICE . ToggleTracking ( ) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object NOISESUP_OFF_OnPush_46 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 802;
        DEVICE . SetNoiseSup ( (ushort)( 0 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object NOISESUP_ON_OnPush_47 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 807;
        DEVICE . SetNoiseSup ( (ushort)( 1 )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object NOISESUP_TOGGLE_OnPush_48 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        
        __context__.SourceCodeLine = 812;
        DEVICE . ToggleNoiseSup ( ) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object APT_SET_OnPush_49 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 820;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 822;
        DEVICE . SetApt ( (ushort)( INDEX )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

object EQ_SET_OnChange_50 ( Object __EventInfo__ )

    { 
    Crestron.Logos.SplusObjects.SignalEventArgs __SignalEventArg__ = (Crestron.Logos.SplusObjects.SignalEventArgs)__EventInfo__;
    try
    {
        SplusExecutionContext __context__ = SplusThreadStartCode(__SignalEventArg__);
        ushort INDEX = 0;
        
        
        __context__.SourceCodeLine = 830;
        INDEX = (ushort) ( Functions.GetLastModifiedArrayIndex( __SignalEventArg__ ) ) ; 
        __context__.SourceCodeLine = 832;
        DEVICE . SetEQ ( (ushort)( INDEX ), (ushort)( EQ_SET[ INDEX ] .UshortValue )) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler( __SignalEventArg__ ); }
    return this;
    
}

public override object FunctionMain (  object __obj__ ) 
    { 
    try
    {
        SplusExecutionContext __context__ = SplusFunctionMainStartCode();
        
        __context__.SourceCodeLine = 841;
        WaitForInitializationComplete ( ) ; 
        __context__.SourceCodeLine = 842;
        RESETALLINFO (  __context__  ) ; 
        __context__.SourceCodeLine = 844;
        // RegisterEvent( DEVICE , ONDEBUGCHANGE , ONDEBUGCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnDebugChange  += ONDEBUGCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 845;
        // RegisterEvent( DEVICE , ONCOMMUNICATINGCHANGE , ONCOMMUNICATINGCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnCommunicatingChange  += ONCOMMUNICATINGCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 846;
        // RegisterEvent( DEVICE , ONINITIALIZEDCHANGE , ONINITIALIZEDCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnInitializedChange  += ONINITIALIZEDCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 847;
        // RegisterEvent( DEVICE , ONDEBUGENABLECHANGE , ONDEBUGENABLECHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnDebugEnableChange  += ONDEBUGENABLECHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 848;
        // RegisterEvent( DEVICE , ONPASSBACKENABLECHANGE , ONPASSBACKENABLECHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnPassbackEnableChange  += ONPASSBACKENABLECHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 849;
        // RegisterEvent( DEVICE , ONADDRESSCHANGE , ONADDRESSCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnAddressChange  += ONADDRESSCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 850;
        // RegisterEvent( DEVICE , ONARMCCHANGE , ONARMCCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnArmCChange  += ONARMCCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 851;
        // RegisterEvent( DEVICE , ONPHANTOMCHANGE , ONPHANTOMCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnPhantomChange  += ONPHANTOMCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 852;
        // RegisterEvent( DEVICE , ONLEDCHANGE , ONLEDCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnLedChange  += ONLEDCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 853;
        // RegisterEvent( DEVICE , ONSWITCHCHANGE , ONSWITCHCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnSwitchChange  += ONSWITCHCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 854;
        // RegisterEvent( DEVICE , ONPRESETCHANGE , ONPRESETCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnPresetChange  += ONPRESETCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 855;
        // RegisterEvent( DEVICE , ONPASSBACKCHANGE , ONPASSBACKCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnPassbackChange  += ONPASSBACKCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 856;
        // RegisterEvent( DEVICE , ONTRACKINGCHANGE , ONTRACKINGCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnTrackingChange  += ONTRACKINGCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 857;
        // RegisterEvent( DEVICE , ONAPTCHANGE , ONAPTCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnAptChange  += ONAPTCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 858;
        // RegisterEvent( DEVICE , ONEQCHANGE , ONEQCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnEQChange  += ONEQCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 859;
        // RegisterEvent( DEVICE , ONNOISESUPCHANGE , ONNOISESUPCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnNoiseSupChange  += ONNOISESUPCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 860;
        // RegisterEvent( DEVICE , ONBUTTONCHANGE , ONBUTTONCHANGE ) 
        try { g_criticalSection.Enter(); DEVICE .OnButtonChange  += ONBUTTONCHANGE; } finally { g_criticalSection.Leave(); }
        ; 
        __context__.SourceCodeLine = 862;
        Functions.Delay (  (int) ( 500 ) ) ; 
        __context__.SourceCodeLine = 864;
        DEVICE . Configure ( (ushort)( DEVICE_TYPE  .Value ), IP_ADDRESS  .ToString(), (ushort)( IP_PORT  .Value ), (ushort)( ADAPTER_TYPE  .Value ), (ushort)( BRIGHTNESS_TYPE  .Value ), ADAPTER_IP_OVERRIDE  .ToString()) ; 
        
        
    }
    catch(Exception e) { ObjectCatchHandler(e); }
    finally { ObjectFinallyHandler(); }
    return __obj__;
    }
    

public override void LogosSplusInitialize()
{
    SocketInfo __socketinfo__ = new SocketInfo( 1, this );
    InitialParametersClass.ResolveHostName = __socketinfo__.ResolveHostName;
    _SplusNVRAM = new SplusNVRAM( this );
    EQLEVEL  = new ushort[ 4 ];
    LEDREDLEVEL  = new ushort[ 16 ];
    LEDGREENLEVEL  = new ushort[ 16 ];
    LEDBLUELEVEL  = new ushort[ 16 ];
    SWITCHADDRESS  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
    IPADDRESS  = new CrestronString( Crestron.Logos.SplusObjects.CrestronStringEncoding.eEncodingASCII, 255, this );
    
    REINITIALIZE = new Crestron.Logos.SplusObjects.DigitalInput( REINITIALIZE__DigitalInput__, this );
    m_DigitalInputList.Add( REINITIALIZE__DigitalInput__, REINITIALIZE );
    
    ENABLE_DEBUG = new Crestron.Logos.SplusObjects.DigitalInput( ENABLE_DEBUG__DigitalInput__, this );
    m_DigitalInputList.Add( ENABLE_DEBUG__DigitalInput__, ENABLE_DEBUG );
    
    POLL = new Crestron.Logos.SplusObjects.DigitalInput( POLL__DigitalInput__, this );
    m_DigitalInputList.Add( POLL__DigitalInput__, POLL );
    
    ENABLE_PASSBACK = new Crestron.Logos.SplusObjects.DigitalInput( ENABLE_PASSBACK__DigitalInput__, this );
    m_DigitalInputList.Add( ENABLE_PASSBACK__DigitalInput__, ENABLE_PASSBACK );
    
    ARM_C_MIC_DOWN = new Crestron.Logos.SplusObjects.DigitalInput( ARM_C_MIC_DOWN__DigitalInput__, this );
    m_DigitalInputList.Add( ARM_C_MIC_DOWN__DigitalInput__, ARM_C_MIC_DOWN );
    
    ARM_C_MIC_UP = new Crestron.Logos.SplusObjects.DigitalInput( ARM_C_MIC_UP__DigitalInput__, this );
    m_DigitalInputList.Add( ARM_C_MIC_UP__DigitalInput__, ARM_C_MIC_UP );
    
    ARM_C_MIC_TOGGLE = new Crestron.Logos.SplusObjects.DigitalInput( ARM_C_MIC_TOGGLE__DigitalInput__, this );
    m_DigitalInputList.Add( ARM_C_MIC_TOGGLE__DigitalInput__, ARM_C_MIC_TOGGLE );
    
    PRESET_SAVE = new Crestron.Logos.SplusObjects.DigitalInput( PRESET_SAVE__DigitalInput__, this );
    m_DigitalInputList.Add( PRESET_SAVE__DigitalInput__, PRESET_SAVE );
    
    PRESET_LOAD = new Crestron.Logos.SplusObjects.DigitalInput( PRESET_LOAD__DigitalInput__, this );
    m_DigitalInputList.Add( PRESET_LOAD__DigitalInput__, PRESET_LOAD );
    
    PHANTOM_ALL_OFF = new Crestron.Logos.SplusObjects.DigitalInput( PHANTOM_ALL_OFF__DigitalInput__, this );
    m_DigitalInputList.Add( PHANTOM_ALL_OFF__DigitalInput__, PHANTOM_ALL_OFF );
    
    PHANTOM_ALL_ON = new Crestron.Logos.SplusObjects.DigitalInput( PHANTOM_ALL_ON__DigitalInput__, this );
    m_DigitalInputList.Add( PHANTOM_ALL_ON__DigitalInput__, PHANTOM_ALL_ON );
    
    LED_R_ALL_OFF = new Crestron.Logos.SplusObjects.DigitalInput( LED_R_ALL_OFF__DigitalInput__, this );
    m_DigitalInputList.Add( LED_R_ALL_OFF__DigitalInput__, LED_R_ALL_OFF );
    
    LED_R_ALL_ON = new Crestron.Logos.SplusObjects.DigitalInput( LED_R_ALL_ON__DigitalInput__, this );
    m_DigitalInputList.Add( LED_R_ALL_ON__DigitalInput__, LED_R_ALL_ON );
    
    LED_G_ALL_OFF = new Crestron.Logos.SplusObjects.DigitalInput( LED_G_ALL_OFF__DigitalInput__, this );
    m_DigitalInputList.Add( LED_G_ALL_OFF__DigitalInput__, LED_G_ALL_OFF );
    
    LED_G_ALL_ON = new Crestron.Logos.SplusObjects.DigitalInput( LED_G_ALL_ON__DigitalInput__, this );
    m_DigitalInputList.Add( LED_G_ALL_ON__DigitalInput__, LED_G_ALL_ON );
    
    LED_B_ALL_OFF = new Crestron.Logos.SplusObjects.DigitalInput( LED_B_ALL_OFF__DigitalInput__, this );
    m_DigitalInputList.Add( LED_B_ALL_OFF__DigitalInput__, LED_B_ALL_OFF );
    
    LED_B_ALL_ON = new Crestron.Logos.SplusObjects.DigitalInput( LED_B_ALL_ON__DigitalInput__, this );
    m_DigitalInputList.Add( LED_B_ALL_ON__DigitalInput__, LED_B_ALL_ON );
    
    IDENTIFY_UNIT_OFF = new Crestron.Logos.SplusObjects.DigitalInput( IDENTIFY_UNIT_OFF__DigitalInput__, this );
    m_DigitalInputList.Add( IDENTIFY_UNIT_OFF__DigitalInput__, IDENTIFY_UNIT_OFF );
    
    IDENTIFY_UNIT_ON = new Crestron.Logos.SplusObjects.DigitalInput( IDENTIFY_UNIT_ON__DigitalInput__, this );
    m_DigitalInputList.Add( IDENTIFY_UNIT_ON__DigitalInput__, IDENTIFY_UNIT_ON );
    
    IDENTIFY_UNIT_TOGGLE = new Crestron.Logos.SplusObjects.DigitalInput( IDENTIFY_UNIT_TOGGLE__DigitalInput__, this );
    m_DigitalInputList.Add( IDENTIFY_UNIT_TOGGLE__DigitalInput__, IDENTIFY_UNIT_TOGGLE );
    
    FIND_UNIT = new Crestron.Logos.SplusObjects.DigitalInput( FIND_UNIT__DigitalInput__, this );
    m_DigitalInputList.Add( FIND_UNIT__DigitalInput__, FIND_UNIT );
    
    DEFAULTS = new Crestron.Logos.SplusObjects.DigitalInput( DEFAULTS__DigitalInput__, this );
    m_DigitalInputList.Add( DEFAULTS__DigitalInput__, DEFAULTS );
    
    TRACKING_OFF = new Crestron.Logos.SplusObjects.DigitalInput( TRACKING_OFF__DigitalInput__, this );
    m_DigitalInputList.Add( TRACKING_OFF__DigitalInput__, TRACKING_OFF );
    
    TRACKING_ON = new Crestron.Logos.SplusObjects.DigitalInput( TRACKING_ON__DigitalInput__, this );
    m_DigitalInputList.Add( TRACKING_ON__DigitalInput__, TRACKING_ON );
    
    TRACKING_TOGGLE = new Crestron.Logos.SplusObjects.DigitalInput( TRACKING_TOGGLE__DigitalInput__, this );
    m_DigitalInputList.Add( TRACKING_TOGGLE__DigitalInput__, TRACKING_TOGGLE );
    
    NOISESUP_OFF = new Crestron.Logos.SplusObjects.DigitalInput( NOISESUP_OFF__DigitalInput__, this );
    m_DigitalInputList.Add( NOISESUP_OFF__DigitalInput__, NOISESUP_OFF );
    
    NOISESUP_ON = new Crestron.Logos.SplusObjects.DigitalInput( NOISESUP_ON__DigitalInput__, this );
    m_DigitalInputList.Add( NOISESUP_ON__DigitalInput__, NOISESUP_ON );
    
    NOISESUP_TOGGLE = new Crestron.Logos.SplusObjects.DigitalInput( NOISESUP_TOGGLE__DigitalInput__, this );
    m_DigitalInputList.Add( NOISESUP_TOGGLE__DigitalInput__, NOISESUP_TOGGLE );
    
    APT_SET = new InOutArray<DigitalInput>( 4, this );
    for( uint i = 0; i < 4; i++ )
    {
        APT_SET[i+1] = new Crestron.Logos.SplusObjects.DigitalInput( APT_SET__DigitalInput__ + i, APT_SET__DigitalInput__, this );
        m_DigitalInputList.Add( APT_SET__DigitalInput__ + i, APT_SET[i+1] );
    }
    
    PHANTOM_OFF = new InOutArray<DigitalInput>( 4, this );
    for( uint i = 0; i < 4; i++ )
    {
        PHANTOM_OFF[i+1] = new Crestron.Logos.SplusObjects.DigitalInput( PHANTOM_OFF__DigitalInput__ + i, PHANTOM_OFF__DigitalInput__, this );
        m_DigitalInputList.Add( PHANTOM_OFF__DigitalInput__ + i, PHANTOM_OFF[i+1] );
    }
    
    PHANTOM_ON = new InOutArray<DigitalInput>( 4, this );
    for( uint i = 0; i < 4; i++ )
    {
        PHANTOM_ON[i+1] = new Crestron.Logos.SplusObjects.DigitalInput( PHANTOM_ON__DigitalInput__ + i, PHANTOM_ON__DigitalInput__, this );
        m_DigitalInputList.Add( PHANTOM_ON__DigitalInput__ + i, PHANTOM_ON[i+1] );
    }
    
    PHANTOM_TOGGLE = new InOutArray<DigitalInput>( 4, this );
    for( uint i = 0; i < 4; i++ )
    {
        PHANTOM_TOGGLE[i+1] = new Crestron.Logos.SplusObjects.DigitalInput( PHANTOM_TOGGLE__DigitalInput__ + i, PHANTOM_TOGGLE__DigitalInput__, this );
        m_DigitalInputList.Add( PHANTOM_TOGGLE__DigitalInput__ + i, PHANTOM_TOGGLE[i+1] );
    }
    
    LED_R_OFF = new InOutArray<DigitalInput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_R_OFF[i+1] = new Crestron.Logos.SplusObjects.DigitalInput( LED_R_OFF__DigitalInput__ + i, LED_R_OFF__DigitalInput__, this );
        m_DigitalInputList.Add( LED_R_OFF__DigitalInput__ + i, LED_R_OFF[i+1] );
    }
    
    LED_R_ON = new InOutArray<DigitalInput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_R_ON[i+1] = new Crestron.Logos.SplusObjects.DigitalInput( LED_R_ON__DigitalInput__ + i, LED_R_ON__DigitalInput__, this );
        m_DigitalInputList.Add( LED_R_ON__DigitalInput__ + i, LED_R_ON[i+1] );
    }
    
    LED_R_TOGGLE = new InOutArray<DigitalInput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_R_TOGGLE[i+1] = new Crestron.Logos.SplusObjects.DigitalInput( LED_R_TOGGLE__DigitalInput__ + i, LED_R_TOGGLE__DigitalInput__, this );
        m_DigitalInputList.Add( LED_R_TOGGLE__DigitalInput__ + i, LED_R_TOGGLE[i+1] );
    }
    
    LED_G_OFF = new InOutArray<DigitalInput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_G_OFF[i+1] = new Crestron.Logos.SplusObjects.DigitalInput( LED_G_OFF__DigitalInput__ + i, LED_G_OFF__DigitalInput__, this );
        m_DigitalInputList.Add( LED_G_OFF__DigitalInput__ + i, LED_G_OFF[i+1] );
    }
    
    LED_G_ON = new InOutArray<DigitalInput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_G_ON[i+1] = new Crestron.Logos.SplusObjects.DigitalInput( LED_G_ON__DigitalInput__ + i, LED_G_ON__DigitalInput__, this );
        m_DigitalInputList.Add( LED_G_ON__DigitalInput__ + i, LED_G_ON[i+1] );
    }
    
    LED_G_TOGGLE = new InOutArray<DigitalInput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_G_TOGGLE[i+1] = new Crestron.Logos.SplusObjects.DigitalInput( LED_G_TOGGLE__DigitalInput__ + i, LED_G_TOGGLE__DigitalInput__, this );
        m_DigitalInputList.Add( LED_G_TOGGLE__DigitalInput__ + i, LED_G_TOGGLE[i+1] );
    }
    
    LED_B_OFF = new InOutArray<DigitalInput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_B_OFF[i+1] = new Crestron.Logos.SplusObjects.DigitalInput( LED_B_OFF__DigitalInput__ + i, LED_B_OFF__DigitalInput__, this );
        m_DigitalInputList.Add( LED_B_OFF__DigitalInput__ + i, LED_B_OFF[i+1] );
    }
    
    LED_B_ON = new InOutArray<DigitalInput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_B_ON[i+1] = new Crestron.Logos.SplusObjects.DigitalInput( LED_B_ON__DigitalInput__ + i, LED_B_ON__DigitalInput__, this );
        m_DigitalInputList.Add( LED_B_ON__DigitalInput__ + i, LED_B_ON[i+1] );
    }
    
    LED_B_TOGGLE = new InOutArray<DigitalInput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_B_TOGGLE[i+1] = new Crestron.Logos.SplusObjects.DigitalInput( LED_B_TOGGLE__DigitalInput__ + i, LED_B_TOGGLE__DigitalInput__, this );
        m_DigitalInputList.Add( LED_B_TOGGLE__DigitalInput__ + i, LED_B_TOGGLE[i+1] );
    }
    
    IS_COMMUNICATING = new Crestron.Logos.SplusObjects.DigitalOutput( IS_COMMUNICATING__DigitalOutput__, this );
    m_DigitalOutputList.Add( IS_COMMUNICATING__DigitalOutput__, IS_COMMUNICATING );
    
    IS_INITIALIZED = new Crestron.Logos.SplusObjects.DigitalOutput( IS_INITIALIZED__DigitalOutput__, this );
    m_DigitalOutputList.Add( IS_INITIALIZED__DigitalOutput__, IS_INITIALIZED );
    
    DEBUG_ENABLED = new Crestron.Logos.SplusObjects.DigitalOutput( DEBUG_ENABLED__DigitalOutput__, this );
    m_DigitalOutputList.Add( DEBUG_ENABLED__DigitalOutput__, DEBUG_ENABLED );
    
    UNUSED = new Crestron.Logos.SplusObjects.DigitalOutput( UNUSED__DigitalOutput__, this );
    m_DigitalOutputList.Add( UNUSED__DigitalOutput__, UNUSED );
    
    PASSBACK_ENABLED = new Crestron.Logos.SplusObjects.DigitalOutput( PASSBACK_ENABLED__DigitalOutput__, this );
    m_DigitalOutputList.Add( PASSBACK_ENABLED__DigitalOutput__, PASSBACK_ENABLED );
    
    ARM_C_MIC_IS_UP = new Crestron.Logos.SplusObjects.DigitalOutput( ARM_C_MIC_IS_UP__DigitalOutput__, this );
    m_DigitalOutputList.Add( ARM_C_MIC_IS_UP__DigitalOutput__, ARM_C_MIC_IS_UP );
    
    PRESET_SAVED = new Crestron.Logos.SplusObjects.DigitalOutput( PRESET_SAVED__DigitalOutput__, this );
    m_DigitalOutputList.Add( PRESET_SAVED__DigitalOutput__, PRESET_SAVED );
    
    IDENTIFY_UNIT_IS_ON = new Crestron.Logos.SplusObjects.DigitalOutput( IDENTIFY_UNIT_IS_ON__DigitalOutput__, this );
    m_DigitalOutputList.Add( IDENTIFY_UNIT_IS_ON__DigitalOutput__, IDENTIFY_UNIT_IS_ON );
    
    TRACKING_IS_ON = new Crestron.Logos.SplusObjects.DigitalOutput( TRACKING_IS_ON__DigitalOutput__, this );
    m_DigitalOutputList.Add( TRACKING_IS_ON__DigitalOutput__, TRACKING_IS_ON );
    
    NOISESUP_IS_ON = new Crestron.Logos.SplusObjects.DigitalOutput( NOISESUP_IS_ON__DigitalOutput__, this );
    m_DigitalOutputList.Add( NOISESUP_IS_ON__DigitalOutput__, NOISESUP_IS_ON );
    
    APT_IS_ACTIVE = new InOutArray<DigitalOutput>( 4, this );
    for( uint i = 0; i < 4; i++ )
    {
        APT_IS_ACTIVE[i+1] = new Crestron.Logos.SplusObjects.DigitalOutput( APT_IS_ACTIVE__DigitalOutput__ + i, this );
        m_DigitalOutputList.Add( APT_IS_ACTIVE__DigitalOutput__ + i, APT_IS_ACTIVE[i+1] );
    }
    
    PHANTOM_IS_ON = new InOutArray<DigitalOutput>( 4, this );
    for( uint i = 0; i < 4; i++ )
    {
        PHANTOM_IS_ON[i+1] = new Crestron.Logos.SplusObjects.DigitalOutput( PHANTOM_IS_ON__DigitalOutput__ + i, this );
        m_DigitalOutputList.Add( PHANTOM_IS_ON__DigitalOutput__ + i, PHANTOM_IS_ON[i+1] );
    }
    
    LED_R_IS_ON = new InOutArray<DigitalOutput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_R_IS_ON[i+1] = new Crestron.Logos.SplusObjects.DigitalOutput( LED_R_IS_ON__DigitalOutput__ + i, this );
        m_DigitalOutputList.Add( LED_R_IS_ON__DigitalOutput__ + i, LED_R_IS_ON[i+1] );
    }
    
    LED_G_IS_ON = new InOutArray<DigitalOutput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_G_IS_ON[i+1] = new Crestron.Logos.SplusObjects.DigitalOutput( LED_G_IS_ON__DigitalOutput__ + i, this );
        m_DigitalOutputList.Add( LED_G_IS_ON__DigitalOutput__ + i, LED_G_IS_ON[i+1] );
    }
    
    LED_B_IS_ON = new InOutArray<DigitalOutput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_B_IS_ON[i+1] = new Crestron.Logos.SplusObjects.DigitalOutput( LED_B_IS_ON__DigitalOutput__ + i, this );
        m_DigitalOutputList.Add( LED_B_IS_ON__DigitalOutput__ + i, LED_B_IS_ON[i+1] );
    }
    
    SWITCH_CH1_IS_ON = new InOutArray<DigitalOutput>( 3, this );
    for( uint i = 0; i < 3; i++ )
    {
        SWITCH_CH1_IS_ON[i+1] = new Crestron.Logos.SplusObjects.DigitalOutput( SWITCH_CH1_IS_ON__DigitalOutput__ + i, this );
        m_DigitalOutputList.Add( SWITCH_CH1_IS_ON__DigitalOutput__ + i, SWITCH_CH1_IS_ON[i+1] );
    }
    
    SWITCH_CH2_IS_ON = new InOutArray<DigitalOutput>( 3, this );
    for( uint i = 0; i < 3; i++ )
    {
        SWITCH_CH2_IS_ON[i+1] = new Crestron.Logos.SplusObjects.DigitalOutput( SWITCH_CH2_IS_ON__DigitalOutput__ + i, this );
        m_DigitalOutputList.Add( SWITCH_CH2_IS_ON__DigitalOutput__ + i, SWITCH_CH2_IS_ON[i+1] );
    }
    
    SWITCH_CH3_IS_ON = new InOutArray<DigitalOutput>( 3, this );
    for( uint i = 0; i < 3; i++ )
    {
        SWITCH_CH3_IS_ON[i+1] = new Crestron.Logos.SplusObjects.DigitalOutput( SWITCH_CH3_IS_ON__DigitalOutput__ + i, this );
        m_DigitalOutputList.Add( SWITCH_CH3_IS_ON__DigitalOutput__ + i, SWITCH_CH3_IS_ON[i+1] );
    }
    
    SWITCH_CH4_IS_ON = new InOutArray<DigitalOutput>( 3, this );
    for( uint i = 0; i < 3; i++ )
    {
        SWITCH_CH4_IS_ON[i+1] = new Crestron.Logos.SplusObjects.DigitalOutput( SWITCH_CH4_IS_ON__DigitalOutput__ + i, this );
        m_DigitalOutputList.Add( SWITCH_CH4_IS_ON__DigitalOutput__ + i, SWITCH_CH4_IS_ON[i+1] );
    }
    
    BUTTON_PRESSED = new InOutArray<DigitalOutput>( 12, this );
    for( uint i = 0; i < 12; i++ )
    {
        BUTTON_PRESSED[i+1] = new Crestron.Logos.SplusObjects.DigitalOutput( BUTTON_PRESSED__DigitalOutput__ + i, this );
        m_DigitalOutputList.Add( BUTTON_PRESSED__DigitalOutput__ + i, BUTTON_PRESSED[i+1] );
    }
    
    LED_R_ALL_BRIGHT_SET = new Crestron.Logos.SplusObjects.AnalogInput( LED_R_ALL_BRIGHT_SET__AnalogSerialInput__, this );
    m_AnalogInputList.Add( LED_R_ALL_BRIGHT_SET__AnalogSerialInput__, LED_R_ALL_BRIGHT_SET );
    
    LED_G_ALL_BRIGHT_SET = new Crestron.Logos.SplusObjects.AnalogInput( LED_G_ALL_BRIGHT_SET__AnalogSerialInput__, this );
    m_AnalogInputList.Add( LED_G_ALL_BRIGHT_SET__AnalogSerialInput__, LED_G_ALL_BRIGHT_SET );
    
    LED_B_ALL_BRIGHT_SET = new Crestron.Logos.SplusObjects.AnalogInput( LED_B_ALL_BRIGHT_SET__AnalogSerialInput__, this );
    m_AnalogInputList.Add( LED_B_ALL_BRIGHT_SET__AnalogSerialInput__, LED_B_ALL_BRIGHT_SET );
    
    EQ_SET = new InOutArray<AnalogInput>( 3, this );
    for( uint i = 0; i < 3; i++ )
    {
        EQ_SET[i+1] = new Crestron.Logos.SplusObjects.AnalogInput( EQ_SET__AnalogSerialInput__ + i, EQ_SET__AnalogSerialInput__, this );
        m_AnalogInputList.Add( EQ_SET__AnalogSerialInput__ + i, EQ_SET[i+1] );
    }
    
    LED_R_BRIGHT_SET = new InOutArray<AnalogInput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_R_BRIGHT_SET[i+1] = new Crestron.Logos.SplusObjects.AnalogInput( LED_R_BRIGHT_SET__AnalogSerialInput__ + i, LED_R_BRIGHT_SET__AnalogSerialInput__, this );
        m_AnalogInputList.Add( LED_R_BRIGHT_SET__AnalogSerialInput__ + i, LED_R_BRIGHT_SET[i+1] );
    }
    
    LED_G_BRIGHT_SET = new InOutArray<AnalogInput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_G_BRIGHT_SET[i+1] = new Crestron.Logos.SplusObjects.AnalogInput( LED_G_BRIGHT_SET__AnalogSerialInput__ + i, LED_G_BRIGHT_SET__AnalogSerialInput__, this );
        m_AnalogInputList.Add( LED_G_BRIGHT_SET__AnalogSerialInput__ + i, LED_G_BRIGHT_SET[i+1] );
    }
    
    LED_B_BRIGHT_SET = new InOutArray<AnalogInput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_B_BRIGHT_SET[i+1] = new Crestron.Logos.SplusObjects.AnalogInput( LED_B_BRIGHT_SET__AnalogSerialInput__ + i, LED_B_BRIGHT_SET__AnalogSerialInput__, this );
        m_AnalogInputList.Add( LED_B_BRIGHT_SET__AnalogSerialInput__ + i, LED_B_BRIGHT_SET[i+1] );
    }
    
    EQ_LEVEL = new InOutArray<AnalogOutput>( 3, this );
    for( uint i = 0; i < 3; i++ )
    {
        EQ_LEVEL[i+1] = new Crestron.Logos.SplusObjects.AnalogOutput( EQ_LEVEL__AnalogSerialOutput__ + i, this );
        m_AnalogOutputList.Add( EQ_LEVEL__AnalogSerialOutput__ + i, EQ_LEVEL[i+1] );
    }
    
    LED_R_BRIGHT_LEVEL = new InOutArray<AnalogOutput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_R_BRIGHT_LEVEL[i+1] = new Crestron.Logos.SplusObjects.AnalogOutput( LED_R_BRIGHT_LEVEL__AnalogSerialOutput__ + i, this );
        m_AnalogOutputList.Add( LED_R_BRIGHT_LEVEL__AnalogSerialOutput__ + i, LED_R_BRIGHT_LEVEL[i+1] );
    }
    
    LED_G_BRIGHT_LEVEL = new InOutArray<AnalogOutput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_G_BRIGHT_LEVEL[i+1] = new Crestron.Logos.SplusObjects.AnalogOutput( LED_G_BRIGHT_LEVEL__AnalogSerialOutput__ + i, this );
        m_AnalogOutputList.Add( LED_G_BRIGHT_LEVEL__AnalogSerialOutput__ + i, LED_G_BRIGHT_LEVEL[i+1] );
    }
    
    LED_B_BRIGHT_LEVEL = new InOutArray<AnalogOutput>( 15, this );
    for( uint i = 0; i < 15; i++ )
    {
        LED_B_BRIGHT_LEVEL[i+1] = new Crestron.Logos.SplusObjects.AnalogOutput( LED_B_BRIGHT_LEVEL__AnalogSerialOutput__ + i, this );
        m_AnalogOutputList.Add( LED_B_BRIGHT_LEVEL__AnalogSerialOutput__ + i, LED_B_BRIGHT_LEVEL[i+1] );
    }
    
    PASSTHROUGH_TEXT = new Crestron.Logos.SplusObjects.StringInput( PASSTHROUGH_TEXT__AnalogSerialInput__, 1024, this );
    m_StringInputList.Add( PASSTHROUGH_TEXT__AnalogSerialInput__, PASSTHROUGH_TEXT );
    
    SWITCH_ADDRESS_TEXT = new Crestron.Logos.SplusObjects.StringOutput( SWITCH_ADDRESS_TEXT__AnalogSerialOutput__, this );
    m_StringOutputList.Add( SWITCH_ADDRESS_TEXT__AnalogSerialOutput__, SWITCH_ADDRESS_TEXT );
    
    IP_ADDRESS_TEXT = new Crestron.Logos.SplusObjects.StringOutput( IP_ADDRESS_TEXT__AnalogSerialOutput__, this );
    m_StringOutputList.Add( IP_ADDRESS_TEXT__AnalogSerialOutput__, IP_ADDRESS_TEXT );
    
    PASSBACK_TEXT = new Crestron.Logos.SplusObjects.StringOutput( PASSBACK_TEXT__AnalogSerialOutput__, this );
    m_StringOutputList.Add( PASSBACK_TEXT__AnalogSerialOutput__, PASSBACK_TEXT );
    
    DEVICE_TYPE = new UShortParameter( DEVICE_TYPE__Parameter__, this );
    m_ParameterList.Add( DEVICE_TYPE__Parameter__, DEVICE_TYPE );
    
    IP_PORT = new UShortParameter( IP_PORT__Parameter__, this );
    m_ParameterList.Add( IP_PORT__Parameter__, IP_PORT );
    
    ADAPTER_TYPE = new UShortParameter( ADAPTER_TYPE__Parameter__, this );
    m_ParameterList.Add( ADAPTER_TYPE__Parameter__, ADAPTER_TYPE );
    
    BRIGHTNESS_TYPE = new UShortParameter( BRIGHTNESS_TYPE__Parameter__, this );
    m_ParameterList.Add( BRIGHTNESS_TYPE__Parameter__, BRIGHTNESS_TYPE );
    
    IP_ADDRESS = new StringParameter( IP_ADDRESS__Parameter__, this );
    m_ParameterList.Add( IP_ADDRESS__Parameter__, IP_ADDRESS );
    
    ADAPTER_IP_OVERRIDE = new StringParameter( ADAPTER_IP_OVERRIDE__Parameter__, this );
    m_ParameterList.Add( ADAPTER_IP_OVERRIDE__Parameter__, ADAPTER_IP_OVERRIDE );
    
    
    REINITIALIZE.OnDigitalPush.Add( new InputChangeHandlerWrapper( REINITIALIZE_OnPush_0, true ) );
    ENABLE_DEBUG.OnDigitalPush.Add( new InputChangeHandlerWrapper( ENABLE_DEBUG_OnPush_1, true ) );
    ENABLE_DEBUG.OnDigitalRelease.Add( new InputChangeHandlerWrapper( ENABLE_DEBUG_OnRelease_2, true ) );
    POLL.OnDigitalPush.Add( new InputChangeHandlerWrapper( POLL_OnPush_3, true ) );
    ENABLE_PASSBACK.OnDigitalPush.Add( new InputChangeHandlerWrapper( ENABLE_PASSBACK_OnPush_4, true ) );
    ENABLE_PASSBACK.OnDigitalRelease.Add( new InputChangeHandlerWrapper( ENABLE_PASSBACK_OnRelease_5, true ) );
    ARM_C_MIC_DOWN.OnDigitalPush.Add( new InputChangeHandlerWrapper( ARM_C_MIC_DOWN_OnPush_6, true ) );
    ARM_C_MIC_UP.OnDigitalPush.Add( new InputChangeHandlerWrapper( ARM_C_MIC_UP_OnPush_7, true ) );
    ARM_C_MIC_TOGGLE.OnDigitalPush.Add( new InputChangeHandlerWrapper( ARM_C_MIC_TOGGLE_OnPush_8, true ) );
    PRESET_SAVE.OnDigitalPush.Add( new InputChangeHandlerWrapper( PRESET_SAVE_OnPush_9, true ) );
    PRESET_LOAD.OnDigitalPush.Add( new InputChangeHandlerWrapper( PRESET_LOAD_OnPush_10, true ) );
    PHANTOM_ALL_OFF.OnDigitalPush.Add( new InputChangeHandlerWrapper( PHANTOM_ALL_OFF_OnPush_11, true ) );
    PHANTOM_ALL_ON.OnDigitalPush.Add( new InputChangeHandlerWrapper( PHANTOM_ALL_ON_OnPush_12, true ) );
    for( uint i = 0; i < 4; i++ )
        PHANTOM_OFF[i+1].OnDigitalPush.Add( new InputChangeHandlerWrapper( PHANTOM_OFF_OnPush_13, true ) );
        
    for( uint i = 0; i < 4; i++ )
        PHANTOM_ON[i+1].OnDigitalPush.Add( new InputChangeHandlerWrapper( PHANTOM_ON_OnPush_14, true ) );
        
    for( uint i = 0; i < 4; i++ )
        PHANTOM_TOGGLE[i+1].OnDigitalPush.Add( new InputChangeHandlerWrapper( PHANTOM_TOGGLE_OnPush_15, true ) );
        
    LED_R_ALL_OFF.OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_R_ALL_OFF_OnPush_16, true ) );
    LED_R_ALL_ON.OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_R_ALL_ON_OnPush_17, true ) );
    for( uint i = 0; i < 15; i++ )
        LED_R_OFF[i+1].OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_R_OFF_OnPush_18, true ) );
        
    for( uint i = 0; i < 15; i++ )
        LED_R_ON[i+1].OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_R_ON_OnPush_19, true ) );
        
    for( uint i = 0; i < 15; i++ )
        LED_R_TOGGLE[i+1].OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_R_TOGGLE_OnPush_20, true ) );
        
    LED_G_ALL_OFF.OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_G_ALL_OFF_OnPush_21, true ) );
    LED_G_ALL_ON.OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_G_ALL_ON_OnPush_22, true ) );
    for( uint i = 0; i < 15; i++ )
        LED_G_OFF[i+1].OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_G_OFF_OnPush_23, true ) );
        
    for( uint i = 0; i < 15; i++ )
        LED_G_ON[i+1].OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_G_ON_OnPush_24, true ) );
        
    for( uint i = 0; i < 15; i++ )
        LED_G_TOGGLE[i+1].OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_G_TOGGLE_OnPush_25, true ) );
        
    LED_B_ALL_OFF.OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_B_ALL_OFF_OnPush_26, true ) );
    LED_B_ALL_ON.OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_B_ALL_ON_OnPush_27, true ) );
    for( uint i = 0; i < 15; i++ )
        LED_B_OFF[i+1].OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_B_OFF_OnPush_28, true ) );
        
    for( uint i = 0; i < 15; i++ )
        LED_B_ON[i+1].OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_B_ON_OnPush_29, true ) );
        
    for( uint i = 0; i < 15; i++ )
        LED_B_TOGGLE[i+1].OnDigitalPush.Add( new InputChangeHandlerWrapper( LED_B_TOGGLE_OnPush_30, true ) );
        
    LED_R_ALL_BRIGHT_SET.OnAnalogChange.Add( new InputChangeHandlerWrapper( LED_R_ALL_BRIGHT_SET_OnChange_31, true ) );
    for( uint i = 0; i < 15; i++ )
        LED_R_BRIGHT_SET[i+1].OnAnalogChange.Add( new InputChangeHandlerWrapper( LED_R_BRIGHT_SET_OnChange_32, true ) );
        
    LED_G_ALL_BRIGHT_SET.OnAnalogChange.Add( new InputChangeHandlerWrapper( LED_G_ALL_BRIGHT_SET_OnChange_33, true ) );
    for( uint i = 0; i < 15; i++ )
        LED_G_BRIGHT_SET[i+1].OnAnalogChange.Add( new InputChangeHandlerWrapper( LED_G_BRIGHT_SET_OnChange_34, true ) );
        
    LED_B_ALL_BRIGHT_SET.OnAnalogChange.Add( new InputChangeHandlerWrapper( LED_B_ALL_BRIGHT_SET_OnChange_35, true ) );
    for( uint i = 0; i < 15; i++ )
        LED_B_BRIGHT_SET[i+1].OnAnalogChange.Add( new InputChangeHandlerWrapper( LED_B_BRIGHT_SET_OnChange_36, true ) );
        
    PASSTHROUGH_TEXT.OnSerialChange.Add( new InputChangeHandlerWrapper( PASSTHROUGH_TEXT_OnChange_37, true ) );
    IDENTIFY_UNIT_OFF.OnDigitalPush.Add( new InputChangeHandlerWrapper( IDENTIFY_UNIT_OFF_OnPush_38, true ) );
    IDENTIFY_UNIT_ON.OnDigitalPush.Add( new InputChangeHandlerWrapper( IDENTIFY_UNIT_ON_OnPush_39, true ) );
    IDENTIFY_UNIT_TOGGLE.OnDigitalPush.Add( new InputChangeHandlerWrapper( IDENTIFY_UNIT_TOGGLE_OnPush_40, true ) );
    FIND_UNIT.OnDigitalPush.Add( new InputChangeHandlerWrapper( FIND_UNIT_OnPush_41, true ) );
    DEFAULTS.OnDigitalPush.Add( new InputChangeHandlerWrapper( DEFAULTS_OnPush_42, true ) );
    TRACKING_OFF.OnDigitalPush.Add( new InputChangeHandlerWrapper( TRACKING_OFF_OnPush_43, true ) );
    TRACKING_ON.OnDigitalPush.Add( new InputChangeHandlerWrapper( TRACKING_ON_OnPush_44, true ) );
    TRACKING_TOGGLE.OnDigitalPush.Add( new InputChangeHandlerWrapper( TRACKING_TOGGLE_OnPush_45, true ) );
    NOISESUP_OFF.OnDigitalPush.Add( new InputChangeHandlerWrapper( NOISESUP_OFF_OnPush_46, true ) );
    NOISESUP_ON.OnDigitalPush.Add( new InputChangeHandlerWrapper( NOISESUP_ON_OnPush_47, true ) );
    NOISESUP_TOGGLE.OnDigitalPush.Add( new InputChangeHandlerWrapper( NOISESUP_TOGGLE_OnPush_48, true ) );
    for( uint i = 0; i < 4; i++ )
        APT_SET[i+1].OnDigitalPush.Add( new InputChangeHandlerWrapper( APT_SET_OnPush_49, true ) );
        
    for( uint i = 0; i < 3; i++ )
        EQ_SET[i+1].OnAnalogChange.Add( new InputChangeHandlerWrapper( EQ_SET_OnChange_50, true ) );
        
    
    _SplusNVRAM.PopulateCustomAttributeList( true );
    
    NVRAM = _SplusNVRAM;
    
}

public override void LogosSimplSharpInitialize()
{
    DEVICE  = new Clock_Audio.ClockAudioDevice();
    
    
}

public UserModuleClass_CLOCK_AUDIO_DEVICE_V3_4_1 ( string InstanceName, string ReferenceID, Crestron.Logos.SplusObjects.CrestronStringEncoding nEncodingType ) : base( InstanceName, ReferenceID, nEncodingType ) {}




const uint REINITIALIZE__DigitalInput__ = 0;
const uint ENABLE_DEBUG__DigitalInput__ = 1;
const uint POLL__DigitalInput__ = 2;
const uint ENABLE_PASSBACK__DigitalInput__ = 3;
const uint ARM_C_MIC_DOWN__DigitalInput__ = 4;
const uint ARM_C_MIC_UP__DigitalInput__ = 5;
const uint ARM_C_MIC_TOGGLE__DigitalInput__ = 6;
const uint PRESET_SAVE__DigitalInput__ = 7;
const uint PRESET_LOAD__DigitalInput__ = 8;
const uint PHANTOM_ALL_OFF__DigitalInput__ = 9;
const uint PHANTOM_ALL_ON__DigitalInput__ = 10;
const uint LED_R_ALL_OFF__DigitalInput__ = 11;
const uint LED_R_ALL_ON__DigitalInput__ = 12;
const uint LED_G_ALL_OFF__DigitalInput__ = 13;
const uint LED_G_ALL_ON__DigitalInput__ = 14;
const uint LED_B_ALL_OFF__DigitalInput__ = 15;
const uint LED_B_ALL_ON__DigitalInput__ = 16;
const uint IDENTIFY_UNIT_OFF__DigitalInput__ = 17;
const uint IDENTIFY_UNIT_ON__DigitalInput__ = 18;
const uint IDENTIFY_UNIT_TOGGLE__DigitalInput__ = 19;
const uint FIND_UNIT__DigitalInput__ = 20;
const uint DEFAULTS__DigitalInput__ = 21;
const uint TRACKING_OFF__DigitalInput__ = 22;
const uint TRACKING_ON__DigitalInput__ = 23;
const uint TRACKING_TOGGLE__DigitalInput__ = 24;
const uint NOISESUP_OFF__DigitalInput__ = 25;
const uint NOISESUP_ON__DigitalInput__ = 26;
const uint NOISESUP_TOGGLE__DigitalInput__ = 27;
const uint APT_SET__DigitalInput__ = 28;
const uint PHANTOM_OFF__DigitalInput__ = 32;
const uint PHANTOM_ON__DigitalInput__ = 36;
const uint PHANTOM_TOGGLE__DigitalInput__ = 40;
const uint LED_R_OFF__DigitalInput__ = 44;
const uint LED_R_ON__DigitalInput__ = 59;
const uint LED_R_TOGGLE__DigitalInput__ = 74;
const uint LED_G_OFF__DigitalInput__ = 89;
const uint LED_G_ON__DigitalInput__ = 104;
const uint LED_G_TOGGLE__DigitalInput__ = 119;
const uint LED_B_OFF__DigitalInput__ = 134;
const uint LED_B_ON__DigitalInput__ = 149;
const uint LED_B_TOGGLE__DigitalInput__ = 164;
const uint PASSTHROUGH_TEXT__AnalogSerialInput__ = 0;
const uint LED_R_ALL_BRIGHT_SET__AnalogSerialInput__ = 1;
const uint LED_G_ALL_BRIGHT_SET__AnalogSerialInput__ = 2;
const uint LED_B_ALL_BRIGHT_SET__AnalogSerialInput__ = 3;
const uint EQ_SET__AnalogSerialInput__ = 4;
const uint LED_R_BRIGHT_SET__AnalogSerialInput__ = 7;
const uint LED_G_BRIGHT_SET__AnalogSerialInput__ = 22;
const uint LED_B_BRIGHT_SET__AnalogSerialInput__ = 37;
const uint IS_COMMUNICATING__DigitalOutput__ = 0;
const uint IS_INITIALIZED__DigitalOutput__ = 1;
const uint DEBUG_ENABLED__DigitalOutput__ = 2;
const uint UNUSED__DigitalOutput__ = 3;
const uint PASSBACK_ENABLED__DigitalOutput__ = 4;
const uint ARM_C_MIC_IS_UP__DigitalOutput__ = 5;
const uint PRESET_SAVED__DigitalOutput__ = 6;
const uint IDENTIFY_UNIT_IS_ON__DigitalOutput__ = 7;
const uint TRACKING_IS_ON__DigitalOutput__ = 8;
const uint NOISESUP_IS_ON__DigitalOutput__ = 9;
const uint APT_IS_ACTIVE__DigitalOutput__ = 10;
const uint PHANTOM_IS_ON__DigitalOutput__ = 14;
const uint LED_R_IS_ON__DigitalOutput__ = 18;
const uint LED_G_IS_ON__DigitalOutput__ = 33;
const uint LED_B_IS_ON__DigitalOutput__ = 48;
const uint SWITCH_CH1_IS_ON__DigitalOutput__ = 63;
const uint SWITCH_CH2_IS_ON__DigitalOutput__ = 66;
const uint SWITCH_CH3_IS_ON__DigitalOutput__ = 69;
const uint SWITCH_CH4_IS_ON__DigitalOutput__ = 72;
const uint BUTTON_PRESSED__DigitalOutput__ = 75;
const uint SWITCH_ADDRESS_TEXT__AnalogSerialOutput__ = 0;
const uint IP_ADDRESS_TEXT__AnalogSerialOutput__ = 1;
const uint PASSBACK_TEXT__AnalogSerialOutput__ = 2;
const uint EQ_LEVEL__AnalogSerialOutput__ = 3;
const uint LED_R_BRIGHT_LEVEL__AnalogSerialOutput__ = 6;
const uint LED_G_BRIGHT_LEVEL__AnalogSerialOutput__ = 21;
const uint LED_B_BRIGHT_LEVEL__AnalogSerialOutput__ = 36;
const uint DEVICE_TYPE__Parameter__ = 10;
const uint IP_PORT__Parameter__ = 11;
const uint ADAPTER_TYPE__Parameter__ = 12;
const uint BRIGHTNESS_TYPE__Parameter__ = 13;
const uint IP_ADDRESS__Parameter__ = 14;
const uint ADAPTER_IP_OVERRIDE__Parameter__ = 15;

[SplusStructAttribute(-1, true, false)]
public class SplusNVRAM : SplusStructureBase
{

    public SplusNVRAM( SplusObject __caller__ ) : base( __caller__ ) {}
    
    
}

SplusNVRAM _SplusNVRAM = null;

public class __CEvent__ : CEvent
{
    public __CEvent__() {}
    public void Close() { base.Close(); }
    public int Reset() { return base.Reset() ? 1 : 0; }
    public int Set() { return base.Set() ? 1 : 0; }
    public int Wait( int timeOutInMs ) { return base.Wait( timeOutInMs ) ? 1 : 0; }
}
public class __CMutex__ : CMutex
{
    public __CMutex__() {}
    public void Close() { base.Close(); }
    public void ReleaseMutex() { base.ReleaseMutex(); }
    public int WaitForMutex() { return base.WaitForMutex() ? 1 : 0; }
}
 public int IsNull( object obj ){ return (obj == null) ? 1 : 0; }
}


}
