Regular API function

simSetStringSignal / sim.setStringSignal

Description Sets the value of a string signal. If that signal is not yet present, it is added. Signals created in the main script or in a child script are automatically cleared at simulation end. See also sim.getStringSignal, the other signal functions, the data packing/unpacking functions and sim.persistentDataWrite.
C synopsis simInt simSetStringSignal(const simChar* signalName,const simChar* signalValue,simInt stringLength)
C parameters
signalName: name of the signal
signalValue: value of the signal (which may contain any value, including embedded zeros)
stringLength: the size of the string value.
C return value
-1 if operation was not successful. In a future release, a more differentiated return value might be available
Lua synopsis number result=sim.setStringSignal(string signalName,string signalValue)
Lua parameters
Same as C-function
Lua return values
Same as C-function
Remote API equiv.
B0-based remote API: simxSetStringSignal
Legacy remote API: simxSetStringSignal

All regular API functions on one page