OnMostMHPPacket
Valid for: CANoe DE NoteOnMostMHPPacket 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
Description
The event procedure is called up as soon as a MOST High packet is finished. Within this event procedure, the following functions are available:-
long mostMHPPacketIsSpy()Indicates whether the packet was made up of Spy messages.
Parameters: None
Returns:
0: Comprised of node messages
1: Comprised of Spy messages -
long mostMHPPacketVersion()Indicates the used MOST High Protocol version.
Parameters: None
Returns: -
long mostMHPPacketNegAcks()Indicates the number of negative frame acknowledge messages.
Parameter: None
Returns: Number of NegAcks (see MHP specification) -
long mostMHPPacketFrameRequests()Indicates the number of single or multiple frame request messages.
Parameter: None
Returns: Number of (multiple) frame requests -
long mostMHPPacketBlockRequests()Indicates the number of block request messages.
Parameter: None
Returns: Number of block requests -
long mostMHPPacketWarnings()Indicates the number of MHP observer warnings. Warnings may indicate communication problems.
Parameter: None
Returns: Number of Observer warnings -
long mostMHPPacketErrors()Indicates the number of MHP Observer errors. Errors indicate MOST High Protocol violations.
Parameter: None
Returns: Number of Observer errors
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 packet event is relayed to the next function block in the Measurement Setup (e.g., a Trace Window).- 0: No relay
- 1: Relay