Config API
General
Type | Method | Description |
---|---|---|
void |
config.resetConfigToDefault() |
Revert all changes to the default configuration. |
void |
config.addScriptLine(line: string) |
Add the line to the script that is executed on the device. |
void |
config.infoLog(msg: string) |
Print the message into the device log within the LMC with log level info . |
void |
config.infoLog(key: string, msg: string) |
Print the message into the devicelog with the log key within the LMC with log level info . |
void |
config.warnLog(msg: string) |
Print the message into the device log within the LMC with log level warn . |
void |
config.abort(msg: string) |
Abort config building, and log the message into the device log within the LMC with log level error . |
OutputStream |
config.createOutputStream() |
Create a new standard output stream for strings. (Only supported for OneTimeScripts) |
OutputStream |
config.createOutputStream(key: string) |
Create a new output stream for strings. (Only supported for OneTimeScripts) |
void |
OutputStream.addLine(key: string) |
Add a string to the output stream. |
Scalar
Type | Method | Description |
---|---|---|
string |
config.getScalarByOid(oid: string) |
Return the value of the given scalar via oid. |
string |
config.getScalarByAlias(alias: string) |
Return the value of the given scalar via alias. |
string |
config.setScalarByOid(oid: string, value: string) |
Set scalar value via oid (returns old value) |
string |
config.setScalarByAlias(alias: string, value: string) |
Set scalar value via alias (returns old value) |
string |
config.enableBitByOidAtPos(oid: string, bitPos); |
Set bit of scalar with 0-based index. |
string |
config.disableBitByOidAtPos(oid: string, bitPos); |
Clear bit of scalar with 0-based index. |
string |
config.enableAllBitsByOid(oid: string); |
Enable all valid bits of a bitfield. |
string |
config.disableAllBitsByOid(oid: string); |
Clear all bits of a bitfield (same as config.setByOid(oid, "0") ). |
string |
config.resetScalarToDefaultByOid(oid: string); |
Reset the given scalar via oid to its default configuration value. |
string |
config.resetScalarToDefaultByAlias(alias: string); |
Reset the given scalar via alias to its 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 by its index, if it has only one index column. |
List<Row> |
table.getRowsByOid(oid: string, value: string); |
Get rows matching the value in the column with oid . |
List<Row> |
table.getRowsByAlias(alias:string, value:string); |
Get rows matching the value in the column with alias . |
List<Row> |
table.getRowsByOids(Map<oid, value>); |
Get all rows matching all search criteria, using oids. |
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 matching the value in the column with oid . |
Row |
table.getFirstRowByAlias(alias, value); |
Return first matching row matching the value in the column with alias |
Row |
table.getFirstRowByOids(Map<oid, value>); |
Get first matching row matching all values via oids. |
Row |
table.getFirstRowByAliases(Map<alias, value>); |
Get first matching row matching all values via aliases |
Row |
table.createNewRow(); |
Create a new empty row. |
Row |
table.addOrMerge(row) |
If the index matches an existing 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. |
string |
row.enableBitByOidAtPos(oid, bitPos); |
Set bit with 0-based index. |
string |
row.disableBitByOidAtPos(oid, bitPos); |
Clear bit with 0-based index. |
string |
row.enableAllBitsByOid(oid); |
Enable all valid bits of a bitfield. |
string |
row.disableAllBitsByOid(oid); |
Clear all bits of a bitfield (same as row.setByOid(oid, "0") ). |
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!) |