Viz Plug-ins User Guide

Version 5.1 | Published December 12, 2023 ©

DataPool Plugin

images/download/attachments/95401790/plugins_datapool-icon.png
The DataPool plug-in is a scene plug-in that manages the DataPool mechanism and data transfer in the scene level (i.e. manages the DataFields/values/registered plug-ins table).

Note: This plug-in is located in: Plugins -> Scene plug-ins -> Data

Information: DataPool plug-ins only work properly on a single channel on the same machine.

DataPool Properties

  • Data: Allows the user or external software to define new DataFields and assign data to DataFields. The field content is saved with the scene when the scene is saved in Viz. Data is a text parameter. 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: Sends information from external applications to the DataPool mechanism. The Data1 field has a larger size and can accept larger information blocks than the Data parameter. This parameter is hidden. The data that is sent is not saved with the scene.

  • DataRequest: Requests data from the DataPool (DataRequest is a text parameter). 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 appears in the DataOutput parameter.

  • DataOutput: Contains the data returned as a result of a query entered in DataRequest (DataOutput is a string parameter ). 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 replies:
    0 VALUE[2-3]=A2, A3; AAA[3]=A3;
  • DataCopy: Copies data from one DataPool variable or structure to another. For example:

    • a=b; is assigned the value of b to a.
      Or, if Stock1 and Stock2 is of Stocks type then:

    • Stock2=Stock1; assigns all the values from Stock1 to the values of Stock2.

      Note: The copy action does not take place unless the Copy Automatically parameter is set On, or the Execute Copy button is pressed.

  • DataLink: Links one DataPool variable or structure to another. For example:

    • a=b; links the value of a to b.
      or, if Stock1 and Stock2 is of Stocks type then:

    • Stock2->Stock1; links Stock2 to Stock1.

      Note: The link action does not take place unless the Link Automatically parameter is set On, or the Execute Link button is pressed.

  • Dump: Triggers a printout of all DataPool variables, structures and their values to the Viz console and to the file datapool_dump.txt located in %ProgramData%\Vizrt\VizEngine\.

  • Dump Spec: Triggers a printout of all DataPool variables and structures to the Viz console.

  • Initialize: Triggers a rebuild of the DataPool hierarchy in the scene and the assignment of values to the DataPool variables.

  • Execute Copy: Triggers an immediate copy of the variables or structures defined in the DataCopy field.

  • Execute Link: Triggers an immediate link of the variables or structures defined in the DataLink field.

  • Reload Configuration Files: Allows reloading all the *.dp files.

  • Reload Conversion Tables: Allows reloading all the conversion tables.

  • Copy Automatically: Defines if the copy of the values, defined in the DataCopy field, is triggered automatically when the DataCopy parameter is changed. When set OFF the copy operation does not happen until the Execute Copy button is pressed. When set to On, every time the DataCopy parameter changes or any of the copied DataPool variables defined in the DataCopy field is modified, DataPool copies the values as defined in the DataCopy parameter.

  • Link Automatically: Defines if the link of the values, defined in the DataLink field, is triggered automatically when the DataLink parameter is changed. When set to Off the copy operation does not happen until the Execute Link button is pressed. When set to On, every time the DataLink parameter changes or the linked DataPool variables are modified, DataPool executes the link as defined in the DataLink parameter.

  • Update DataPool On Load: Loads and initializes the data stored in the Data parameter when set to On.

  • Enable UDP: Enables external applications to control the DataPool via UDP when set to On. When set to On additional parameters are 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 DataPool listens for UDP messages.

  • Enable Multicast: Enables external applications to control the DataPool via MULTICAST when set to On. When set to On additional parameters are enabled.

  • Show Multicast Messages: Defines whether to display incoming MULTICAST messages in the Viz console.

  • Multicast Port: Defines the port number that DataPool listens for MULTICAST messages.

  • Multicast Address: Defines the address of the machine sending the MULTICAST messages.

  • Track DP_COMMAND in Scene SHM: Tracks a reserved shared memory key DP_COMMAND in the scene shared memory when set to On. When the key is changed its content is parsed and interpreted as one of the following commands:

    1. If DP_COPY prefix is used, the remaining string is used as a DataPool copy command, copying one or multiple DataPool fields.

    2. If DP_LINK prefix is used, the remaining string is used as a DataPool link command, linking one or multiple DataPool fields.

    3. If DP_SET prefix is used, the remaining string is used to set the value of DataPool fields.

    4. When none of the above options are detected, the content of DP_COMMAND is used to set the value of DataPool fields.

  • Track DP_COMMAND in Global SHM: Tracks a reserved shared memory key DP_COMMAND in the scene shared memory when set to On. The same as the above section, regarding Viz 3 Global shared memory.

  • Track DP_COMMAND in Distributed SHM: Tracks a reserved shared memory key DP_COMMAND in the scene shared memory when set to On. The same as the above section, regarding Viz 3 Distributed shared memory.