Skip to main contentOpen topic with navigation
CAPL Functions » MOST » mostParamSetString
mostParamSetString
Valid for: CANoe DE
Function Syntax
long mostParamSetString (mostAmsMessage msg, char paramAdr[], char value[]); // form 1
long mostParamSetString (mostAmsMessage msg, char paramAdr[], long arrayIndex, char value[]); // form 2
Description
Setting of parameters of the String type (for ASCII-coded strings only) or of the ‘Enum’ type in 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 mostParamSetData. For enumerations, the parameter value can be indicated symbolically. The mostParamSet function can be used to set the numeric value.
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. When using function mostParamSetString to build a message dump, the parameters must be populated in the order specified by the MOST Function Catalog, particularly for messages with StreamCases.
Parameters
- msg: Message in which the parameter value should be described.
- 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>.
- value: String: Characters that should be copied to the message. Enumeration: Symbolic name of the parameter value.
Return Values
See error codes
Example
—
OnMostApInstID • mostParamSetStringEnc • mostParamGet • mostParamGetData • mostParamGetString • mostParamSet • mostParamSetData • General Tips on XML Function Catalog Support in CAPL • Symbolic Identification of Parameters