This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Include multiple chunks in one fds record

I would like to include multiple p_chunks in one record. How do I do this? I've only seen examples with one chunk per record, but fds_record_t.data has a field called number_chunks. My uncertainty stems from the fact that fds_record_t.data.fds_record_chunk_t looks like it can take a pointer to only one chunk.

Thanks for any input!

EDIT: My first instinct is to create an array of length num_chunks that holds pointers to each of the chunks I want to store, then assign this new array to fds_record_t.data.fds_record_chunk_t. Is this the general idea?

EDIT 2: In SDK 14 chunks have been removed, so it has become a non-issue.

SDK13

  • Hi,

    My uncertainty stems from the fact that fds_record_t.data.fds_record_chunk_t looks like it can take a pointer to only one chunk.

    Short answer: you can assign an array to it.

    My first instinct is to create an array of length num_chunks that holds pointers to each of the chunks I want to store, then assign this new array to fds_record_t.data.fds_record_chunk_t. Is this the general idea?

    No, you don't need an array of pointers to chunks, just an array. Then you assign the array to the fds_record_chunk_t *


    However, I would discourage you from using chunks altogether. In most cases you could just write your data into several records and have a better control over it, generally speaking. Keep in mind that once you write one or more chunks into one record, there is no way to retrieve the data chunk by chunk using fds calls.

Related