You are reading a single comment by @allObjects and its replies. Click here to read the full conversation.
  • @DrAzzy - sorry, I got the parts and couldn't wait: http://forum.espruino.com/conversations/­260971/

    I'd be interested to see if it works for you?

    @allObjects - this is what I meant... So ideally you'd have two parts: One that accesses the EEPROM/FRAM/MRAM/etc, and another that handles storage and memory management of objects - so that for instance you could use your memory manager on @DrAzzy's EEPROM.

    Hopefully when we've got a few memory drivers that work the same way, we can maybe pull your code into a module that will work with them?

  • Exactly: the ability to retrieve previously stored strings and the ability to temporarily store strings. The pubs I made is to give you some head start of the logic... I wanted to explore the techniques/logic in a higher lever environment. An intermediate layer is the management of the memory, and the bottom layer / foundation is the actual device driver. The basic functions are:

    1. write(string) returning ID (addr)
    2. read(addr) returning string
    3. update(addr,string) returning nothing
    4. delete(addr) returning deleted
    5. writeKeyed(key,string) returning ID (addr) --- key is a string
    6. readKeyed(key) returning ID (addr) [and string]
    7. [updateKeyed(key,string)]
    8. [deleteKeyed(key) returning ID (addr) [and string]

    The functions in [square brackets] are just combinations of non-bracketed ones.

About

Avatar for allObjects @allObjects started