SerialPortReadBytes Method |
Reads numberOfBytes bytes from the serial port and discards them.
It works only if AutoReceive property is false.
Namespace: ZylSoft.SerialAssembly: ZylSerialPort (in ZylSerialPort.dll) Version: 1.83.8519.34486
Syntax public byte[] ReadBytes(
int numberOfBytes,
int timeout = 60000
)
Public Function ReadBytes (
numberOfBytes As Integer,
Optional timeout As Integer = 60000
) As Byte()
public:
array<unsigned char>^ ReadBytes(
int numberOfBytes,
int timeout = 60000
)
member ReadBytes :
numberOfBytes : int *
?timeout : int
(* Defaults:
let _timeout = defaultArg timeout 60000
*)
-> byte[]
public byte[] ReadBytes(
int numberOfBytes,
int timeout = 60000
)
public function ReadBytes(
numberOfBytes : int,
timeout : int
) : byte[]
function ReadBytes(numberOfBytes, timeout);
METHOD ReadBytes(
numberOfBytes AS LONG,
timeout AS LONG := 60000
) AS BYTE[]
No code example is currently available or this language may not be supported.
Parameters
- numberOfBytes Int32
-
The number of bytes to read.
- timeout Int32 (Optional)
-
If the timeout (milliseconds) interval elapses and cannot read enough bytes (numberOfChars), the method will return what it read till then, less bytes.
Default value: 60000.
Return Value
Byte
Returns numberOfBytes bytes from the serial port.
See Also