Transformer SDK For C
6.2.11.309924
|
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-level
Type: String
Default: INFO
Logging level of the pipeline module.
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
udp-command
Type: String Array
Default: None
This option defines a list of UDP commands that the defined udpsig-func wishes to receive.
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.
provider-exclude-regex
Type: String Array
Default: None
Regex to not match for providers
provider-regex
Type: String Array
Default: None
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:
Name | Value | Desc |
---|---|---|
none | 0 | Default value |
default | 1 | This pipeline is a default which should capture all updates not caught by other pipelines |
flags
Type: Integer
Default: 0
Acceptable Values:
Name | Value | Desc |
---|---|---|
none | 0 | No flags |
manyprovider | 1 | The pipeline should be asked many times to provide the data |
initallatstart | 2 | The init function should be called when the Transformer starts up |
clearupdate | 4 | Incoming updates should be cleared to prevent processing by other modules/pipelines |
suppressupdate | 8 | Incoming updates should be prevented from being distributed to connected peers |
accessory | 16 | Subscriptions on this pipeline are accessories |
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:
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.
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:
Where update is of type dsdata (see dsdata).
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:
The parameter flags should not be inspected since it has no significence.
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:
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.
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:
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.
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:
The parameter msg will contain the UDP message the first field of which will be the UDP command.
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:
Name | Value | Desc |
---|---|---|
none | 0 | No extra logging |
update | 1 | Log receiving updates |
nodata | 2 | Log receiving nodatas |
status | 16 | Log receiving status |
filter | 4 | Log receiving filters |
timer | 8 | Log timer interactions |
all | -1 | All available extra logging |
Flags for additional logging