Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA Pipeline Operations for Liquids

Implement the plugin

  • Last UpdatedApr 24, 2025
  • 3 minute read

To host the additional information, each of the baseline Historical pipeline inventory tables contains a column: Extension NVARCHAR(MAX). Using the extension points described in this section, you have multiple options depending on your needs. Examples of these options are shown in the upcoming Example implementation section.

  • Option 1: If you only need to send one custom value to the Historical table, you can provide a string that contains that single value. When querying the Historical table, you will need to include Extension as one of the columns in the select statement and perform any required type conversion.

  • Option 2: If you need to send multiple custom values to the Historical table, you can build a string that contains a comma-separated list of values, key-value pairs, a JSON structure, or any other format. When querying the Historical table, you will have to unpack the content of the Extension field.

  • Option 3: If you need to send custom values to an extension table (for example, in case you have a large number of additional fields), you can create a unique ID and send it in a string format to the Extension field in the baseline table. The unique ID will act as a foreign key to reference the additional information in another custom Historical table that you will have to create and maintain. When querying the baseline table, you will have to join it with the extension table using the unique ID.

You can use this extension point to send additional data to each of the following pipeline inventory tables: pplAnomalyInventory, pplPipeInventory, pplStationInventory, pplBatchInventory, pplBatchSequence and pplFragmentInventory.

Your plugin code should provide an implementation for one or more of the following functions. The entry point for each of these functions is located inside the corresponding baseline inventory function which gets called to process each individual record and send it to the Historical database. Your implementation should construct the string value that you would like the baseline function to send as part of the Historical record. The string value will be persisted in the Extension column.

string extendAnomalyInventory (pipeline * pPpl, anomalyslot anmslot)

Where:

  • pPpl is a pointer to the locked pipeline record in the RealTime database (RTDB).

  • anmslot is an integer that represents the slot number of the anomaly being processed.

  • This function is expected to return the string value that will be used to populate the Extension column in the pplAnomalyInventory Historical table.

string extendPipeSegmentInventory(pipeline * pPpl, pipe_segmentslt pipeslot)

Where:

  • pPpl is a pointer to the locked pipeline record in the RealTime database (RTDB).

  • pipeslot is an integer that represents the slot number of the pipe segment being processed.

  • This function is expected to return the string value that will be used to populate the Extension column in the pplPipeInventory Historical table.

string extendStationInventory(pipeline * pPpl, nodeslot curnode, pipe_segmentslt lastpipe, pipe_segmentslt nextpipe)

Where:

  • pPpl is a pointer to the locked pipeline record in the RealTime database (RTDB).

  • curnode is an integer that represents the slot number of the node being processed.

  • lastpipe is an integer that represents the slot number of the pipe segment directly upstream of the node being processed.

  • nextpipe is an integer that represents the slot number of the pipe segment directly downstream of the node being processed.

  • This function is expected to return the string value that will be used to populate the Extension column in the pplStationInventory Historical table.

string extendBatchInventory(pipeline * pPpl, batchslot batslot)

Where:

  • pPpl is a pointer to the locked pipeline record in the RealTime database (RTDB).

  • batslot is an integer that represents the slot number of the batch being processed.

  • This function is expected to return the string value that will be used to populate the Extension column in the pplBatchInventory Historical table.

string extendBatchSequenceInventory(pipeline * pPpl, batchslot batslot)

Where:

  • pPpl is a pointer to the locked pipeline record in the RealTime database (RTDB).

  • batslot is an integer that represents the slot number of the batch being processed as part of the batch sequence.

  • This function is expected to return the string value that will be used to populate the Extension column in the pplBatchSequence Historical table.

string extendFragmentInventory(pipeline * pPpl, fragmentslot fragslot)

Where:

  • pPpl is a pointer to the locked pipeline record in the RealTime database (RTDB).

  • fragslot is an integer that represents the slot number of the fragment being processed.

  • This function is expected to return the string value that will be used to populate the Extension column in the pplFragmentInventory Historical table.