How do I manipulate multilayer pointers in calllib calls, what is the proper syntax?
이전 댓글 표시
I have access to a library with the following calls:
[int32, BVTOpaqueSonarPtr, BVTOpaqueHeadPtrPtr] = BVTSonar_GetHead (BVTOpaqueSonarPtr, int32, BVTOpaqueHeadPtrPtr)
and
[int32, BVTOpaqueHeadPtr, BVTOpaquePingPtrPtr] = BVTHead_GetPing (BVTOpaqueHeadPtr, int32, BVTOpaquePingPtrPtr)
In my MATLAB function I have the following:
sonarPtr = libpointer;
headPtrPtr = libpointer;
[retval, sonarPtr, headPtrPtr] = BVTSonar_GetHead(sonarPtr, headIndex, headPtrPtr);
Now it is not clear to me how to dereference headPtrPtr to make the call to get the ping. It will look something like:
pingPtrPtr = libpointer;
[retval, *headPtr, pingPtrPtr] = BVTHead_GetPing(*headPtr, pingNumber, pingPtrPtr);
Except the '*' obviously does not work and I cannot find the proper syntax. I will have a similar problem using the BVTPing commands to get information from the ping, since they all call for pingPtr.
eg. [int32, BVTOpaquePingPtr, BVTOpaqueMagImagePtrPtr] BVTPing_GetImageRTheta (BVTOpaquePingPtr, BVTOpaqueMagImagePtrPtr)
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Call C from MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!