SerialPortTestDevice Method |
Tests if the connection is alive sending sentToken and expecting to receive receivedToken.
Namespace: ZylSoft.SerialAssembly: ZylSerialPort (in ZylSerialPort.dll) Version: 1.83.8519.34486
Syntax public bool TestDevice(
string sentToken,
string receivedToken,
int timeout = 60000
)
Public Function TestDevice (
sentToken As String,
receivedToken As String,
Optional timeout As Integer = 60000
) As Boolean
public:
bool TestDevice(
String^ sentToken,
String^ receivedToken,
int timeout = 60000
)
member TestDevice :
sentToken : string *
receivedToken : string *
?timeout : int
(* Defaults:
let _timeout = defaultArg timeout 60000
*)
-> bool
public boolean TestDevice(
String sentToken,
String receivedToken,
int timeout = 60000
)
public function TestDevice(
sentToken : String,
receivedToken : String,
timeout : int
) : boolean
function TestDevice(sentToken, receivedToken, timeout);
METHOD TestDevice(
sentToken AS STRING,
receivedToken AS STRING,
timeout AS LONG := 60000
) AS LOGIC
No code example is currently available or this language may not be supported.
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