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

OnMostReg

Valid for: CANoe DE

Function Syntax

Description

OnMostReg() is called in response to read or write requests to registers of a MOST network interface chip. The following functions are available for evaluating the event:
  • long mostRegChip()
    • Returns the identifier of the chip whose registers are transported with this event (see mostReadReg)
  • long mostRegOffset()
    • Returns the start address of the register.
  • long mostRegDataLen()
    • Returns the number of bytes transported with this event (maximum of 16).
  • void mostRegGetData(byte buffer[], long buffersize)
    • The register values may be copied to a byte buffer with the function mostRegGetData(). It must be assured that the buffer has the specified size (buffersize). A maximum of 16 bytes are transported with the MostReg event.
  • long mostRegGetByteAbs(long chip, long adr)
  • long mostRegGetWordAbs(long chip, long adr)
    • Returns the contents of the register ‘adr’ in the chip ‘chip’. If the MostReg event does not contain this register kMostParameterOutOfRange = -9 is returned.
For further information on this event see Supplemental Information on Event Procedures for MOST Controller Events.

Parameters

Return Values

Example

Output in the Write Window
mostReadRegmostWriteReg