PIBatchDataInterface Property
General info
Label |
Batch Data Interface |
Description |
Specifies which Interface will be used for batch data retrieval (applies only to batch data processing functions). |
Data type |
UInt32 |
Default value |
1 (syslib.model.codes.BatchDataInterface.BDI_PIBATCH) |
Type |
CodingGroup |
Code |
6463 |
Symbolic name |
MODEL_PROP_PIBATCHDATAINTERFACE |
Lua access code |
syslib.model.properties.PIBatchDataInterface |
Available since |
1.52 |
- 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: BatchDataInterface
| Name | Code | Label | Tooltip |
|---|---|---|---|
BDI_PIBATCH |
1 |
PI-Batch SDK |
Batch Data will be acquired from a PI Server using the PI-Batch SDK. |
BDI_EVENTFRAMES |
2 |
PI-AF Event Frames |
Batch Data will be acquired from a PI Server using an asset framework server and event frames (the AF server must be properly configured in case this option is used). |
Examples
Read from or write to the PIBatchDataInterface property.
-- Read from the PIBatchDataInterface
syslib.getvalue("<OBJECT FULL PATH>.HistorySubscriberInterfacePI.HistorySubscriberGeneral.PIConnection.PIBatchDataInterface")
-- Write to the PIBatchDataInterface
syslib.setvalue("<OBJECT FULL PATH>.HistorySubscriberInterfacePI.HistorySubscriberGeneral.PIConnection.PIBatchDataInterface",
syslib.model.codes.BatchDataInterface.BDI_PIBATCH)
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "<username>", Password = "<password>" };
StatelessInterface sli = new StatelessInterface(tcpcfg);
// Read from the PIBatchDataInterface
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.HistorySubscriberInterfacePI.HistorySubscriberGeneral.PIConnection.PIBatchDataInterface"));
// Write to the PIBatchDataInterface
Result result = sli.WriteValue(sc, new WriteItem(BatchDataInterface.BDI_PIBATCH, "<OBJECT FULL PATH>.HistorySubscriberInterfacePI.HistorySubscriberGeneral.PIConnection.PIBatchDataInterface"));
A switch-like function of the codings.
function get_coding_name(code)
local _bdi = syslib.model.codes.BatchDataInterface
if _bdi.BDI_PIBATCH==code then return 'BDI_PIBATCH'
elseif _bdi.BDI_EVENTFRAMES==code then return 'BDI_EVENTFRAMES'
end
end
return get_coding_name(syslib.model.codes.BatchDataInterface.BDI_PIBATCH)