vtsSerialReceive
Valid for: CANoe DE • CANoe:lite DEFunction Syntax
Description
Starts receiving blocks of bytes from the serial port of the specified VT7001 channel. Received data is copied to the specified buffer. The data can only be accessed in the OnSerialReceive callback.- The operation works continuously if issued once.
- If another receive operation is given, the result buffer will change to that one given by the last receive operation.
- A callback handler has to be set for notification when data has been received. See SerialSetOnReceiveHandler.
- Another callback handler can be set to notify of errors in later stages of the send operation. See SerialSetOnErrorHandler.
Parameters
- Target: Name of the system variable/namespace that will be affected by this function call.
- buffer: An array of bytes where received data is copied to. The buffer is only valid within the OnSerialReceive callback.
- size: Maximum number of Bytes which can be received at a time. Must have a value > 0 and < 65.
Return Values
- 0: Successful call
- -1: Non-specific error
- -2: The namespace on which the command was called does not exist, is not a valid VT System namespace or does not support this command.
- -3: One of the parameters has an invalid value.
- -5: Serial port is not open.