Skip to main content

coTfsWToArr

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

Function Syntax

long coTfsWToArr( word wordValue, byte outByteArray[], dword arraysize );

Description

The function converts a word value into a byte array.

Parameters

  • wordValue: Value to be converted.
  • outByteArray[]: Array containing the converted value, recommended array size: 2 byte.
  • arraysize: Size of the byte array.

Return Values

Error code

Example

/* converts a word value to a byte array */
Word inValue = 2345;
Byte outDataArr[2];

if (coTfsWToArr(inValue, outDataArr, 2) != 1)
{
  /* conversion failed */
} /* if */