User Tools

Site Tools


kb:bestpractices:codingconventions:apptemplate

31 HSE App. Template

Guidelines and tips pertaining to the HSE Application Template.

General Guidelines

  • Keep framework and project responsibilities separate

Application Startup

  • By default, the Application Template starts only a single, project-specific Application Controller.lvlib module via the framework mechanism (config.ini and startup.vi)
    • having this one dynamically loaded module avoids static dependencies between framework and project-specific code
  • The project-specific Application Controller (which typically has an HSE State Machine) is responsible for starting and coordinating all remaining modules
  • Starting multiple modules directly from the framework is still supported, but should only be used where appropriate:
    • UI Framework modules
    • Modules that are displayed in UI-Manager/Layout VI at startup
    • Very small applications

Module Orchestration

The Application Controller explicitly coordinates starting and synching of all remaining modules using an HSE State Machine. When starting multiple modules, use

Sequential startup

  • separate states in the SM
  • synchronous
  • for modules that depend on each other (ie A needs to run before B)

Parallel startup

  • same state in the SM
  • asynchronous
  • for independent modules (ie A and B don't care about each other)

Hybrid approach

  • combination of sequential and parallel
  • combine modules in groups
  • start modules in groups in parallel
  • start different groups sequentially (eg first all models, then all viewers)

Module Architecture

Dependencies

  • Keep dependencies explicit and one-directional
    • Application Controller – coordinates application state
    • Models – implement business logic and device communication
    • Viewers – present application state

Model modules should not depend on Viewer modules


The HSE Way of Working:
A set of guidelines that recommend programming style, better practices, and methods for all our LabVIEW projects. We ask all our peers to follow these guidelines to help improve the readability of our shared source code and make software maintenance easier.

kb/bestpractices/codingconventions/apptemplate.txt · Last modified: 2026/08/17 16:07 by joerg.hampel