Regular API function

simPersistentDataRead / sim.persistentDataRead

Description Reads a block of persistent data. See also sim.persistentDataWrite, sim.getPersistentDataTags, sim.getStringSignal, sim.getInt32Signal, sim.getDoubleSignal and sim.readCustomDataBlock.
C/C++
synopsis
simChar* simPersistentDataRead(const simChar* dataTag,simInt* dataLength)
C/C++
parameters
dataTag: name of the data block
dataLength: the size of the returned data block, since it may contain any data (also embedded zeros).
C/C++
return value
nullptr if operation was not successful or data block does not exist, otherwise the data block (which may contain any value, including embedded zeros). In that case the returned buffer should be released with simReleaseBuffer
Lua
synopsis
buffer dataValue=sim.persistentDataRead(string dataTag)
Lua
parameters
dataTag: name of the data block
Lua
return values
dataValue: value of the data block, or nil if data block does not exist. The returned data block may contain any value, including embedded zeros.
Python
synopsis
string/bytes dataValue=sim.persistentDataRead(string dataTag)

<