BeginWaiting |
Resets waiting events. This method is used to initialize usage of WaitForWithoutSend which performs continuous waiting for incoming
data stream.
|
ClearTransferCounters |
Clears total bytes transfered and total transfer time.
|
Connect(CancellationToken) |
Call this method to connect to a remote device with standard "connecting" message displayed in a log.
|
Connect(String, CancellationToken) |
Call this method to connect to a remote device. It must be called before any sending operation unless AutoConnect is set to true.
|
Disconnect |
Call this method to disconnect from a remote device with standard "disconnecting" message displayed in a log.
|
Disconnect(String) |
Call this method to disconnect from a remote device.
|
Dispatch |
Call this method from a data receive handler to accept new incoming data and to add them to the receive buffer and test if all data are received.
|
DisplayReceivedBytes |
Displays all received bytes that were processed by Dispatch method in a log.
|
Dispose |
IDisposable.Dispose implementation - Resets instance members
|
EndWaiting |
Sets waiting event, escapes the waiting loop and displays possible error message.
|
GetCurrentTime |
Function that returns current date/time. It should be used insted of DateTime.Now in all communicator methods.
|
GetDefaultStartReceiveTimeout |
Returns maximal time to wait for the first response counted after a request is sent. This method should be used to
compute StartReceiveTimeout and NextReceiveTimeout before every communication id CheckDataReceive is set to true.
|
GetDefaultTimeout |
Returns the maximal time for communication with a device. TimeoutScale and ReplyDelay properties will be used for computation.
This method should be used to compute Rimeout before every communication id CheckTimeout is set to true.
|
GetDetailedInfo |
Returns a string with detailed communicator settings including information about timeouts.
|
GetInfo |
Returns a string with brief description of current communicator settings.
|
GetParamsDetailedInfo |
Returns a detailed description of communicator configuration. If it is not overriden, it returns list of names and values of all
connection params and it includes also timeouts.
|
GetParamsInfo |
Returns a brief description of communicator configuration. If it is not overriden, it returns a comma delimited string containing
all values of connection params.
|
PrepareReceived |
Clears receive buffers.
|
PrepareSent |
Stores copy of data to sent for further echo check. Displays bytes to send in a log.
|
RaiseComException(String) |
Displays error message and raises the unknown communication exception.
|
RaiseComException(String, ComExceptionComExceptionKind) |
Displays error message and raises the communication exception.
|
RaiseComException(String, Exception) |
Displays error message and raises the communication exception.
|
RaiseComException(String, ComExceptionComExceptionKind, Exception) |
Displays error message without description and raises the communication exception.
|
RaiseComException(String, Boolean, ComExceptionComExceptionKind) |
Displays error message and raises the communication exception.
|
RaiseComException(String, Boolean, ComExceptionComExceptionKind, Exception) |
Displays error message and raises the communication exception.
|
RefreshState |
Refreshes a displaying of communicator status.
|
Send(ByteBuffer, CancellationToken) |
Sends data to a remote device and returns. This method does not wait for a response.
|
Send(String, CancellationToken) |
Sends data to a remote device and returns. This method does not wait for a response.
|
Send(ByteBuffer, ByteBuffer, CancellationToken) |
Sends data to a remote device and returns. This method does not wait for a response.
|
ShowProgress |
Shows communication progress message usualy used to write a message into a log.
|
Wait |
Waits required count of milliseconds. Waiting loop can be breaked via OnTestTerminate callback only.
All incomming data are ignored and not displayed in a log.
|
WaitFor(ByteBuffer, WaitingTerminateProc, CancellationToken) |
Sends specified data and waits for the response. The waiting loop will be terminated if waitingTerminateProc returns true.
If ByteBuffer data is empty, nothing is sent. Incomming bytes are returned using parametr data (so data parameter cannot be null).
The procedure clears ByteBuffer data before start of receiving. If multiple incomming streams should be received without sending
output bytes, WaitForWithoutSend method should be used.
|
WaitFor(String, WaitingTerminateProc, CancellationToken) |
Sends specified data and waits for the response. The waiting loop will be terminated if waitingTerminateProc returns true.
If string data is empty, nothing is sent. Incomming chars are returned using parametr data (so data parameter cannot be null).
|
WaitFor(ByteBuffer, WaitingTerminateProc, ByteBuffer, CancellationToken) |
Sends specified data and waits for the response. The waiting loop will be terminated if waitingTerminateProc returns true.
If ByteBuffer data is empty, nothing is sent. Incomming bytes are returned using parametr data (so data parameter cannot be null).
The procedure clears ByteBuffer data before start of receiving. If multiple incomming streams should be received without sending
output bytes, WaitForWithoutSend method should be used.
|
WaitForAnyData |
Sends content of data argument and waits until some data are received. Incomming data are returned in the data argument.
This procedure is useful when data are sent/received in whole packets (e.g. HTTP).
|
WaitForByte(ByteBuffer, Byte, CancellationToken) |
Sends the content of data argument and waits until specified byte is received. Incomming data are returned in the data argument.
|
WaitForByte(ByteBuffer, Byte, CancellationToken) |
Sends the content of data argument and waits until any byte from byteSet array is received. Incomming data are returned
in the data argument.
|
WaitForBytes |
Sends the content of data argument and waits until specified byte sequence is received. Incomming data are returned
in the data argument.
|
WaitForChar(ByteBuffer, Char, CancellationToken) |
Sends the content of data argument and waits until specified char is received. Incomming data are returned in the data argument.
|
WaitForChar(ByteBuffer, Char, CancellationToken) |
Sends the content of data argument and waits until any char from charSet array is received. Incomming data are returned
in the data argument.
|
WaitForChar(String, Char, CancellationToken) |
Sends the content of data argument and waits until specified char is received. Incomming data are returned in the data argument.
|
WaitForChar(String, Char, CancellationToken) |
Sends the content of data argument and waits until any char from charSet array is received. Incomming data are returned in the data argument.
|
WaitForLength |
Sends the content of data argument and waits until specified count of bytes is received. Incomming data are returned in
the data argument.
|
WaitForStr(ByteBuffer, String, CancellationToken) |
Sends the content of data argument and waits until specified string is received. Incomming data are returned in the data argument.
Incoming bytes are transformed using InputEncoding.
|
WaitForStr(String, String, CancellationToken) |
Sends the content of data argument and waits until specified string is received. Incomming data are returned in the data argument.
Incoming bytes are transformed using InputEncoding.
|
WaitForStrings(ByteBuffer, String, CancellationToken) |
Sends the content of data argument and waits until any string from specified list is received. Incomming data are returned in the data argument.
Incoming bytes are transformed using InputEncoding.
|
WaitForStrings(ByteBuffer, String, CancellationToken) |
Sends the content of data argument and waits until any string from specified list is received. Incomming data are returned in the data argument.
Incoming bytes are transformed using InputEncoding.
|
WaitForStrings(String, String, CancellationToken) |
Sends the content of data argument and waits until any string from specified list is received. Incomming data are returned in the data argument.
Incoming bytes are transformed using InputEncoding.
|
WaitForStrings(String, String, CancellationToken) |
Sends the content of data argument and waits until any string from specified list is received. Incomming data are returned in the data argument.
Incoming bytes are transformed using InputEncoding.
|
WaitForStrings(ByteBuffer, String, ByteBuffer, CancellationToken) |
Sends the content of data argument and waits until any string from specified list is received. Incomming data are returned in the data argument.
Incoming bytes are transformed using InputEncoding.
|
WaitForTime |
Sends the content of data argument and waits required count of milliseconds. Waiting loop can be breaked via OnTestTerminate callback only.
Incomming data are returned in the data argument.
|
WaitForWithoutSend |
Receives incomming data until waitingTerminate returns true. Input buffer is not cleared, incomming bytes are appended to the input buffer content,
so the method can be called multiple times. If some data were received in the meantime and waitingTerminate returns true for that data, method returns immediately
to process returned data. Method waitingTerminate checks always whole receive buffer. Before call of WaitForwithoutSend, waiting must be initialized
by calling BeginWaiting wich sets up timeout-check events.
Todo: BeginWaiting ands WaitForWithoutSend can be unified in one method - ???
|