Transformer SDK For C  6.2.11.309924
Configuration: Pipeline

The configuration options documented in this section allow pipelines to be defined that react to object events.

pipeline-paths

Type: String Array
Default: None

Paths where pipeline scripts and libraries can be found.

The scripts can be separated between directories to aid maintainability.

%r/lib/pipeline is always defined since that is where the core Caplin supplied packages reside.

logfile

Type: String
Default: pipeline.log

Log file

log-level

Type: String
Default: INFO

Logging level of the pipeline module.

Configuration group add-pipeline

Start a pipeline configuration group.

Format:

add-pipeline
    id                  [value]
    pipeline-file       [value]
    listener-regex      [values]
    provider-regex      [values]
    initialise-func     [value]
    update-func         [value]
    nodata-func         [value]
    request-func        [value]
    discard-func        [value]
    no-delay-load
    add-info            [value] [value]
end-pipeline

required-fields

Type: String Array
Default: None

Required fields

udp-command

Type: String Array
Default: None

This option defines a list of UDP commands that the defined udpsig-func wishes to receive.

add-pipeline
udp-command source_up
udpsig-func udpsig
pipeline-file script.lua
end-pipeline

add-info

Type: String Array
Default: None

Insert information into the database

exclude-regex

Type: String Array
Default: None

List of regular expressions that if the symbolname matches should be excluded from being processed by this pipeline.

listener-regex

Type: String Array
Default: None

This option defines a list of regular expressions that the defined update-func wishes to receive.

Similarly, exclude-regex defines a list of regular expressions that will be excluded from the matching process.

add-pipeline
listener-regex ^/I/.*\.L
exclude-regex ^/I/VOD.L
update-func update
pipeline-file script.lua
end-pipeline

provider-exclude-regex

Type: String Array
Default: None

Regex to not match for providers

provider-regex

Type: String Array
Default: None

Regex to match

id

Type: String
Default: None

A unique identifier for the pipeline, this value is used by the add-info configuration option and is also logged to the log file at many points.

If no id is defined, then one will be automatically generated.

type

Type: Integer
Default: 0
Acceptable Values:

NameValueDesc
none0Default value
default1This pipeline is a default which should capture all updates not caught by other pipelines

Type for this pipeline

flags

Type: Integer
Default: 0
Acceptable Values:

NameValueDesc
none0No flags
manyprovider1The pipeline should be asked many times to provide the data
initallatstart2The init function should be called when the Transformer starts up
clearupdate4Incoming updates should be cleared to prevent processing by other modules/pipelines
suppressupdate8Incoming updates should be prevented from being distributed to connected peers
accessory16Subscriptions on this pipeline are accessories

Flags for this pipeline

pipeline-file

Type: String
Default: None

initialise-func

Type: String
Default: None

The name of the Lua function to call when the script is first loaded.

The signature of the function should be:

function initialise()

The initialise function is called when the script is loaded. It may be called multiple times depending on the setting of num-threads option.

A script is normally loaded when a matching update is received, if you want the initialise function to be called when the Transformer is started up use the no-delay-load option.

Note
This function is always called on the main thread.

update-func

Type: String
Default: None

The name of the Lua function to call when an update matching the listener-regex pattern is received.

The signature of the function should be:

function update(update)

Where update is of type dsdata (see dsdata).

Note
This function may be called on any of the slave threads (see num-threads)

nodata-func

Type: String
Default: None

The name of the Lua function to call when a nodata message for a symbol matching the listener-regex pattern is received.

The signature of the function should be:

function nodata(peer, symbolname, flags)

The parameter flags should not be inspected since it has no significence.

Note
This function may be called on any of the slave threads (see num-threads)

status-func

Type: String
Default: None

This configuration option is currently unused and is present for consistency only.

request-func

Type: String
Default: None

The name of the Lua function to call when an update matching the provider-regex pattern is received.

The signature of the function should be:

function request(peer, symbolname)

This function should return 0 if the request couldn't be handled, or 1 if it could.

This function will be called should either a module or a connected DataSource peer require updates to this symbol.

Note
This function is always called on the main thread.

discard-func

Type: String
Default: None

The name of the Lua function to call when an update matching the provider-regex pattern is received.

The signature of the function should be:

function discard(peer, symbolname)

This function should return 0 if the discard couldn't be handled, or 1 if it could.

The discard function will be called when no modules or peers wish to receive updates for the symbol.

Note
This function is always called on the main thread.

udpsig-func

Type: String
Default: None

The name of the Lua function to call when a UDP signal containing a command message matching (one of) the configured udp-command is received.

The signature of the function should be:

function udpsig(msg)

The parameter msg will contain the UDP message the first field of which will be the UDP command.

Note
This function may be called on any of the slave threads (see num-threads)

no-delay-load

Type: Boolean
Default: FALSE

This option forces the pipeline to be loaded on startup of the transformer rather than being delayed until it is first required.

log-flags

Type: Integer
Default: 0
Acceptable Values:

NameValueDesc
none0No extra logging
update1Log receiving updates
nodata2Log receiving nodatas
status16Log receiving status
filter4Log receiving filters
timer8Log timer interactions
all-1All available extra logging

Flags for additional logging


Generated on Sat Aug 26 2017 12:36:32 for Transformer SDK For C