MultichannelConnection.SendAndWaitForResponse(Byte[], Int32, Int32, String) Method
|
Sends dataToSend and returns the response data.
Namespace: Zebra.Sdk.CommAssembly: SdkApi.Core (in SdkApi.Core.dll) Version: 3.0.3271
Syntaxpublic byte[] SendAndWaitForResponse(
byte[] dataToSend,
int initialResponseTimeout,
int responseCompletionTimeout,
string terminator
)
Public Function SendAndWaitForResponse (
dataToSend As Byte(),
initialResponseTimeout As Integer,
responseCompletionTimeout As Integer,
terminator As String
) As Byte()
public:
virtual array<unsigned char>^ SendAndWaitForResponse(
array<unsigned char>^ dataToSend,
int initialResponseTimeout,
int responseCompletionTimeout,
String^ terminator
) sealed
Parameters
- dataToSend Byte[]
- Byte array of data to send
- initialResponseTimeout Int32
- The maximum time, in milliseconds, to wait for the initial response to be received.
If no data is received during this time, the function returns a zero length array.
- responseCompletionTimeout Int32
- After the initial response, if no data is received for this period of time, the
input is considered complete and the method returns.
- terminator String
- If the response contains this string, the input is considered complete and the method returns.
May be used to avoid waiting for more data when the response is always terminated with a known string. Use null
if no terminator is desired.
Return Value
Byte[]The received data.
Implements
Connection.SendAndWaitForResponse(Byte[], Int32, Int32, String)
Exceptions
Remarks
The software returns immediately if the data received contains terminator. The connection must be open before this method
is called. If sendAndWaitForResponse is called when a connection is closed, a ConnectionException is thrown.
See Also