From: scott Heath on 21 Mar 2010 21:11 Thanks for the replies, i did manage to solve this issue, but only using a hack. Using matlab to generate a prototype m file from a c++ header file worked as expected. The problem was in the definition of a particular struct. In the prototype m-file i found (long line, sorry): structs.s_playerc_device_t.members=struct('id', 'voidPtr', 'client', 's_playerc_client_tPtr', 'addr', 'player_devaddr', 'drivername', 'int8#64', 'subscribed', 'int32', 'datatime', 'double', 'lasttime', 'double', 'fresh', 'int32', 'freshgeom', 'int32', 'freshconfig', 'int32', 'putmsg', 'FcnPtr', 'user_data', 'voidPtr', 'callback_count', 'int32', 'callback', 'FcnPtr#4', 'callback_data', 'voidPtr#4'); The problem is in the FcnPtr#4 field. Matlab only associated 4bytes with that field when it should have been 16, shifting all the returned data several places down. Replacing FcnPtr with int32 fixed the problem. Is this a bug? --scott
|
Pages: 1 Prev: Cos infinite series Next: mean shift clustering code matlab |