Re: [ctypes-users] copying/slicing ctypes arrays, (c_ulong *n)()
Brought to you by:
theller
From: RayS <ra...@bl...> - 2004-12-23 00:42:58
|
Hi, At 05:10 PM 12/16/2004 +0100, Thomas Heller wrote: >But it *should* support slicing. =20 Yes, I got it going correctly, again... >Another possibility would be to let the ADC write the data directly into >the numArray, once you know it's address (and assuming it doesn't >change). I'm trying to figure out how this would be accomplished; I currently crea= te a (c_long*2000)() to receive the result of the driver call buf =3D usb.EDRE_ADGetDataRaw(Sn,*Buf ,*BufSize) where=20 usb =3D windll.EDRAPI #driver Sn 32-bit unsigned integer Board=92s serial number. *Buf Pointer to an array of 16-bit unsigned words *BufSize Pointer to an array of 32-bit unsigned integers As per you suggestion, the address and memmove() work fine, the address c= alcs are easy. So, how can I set up a windll call to the driver to plop data directly in= to the numarray? (The 4us memmove() is actually fast enough; the driver c= alls and other ops are now the majority of the time spent. I have 8000us = between 2K buffers.) Ray Happy Holidays to all!=20 |