Skip to end of metadata
Go to start of metadata

Plugin registration

The browser plugins are a subclass of the CBPMPluginManager.lvclass (see also the class hierarchy of the browser). During program start-up, the browser screens for .lvclasses in the extension/Plugin folder and tests, if thefound LabView classes are a real "plugin-child". If this is the case, the plugin is registered.
The registered plugins are initialized directly after registration by invoking the dynamic dispatch function CPPMInitPlugin. From every plugin, and instance is generated during registration. An array of references is stored in the CBPMPluginInstances. The index-number of the array with the instance is also stored in the registration information.

You can use the plugin manager to see the installed plugins and adjust their preferences.

The registration information of the plugin is a cluster with following fields:

Field

Type

Description

Type

string

Type of plugin

Name

string

Display-name of plugin

Description

string

Description of the Plugin. Displayed in the the plugin manager

PluginPath

Path

Path to plugin class, filled during registration

Version

string

Version of plugin

RealtiveMainPath

Path

Relative path of the main vi of the plugin to the plugin class

StandardPlugin

Boolean

Flag, if the plugin must be installed

UniqueID

string

Unique identifier. Use name and creation date. For viewportTypes: The UniqueID must be the name of the viewport type

Author

String

Author of the plugin

Institution

String

Institution of the Author

HelpPath

string

HTML adress for the plugin help

OSCompatibility

Cluster of booleans

OS compatibility of plugin

PluginIndex

I16

Index pointing to the plugin instance reference in the plugin array stored in CBPMPluginInstances

Types of plugins

The plugin type defines:

  • Where the plugin can be invoked from the user interface
  • How it is invoked. Viewports have a different start-up mechanism

Type

Description

Collection

A plugin for data registration or direct data measurement from a measurement instrument

Tools

A plugin displayed and invoked from the tools menu

viewportType

Handles the data type displayed. It defines the data-type loaded by importers and displayed by viewports. It also handles the preview generation of a specific type during import, as well as provides data-type specific functions.

viewport

A plugin providing a viewport, e.g. Display of data. Note every viewport must be associated with a viewportType, and is loaded as a subclass of a the associated viewport type definition.The viewport also saves a preferences for every data-set about the display settings.

importer

Data importer plugin. Note that importers must be associated by viewportTypes

database

Plugin for database collection. Normally openBIS

Minimal overwrite functions

name

Description

CBPMGetPluginInfo

Provides the plugin information used for plugin registration

CBPMPreferencesGUI

Provides the preferences GUI displayed in the plugging manager sub-panel

CBPMStartMain

Starts the main plugin program stored in the MainPathField

CBPMInitPlugin

Initializes the plugin. This is done during the plugin registration process

Plug-in info

The plugin info is provided as an overwrite function named CBPMPluginInfo.vi. This function returns a struct with following contents:

field

Type

Description

Type

string

Type of plugin

Name

string

Display name of plugin

Description

string

Description of plugin

PluginPath

path

Pathn to plugin class. Do not use. Will be filled during plugin registration.

Version

string

Plugin version

RelativeMainPath

path

Relative main path to main plugin program (obsolete?)

StandardPlugin?

boolean

Indicates, if it is a standard plugin belonging to a minimal installation

UniqueID

sting

Unique identifier of plugin

Author

string

Authors e-mail adress

Institution

string

Institution (description)

helpPath

string

Static adress to plugin help-page

OS compatibility

Cluster

Cluster of booleans providing os compatibility information

Plugin-type specific information

Collection plug-ins

  • A copy of the class hierarchy is passed to the collection plugin
  • Use CBPMStartMain to start the collection

Tools plug-ins

  • A new menu is displayed in the tools pop-up menu
  • Use CBPMStartMain
  • No labels
Write a comment…