Skip to main content

GetNetworkName

Valid for: CANoe DE • CANoe4SW DE

Function Syntax

long GetNetworkName(dword busType, dword channelNumber, char name[]);

Description

Retrieves the name assigned in the Simulation Setup for a specific channel.

Parameters

  • busType: Bus system of the channel. The predefined enum BusType should be used for the value of this parameter.
  • channelNumer: Number of the channel for the specified bus. Channel numbering starts with 1.
  • name: Receives the name for the channel.

Return Values

  • 0: success
  • 1: invalid bus system or channel number
  • 2: name contains characters which can’t be represented in the current CAPL string encoding
  • 3: name buffer is too small for the name

Example

stack char networkName[50];
stack long ret;
ret = GetNetworkName(eCAN, 1, networkName);
write("Name of CAN 1 is: %s", networkName);
GetBusNameContext