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

OnMostMHPError

Valid for: CANoe DE Note
OnMostMHPError can only be used in the Measurement Setup and should be inserted under the item “Callback function”.
For simulation of a MOST High connection sender and receiver in CAPL, the MOST High DLL can be used. The DLL is located in the Exec32 folder of the MOST High Demos.

Function Syntax

long OnMostMHPError(long sourceDevID, long destDevID, long fBlockID, long instID, long functionID, long opType);

Description

The event procedure is called up as soon as a MOST High protocol violation is observed. Within this event procedure the following functions are available:
  • long mostMHPErrorCode() Indicates the MHP observer error number. See possible MHP observer error codes. Parameter:
    None
    Returns:
    Observer error number
  • long mostMHPErrorValue() Indicates the error value. Not supported by all error codes. Parameter:
    None
    Returns:
    Error value or 0
  • long mostMHPErrorExpectedValue() Indicates the expected value. Not supported by all error codes. Parameter:
    None
    Returns:
    Expected value or 0
  • long mostMHPErrorIsWarning() Indicates if this is a warning. Warnings may indicate a communication problem. Parameter:
    None
    Returns:
    Error value or 0
The functions mostEventChannel, mostEventTime and mostEventTimeNS can be used to call up supplemental information.

Parameters

  • sourceDevID: Address of the transmitter
  • destDevID: Address of the receiver
  • fBlockID: FBlockID of the receiver
  • instID: Instance ID of the receiver
  • functionID: FunctionID of the receiver
  • opType: OpType of the receiver

Return Values

The return value determines whether the MHP error event is relayed to the next function block in the Measurement Setup (e.g., a Trace Window).
  • 0: No relay
  • 1: Relay

Example

MOST High Protocol: Simulation of Sender and ReceiverOnMostMHPBlockOnMostMHPPacketmostMHPErrorSetTraceColorsMOST High Observer Error CodesMOST High Observer and Combiner