Click or drag to resize

SerialPortTestDevice Method

Tests if the connection is alive sending sentToken and expecting to receive receivedToken.

Namespace: ZylSoft.Serial
Assembly: ZylSerialPort (in ZylSerialPort.dll) Version: 1.83.8519.34486
Syntax
public bool TestDevice(
	string sentToken,
	string receivedToken,
	int timeout = 60000
)

Parameters

sentToken  String
The token, which is sent in the test process, to check the port.
receivedToken  String
The token, expected to receive in the test process.
timeout  Int32  (Optional)
If the timeout (milliseconds) interval elapses and no receivedToken is received, the method will return with false result. Default value: 60000.

Return Value

Boolean
True, if the receivedToken was received (test succeeded), otherwise false.
See Also