Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is it safe to use Peer Manager's Peer IDs for other FDS files?

I'm developing a database with FDS that stores application-level data that must be able to be matched to bond data. After looking at the files for Peer Manager, ID Manager, and Peer Data Storage, I want to check with someone else who knows the SDK code better than me to make sure that a couple assumptions behind my use of the Peer ID are valid.

Noticing the macros at the top of peer_data_storage.h, is it safe to assume that Peer IDs will always fall within the range 0x0-0x3FFE?  Also,  although the documentation says that the Peer IDs identify persistently stored peer data, do the IDs themselves stay the same for the lifetime of the peer (i.e. until pm_peer_delete() is called)?

Parents
  • Note 1:  If you store data with those file IDs, make sure the to use unused data IDs (I would go for record keys below 0xC000 since data IDs are also offset by 0xC000 when converted to record keys). If you do, there should be no problem, except:

    Note 2: Your data will be deleted if the peer is deleted.

    Note 3: What you're doing is non-standard, so what I'm saying is subject to change, though it's somewhat unlikely :).

Reply
  • Note 1:  If you store data with those file IDs, make sure the to use unused data IDs (I would go for record keys below 0xC000 since data IDs are also offset by 0xC000 when converted to record keys). If you do, there should be no problem, except:

    Note 2: Your data will be deleted if the peer is deleted.

    Note 3: What you're doing is non-standard, so what I'm saying is subject to change, though it's somewhat unlikely :).

Children
No Data
Related