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

mostGetChannel

Valid for: CANoe DE

Function Syntax

mostGetChannel ();

Description

This query returns the number of the MOST channel to which the CAPL node is connected in the Simulation Setup. This query is especially useful with nodes that are only connected to one MOST channel in the Simulation Setup. The return value can be used directly as a parameter for all CAPL functions that expect specification of a channel, e.g. in driving the network interface. With the help of this function CAPL programs can be created such that they are independent of channel numbers. By proper configuration of the Simulation Setup the user can choose the MOST interface over which the node should be operated.

Parameters

Return Values

  • 0: the node is not connected to any MOST channel in the Simulation Setup
  • 1..16: the allocated MOST channel
  • 0xFFFF: The node is connected to more than one MOST channel and may operate as a Gateway. The user must choose, on a case-by-case basis, the MOST channel over which the node should operate. In this case, channel numbers and bus names from the Simulation Setup are determined by the getBusContext or getBusNameContext function.

Example

getBusNameContextgetBusContextmostStrictChannelMappingmostApplicationNode