DataPool
The DataPool Plugin is a scene plugin that manages the DataPool mechanism and data transfer in the scene level (i.e. manages the DataFields/values/registered plugins table).
Unique Parameters
-
Data: Data is a text parameter. In this parameter the user or external software can define new DataFields and assign data to DataFields. The field content is saved with the scene when the scene is saved in Viz.
All commands/assignments should be semicolon separated.
For example:
A=5; B=3; aa[0..2]=1,3,5; Stocks[1]={Name=TEST, Value=4.5};
-
Data1: This parameter is hidden. It was intended for external applications sending information to the DataPool mechanism. The Data1 field has a larger size and can accept larger information blocks than the Data parameter.
The data that was sent is not saved with the scene.
-
DataRequest: DataRequest is a text parameter for requesting data from the DataPool. The user or external software can query DataFields by name using this parameter.
The format of the query is as follows:
fieldname[indexes-range]; fieldname[indexes-range]….
The result of the query will appear in the DataOutput parameter
-
DataOutput: DataOutput is a string parameter containing the data returned as a result of a query entered in DataRequest. The user or external software can use the returned information for manipulating the graphics.
For example: external usage of DataRequest and DataOutput
Enter data to the vectors VALUE and AAA: 0 RENDERER*FUNCTION*DataPool*Data SET VALUE[0-3]=V0, V1, V2,V3; AAA[0-5]=A0, A1, A2, A3, A4, A5; Request the last two items of VALUE and the third value of AAA: 0 RENDERER*FUNCTION*DataPool*DataRequest SET VALUE[2-3]; AAA[3]; Read the requested information: 0 RENDERER*FUNCTION*DataPool*DataOutput GET Viz will reply: 0 VALUE[2-3]=A2, A3; AAA[3]=A3;
-
DataCopy: This parameter is used for copying data from one DataPool variable or structure to another. For example:
-
a=b; will assign the value of b to a.
Or, if Stock1 and Stock2 is of Stocks type then:
-
Stock2=Stock1; will assign all the values from Stock1 to the values of Stock2.
Note: The copy action will not take place unless the Copy Automatically parameter is set ON, or the Execute Copy button is pressed.
-
-
DataLink: This parameter is used for linking one DataPool variable or structure to another. For example:
-
a=b; will link the value of a to b.
or, if Stock1 and Stock2 is of Stocks type then:
-
Stock2->Stock1; will link Stock2 to Stock1.
Note: The link action will not take place unless the Link Automatically parameter is set ON, or the Execute Link button is pressed.
-
-
Dump: This button will trigger a printout of all DataPool variables, structures and their values to the Viz console.
-
Dump Spec: This button will trigger a printout of all DataPool variables and structures to the Viz console.
-
Initialize: This button triggers a rebuild of the DataPool hierarchy in the scene and the assignment of values to the DataPool variables.
-
Execute Copy: this button will trigger an immediate copy of the variables or structures defined in the DataCopy field.
-
Execute Link: this button will trigger an immediate link of the variables or structures defined in the DataLink field.
-
Reload Configuration Files: This button allows reloading all the *.dp files.
-
Reload Conversion Tables: Allows reloading all the conversion tables.
-
Copy Automatically: This parameter defines if the copy of the values, defined in the DataCopy field, will be triggered automatically when the DataCopy parameter is changed. When set OFF the copy operation will not happen until the Execute Copy button is pressed. When set ON, every time the DataCopy parameter changes or any of the copied datapool variables defined in the DataCopy field is modified, DataPool will copy the values as defined in the DataCopy parameter.
-
Link Automatically: This parameter defines if the link of the values, defined in the DataLink field, will be triggered automatically when the DataLink parameter is changed. When set OFF the copy operation will not happen until the Execute Link button is pressed. When set ON, every time the DataLink parameter changes or the linked datapool variables are modified, DataPool will execute the link as defined in the DataLink parameter.
-
Update DataPool On Load: When set ON the DataPool will load and initialize the data stored in the Data parameter.
-
Enable UDP: When set ON the parameter will enable external applications to control the DataPool via UDP. When set ON additional parameters will be enabled.
-
Show UDP Messages: defines whether to display incoming UDP messages in the Viz console.
-
UDP Host Name: Defines the name of the machine that the UDP messages should arrive from.
-
UDP Port: defines the port number that the DataPool will be listening for UDP messages.
-
Enable Multicast: When set ON the parameter will enable external applications to control the DataPool via MULTICAST. When set ON additional parameters will be enabled.
-
Show Multicast Messages: defines whether to display incoming MULTICAST messages in the Viz console.
-
Multicast Port: defines the port number that the DataPool will be listening for MULTICAST messages.
-
Multicast Address: defines the address of the machine sending the MULTICAST messages.
-
Track DP_COMMAND in Scene SHM: When set ON, a reserved shared memory key "DP_COMMAND" will be tracked in the scene shared memory. When the key is changed its content is parsed and interpreted as one of the following commands:
-
If "DP_COPY" prefix is used, the remaining string will be used as a DataPool copy command, copying one or multiple DataPool fields.
-
If "DP_LINK" prefix is used, the remaining string will be used as a DataPool link command, linking one or multiple DataPool fields.
-
If "DP_SET" prefix is used, the remaining string will be used to set the value of DataPool fields.
-
When none of the above option is detected, the content of DP_COMMAND will be used to set the value of DataPool fields.
-
-
Track DP_COMMAND in Global SHM: the same as the above section, regarding Viz 3 Global shared memory.
-
Track DP_COMMAND in Distributed SHM: the same as the above section, regarding Viz 3 Distributed shared memory.