Skip to main content

C2xGetStationName

Open topic with navigation CAPL Functions » Car2x » C2xGetStationName Valid for: CANoe DE

Function Syntax

long C2xGetStationName(long stationHandle, long length, char name[]);

Description

Get the name assigned to the ITS Station in the StationManager.

Parameters

  • stationHandle: Handle of the ITS station.
  • length: Maximum number of bytes to be copied.
  • name: Buffer in which the name is copied.

Return Values

Example

char   stationName[1024];
long   stationHdl ;

stationHdl = C2xGetStationHandle(packet) ;
if (C2xGetStationName(stationHdl, elcount(stationName), stationName) == 0)
{
  write("Station: %s", stationName) ;
}