PumpType Property
General info
Label |
Pump Type |
Description |
Pump Type. |
Data type |
UInt32 |
Default value |
1 (syslib.model.codes.PumpType.GENERIC) |
Type |
CodingGroup |
Code |
12948 |
Symbolic name |
MODEL_PROP_PUMPTYPE |
Lua access code |
syslib.model.properties.PumpType |
Available since |
1.80 |
- Parent classes
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: PumpType
| Name | Code | Label | Tooltip |
|---|---|---|---|
GENERIC |
1 |
Generic Pump |
Generic Pump. |
CENTRIFUGAL |
2 |
Centrifugal Pump |
Centrifugal Pump. |
RECIPROCATING |
3 |
Reciprocating Pump |
Reciprocating Pump. |
SCREW |
4 |
Screw Pump |
Screw Pump. |
Examples
Read from or write to the PumpType property.
-- Read from the PumpType
syslib.getvalue("<OBJECT FULL PATH>.PumpType")
-- Write to the PumpType
syslib.setvalue("<OBJECT FULL PATH>.PumpType",
syslib.model.codes.PumpType.GENERIC)
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);
// Read from the PumpType
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.PumpType"));
// Write to the PumpType
Result result = sli.WriteValue(sc, new WriteItem(PumpType.GENERIC, "<OBJECT FULL PATH>.PumpType"));
A switch-like function of the codings.
function get_coding_name(code)
local _pt = syslib.model.codes.PumpType
if _pt.GENERIC==code then return 'GENERIC'
elseif _pt.CENTRIFUGAL==code then return 'CENTRIFUGAL'
elseif _pt.RECIPROCATING==code then return 'RECIPROCATING'
elseif _pt.SCREW==code then return 'SCREW'
end
end
return get_coding_name(syslib.model.codes.PumpType.GENERIC)