Skip to main content

diag_DataCon

Valid for: CANoe DE

Function Syntax

  • void diag_DataCon (long count); // form 1
  • void diag_DataCon (char target[], dword count); // form 2

Description

Tells the diagnostic layer, via the count parameter, how many bytes of data were successfully handed over to the TP layer. This function is typically called within a transport layer callback. Once the diagnostic layer has initiated the transmission of a message via _Diag_DataRequest and the transport layer has sent this message in its entirety, using several message segments if needed, the transport layer uses this function to confirm to the diagnostic layer that the message was sent successfully. Note: Depending on the transport layer, this confirmation might already be given when the data was handed over to the TP layer, i.e. before the data physically has been sent entirely.

Parameters

  • count: Number of bytes transmitted successfully.
  • target: The qualifier of the ECU the request was sent to.

Return Values

Example

See DoIP_DataCon
// This callback shall be called by an example TP layer
TPLayer_SendConfirmation( long connectionHandle, long count)
{
  char ecuQualifier[20];
  TPLayerGetECUQualifierForHandle(connectionHandle, ecuQualifier);
  diag_DataCon(ecuQualifier, count);
}
Communication Layer Connection / Reference Implementations