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

mostParamGetString

Valid for: CANoe DE

Function Syntax

long mostParamGetString (mostAmsMessage msg, char paramAdr[], char buffer[], long buffersize); // form 1
long mostParamGetString (mostAmsMessage msg, char paramAdr[], long arrayIndex, char buffer[], long buffersize); // form 2

Description

Query of parameters of the String type from an AMS message using the parameter name from the XML function catalog. Note: This function supports ASCII-coded strings only. In case of other string encoding use the function mostParamGetData. Note: The message data must contain a parameter with the given parameter address. Since the compiler is not able to validate this, errors are detected at runtime of the CAPL program only. If the parameter is not part of the message or not the expected type, an error text is displayed in the Write Window and the measurement stops. The function mostParamIsAvailable can be applied to assure parameter availability.

Parameters

  • msg: Message from which the parameter should be read.
  • paramAdr: Identification of parameters (see Symbolic Identification of Parameters).
  • arrayIndex: Parameter index in arrays or sequences. This declaration overwrites the indexing in the brackets of <paramAdr>.
  • buffer: Buffer to which the parameter bytes are copied.
  • buffersize: Maximum number of copied parameter bytes (can be specified with (elcount(buffer))).

Return Values

Example

mostParamIsAvailablemostParamGetmostParamGetDatamostParamGetStringAsciimostParamSetmostParamSetDatamostParamSetStringGeneral Tips on XML Function Catalog Support in CAPLSymbolic Identification of Parameters