From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
Yamaeda

Unbundle Event Ref

Status: Declined

National Instruments will not be implementing this idea. See the idea discussion thread for more information.

When you create and register user events, you need to send a copy of the event ref to the Event structure to be able to use and generate events. Why? We should be able to extract/unbundle the registered events. On the same thoughts, unregister should also return the ref so it can be destroyed, similar to how Open/Close File ref works.

 

TLDR; We should be able to extract and use registered event refs, e.g. through unbundle.

 

/Y

 

Unbundle Event ref.png

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
2 Comments
AristosQueue (NI)
NI Employee (retired)

That's not a cluster. It's an event registration refnum. It's not a by-value type at all. And the refnums that it accesses can be dynamically replaced... we would need some sort of locking unbundle if we were even going to do that. It would be a pretty weird API, honestly.

 

But there's a far bigger problem with your idea. It would break event refnum encapsulation. Many APIs will return only the registration refnum to callers and not return the user event refnum. This makes it so that the caller can receive the event but cannot generate the event. This barrier is intentional and relied upon for program correctness by many APIs. Yes, there is a way to get the even refnum *in the left-side event parameters in the frame where the event occurs*... but you can't get that refnum until the event has occured at least once from its intended source, which pretty much eliminates people using that back door. The encapsulation would be broken if we enable the registration refnum to give direct access to the user event refnums.

 

The R&D intended solution is exactly what you've done -- wire the event refnum itself to the place that needs to generate that event.

 

I will approach some of the rest of R&D, but it is my intent to close this idea as rejected because it would violate the encapsulation.

Darren
Proven Zealot
Status changed to: Declined

National Instruments will not be implementing this idea. See the idea discussion thread for more information.