Exemplo n.º 1
0
 private void client_ConnectionStatus(int _status, int _id)
 {
     try
     {
         if (_status == 2 && !isConnected)
         {
             this.isConnected = true;
             foreach (var item in this.SimplClients)
             {
                 item.Value.Fire(new SimplEventArgs(eQscSimplEventIds.IsConnected, (SimplSharpString)"true", 1));
             }
             CrestronEnvironment.Sleep(1500);
         }
         else if (this.isConnected && _status != 2)
         {
             ErrorLog.Error("Qsys Core {0} disconnected!", this.coreID);
             this.isConnected   = false;
             this.isInitialized = false;
             this.heartbeatTimer.Dispose();
             foreach (var item in this.SimplClients)
             {
                 item.Value.Fire(new SimplEventArgs(eQscSimplEventIds.IsRegistered, (SimplSharpString)"false", 0));
                 item.Value.Fire(new SimplEventArgs(eQscSimplEventIds.IsConnected, (SimplSharpString)"false", 0));
             }
         }
     }
     catch (Exception e)
     {
         ErrorLog.Error("Qsys Core {0} connection failure {1} - {2}", this.coreID, e.Message, e.StackTrace);
     }
 }
Exemplo n.º 2
0
        private ushort MakeRequest(Func <HttpsResult> action)
        {
            try
            {
                var response = action.Invoke();

                if (response == null)
                {
                    Debug.WriteError("HTTPS response object was null.");
                    return(0);
                }

                // Some HTTP(S) responses will not have a message body.
                if (response.Content == null)
                {
                    OnSimplHttpsClientResponse(response.Status, response.ResponseUrl, string.Empty, 0);
                }
                else
                {
                    foreach (var contentChunk in response.Content.SplitIntoChunks(255))
                    {
                        OnSimplHttpsClientResponse(response.Status, response.ResponseUrl, contentChunk, response.Content.Length);
                        CrestronEnvironment.Sleep(10); // allow a little bit for things to process
                    }
                }

                return((ushort)response.Status);
            }
            catch (Exception ex)
            {
                Debug.WriteException(ex);
                return(0);
            }
        }
Exemplo n.º 3
0
        private static void SearchAndListen()
#endif
        {
            while (true)
            {
                searching.WaitOne();

                try
                {
                    Receive(UpnpSearcher.Instance, UpnpSearcher.sockets);
                    Receive(PmpSearcher.Instance, PmpSearcher.sockets);

                    foreach (ISearcher s in controllers)
                    {
                        if (s.NextSearch < DateTime.Now)
                        {
                            Log("Searching for: {0}", s.GetType().Name);
                            s.Search();
                        }
                    }
                }
                catch (Exception e)
                {
                    if (UnhandledException != null)
                    {
                        UnhandledException(typeof(NatUtility), new UnhandledExceptionEventArgs(e, false));
                    }
                }
#if SSHARP
                CrestronEnvironment.Sleep(10);
#else
                System.Threading.Thread.Sleep(10);
#endif
            }
        }
Exemplo n.º 4
0
        public void Dial(string chanNum)
        {
            if (DialIsRunning || !InitSuccess)
            {
                return;
            }
            if (DialFunctions == null)
            {
                Debug.Console(1, "DevicePresets '{0}', not attached to keypad device. Ignoring channel", Key);
                return;
            }

            DialIsRunning = true;
            CrestronInvoke.BeginInvoke(o =>
            {
                foreach (var c in chanNum.ToCharArray())
                {
                    if (DialFunctions.ContainsKey(c))
                    {
                        Pulse(DialFunctions[c]);
                    }
                    CrestronEnvironment.Sleep(DigitSpacingMS);
                }

                if (EnterFunction != null)
                {
                    Pulse(EnterFunction);
                }
                DialIsRunning = false;
            });
        }
Exemplo n.º 5
0
        void HandleQueue(object o)
        {
            while (true)
            {
                try
                {
                    var data = _queue.Dequeue();
                    if (data == null)
                    {
                        return;
                    }

                    if (Debug)
                    {
                        CrestronConsole.PrintLine("Sennheiser - {0} - Sending data: {1}", _client.AddressToAcceptConnectionFrom, data);
                    }

                    if (_connected)
                    {
                        var bytes = _encoding.GetBytes(data);
                        _client.SendData(bytes, bytes.Length);
                        CrestronEnvironment.Sleep(25);
                    }
                }
                catch (Exception ex)
                {
                    ErrorLog.Error("Sennheiser - Exception in UdpTransport.HandleQueue: " + ex.Message);
                }
            }
        }
