Skip to main content
Open topic with navigation CAPL Functions » K-Line » _KLine_ByteReceptionInd

_KLine_ByteReceptionInd

Valid for: CANoe DE

Function Syntax

_KLine_ByteReceptionInd(BYTE byteIn, int64 endOfByteTimes_ns)

Description

Is called when a byte has been received.

Parameters

  • byteIn: Received byte
  • endOfByteTimes_ns: End of byte time stamp in ns resolution.

Return Values

Example

_KLine_ByteReceptionInd(BYTE byteIn, int64 endOfByteTimes_ns)
{
   int64 endOfByteCorrection_ns;
   dword systemBaudRate;
   float uartSamplePoint;
   systemBaudRate  = 10400;
   uartSamplePoint = 0.5;
   write("Byte Value: %x", byteIn);
   write("End of Byte Time: [%.9f]", endOfByteTimes_ns/1000000000.0);
   // UART sample point corrected end of byte time. UART samples in the middle of a bit.
   endOfByteCorrection_ns = ((1.0/systemBaudRate) * uartSamplePoint) * 1000000000;
   write("Corrected End of Byte Time: [%.9f]", (endOfByteTimes_ns + endOfByteCorrection_ns)/1000000000.0);
}
_KLine_ByteTransmissionCon_KLine_FrameReceptionInd_KLine_FrameTransmissionCon