Graphical object oriented programming
This presentation is the property of its rightful owner.
Sponsored Links
1 / 19

Graphical Object-Oriented Programming PowerPoint PPT Presentation


  • 91 Views
  • Uploaded on
  • Presentation posted in: General

Graphical Object-Oriented Programming. Jörgen Jehander - ENDEVO Stepan Riha - LabVIEW Software Engineer Thu 10:15a, 12:45p, and 3:30p Red River (4B). Overview. Problems with monolithic applications Conventional development Component-based development Using components in LabVIEW

Download Presentation

Graphical Object-Oriented Programming

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Graphical object oriented programming

Graphical Object-Oriented Programming

Jörgen Jehander - ENDEVO

Stepan Riha - LabVIEW Software Engineer

Thu 10:15a, 12:45p, and 3:30p

Red River (4B)


Overview

Overview

  • Problems with monolithic applications

  • Conventional development

  • Component-based development

  • Using components in LabVIEW

  • Implementing OOP in LabVIEW


Problems with monolithic applications

Problems with Monolithic Applications

  • Difficulties we face:

    • Design can quickly become confusing

    • Numerous developers increase problems

    • Testing is not straightforward

    • Difficulty finding and correcting bugs

    • Expensive to add functionality


Conventional development

Conventional Development

  • Top-down design

    • Functionality abstracted into subVIs

  • GUI often designed first

    • SubVIs often created from sections of virtual instruments (VI)

  • State information stored in global variables

    • Data dependencies

    • Race conditions


Conventional development1

Conventional Development

  • Case study – climate control system

    • Maintain a desired temperature using a heater, cooler, fan, and temperature sensor


Conventional development2

Conventional Development

  • Climate control system


Component based development

Component Program

Component A

Component B

Component C

Component D

Component E

Component-Based Development

Monolithic Program


Component based development1

Component-Based Development

  • Design begins by identifying components

    • Look at the problem description

    • Think in higher level terms

    • Decide on responsibility and behavior of each component

    • Test each component on its own

  • Application is built up from components

    • They snap together like Lego blocks

    • You can add new pieces in the future


Component based development2

Component-Based Development

  • Case study – climate control system

Controller

Heater

Cooler

Fan

Temp


Component based development3

Component-Based Development

  • Climate control system


Designing components

Designing Components

  • Responsibility first

    • Determine component behavior

    • Decide on component responsibilities

  • Interface second

    • Select which functions you should use to control the component

  • Implementation third

    • Test component


Using components in labview

Using Components in LabVIEW

  • Queue VIs

    • Responsibility

      • Passing data between diagrams running in parallel

      • Using FIFO buffer for string data

    • Interface

      • Create queue

      • Insert queue element

      • Remove queue element

      • Destroy queue


Classes methods and objects

Classes, Methods, and Objects

  • Classes

    • Implementation of components

  • Methods

    • Public interface to component

  • Objects

    • Instances of class data


Implementing oop in labview

Implementing OOP in LabVIEW

  • Should use the same as built-in components

  • No direct language support in LabVIEW

    • Object management implemented on diagram

  • Class Wizard

    • Automatically generates class and method VIs


Implementing oop in labview1

Implementing OOP in LabVIEW

Class New

Creates an object

Class Delete

Destroys the object

Class Get Data

Reads object state information (read-only)

Class Get Data to Modify

Class Set Modified Data

Reads and writes object state information


Implementing oop in labview2

Implementing OOP in LabVIEW

  • Class Methods

    • Implemented using Get Data or Get Data to Modify and Set Modified Data VIs


Class wizard demo

Class Wizard Demo


Graphical object oriented programming conclusion

Graphical Object-Oriented Programming Conclusion

  • GOOP and Components improve:

    • Reusability

    • Testability

    • Maintenance

    • Scaleability

    • Team development

  • GOOP is built on:

    • Classes, objects, and methods


Questions

Questions?


  • Login