coTfsSDOUploadAndCompare (Level 2)
Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DEFunction Syntax
long coTfsSDOUploadAndCompare( dword index, dword subIndex, dword size, byte inValueBuf[], dword valueBufSize, byte inMaskBuf[], dword maskBufSize, dword useBitMask ); // form 1long coTfsSDOUploadAndCompare( dword index, dword subIndex, dword size, byte inValueBuf[], dword valueBufSize, byte inMaskBuf[], dword maskBufSize ); // form 2long coTfsSDOUploadAndCompare( dword index, dword subIndex, dword size, byte inValueBuf[][], dword valueBufSize ); // form 3long coTfsSDOUploadAndCompare( dword index, dword subIndex, dword size, qword inValue ); // form 4long coTfsSDOUploadAndCompare( dword index, dword subIndex, dword size, qword inValue, qword mask ); // (5)
Description
This function executes a complete SDO upload. Depending on the number of data, this is either an expedited upload (up to 4 bytes) or a segmented transfer. Afterwards the received data is compared against the data supplied. It is not possible to fetch the received data using coTfsGetSdoUploadData after this function was called. (4) and (5) can be used for maximum 4 byte objects only.Parameters
- index: Object index
- subindex: Object subindex
- size: Expected data length.
- inValueBuf[]: Data pointer for expected data.
- valueBufSize: Buffer size in byte of inValueBuf.
- inMaskBuf[]: Data pointer for compare data.
- maskBufSize: Buffer size in byte of inMaskBuf.
- useBitMask:
- 0: don’t use bitmask for comparison
- !=0: use bitmask for comparison
- inValue: Data to be compared.
- mask: Mask that is used for comparison.
Return Values
- error code or
- 0: data mismatch
- 1: supplied data matches received data
- 2: data length mismatch