DisabledSafMode Property
General info
Label |
Disabled SaF Mode |
Description |
SaF behavior if the object is disabled. |
Data type |
UInt32 |
Default value |
1 (syslib.model.codes.DisabledSaFMode.DISCARD) |
Type |
CodingGroup |
Code |
13185 |
Symbolic name |
MODEL_PROP_DISABLEDSAFMODE |
Lua access code |
syslib.model.properties.DisabledSafMode |
Available since |
1.84 |
Attributes
| Name | Tooltip |
|---|---|
| PROP_CONFIGURABLE | The property is configurable and can be changed with DataStudio and the various inmation APIs. |
| PROP_VISIBLE | The property is visible in DataStudio and can be read by the inmation APIs. |
| PROP_HAS_DEFAULT | The property has a default value as standard. |
Codings
Coding group: DisabledSaFMode
| Name | Code | Label | Tooltip |
|---|---|---|---|
DISCARD |
1 |
Discard |
SaF data is discarded as long as the object is disabled. |
KEEP |
2 |
Keep |
SaF data is not discarded and keeps accumulating at the producer until the object is enabled again. |
Examples
Read from or write to the DisabledSafMode property.
-- Read from the DisabledSafMode
syslib.getvalue("<OBJECT FULL PATH>.DisabledSafMode")
-- Write to the DisabledSafMode
syslib.setvalue("<OBJECT FULL PATH>.DisabledSafMode",
syslib.model.codes.DisabledSaFMode.DISCARD)
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);
// Read from the DisabledSafMode
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.DisabledSafMode"));
// Write to the DisabledSafMode
Result result = sli.WriteValue(sc, new WriteItem(DisabledSaFMode.DISCARD, "<OBJECT FULL PATH>.DisabledSafMode"));
A switch-like function of the codings.
function get_coding_name(code)
local _dsfm = syslib.model.codes.DisabledSaFMode
if _dsfm.DISCARD==code then return 'DISCARD'
elseif _dsfm.KEEP==code then return 'KEEP'
end
end
return get_coding_name(syslib.model.codes.DisabledSaFMode.DISCARD)