Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Event Callbacks Contain Unusable Parameters

Aperta
#143 5 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@DeborahOoi96 ci sta già lavorando.

Dal 19/1/2024.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

api enhancement

Original discussion on NI's forms.

DAQmx's event callback signatures include a Task ID and callbackData parameters even though there currently isn't a way to get a task object from a Task ID or be able to pass in user provided callbackData (register_every_n_samples_acquired_into_buffer_event passes None as the data.)

Having to specify these to parameters in the signature even though they are not usable is confusing the users.

These are 2 ideas on how to improve this.

  • Provide a way to pass in user provided data and get a task object from a Task ID.
  • Make the callback signature that users provide not have to specify those and wrap their callback in an internal one to the event register functions.
    • Might also be able to pass reference to task object that referenced it by passing self from internal_callback wrapper.
Lingua principale
Python
Stelle
590
Fork
199
Merge medio
1g 20h
PR unite (30g)
10

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ni/nidaqmx-python

Tutte le issue di ni/nidaqmx-python

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.