Abstract class that implements default functionality for IComm interface class. More...
Public Member Functions | |
abstract void | Close () |
Closes a connection. | |
abstract void | Open () |
Opens a connection. | |
abstract byte[] | Read () |
Read all bytes available. | |
virtual void | Read (BinaryWriter binDataIn) |
Reads all bytes available into the stream passed in. | |
virtual void | WaitForData (int msTimeOut) |
Waits until data available BytesAvailable in current thread. Current thread sleeps until data received or timeout reached. Blocking call. More... | |
virtual void | Write (BinaryReader binReader) |
Write from input stream to output stream More... | |
abstract void | Write (byte[] dataOut) |
Writes all bytes from the array passed in. | |
virtual void | WriteAndWaitForResponse (BinaryWriter binDataIn, BinaryReader binDataOut, int responseStartTimeOut, int responseEndTimeOut, string completetionToken) |
Write binDataOut stream data to output stream and return data received in binDataIn stream. Data returned is any data received or up to completion token if received. Wait for response timeout before returning. More... | |
virtual byte[] | WriteAndWaitForResponse (byte[] dataOut, int responseStartTimeOut, int responseEndTimeOut, string completetionToken) |
Write byte data to output stream and return data received. Data returned is any data received or up to completion token if received. Wait for response timeout before returning. More... | |
Properties | |
abstract int | BytesAvailable [get] |
abstract bool | Connected [get] |
abstract string | Descriptor [get] |
Abstract class that implements default functionality for IComm interface class.
|
virtual |
Waits until data available BytesAvailable in current thread. Current thread sleeps until data received or timeout reached. Blocking call.
[in] | msTimeOut | Millisecond timeout before return if no data received. |
Implements UniPRT.Sdk.Comm.IComm.
|
virtual |
Write from input stream to output stream
[in] | binReader | Source data to send |
Implements UniPRT.Sdk.Comm.IComm.
|
virtual |
Write binDataOut stream data to output stream and return data received in binDataIn stream. Data returned is any data received or up to completion token if received. Wait for response timeout before returning.
[out] | binDataIn | Destination stream to store response received from connection. |
[in] | binDataOut | Source stream data to write to connection. |
[in] | responseStartTimeOut | Timeout, milliseconds, to wait for first data to be received. Time to first byte. |
[in] | responseEndTimeOut | Timeout, milliseconds, of no new data received. Time after last byte. |
[in] | completetionToken | String token denoting the end of the response expected. This can be empty string if simply want to wait for response after writing data to connection. |
Implements UniPRT.Sdk.Comm.IComm.
|
virtual |
Write byte data to output stream and return data received. Data returned is any data received or up to completion token if received. Wait for response timeout before returning.
byte[] | Array of bytes received from connection. Data returned is any data received or up to completetionToken if token received |
[in] | dataOut | Source byte array to write to connection. |
[in] | responseStartTimeOut | Timeout, milliseconds, to wait for first data to be received. Time to first byte. |
[in] | responseEndTimeOut | Timeout, milliseconds, of no new data received. Time after last byte. |
[in] | completetionToken | String token denoting the end of the response expected. This can be empty string if simply want to wait for response after writing data to connection. |
Implements UniPRT.Sdk.Comm.IComm.