Skip to main content

coTfsSDOBlockDownload (Level 2)

Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE

Function Syntax

long coTfsSDOBlockDownload( dword index, dword subIndex, dword size, dword useCrc, byte inValueBuf[], dword valueBufSize, dword outCrcUsed[] );

Description

This function executes a complete SDO block download. This function can be used to exchange simple larger quantities of data with a CANopen® device insofar as it supports the block transfer. A fallback to segmented transfer is not supported. The parameter useCrc reports if a CRC check was executed during transmission.

Parameters

  • index: object index
  • subIndex: object subindex
  • size: number of bytes to be transmitted
  • useCrc: reports if CRC check was executed during transmission
  • inValueBuf[]: data field for transfer data
  • valueBufSize: buffer size in byte of inValueBuf
  • outCrcUsed[]: datafield, outCrcUsed[0] returns if a CRC check of the data was executed. This check can only be done if both sides of the communication (test module and test node) support CRC checks.

Return Values

Error code

Example

byte pData[50];
dword outCrc[1];

// ... copy data to pData ...

if (coTfsSDOBlockDownload(0x2000, 0, 32, 1, pData, 50, outCrc) != 1) {
  TestStepFail("SDO block download test failed");
}