You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although, I am able to access the first bucket's information, through BucketList.items. But, I am not able to "point" to the next bucket's information.
May someone hint, as to how I may access the next information?
Thank in Advance
Vivs
The text was updated successfully, but these errors were encountered:
@engrvivs-neosoft have you managed to do this in the end? I tried using readPointer and get with an offset to get the next element but this results in "Buffer instance must be at least 32 bytes to back this struct type"
Oh I have finally found it. It was difficult because the full api doc of ref is missing but for anyone who falls onto this:
The buffer is allocated for only one structure by default (as it is a pointer) so you need to use the reinterpret function:
// const structType = new StructType({…});constmyStructType=ref.refType(structType);constresult=myLibraryStruct.reinterpret(n*myStructType.size);// with n being the number of elements in the arrayletel=ref.get(result,i*myStructType.size,structType);// retrieves the element in the array at rank i
Hi
Through list_buckets() C function, I am retrieving a C structure, BucketList, through ref-struct, defined as follows:
Here, I mainly need to access the "array" of BucketInfo, which I have declared as follows:
Although, I am able to access the first bucket's information, through BucketList.items. But, I am not able to "point" to the next bucket's information.
May someone hint, as to how I may access the next information?
Thank in Advance
Vivs
The text was updated successfully, but these errors were encountered: