System.IO.BACnet.BacnetSerialPortTransport.Read C# (CSharp) Метод

Read() публичный Метод

public Read ( byte buffer, int offset, int length, int timeout_ms ) : int
buffer byte
offset int
length int
timeout_ms int
Результат int
        public int Read(byte[] buffer, int offset, int length, int timeout_ms)
        {
            if (m_port == null) return 0;
            m_port.ReadTimeout = timeout_ms;
            try
            {
                int rx = m_port.Read(buffer, offset, length);
                return rx;
            }
            catch (TimeoutException)
            {
                return -BacnetMstpProtocolTransport.ETIMEDOUT;
            }
            catch (Exception)
            {
                return -1;
            }
        }