user events.tips,tricks and sundry chris roebuck ni days 2013

26
NI Days 2013 User Events: tips, tricks and sundry Chris Roebuck

Upload: chris-roebuck

Post on 07-Nov-2014

476 views

Category:

Technology


1 download

DESCRIPTION

NI Days 2013 User Events Tips Tricks & Sundry Presentation By Chris Roebuck

TRANSCRIPT

Page 1: User events.tips,tricks and sundry   chris roebuck ni days 2013

NI Days 2013

User Events: tips, tricks and sundry

Chris Roebuck

Page 2: User events.tips,tricks and sundry   chris roebuck ni days 2013

Hello & Welcome

• Chris Roebuck (aka croebuck)

Page 3: User events.tips,tricks and sundry   chris roebuck ni days 2013

As a courtesy to others…….

Leave your smartphone switched ON

Please Tweet your friendsPlease Update your LinkedIn statusPlease Post on your Facebook wall

Make your friends jealous you’re here learning cool new stuff and they’re not !!!

Page 4: User events.tips,tricks and sundry   chris roebuck ni days 2013

Lets give some credit….• “User events, tips, tricks and sundry “

– Presented by Jack Dunaway at the 2013 European CLA Summit held in Paris

• “Everything You wanted to know about events (but were afraid to ask)”– Presented by Norm Kirchner at NI Week 2013

Page 5: User events.tips,tricks and sundry   chris roebuck ni days 2013

Show of hands…….

Page 6: User events.tips,tricks and sundry   chris roebuck ni days 2013

I don’t need no stinkin’ events !

Page 7: User events.tips,tricks and sundry   chris roebuck ni days 2013

History Lesson

Before 6i the only real option was to “poll” the control values

Remember doing this ?

Page 8: User events.tips,tricks and sundry   chris roebuck ni days 2013

History Lesson 6.1

LabVIEW 6.1 quietly introduced the Event Structure and gaveus some limited access to static VI Server events

Page 9: User events.tips,tricks and sundry   chris roebuck ni days 2013

History Lesson 7 Express

Brought us “dynamic” event registration

Page 10: User events.tips,tricks and sundry   chris roebuck ni days 2013

History Lesson 8.0History Lesson 8.2

Brought us .net events & event callbacks

Page 11: User events.tips,tricks and sundry   chris roebuck ni days 2013

and now 2013

…and now we’ve got some new primitives and features likePriority events and the ability to flush the event queue

Page 12: User events.tips,tricks and sundry   chris roebuck ni days 2013

Syntax – Static Events (VI Server)

Statically bind an event “handler” structure to a VI Server event at edit time using the event configuration dialog

Page 13: User events.tips,tricks and sundry   chris roebuck ni days 2013

Syntax – Dynamic Events (VI Server)

Dynamically bind an event “handler” structure to a VI Server event at run time

Page 14: User events.tips,tricks and sundry   chris roebuck ni days 2013

Syntax – Dynamic / User / Custom Events“The Palette”

Publisher

Subscriber

Page 15: User events.tips,tricks and sundry   chris roebuck ni days 2013

Semantics

Page 16: User events.tips,tricks and sundry   chris roebuck ni days 2013

Demo’s & Myth Busting

Page 17: User events.tips,tricks and sundry   chris roebuck ni days 2013

Myth #1: Events are slow

Page 18: User events.tips,tricks and sundry   chris roebuck ni days 2013

Myth #2 : Events Can’t Handle Big Data

Page 19: User events.tips,tricks and sundry   chris roebuck ni days 2013

Myth #3 : Events Are Dangerous

Page 20: User events.tips,tricks and sundry   chris roebuck ni days 2013

Events For Messaging

Message 1

Message 2

Message 3

MSG Producer

MSG Consume

r

Publisher SubscriberSubscriber Producer Consumer

Page 21: User events.tips,tricks and sundry   chris roebuck ni days 2013

Events For Messaging

How do we do that ?

Page 22: User events.tips,tricks and sundry   chris roebuck ni days 2013

…..but what about objects?

Page 23: User events.tips,tricks and sundry   chris roebuck ni days 2013

Private & Public Events API

And fire it !!!

Obtain a reference to

the event

Page 24: User events.tips,tricks and sundry   chris roebuck ni days 2013

Summary

• Scalable (Actor Oriented Design ?)• Loosely Coupled (Reusable) Components • Testability• Easy to create an API (Private & Public Events)

Page 25: User events.tips,tricks and sundry   chris roebuck ni days 2013

Take Home Point

User Events are a lightweight, easy-to-use native feature with some really cool functionality.

SSBV use them a a primary way of performing intra-process communications.

They just got a whole lot better in LabVIEW 2013 so if you’ve dismissed them, take another look

Page 26: User events.tips,tricks and sundry   chris roebuck ni days 2013

[email protected]

@roebuckchris

www.walkingthewires.com

Want to talk some more ?