- Deprecated:
- See Pipeline Concepts: Data Dictionary
This collection of functions provides routines to add and retrieve fields from dsdata packets using the DataDictionary to obtain fieldnames and formats
This file is retained for legacy purposes only, the Pipeline Concepts: Data Dictionary should be used for new development
|
| getconfigitem (var symbolname, var requireditem) |
| Get the value of a config item. More...
|
|
| getfield (var update, var fieldkey, var formatkey, var pipeline_id) |
| Get the value of a field and apply a format. More...
|
|
| getoutputfield (var packet, var fieldkey) |
| Get an output field from a normalised packet. More...
|
|
| addfield (var packet, var fieldkey, var value, var pipeline_id) |
| Add a field to the update packet. More...
|
|
| addformattedfield (var packet, var fieldkey, var fmtname, var value) |
| Add a formatted field to the update packet. More...
|
|
| copyfield (var incoming, var normal, var source, var dest) |
| Copy the contents of one field to another. More...
|
|
addfield |
( |
var |
packet, |
|
|
var |
fieldkey, |
|
|
var |
value, |
|
|
var |
pipeline_id |
|
) |
| |
Add a field to the update packet.
- Parameters
-
packet | - Packet to add field to |
fieldkey | - Secondary key of the field to add |
value | - Field value to add |
pipeline_id | - Pipeline name to get configuration from, defaults to the current pipeline (optional) |
- Returns
- Nothing
addformattedfield |
( |
var |
packet, |
|
|
var |
fieldkey, |
|
|
var |
fmtname, |
|
|
var |
value |
|
) |
| |
Add a formatted field to the update packet.
- Parameters
-
packet | - Packet to add field to |
fieldkey | - Secondary key of the field to add |
fmtname | - Name of the format |
value | - Field value to add |
- Returns
- Nothing
copyfield |
( |
var |
incoming, |
|
|
var |
normal, |
|
|
var |
source, |
|
|
var |
dest |
|
) |
| |
Copy the contents of one field to another.
- Parameters
-
incoming | - Update packet that we have received |
normal | - Normalised packet the we can add updates to |
source | - Source fieldname/fieldnumber |
dest | - Destination fieldname/fieldnumber |
- Returns
- The field we have just copied
- Return values
-
nil | - Field wasn't available in incoming |
getconfigitem |
( |
var |
symbolname, |
|
|
var |
requireditem |
|
) |
| |
Get the value of a config item.
- Parameters
-
symbolname | - Incoming symbol name |
requireditem | - Item that we require |
- Returns
- Item name that we required
- Return values
-
We initially look under the symbolname in case any items have been overridden, if that fails, we look under the pipeline this symbol is associated with.
getfield |
( |
var |
update, |
|
|
var |
fieldkey, |
|
|
var |
formatkey, |
|
|
var |
pipeline_id |
|
) |
| |
Get the value of a field and apply a format.
- Parameters
-
update | - Incoming update |
fieldkey | - Fieldkey to obtain |
formatkey | - Format key to apply to the field data (optional) |
pipeline_id | - Pipeline name to get configuration from, defaults to the current pipeline (optional) |
- Returns
- Field value
- Return values
-
nil | - No field present in update |
This function should be used on the incoming data packet from feed - it references the individual pipeline configuration to determine what field a fieldkey maps to
getoutputfield |
( |
var |
packet, |
|
|
var |
fieldkey |
|
) |
| |
Get an output field from a normalised packet.
- Parameters
-
packet | - Packet to add field to |
fieldkey | - Secondary key of the field to get |
- Returns
- Field value
- Return values
-
nil | - No field present in update |
This function should be used on the outgoing data packet - it references the datadictionary to determine what field a fieldkey maps to