- From: John Conner <conner_at_empiredi.com>
- Date: Thu, 13 Nov 2003 11:32:47 -0700
Bryan, Have you been able to test the sample code that is in comedilib 0.7.21? I'm not able to get it to run on my box with the PC104-DAS16 or the PCI-DAS1602. I know for sure both are now happy with comedi/comedilib. Similar problems with the code Luc Lefebvre put out. Only his version of info.c really works. What I need is to get the comedi_read_data function working. I get errors saying that on of the parameters needs to be a _p_lsample_t pointer. I'm probably missing something obvious but so far I've not found the right approach. Any ideas? The swig wrappers are a good idea but not always as simple as it seems. John Conner PS. You should update the url for your PythonDAq page. http://www.cole.uklinux.net/PythonDAq Took a bit to find and I remembered it was changed. > Yes, I've looked at the existing "ComPy" module in comedi CVS. As far as > I can see, ComPy does not include streaming/commands support. > > In fact, it would be good to liase with the authors of the ComPy module > (or anyone else with an interest in python/comedi wrappers), since it > would make sense to write a more robust,"pythonic" ComPy module on top > of the SWIG-generated wrappers. SWIG maps all the comedilib functions to > python functions in a 1-to-1 fashion, with no error checking or other > "idiot-proofing". When I next get a Comedi-supported card installed, > I'll have a go at this. > > The SWIG-generated code provides a simple mechanism for creating and > manipulating all the various comedi structs as python objects. Since > python already supports file-descriptor I/O, no special code is required > for streaming acquisition. The SWIG generated wrappers have an > additional advantage of easy maintainability: as Comedilib evolves, just > re-run SWIG to re-generate the code. SWIG generates the entire wrapper > c-code from an interface file under 30 lines long! > > Bryan > > > > > _______________________________________________ > comedi mailing list > comedi_at_comedi.org > https://cvs.comedi.org/cgi-bin/mailman/listinfo/comedi
Received on 2003-11-13Z18:32:47