Viz Plug-ins User Guide
Version 5.1 | Published December 12, 2023 ©
Overview
DataPool implements a table of DataFields. Each DataField has a unique name by which it is accessed, a value (data) and a list of data changes handlers. The handlers are implemented as plug-ins in Viz, where each plug-in affects specific parameters of a container in Viz. The plug-in instances are registered to DataFields when attached to a container in the scene. The plug-in modifies the container parameters when the value of the DataField changes. It doesn’t do anything unless it is called.
The external software sends the data to the DataPool through the DataPool plug-in. In the sent message, the application specifies which data should be assigned to which DataField. The DataPool plug-in accesses the DataFields table using the name of the field to be accessed, gets the relevant field and assigns the data to it.
This assignment invokes a series of triggers to all the plug-ins (handlers) registered to the field.
DataFields
As stated before, the DataField is a cell formed by three elements:
-
Name (or address).
-
Data.
-
A list of handlers. The name is a zero terminated ASCII string.
The data is a vector of strings. The DataField can host one string of data, or a series of strings. The user can set the size (the number of items) of the DataField. Each one of the DataField items can be accessed separately or they can be accessed as a group, altogether.
The process of creation of the DataField is as follows: When a DataPool plug-in is specified to register to a certain DataField the plug-in looks for the specific DataField in the DataFields table. If the field doesn’t exist the plug-in creates it and registers itself to the DataField. In order to send data to a certain DataField, at least one plug-in has to be registered to that DataField.