Regular API function

simGetIntegerSignal / sim.getIntegerSignal (remote API equivalent: simxGetIntegerSignal)

Description Gets the value of an integer signal. Signals are cleared at simulation start. See also sim.setIntegerSignal, the other signal functions, and sim.persistentDataRead.
C synopsis simInt simGetIntegerSignal(const simChar* signalName,simInt* signalValue)
C parameters
signalName: name of the signal
signalValue: value of the signal
C return value
-1 if operation was not successful, 0 if signal does not exist, 1 if signalValue was retrieved
Lua synopsis number signalValue=sim.getIntegerSignal(string signalName)
Lua parameters
signalName: name of the signal
Lua return values
signalValue: value of the signal. nil if operation was not successful or if signal does not exist

All regular API functions on one page