Exemplo n.º 6
0
        void client_ConnectionStatus(int status, int id)
        {
            if (status == 2 && !isConnected)
            {
                this.isConnected = true;
                foreach (var item in SimplClients)
                {
                    item.Value.Fire(new SimplEventArgs(eElkSimplEventIds.IsConnected, "true", 1));
                }
                CrestronEnvironment.Sleep(1500);

                foreach (var item in SimplClients)
                {
                    item.Value.Fire(new SimplEventArgs(eElkSimplEventIds.IsRegistered, "true", 1));
                }
                this.InitializePanelParameters();
            }
            else if (isConnected && status != 2)
            {
                this.SendDebug("Elk Disconnected");
                this.isConnected = false;
                //foreach (var item in SimplClients)
                //{
                //    //item.Value.Fire(new SimplEventArgs(eQscSimplEventIds.IsRegistered, "false", 0));
                //    //item.Value.Fire(new SimplEventArgs(eQscSimplEventIds.IsConnected, "false", 0));
                //}
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// Attempts to acquire the mutex and returns after a
        /// timeout period if the mutex could not be acquired.
        /// </summary>
        /// <param name="millisecondsTimeout">The timeout, in milliseconds.</param>
        /// <returns>Whether or not the mutex was acquired.</returns>
        public bool TryAcquire(int millisecondsTimeout)
        {
            if (Monitor.TryEnter(_lock))
            {
                return(true);
            }

            if (millisecondsTimeout == 0)
            {
                return(false);
            }

            DateTime endtime = DateTime.Now.AddMilliseconds(millisecondsTimeout);

            while (DateTime.Now < endtime)
            {
                if (Monitor.TryEnter(_lock))
                {
                    return(true);
                }
                CrestronEnvironment.Sleep(1);
            }

            return(Monitor.TryEnter(_lock));
        }
Exemplo n.º 8
0
        private void CreatePortMapAsync(object obj)
        {
            CreatePortMapAsyncState state = obj as CreatePortMapAsyncState;

            UdpClient udpClient = new UdpClient();
            CreatePortMapListenState listenState = new CreatePortMapListenState(state, udpClient);

            int attempt = 0;
            int delay   = PmpConstants.RetryDelay;

            ThreadPool.QueueUserWorkItem(new WaitCallback(CreatePortMapListen), listenState);

            while (attempt < PmpConstants.RetryAttempts && !listenState.Success)
            {
                udpClient.Send(state.Buffer, state.Buffer.Length, new IPEndPoint(localAddress, PmpConstants.ServerPort));
                listenState.UdpClientReady.Set();

                attempt++;
                delay *= 2;
#if SSHARP
                CrestronEnvironment.Sleep(delay);
#else
                Thread.Sleep(delay);
#endif
            }

            state.Success = listenState.Success;

            udpClient.Close();
            state.ResetEvent.Set();
        }
Exemplo n.º 9
0
        /// <summary>
        ///     Acquires the lock in shared mode, busy waiting
        ///     if necessary.
        /// </summary>
        /// <remarks>
        ///     Exclusive acquires are *not* given precedence over shared
        ///     acquires for busy wait methods.
        /// </remarks>
        public IDisposable SpinAcquireShared()
        {
            int ncount = 0;

            while (true)
            {
                int value = _value;

                if ((value & ExclusiveMask) == 0)
                {
                    if ((value & LockOwned) == 0)
                    {
                        if (Interlocked.CompareExchange(ref _value, value + LockOwned + LockSharedOwnersIncrement, value) == value)
                        {
                            break;
                        }
                    }
                    else if (((value >> LockSharedOwnersShift) & LockSharedOwnersMask) != 0)
                    {
                        if (Interlocked.CompareExchange(ref _value, value + LockSharedOwnersIncrement, value) == value)
                        {
                            break;
                        }
                    }
                }

                CrestronEnvironment.Sleep(++ncount % 10 == 0 ? 1 : 0);
            }

            return(_fastResourceLockContext);
        }
Exemplo n.º 10
0
        /// <summary>
        /// Sets the temperature for the passenger's climate control
        /// </summary>
        /// <param name="desiredTemperature">The value to which the climate control should be set</param>
        public void HvacSetPassengerLevel(int desiredTemperature)
        {
            decimal            convertedLevel;
            HvacSetLevelResult result;
            string             rounded;

            try
            {
                HvacSetTempUnits();

                if (Settings.TemperatureUnits == "F")
                {
                    rounded = Calculators.GetTempCelsiusFromFarenheit(Convert.ToDecimal(desiredTemperature)).ToString("0.##");
                }
                else
                {
                    rounded = desiredTemperature.ToString();
                }

                convertedLevel = Convert.ToDecimal(rounded);
                result         = new HvacSetLevelResult(convertedLevel, HvacSetLevelResult.TempLocations.Passenger);
                result.GetResult();
                CrestronEnvironment.Sleep(2000);
                result.GetResult();
            }
            catch (Exception ex)
            {
                CrestronConsole.PrintLine("SimplTeslaCar.Main.HvacSetPassengerLevel()::Error Setting Passenger HVAC: " + ex.ToString());
            }
        }
        /// <summary>
        ///
        /// </summary>
        protected override void EndShutdown()
        {
            VideoCodec.EndAllCalls();

            SetDefaultLevels();

            RunDefaultPresentRoute();

            CrestronEnvironment.Sleep(1000);

            RunRouteAction("roomOff");
        }
Exemplo n.º 12
0
        /// <summary>
        ///
        /// </summary>
        protected override void EndShutdown()
        {
            SetDefaultLevels();

            RunDefaultPresentRoute();

            CrestronEnvironment.Sleep(1000);

            Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "Shutting down room");

            RunRouteAction("roomOff");
        }
Exemplo n.º 13
0
 // client connect callback method
 void PJLinkConnectCallBack(TCPClient Client)
 {
     if (Client.ClientStatus == SocketStatus.SOCKET_STATUS_CONNECTED)
     {
         Client.ReceiveDataAsync(PJLinkReceiveDataCallback); // set up callback when data received
     }
     else
     {
         CrestronEnvironment.Sleep(2000);
         Client.ConnectToServerAsync(PJLinkConnectCallBack);  // connection failed, try again
     }
 }
Exemplo n.º 14
0
        /// <summary>
        ///
        /// </summary>
        public void StatusGet()
        {
            PowerGet();

            CrestronEnvironment.Sleep(100);

            InputGet();

            CrestronEnvironment.Sleep(100);

            VolumeGet();
        }
Exemplo n.º 15
0
 private INTEGER MakeRequest(Func <HttpsResult> action)
 {
     using (_httpsOperationLock.AquireLock())
     {
         var response = action.Invoke();
         foreach (var contentChunk in response.Content.SplitIntoChunks(250))
         {
             OnSimplHttpsClientResponse(response.Status, response.ResponseUrl, contentChunk);
             CrestronEnvironment.Sleep(10); // allow for things to process
         }
         return((INTEGER)response.Status);
     }
 }
Exemplo n.º 16
0
 public void VolumeDown(bool pressRelease)
 {
     //while (pressRelease)
     //{
     Debug.Console(2, this, "Volume Up {0}", pressRelease);
     if (pressRelease)
     {
         var newLevel = _FakeVolumeLevel - VolumeInterval;
         SetVolume((ushort)newLevel);
         CrestronEnvironment.Sleep(VolumeHeldRepeatInterval);
     }
     //}
 }
 /// <summary>
 /// On monitor connect, restart the operation
 /// </summary>
 void MonitorClient_IsReadyForComm(object sender, GenericTcpServerClientReadyForcommunicationsEventArgs args)
 {
     if (args.IsReady)
     {
         Debug.Console(1, this, Debug.ErrorLogLevel.Notice, "Monitor client connection success. Disconnecting in 2s");
         MonitorClientTimer.Stop();
         MonitorClientTimer        = null;
         MonitorClientFailureCount = 0;
         CrestronEnvironment.Sleep(2000);
         StopMonitorClient();
         StartMonitorClient();
     }
 }
Exemplo n.º 18
0
 // client connect callback method
 void ConnectCallBack(TCPClient Client)
 {
     if (Client.ClientStatus == SocketStatus.SOCKET_STATUS_CONNECTED)
     {
         Client.ReceiveDataAsync(ReceiveDataCallback); // set up callback when data received
     }
     else
     {
         CrestronEnvironment.Sleep(2000);
         Client.ConnectToServerAsync(ConnectCallBack);  // connection failed, try again
         CrestronConsole.PrintLine("Attempting to reconnect PJLink Projector");
     }
 }
Exemplo n.º 19
0
        /// <summary>
        ///     Waits for the event to be set by busy waiting.
        /// </summary>
        public void SpinWait()
        {
            if ((_value & EventSet) != 0)
            {
                return;
            }

            int ncount = 0;

            while ((_value & EventSet) == 0)
            {
                CrestronEnvironment.Sleep(++ncount % 10 == 0 ? 1 : 0);
            }
        }
Exemplo n.º 20
0
        protected void UpdateSentData(int size)
        {
            if (!IsLocal)
            {
                return;
            }

            if (InterlockedAdd(ref _bytesSent, size) > 32767)
            {
                _bytesSent = 0;

                CrestronEnvironment.Sleep(100);
            }
        }
Exemplo n.º 21
0
    // method to handle client socket status
    void SocketStatusChange(TCPClient myTCPClient, SocketStatus clientSocketStatus)
    {
        Debug(String.Format("[PJLink Projector] LAN client ({1}) reports: {0}", clientSocketStatus, IPaddress));

        if (clientSocketStatus == SocketStatus.SOCKET_STATUS_CONNECTED)
        {
            CrestronEnvironment.Sleep(2000);
            Connected = true;
            Debug("SOCKET CONNECTED!");
        }
        else
        {
            Connected = false;
            CrestronEnvironment.Sleep(2000); //attempt reconnect after 2 seconds
            Client.ConnectToServerAsync(ConnectCallBack);
        }
    }
        public override void WriteByte(byte value)
        {
            Debug.WriteLine("BNS ({0}): WriteByte () [m_outputBuffer_pos = {1}]", NetworkStream.InternalSocket.InternalRemoteEndPoint, m_outputBuffer_pos);

            CheckObjectDisposedException();

            if (!m_stream.CanWrite)
            {
                throw new NotSupportedException(Locale.GetText("Cannot write to stream"));
            }

            if (m_nagleTimer == null)
            {
                m_stream.Write(new byte[] { value }, 0, 1);
                return;
            }

            EnsureOutputBuffer();

            m_lockFlush.Acquire();
            try
            {
                m_outputBuffer[m_outputBuffer_pos++] = value;

                if (m_outputBuffer_pos == m_bufferSize)
                {
                    m_nagleTimer.Stop();
                    m_stream.Write(m_outputBuffer, 0, m_bufferSize);
                    m_outputBuffer_pos = 0;

                    if (m_isLocal)
                    {
                        CrestronEnvironment.Sleep(200);
                    }
                }
                else
                {
                    m_nagleTimer.Reset(200);
                }
            }
            finally
            {
                m_lockFlush.Release();
            }
        }
Exemplo n.º 23
0
        /// <summary>
        ///     Converts the ownership mode from shared to exclusive,
        ///     busy waiting if necessary.
        /// </summary>
        public void SpinConvertSharedToExclusive()
        {
            int ncount = 0;

            while (true)
            {
                int value = _value;

                // Can't convert if there are other shared owners.
                if (((value >> LockSharedOwnersShift) & LockSharedOwnersMask) == 1)
                {
                    if (Interlocked.CompareExchange(ref _value, value - LockSharedOwnersIncrement, value) == value)
                    {
                        break;
                    }
                }

                CrestronEnvironment.Sleep(++ncount % 10 == 0 ? 1 : 0);
            }
        }
Exemplo n.º 24
0
        /// <summary>
        ///     Acquires the lock in exclusive mode, busy waiting
        ///     if necessary.
        /// </summary>
        /// <remarks>
        ///     Exclusive acquires are *not* given precedence over shared
        ///     acquires for busy wait methods.
        /// </remarks>
        public IDisposable SpinAcquireExclusive()
        {
            int ncount = 0;

            while (true)
            {
                int value = _value;

                if ((value & (LockOwned | LockExclusiveWaking)) == 0)
                {
                    if (Interlocked.CompareExchange(ref _value, value + LockOwned, value) == value)
                    {
                        break;
                    }
                }

                CrestronEnvironment.Sleep(++ncount % 10 == 0 ? 1 : 0);
            }

            return(_fastResourceLockContext);
        }
Exemplo n.º 25
0
        /// <summary>
        /// Acquires the spinlock.
        /// </summary>
        public void Acquire()
        {
            if (Interlocked.CompareExchange(ref _value, 1, 0) == 0)
            {
                return;
            }

            //if (NativeMethods.SpinEnabled)
            //	{
            //	while (Interlocked.CompareExchange (ref _value, 1, 0) == 1)
            //		Thread.SpinWait (8);
            //	}
            //else
            {
                int ncount = 0;

                while (Interlocked.CompareExchange(ref _value, 1, 0) == 1)
                {
                    CrestronEnvironment.Sleep(++ncount % 10 == 0 ? 1 : 0);
                }
            }
        }
Exemplo n.º 26
0
        public static int WaitAny(WaitHandle[] waitHandles, int millisecondsTimeout)
        {
            if (millisecondsTimeout < Timeout.Infinite)
            {
                throw new ArgumentOutOfRangeException("millisecondsTimeout");
            }

            if (waitHandles == null || waitHandles.Any(w => w == null))
            {
                throw new ArgumentNullException("waitHandles");
            }

            if (waitHandles.Length == 0)
            {
                throw new ArgumentException("waitHandles");
            }


            long endTime = millisecondsTimeout == Timeout.Infinite ? Int64.MaxValue : millisecondsTimeout;
            var  sw      = Stopwatch.StartNew();

            int sleepTime = 0;

            while (sw.ElapsedMilliseconds <= endTime)
            {
                for (int ix = 0; ix < waitHandles.Length; ++ix)
                {
                    if (waitHandles[ix].WaitOne(0))
                    {
                        return(ix);
                    }
                }
                CrestronEnvironment.Sleep(++sleepTime);
            }

            return(WaitTimeout);
        }
Exemplo n.º 27
0
        /// <summary>
        /// Formats an outgoing message. Replaces third byte with ID and replaces last byte with checksum
        /// </summary>
        /// <param name="b"></param>
        void SendBytes(byte[] b)
        {
            if (LastCommandSentWasVolume)   // If the last command sent was volume
            {
                if (b[1] != 0x12)           // Check if this command is volume, and if not, delay this command
                {
                    CrestronEnvironment.Sleep(100);
                }
            }

            b[2] = ID;
            // append checksum by adding all bytes, except last which should be 00
            int checksum = 0;

            for (var i = 1; i < b.Length - 1; i++) // add 2nd through 2nd-to-last bytes
            {
                checksum += b[i];
            }
            checksum        = checksum & 0x000000FF; // mask off MSBs
            b[b.Length - 1] = (byte)checksum;
            if (Debug.Level == 2)                    // This check is here to prevent following string format from building unnecessarily on level 0 or 1
            {
                Debug.Console(2, this, "Sending:{0}", ComTextHelper.GetEscapedText(b));
            }

            if (b[1] == 0x12)
            {
                LastCommandSentWasVolume = true;
            }
            else
            {
                LastCommandSentWasVolume = false;
            }

            Communication.SendBytes(b);
        }
        public override void Write(byte[] array, int offset, int count)
        {
            Debug.WriteLine("BNS ({0}): Write (array, {1}, {2}) [m_outputBuffer_pos = {3}]", NetworkStream.InternalSocket.InternalRemoteEndPoint, offset, count,
                            m_outputBuffer_pos);

            if (array == null)
            {
                throw new ArgumentNullException("array");
            }
            if (offset < 0)
            {
                throw new ArgumentOutOfRangeException("offset", "< 0");
            }
            if (count < 0)
            {
                throw new ArgumentOutOfRangeException("count", "< 0");
            }
            // avoid possible integer overflow
            if (array.Length - offset < count)
            {
                throw new ArgumentException("array.Length - offset < count");
            }

            CheckObjectDisposedException();

            if (!m_stream.CanWrite)
            {
                throw new NotSupportedException(Locale.GetText("Cannot write to stream"));
            }

            if (count == 0)
            {
                return;
            }

            if (m_nagleTimer == null)
            {
                m_stream.Write(array, offset, count);
                return;
            }

            int avail = m_bufferSize - m_outputBuffer_pos;

            if (count <= avail)
            {
                EnsureOutputBuffer();

                m_lockFlush.Acquire();
                try
                {
                    Buffer.BlockCopy(array, offset, m_outputBuffer, m_outputBuffer_pos, count);
                    m_outputBuffer_pos += count;

                    if (m_outputBuffer_pos == m_bufferSize)
                    {
                        m_nagleTimer.Stop();
                        m_stream.Write(m_outputBuffer, 0, m_bufferSize);
                        m_outputBuffer_pos = 0;

                        if (m_isLocal)
                        {
                            CrestronEnvironment.Sleep(200);
                        }
                    }
                    else
                    {
                        m_nagleTimer.Reset(200);
                    }
                }
                finally
                {
                    m_lockFlush.Release();
                }

                return;
            }

            if (m_outputBuffer_pos != 0 && count <= m_bufferSize)
            {
                m_nagleTimer.Stop();

                m_lockFlush.Acquire();
                try
                {
                    if (m_outputBuffer_pos != 0)
                    {
                        var tbuffer = new byte[m_outputBuffer_pos + count];
                        Buffer.BlockCopy(m_outputBuffer, 0, tbuffer, 0, m_outputBuffer_pos);
                        Buffer.BlockCopy(array, offset, tbuffer, m_outputBuffer_pos, count);

                        m_outputBuffer_pos = 0;

                        m_stream.Write(tbuffer, 0, tbuffer.Length);

                        if (m_isLocal)
                        {
                            CrestronEnvironment.Sleep(200);
                        }

                        return;
                    }
                }
                finally
                {
                    m_lockFlush.Release();
                }
            }

            InternalFlush();
            m_stream.Write(array, offset, count);
        }
Exemplo n.º 29
0
        /*
         * internal object InternalWaitForCompletionNoSideEffects()
         * {
         * return WaitForCompletion(false);
         * }
         */

        private object WaitForCompletion(bool snap)
        {
            ManualResetEvent waitHandle  = null;
            bool             createdByMe = false;
            bool             complete    = snap ? IsCompleted : InternalPeekCompleted;

            if (!complete)
            {
                // Not done yet, so wait:
                waitHandle = (ManualResetEvent)m_Event;
                if (waitHandle == null)
                {
                    createdByMe = LazilyCreateEvent(out waitHandle);
                }
            }

            if (waitHandle != null)
            {
                try
                {
#if !NETCF
                    GlobalLog.Print("LazyAsyncResult#" + ValidationHelper.HashString(this) + "::InternalWaitForCompletion() Waiting for completion m_Event#" +
                                    ValidationHelper.HashString(waitHandle));
#endif
                    waitHandle.WaitOne(Timeout.Infinite, false);
                }
                catch (ObjectDisposedException)
                {
                    // This can occur if this method is called from two different threads.
                    // This possibility is the trade-off for not locking.
                }
                finally
                {
                    // We also want to dispose the event although we can't unless we did wait on it here.
                    if (createdByMe && !m_UserEvent)
                    {
                        // Does m_UserEvent need to be volatile (or m_Event set via Interlocked) in order
                        // to avoid giving a user a disposed event?
                        ManualResetEvent oldEvent = (ManualResetEvent)m_Event;
                        m_Event = null;
                        if (!m_UserEvent)
                        {
                            oldEvent.Close();
                        }
                    }
                }
            }

            // A race condition exists because InvokeCallback sets m_IntCompleted before m_Result (so that m_Result
            // can benefit from the synchronization of m_IntCompleted).  That means you can get here before m_Result got
            // set (although rarely - once every eight hours of stress).  Handle that case with a spin-lock.
            while (m_Result == DBNull.Value)
#if NETCF
            { CrestronEnvironment.Sleep(1); }
#else
            { Thread.SpinWait(1); }
#endif

#if !NETCF
            GlobalLog.Print("LazyAsyncResult#" + ValidationHelper.HashString(this) + "::InternalWaitForCompletion() done: " +
                            (m_Result is Exception ? ((Exception)m_Result).Message : m_Result == null ? "<null>" : m_Result.ToString()));
#endif

            return(m_Result);
        }
Exemplo n.º 30
0
 void Pulse(Action <bool> act)
 {
     act(true);
     CrestronEnvironment.Sleep(PulseTime);
     act(false);
 }