chore(inputs.opcua): rename regular reads to unregistered reads (#11892)
This commit is contained in:
parent
3f7b55baaf
commit
d37ae5f775
|
|
@ -96,8 +96,8 @@ Plugin minimum tested version: 1.16
|
||||||
## Set additional valid status codes, StatusOK (0x0) is always considered valid
|
## Set additional valid status codes, StatusOK (0x0) is always considered valid
|
||||||
# additional_valid_status_codes = ["0xC0"]
|
# additional_valid_status_codes = ["0xC0"]
|
||||||
|
|
||||||
## Use regular reads instead of registered reads
|
## Use unregistered reads instead of registered reads
|
||||||
# use_regular_reads = false
|
# use_unregistered_reads = false
|
||||||
```
|
```
|
||||||
|
|
||||||
## Node Configuration
|
## Node Configuration
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ var sampleConfig string
|
||||||
|
|
||||||
type OpcuaWorkarounds struct {
|
type OpcuaWorkarounds struct {
|
||||||
AdditionalValidStatusCodes []string `toml:"additional_valid_status_codes"`
|
AdditionalValidStatusCodes []string `toml:"additional_valid_status_codes"`
|
||||||
UseRegularReads bool `toml:"use_regular_reads"`
|
UseUnregisteredReads bool `toml:"use_unregistered_reads"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpcUA type
|
// OpcUA type
|
||||||
|
|
@ -366,7 +366,7 @@ func Connect(o *OpcUA) error {
|
||||||
return fmt.Errorf("error in Client Connection: %s", err)
|
return fmt.Errorf("error in Client Connection: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !o.Workarounds.UseRegularReads {
|
if !o.Workarounds.UseUnregisteredReads {
|
||||||
regResp, err := o.client.RegisterNodes(&ua.RegisterNodesRequest{
|
regResp, err := o.client.RegisterNodes(&ua.RegisterNodesRequest{
|
||||||
NodesToRegister: o.nodeIDs,
|
NodesToRegister: o.nodeIDs,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -137,8 +137,8 @@ func TestClient1Integration(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// test regular reads workaround
|
// test unregistered reads workaround
|
||||||
o.Workarounds.UseRegularReads = true
|
o.Workarounds.UseUnregisteredReads = true
|
||||||
|
|
||||||
for i := range o.nodeData {
|
for i := range o.nodeData {
|
||||||
o.nodeData[i] = OPCData{}
|
o.nodeData[i] = OPCData{}
|
||||||
|
|
|
||||||
|
|
@ -86,5 +86,5 @@
|
||||||
## Set additional valid status codes, StatusOK (0x0) is always considered valid
|
## Set additional valid status codes, StatusOK (0x0) is always considered valid
|
||||||
# additional_valid_status_codes = ["0xC0"]
|
# additional_valid_status_codes = ["0xC0"]
|
||||||
|
|
||||||
## Use regular reads instead of registered reads
|
## Use unregistered reads instead of registered reads
|
||||||
# use_regular_reads = false
|
# use_unregistered_reads = false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue