PutValueToControl
Syntax
Value & String Output
void putValueToControl(char panel[], char control[], float val);
void putValueToControl(char panel[], char control[], float val, long paragraph);This function requires CANoe 7.5 and higher.1
void putValueToControl(char panel[], char control[], long val);
void putValueToControl(char panel[], char control[], long val, long paragraph);This function requires CANoe 7.5 and higher.1
void putValueToControl(char panel[], char control[], long val, long paragraph, long dispHex);This function requires CANoe 7.5 and higher.1
void putValueToControl(char panel[], char control[], char val[]);
Message Output
void putValueToControl(char panel[], char control[], message val);
void putValueToControl(char panel[], char control[], message val, long paragraph);This function requires CANoe 7.5 and higher.1
void putValueToControl(char panel[], char control[], message val, long paragraph, long dispHex);This function requires CANoe 7.5 and higher.1
PG Output
void putValueToControl(char panel[], char control[], pg val);
void putValueToControl(char panel[], char control[], pg val, long paragraph);This function requires CANoe 7.5 and higher.1
void putValueToControl(char panel[], char control[], pg val, long paragraph, long dispHex);This function requires CANoe 7.5 and higher.1
LIN Message Output
void putValueToControl(char panel[], char control[], linFrame val);
void putValueToControl(char panel[], char control[], linFrame val, long paragraph);This function requires CANoe 7.5 and higher.1
void putValueToControl(char panel[], char control[], linFrame val, long paragraph, long dispHex);This function requires CANoe 7.5 and higher.1
MOST Message Output
void putValueToControl(char panel[], char control[], mostMessage val);
void putValueToControl(char panel[], char control[], mostMessage val, long paragraph);This function requires CANoe 7.5 and higher.1
void putValueToControl(char panel[], char control[], mostMessage val, long paragraph, long dispHex);This function requires CANoe 7.5 and higher.1
MOST Raw Message Output
void putValueToControl(char panel[], char control[], mostRawMessage val);
void putValueToControl(char panel[], char control[], mostRawMessage val, long paragraph);This function requires CANoe 7.5 and higher.1
void putValueToControl(char panel[], char control[], mostRawMessage val, long paragraph, long dispHex);This function requires CANoe 7.5 and higher.1
GMLAN Message Output
void putValueToControl(char panel[], char control[], gmLanMessage val);
void putValueToControl(char panel[], char control[], gmLanMessage val, long paragraph);This function requires CANoe 7.5 and higher.1
void putValueToControl(char panel[], char control[], gmLanMessage val, long paragraph, long dispHex);This function requires CANoe 7.5 and higher.1
Function
Assigns the valuevalto thePanel DesignerMulti Display Control or theCAPL Output Viewwith the namecontrol. The Multi Display Control/ CAPL Output View is located on the panel with the titlepanel. Different contents are displayed with the Multi Display Control/CAPL Output View. In addition to numbers (float and integer) and texts (char[]), in particular different messages (CAN, LIN, ...and J1939 PGNs) can also be displayed.
Parameters
panel Name of the panel, restricted to 128 characters.
control
Name of the control, restricted to 128 characters.
val
Value to be displayed.
paragraph
Indicates if the output shall be written to a new line.
dispHex
- This parameter is only available with theCAPL Output View.
- The physical value of a signal cannot be displayed in hexadecimal format. Then the setting is not considered and will be ignored. Only the raw value of a signal can be formatted hexadecimal.
Return Values
—
Example: Output of a string, a message, a signal - no additional function parameters used variables{int value;message EngineData mEngineData;}on envVar EnvShowMultiDisplay{value = getvalue(this);switch(value){case 1: putValueToControl("Gateway","DisplayControl","This is the Automot Demo!");break;case 2: putValueToControl("Gateway","DisplayControl",mEngineData);break;case 3: putValueToControl("Gateway","DisplayControl",mEngineData.EngSpeed.phys);break;}}
Example: Output of a message — optional with function parameters variables{...message MyMessage TestMsg;}}on key 'a'{//Output of a message without additional parameter settings. In this case parameters have default settings; they are 'no new paragraph' and 'display message in 'hexadecimal' notation'putValueToControl("TestPanel","ControlOutput1", TestMsg);//Output of a message, each time in a new paragraph.putValueToControl("TestPanel","ControlOutput1", TestMsg, 1);//Output of a message, each time with a new paragraph and the message is displayed in decimal notation.//putValueToControl("TestPanel","ControlOutput1", TestMsg, 1, 0);}
Example: Output of a signal (raw format) — optional with function parameters variables{...message MyMessage TestMsg;}}on key 'b'{//Output of a signal (raw) without additional parameter settings.//In this case parameters have default settings;//they are 'no new paragraph' and display signal in 'decimal' notation.putValueToControl("TestPanel","ControlOutput1", "\nSignal raw\n");putValueToControl("TestPanel","ControlOutput1", TestMsg.Signal1);//Output of a signal (raw), each time in a new paragraph.putValueToControl("TestPanel","ControlOutput1", TestMsg.Signal1, 1);//Output of a signal (raw), each time in a new paragraph and in hexadecimal notation.putValueToControl("TestPanel","ControlOutput1", TestMsg.Signal1, 1, 1);}
Example: Output of a signal (physical format) — optional with function parameters variables{...message MyMessage TestMsg;}}on key 'c'{//Output of a signal (physical) without additional parameter settings.//In this case parameters have default settings;//they are 'no new paragraph' and display signal in 'decimal' notation.putValueToControl("TestPanel","ControlOutput1", "\nSignal raw\n");putValueToControl("TestPanel","ControlOutput1", TestMsg.Signal1.phys);//Output of a signal (physical), each time in a new paragraph.putValueToControl("TestPanel","ControlOutput1", TestMsg.Signal1.phys, 1);}