Config API
General
Type | Method | Description |
---|---|---|
void |
config.resetConfigToDefault() |
Revert all changes to the default configuration. |
void |
config.addScriptLine(line: string) |
Adds the line to the script that is executed on the device. |
void |
config.infoLog(msg: string) |
Prints the message into the device log within the LMC with log level info . |
void |
config.infoLog(key: string, msg: string) |
Prints the message into the devicelog with the log key within the LMC with log level info . |
void |
config.warnLog(msg: string) |
Prints the message into the device log within the LMC with log level warn . |
void |
config.abort(msg: string) |
Aborts config building, and log the message into the device log within the LMC with log level error . |
OutputStream |
config.createOutputStream() |
Creates a new standard output stream for strings. (Only supported for OneTimeScripts) |
OutputStream |
config.createOutputStream(key: string) |
Creates a new output stream for strings. (Only supported for OneTimeScripts) |
void |
OutputStream.addLine(key: string) |
Adds a string to the output stream. |
Scalar
Type | Method | Description |
---|---|---|
string |
config.getScalarByOid(oid) |
Returns the value of the given scalar via oid. |
string |
config.getScalarByAlias(alias) |
Returns the value of the given scalar via alias. |
string |
config.setScalarByOid(oid, value) |
Sets scalar value (returns old value) |
string |
config.setScalarByAlias(alias, value) |
Sets scalar value (returns old value) |
string |
config.resetScalarToDefaultByOid(oid); |
Reset the given scalar via oid to the default configuration value. |
string |
config.resetScalarToDefaultByAlias(alias); |
Reset the given scalar via alias to the default configuration value. |
Table
Type | Method | Description |
---|---|---|
Table |
config.getTableByOid(oid: string); |
Get the Table object via oid. |
Table |
config.getTableByAlias(alias: string); |
Get the Table object via alias. |
List<Row> |
table.getRows(); |
Get all rows of the Table object. |
Row |
table.getRowBySingleIndex(indexValue: string); |
Get a row index, if it has only one index. |
List<Row> |
table.getRowsByOid(oid: string, value: string); |
Get rows matching the value value in the column oid . |
List<Row> |
table.getRowsByAlias(alias:string, value:string); |
Get rows matching the value value in the column alias . |
List<Row> |
table.getRowsByOids(Map<oid, value>); |
Get all rows matching all search criteria. |
List<Row> |
table.getRowsByAliases(Map<alias, value>); |
Get all rows matching all search criteria, using aliases. |
Row |
table.getFirstRowByOid(oid, value); |
Return first matching row via oid. |
Row |
table.getFirstRowByAlias(alias, value); |
Return first matching row via alias |
Row |
table.getFirstRowByOids(Map<oid, value>); |
Get first matching row matching via oid. |
Row |
table.getFirstRowByAliases(Map<alias, value>); |
Get first matching row matchign via aliases |
Row |
table.createNewRow(); |
Create a new empty row. |
Row |
table.addOrMerge(row) |
If the index matches a row the row is updated, otherwise the row is added. |
boolean |
table.resetToDefault(); |
Reset the table to the default configuration. |
Row
Type | Method | Description |
---|---|---|
string |
row.getByOid(oid); |
Get value via oid. |
string |
row.getByAlias(alias); |
Get value via alias. |
string |
row.setByOid(oid, value); |
Set value via oid. |
string |
row.setByAlias(oid, value); |
Set value via alias. |
void |
row.setByOids(Map<oid, value>); |
Set multiple values via oid. |
void |
row.setByAliases(Map<alias, value>); |
Set multiple values via aliases. |
Row |
row.addByOid(oid, value); |
Like setByOid but returns the row for fluent API usage. |
Row |
row.addByAlias(alias, value); |
Like setByAlias but returns the row for fluent API usage. |
boolean |
row.delete(); |
Delete the row from the table. |
Exclude/Include
Type | Method | Description |
---|---|---|
void |
config.excludeByOid(oid: string) |
Do not write element(s) that match oid filter to the device, e.g. config.excludeByOid("1.2.9.13"); |
void |
config.excludeByOids(oids: List<string>) |
Do not write element(s) that match oid filter to the device, e.g. config.excludeByOids(["1.2.9.17", "1.2.9.18", "1.2.11.*"]); |
void |
config.includeByOid(oid: string) |
Only write the element(s) matching the oid filter to the device |
void |
config.includeByOids(oids: List<string>) |
Only write the element(s) matching the oid filter to the device (Note: the include calls do not stack!) |