_DoIP_TCPPreSend
Valid for: CANoe DE NoteThe following DoIP CAPL function is only available with the modeling library DoIP.dll and eventually an appropriate implementation of the CAPL Callback Interface. Information about the DoIP DLL and the CAPL Callback Interface you find here:
Function Syntax
Description
The DoIP implementation is about to send a TCP DoIP PDU with the given content. It is possible to change the values in header and data, to drop the PDU, and to reduce the length of the payload. Only DoIP PDUs with valid layout are sent. Note- PDUs sent with DoIP_TCPSend are NOT indicated here since it is possible to provide any data using that call anyway.
- If the length of the PDU shall be increased, it is necessary to drop this PDU by returning -1, and send a longer PDU with DoIP_TCPSend later.
Parameters
- DoIPVersion: Protocol version value to send, defaults to configured value.
- payloadType: Type of the PDU sent. The value is converted from and to network byte order automatically.
- payloadLen: Length of the payload as indicated in the header and actually sent. The value is converted from and to network byte order automatically.
- payload: Payload itself. Elcount( payload) indicates the maximum number of bytes that can be accessed in the callback, and the maximum value payloadLen can be set to.
Return Values
- -1: Drop this PDU. This might violate the DoIP protocol.
- 0: Send the PDU with the data given.
- Others: Reserved