Skip to main content
Open topic with navigation CAPL Functions » MOST » mostMHPBlockSetTraceColors

mostMHPBlockSetTraceColors

Valid for: CANoe DE

Function Syntax

mostMHPBlockSetTraceColors(long font, long bkgnd);

Description

Sets the text and background color for displaying the MOST event in the Trace Window. The makeRGB function can be used for the colors. Note
  • This function can only be used in Measurement Setup and is only applied to the Trace Window.
  • The setting of colors with this function has a higher priority than the color settings for events in the Trace Window.
Note makeRGB
  • Up to and including CANoe DE product version 12.0 SP2, the function makeRGB returned the blue value in the second byte and the red value in the fourth byte. Functions that received this value as a parameter interpreted this exchange so that the color was displayed correctly.
  • From CANoe DE product 12.0 SP3, the function makeRGB returns the color values in the correct order. Functions that have received this value as a parameter have also been adjusted to display the correct color again.
  • Existing programs only need to be adapted if you have not used the function makeRGB but you have passed the color hard coded.

Parameters

  • font: Font color (RGB value)
  • bkgnd: Background color (RGB value)

Return Values

  • 0: OK
  • -1: Invalid RGB value of a color

Example

OnMostMHPConnection (long sourceDevID, long destDevID, long fBlockID, long instID, long functionID, long opType)
{
   mostMHPConnectionSetTraceColors(makeRGB(0, 0, 0), makeRGB(255, 0, 0) );
   return 1; // Forward the MHPConnection-Event to the next node in the Measurement Setup
}
traceSetEventColors