SafDiskRepairMode Property
General info
Label |
Repair Mode |
Description |
The Store and Forward repair mode in case of a corrupt database. |
Data type |
UInt32 |
Default value |
2 (syslib.model.codes.SafDiskRepairMode.REPAIR) |
Type |
CodingGroup |
Code |
2394 |
Symbolic name |
MODEL_PROP_SAFDISKREPAIRMODE |
Lua access code |
syslib.model.properties.SafDiskRepairMode |
Available since |
1.40 |
- Parent properties
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: SafDiskRepairMode
| Name | Code | Label | Tooltip |
|---|---|---|---|
NONE |
1 |
None |
Do not try to repair the Store and Forward disk database. |
REPAIR |
2 |
Repair |
Try to repair the Store and Forward disk database. Data loss may occur. If repairing fails, the configured fallback mode will be entered. |
REPAIR_OR_DESTROY |
3 |
Repair or Destroy |
Try to repair the Store and Forward disk database. Data loss may occur. If repair fails, the database will be destroyed and all persisted SaF data lost. |
DESTROY |
4 |
Destroy |
Destroy the Store and Forward disk database if it is corrupted (instead of trying to repair it). |
Examples
Read from or write to the SafDiskRepairMode property.
-- Read from the SafDiskRepairMode
syslib.getvalue("<OBJECT FULL PATH>.SafOptions.SafDiskRepairMode")
-- Write to the SafDiskRepairMode
syslib.setvalue("<OBJECT FULL PATH>.SafOptions.SafDiskRepairMode",
syslib.model.codes.SafDiskRepairMode.NONE)
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);
// Read from the SafDiskRepairMode
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.SafOptions.SafDiskRepairMode"));
// Write to the SafDiskRepairMode
Result result = sli.WriteValue(sc, new WriteItem(SafDiskRepairMode.NONE, "<OBJECT FULL PATH>.SafOptions.SafDiskRepairMode"));
A switch-like function of the codings.
function get_coding_name(code)
local _sdrm = syslib.model.codes.SafDiskRepairMode
if _sdrm.NONE==code then return 'NONE'
elseif _sdrm.REPAIR==code then return 'REPAIR'
elseif _sdrm.REPAIR_OR_DESTROY==code then return 'REPAIR_OR_DESTROY'
elseif _sdrm.DESTROY==code then return 'DESTROY'
end
end
return get_coding_name(syslib.model.codes.SafDiskRepairMode.NONE)