SerialPortFastDetectDevice Method |
Detects the serial port where the device is connected to and returns as output parameters
the communication port and baud rate. In the detection process senToken will be sent and receivedToken is expected to receive.
Only baud rates between 4800 and 921600 will be checked.
Namespace: ZylSoft.SerialAssembly: ZylSerialPort (in ZylSerialPort.dll) Version: 1.83.8519.34486
Syntax public bool FastDetectDevice(
string sentToken,
string receivedToken,
out SerialCommPort port,
out SerialBaudRate baudRate
)
Public Function FastDetectDevice (
sentToken As String,
receivedToken As String,
<OutAttribute> ByRef port As SerialCommPort,
<OutAttribute> ByRef baudRate As SerialBaudRate
) As Boolean
public:
bool FastDetectDevice(
String^ sentToken,
String^ receivedToken,
[OutAttribute] SerialCommPort% port,
[OutAttribute] SerialBaudRate% baudRate
)
member FastDetectDevice :
sentToken : string *
receivedToken : string *
port : SerialCommPort byref *
baudRate : SerialBaudRate byref -> bool
public boolean FastDetectDevice(
String sentToken,
String receivedToken,
/** @attribute OutAttribute */ /** @ref */SerialCommPort port,
/** @attribute OutAttribute */ /** @ref */SerialBaudRate baudRate
)
public function FastDetectDevice(
sentToken : String,
receivedToken : String,
port : SerialCommPort,
baudRate : SerialBaudRate
) : boolean
function FastDetectDevice(sentToken, receivedToken, port, baudRate);
METHOD FastDetectDevice(
sentToken AS STRING,
receivedToken AS STRING,
port OUT SerialCommPort,
baudRate OUT SerialBaudRate
) 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 detection process, to check the port.
- receivedToken String
-
The token, expected to receive in the detection process, to check the port.
- port SerialCommPort
-
The serial port where the device is connected to.
- baudRate SerialBaudRate
-
Baud rate of the communication.
Return Value
Boolean
Returns true, if a GPS receiver was detected, otherwise false.
See Also