HGF Base Class Library and Design Patterns

I started a project to create a LVOOP base class library that can serve as a base for LVOOP projects. HGF is an abbreviation for Helmholz, GSI, FAIR. The sources are published with GNU Public License (GPL).

Publications

  • H. Brand, “Object oriented programming with LabVIEW”, SEI-Herbsttagung 2008, HMI-B623 Berlin, Dez. 2008, Seiten 217–256, ISSN-0936-0891
    HGF_BaseClasses.ppt: Introductory talk to the HGF Base Class library.
  • H. Brand, D.Beck, “The HGF Base Class Library based on LVOOP”, GSI Scientific Report 2008, page 260, ISSN: 0174-0814, GSI-Report-2009-1
  • H.Brand, D. Beck, F.Berck Machbarkeitsstudie: LVOOP basiertes Agenten-System erschienen in "Virtuelle Instrumente in der Praxis - Begleitband zum Kongress VIP 2009", Rahman Jamal, Hans Jascchinski (Hrsg.), Hüthig Verlag, ISBN 978-3-7785-4057-2
  • F.Berck, H.Brand Prototyp für ein mobiles Agentensystem in LVOOP erschienen in "Virtuelle Instrumente in der Praxis 2010 - Begleitband zum 15. VIP-Kongress", Rahman Jamal, Ronald Heinze (Hrsg.), VDE Verlag, ISBN 978-3-8007-3235-7

Sources

Sources under development are available in our Subversion repository
  • HGF_Classes.lvproj in LVSCC\LVxxx\GPL\lib.lib\LVOOP.
  • HGF_DesignPatterns.lvproj in LVSCC\LVxxx\GPL\lib.lib\LVOOP\HGF_DesignPatterns
  • HB_BaseClass_Test.lvproj in LVSCC\LVxxx\GPL\User\Brand\HGF_DesignPatterns.
  • Source snapshots:
    • LabVIEW 8.6.1
      • The snapshot HB_BaseClasses_V0_8.zip includes HGF base class library, design patterns and test project for download. The NI Instrument Simulator device driver project style library is already included.
      • This snapshot is monolitic and you need to install all necessary drivers and LabVIEW Modules to avoid problems.
    • LabVIEW 2009 SP1 (SVN6384)
      • HGF_BaseClasses.zip: This zip-file contains the HGF LVOOP base classes.
      • HB_BaseClass_Examples.zip: This zip-file contains classes and demo VIs illustrating the application of HGF_LVC library and corresponding design patterns.
      • HGF_GPG.zip: This zip-file contains the HGF GPG base classes.
      • HGF_SharedVariable.zip: This zip-file contains classes to interface to Shared Variables.
      • VISA required
        • HB_Device_Exampless.zip: This zip-file contains classes and demo VIs illustrating the application of HGF_LVC library using the NI Instrument Simulator.
      • IMAQ and IMAQdx required
        • HGF_IMAQ.zip: This zip-file contains classes to access cameras via NI-IMAQ or NI-IMAQdx.
        • HB_IMAQ_Exampless.zip: This zip-file contains classes and demo VIs illustrating the application of HGF_LVC library and HGF_IMAQ classes.
      • LabVIEW StateChart Module and VISA required
        • HGF_DeviceFSMs.zip: This zip-file contains classes to drive stationary device agents by using the StateChart Module.
      • LabVIEW DSC required
      • DIM required
        • HGF_DIM.zip: This zip-file contains classes to interface to DIM.
        • HB_DIM_Examples.zip: This zip-file contains classes and demo VIs illustrating the application of HGF_BaseClasses library using DIM as network communication layer.
      • LabVIEW StateChart Module, VISA and DIM required
        • HB_DIM_DFSM_Device_Exampless.zip: This zip-file contains classes and demo VIs illustrating the implementation of an stationary device agent using the HGF_BaseClasses library using the NI Instrument Simulator and DIM.

We will start to evaluate options for an successor for the CS Framework based on this base classes library.

Following design patterns and base classes are already available.

HGF Design Patterns

HGF Base Class Hierarchy

Following picture shows the HGF Base Class Library. The classes in red/yellow belong to the HB_BaseClass_Test.lvproj.

HGF Class Hierarchy

  • HGF_Reference, can be used to treat objects as entities.
  • HGF_Factory, can be used to create initialized named objects dynamically fron class name. Refer to http://en.wikipedia.org/wiki/Abstract_factory_pattern for explanation.
  • HGF_Base, base class for all HGF classes. It provides some basic attributes, which are usefull for all HGF classes.
  • HGF_Event, base class for event handling, Children:
    • Internal events
      • HGF_WaitMultiple and HGF_Wait and HGF_Rendezvous
    • Triggered events
      • HGF_Occurrence, HGF_Notifier and HGF_Queue
    • Network events
      • HGF_DIMEvent, HGF_SVEvent (Shared Variable)
  • HGF_Visitor can perform actions on a HGF_Visitable object. Refer to http://en.wikipedia.org/wiki/Visitor_pattern for explanation.
  • HGF_FGV is an object oriented Functional Global Variable. Several HGF_FGV_Action classes are provided to access the objects in a FGV instance or to send a HGF_Visitor to them.
  • HGF_Composite consisting of HGF_Component and HGF_Leaf. Refer to http://en.wikipedia.org/wiki/Composite_pattern for explanation.
  • HGF_ThreadPool starts the HGF_Worker threads. They can be visited by a HGF_Task . Refer to http://en.wikipedia.org/wiki/Thread_pool_pattern for explanation.
    Recommended further reading:
  • HGF_DeviceBase and HGF_VISADevice inheriting from HGF_Visitable. They are the base class for devices. Also some HGF_DeviceVisitor classes are already exisiting.
  • Device Agent: To implement this pattern one additional Task has been developed, HGF_TaskDFSM derived from HGF_Task, that drives the Device Finite State Machine HGF_DeviceFSM.lvsc which defines the behavior. The State Chart defining the behavior of the HGF_DeviceAgent is shown in the following picture:
    State Chart defining the behavior of the HGF_DeviceAgent

Following picture contains a part of the HGF Class Library created with the Endevo UML Modeller:
Part of the HGF Class Library created with the Endevo UML Modeller

-- HolgerBrand - 29 Oct 2010
Topic revision: r35 - 2011-06-16, HolgerBrand - This page was cached on 2024-12-27 - 19:07.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Legal notice | Privacy Policy (german)