Code Monkey home page Code Monkey logo

Comments (2)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
Hello,

attached you will find a patch that fixes the problem. The drawback is that the 
task parameter now contains the task_handle (an integer) not the task object 
itself so you need to fix that in your AI_callback.py.

Maybe it would be a good idea to register a local callback that calls the 
callback given by the user, using the task object as parameter and maybe also a 
data array.
I also suggest to update the documentation as it was very confusing for me when 
I first tried to use this event. I can come up with a patch for that but I 
would like to know other opinions about the local callback part.

I guess that the done_event and signal_event have the same problem which can be 
fixed the same way, but I haven't tested this.

Best wishes,

Tobias

Original comment by [email protected] on 29 Aug 2010 at 1:33

Attachments:

from pylibnidaqmx.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 11, 2024
I 'fixed' this - although it is probably not fully thread-safe. The callback 
function now gets:
 * a Task object from the Task cache, so no new Tasks are created in the callback
 * the data retrieved from the DAQ card (instead of the number of samples).

It's a breaking API change, though, I guess. A more simple patch would not add 
the data as a parameter, which won't break the API.

Original comment by [email protected] on 24 Feb 2011 at 1:43

Attachments:

from pylibnidaqmx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.