This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

FDS Implementation

Hello Everyone,

I am trying to implement fds in nrf52832 with sdk 15.2. getting some issues. I am using 5 record key's and 1 file id.

Before coming to that, Can anyone explain what is file id, record id and record key? I have read documentations but not clear about it.

Parents
  • Hi.

    I actually do not agree, I think the specification explains is pretty well:

    Record key 16 bits Key that can be used to find the record. The value FDS_RECORD_KEY_DIRTY (0x0000) is reserved by the system to flag records that have been invalidated. See Restrictions on keys and IDs for further restrictions.
    File ID 16 bits

    ID of the file that the record is associated with. The value FDS_FILE_ID_INVALID (0xFFFF) is used by the system to identify records that have not been written correctly. See Restrictions on keys and IDs for further restrictions.

    Record ID 32 bits Unique identifier of the record.

    So a specific Record will be stored in a file with a file ID. A file can have several records with the same record KEY but different record ID. Record ID is therefore unique, record KEY and file ID however is not. Which means that you can have several records stored with the same file ID and record KEY but with a unique record ID. You use record KEY and file ID when you want to access a Record. 

    Documentation.

    regards

    Jared 

Reply
  • Hi.

    I actually do not agree, I think the specification explains is pretty well:

    Record key 16 bits Key that can be used to find the record. The value FDS_RECORD_KEY_DIRTY (0x0000) is reserved by the system to flag records that have been invalidated. See Restrictions on keys and IDs for further restrictions.
    File ID 16 bits

    ID of the file that the record is associated with. The value FDS_FILE_ID_INVALID (0xFFFF) is used by the system to identify records that have not been written correctly. See Restrictions on keys and IDs for further restrictions.

    Record ID 32 bits Unique identifier of the record.

    So a specific Record will be stored in a file with a file ID. A file can have several records with the same record KEY but different record ID. Record ID is therefore unique, record KEY and file ID however is not. Which means that you can have several records stored with the same file ID and record KEY but with a unique record ID. You use record KEY and file ID when you want to access a Record. 

    Documentation.

    regards

    Jared 

Children
No Data
Related