GX450
ALEOS Version 4.9.4
I am successfully using persist.save() and persist.load() to save configuration data to non-volatile storage.
However, I am trying to access the same data from 2 ALEOS applications, unsuccessfully. What is the scope of the naming of the objects? Is it possible for 2 or more ALEOS applications to access the same persistent storage?
Regards,
Paul
Hi @pcomb314
persist.save(name, obj)
Saves an object for later retrieval.
If the saving operation cannot be performed successfully, an error is thrown. Objects saved with this function can be retrieved with #persist.load, by giving back the same name, even after a reboot.
Parameters
name : the name of the persisted object to save.
obj : the object to persist.
#### Usage:
persist.save ('xxx', 1357) -- Save it in the store as 'xxx'
[...] -- reboot
x = persist.load 'xxx' -- Retrieve it from the store
assert(x == 1357)
persist.load(name)
Retrieve from flash an object saved with #persist.save.
Parameter
name : the name of the persisted object to load.
Return value
the object stored under that name, or nil if no such object exists.
No, it isn’t.
Please help to mark “Solution” if your question is answered.