Search code examples
eeprommovesense

Is there a way to know eeprom index of the chip in onGetResult() when requested for eeprom chip's information


When requested for eeprom chip's information with asyncGet(WB_RES::LOCAL::COMPONENT_EEPROM_EEPROMINDEX_INFO(), AsyncRequestOptions::Empty, eepromIndex);

in the WB_RES::EepromInfo value received in onGetResult(), I couldn't any reference to which chip(0 or 1) does that information belong to. How can I know that in the application?

I would like to get both the eeprom chip's (0, 1) info with their indices into the application and then modify the reading and writing methods as per their sizes.


Solution

  • The easiest way is to store the chip-index in your class when making the query and using that information in onGetResult(). The Whiteboard does encode the query parameters into the ResourceID, but finding their values afterwards is quite complex and probably not worth the effort.

    Full disclosure: I work for the Movesense team