How to use correctly A&D memory?

Hi all !

I’m starting with OpenAT 3.04 on Q2501B (6.52a) and i need your help !!

After reading tons of documentation and posts about A&D topics, i still cant use properly this memory…

What i do in my application :

  1. I subscribe to adl_adSubscribe to get the handle (return code is 0, which should be OK)

  2. I write in the cell with adl_adWrite, the result code is still OK (i’ve tried to put char* or int* as third parameter)

  3. I finalise the cell

  4. Then i try to read the content of data in the adl_adInfo_t structure depending on the data type i put in with an appropriate cast (return code is OK). By the way, the size field of Info is correct according to data i’ve tried to store…

  5. I display the content of data with adl_atSendResponse

  6. I format and recompact the cells before ending my application (return code is OK)

My problem :

All the bits in the memory are “1”…looks like i did never write anything in the A&D cell… so if i read characters (char), i obtain an “ÿ” for every char (0xFF) and if i read integers (int) i get 4294967295 (0xFFFFFFFF) for every int !

I’m running the application in remote mode with VC++ 6 and i’ve no idea of what the problem is or what i’m doing wrong… And u ?

Thanks in advance !

Remember, your data is not actually contained in the adl_adInfo_t structure - there is just a pointer to your data.

Are you certain that your are correctly dereferencing the pointer?
You need to show the code that you use to do this!

Thank you awneil !!

I thought that the data were in the adl_adInfo structure… It helps me a lot !! Thank you again !

I’m having the same problem like colin-tfe and this is how I dereference the pointer:

*(u8* )cellInfo.data

but I still just garbage !!!

That’s fairly meaning less on its own!

You need to show how you actually use this in your code!