chore(inputs.opcua): rename regular reads to unregistered reads (#11892)

This commit is contained in:
Mya 2022-09-27 10:39:37 -06:00 committed by GitHub
parent 3f7b55baaf
commit d37ae5f775
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 8 deletions

View File

@ -96,8 +96,8 @@ Plugin minimum tested version: 1.16
## Set additional valid status codes, StatusOK (0x0) is always considered valid
# additional_valid_status_codes = ["0xC0"]
## Use regular reads instead of registered reads
# use_regular_reads = false
## Use unregistered reads instead of registered reads
# use_unregistered_reads = false
```
## Node Configuration

View File

@ -26,7 +26,7 @@ var sampleConfig string
type OpcuaWorkarounds struct {
AdditionalValidStatusCodes []string `toml:"additional_valid_status_codes"`
UseRegularReads bool `toml:"use_regular_reads"`
UseUnregisteredReads bool `toml:"use_unregistered_reads"`
}
// OpcUA type
@ -366,7 +366,7 @@ func Connect(o *OpcUA) error {
return fmt.Errorf("error in Client Connection: %s", err)
}
if !o.Workarounds.UseRegularReads {
if !o.Workarounds.UseUnregisteredReads {
regResp, err := o.client.RegisterNodes(&ua.RegisterNodesRequest{
NodesToRegister: o.nodeIDs,
})

View File

@ -137,8 +137,8 @@ func TestClient1Integration(t *testing.T) {
}
}
// test regular reads workaround
o.Workarounds.UseRegularReads = true
// test unregistered reads workaround
o.Workarounds.UseUnregisteredReads = true
for i := range o.nodeData {
o.nodeData[i] = OPCData{}

View File

@ -86,5 +86,5 @@
## Set additional valid status codes, StatusOK (0x0) is always considered valid
# additional_valid_status_codes = ["0xC0"]
## Use regular reads instead of registered reads
# use_regular_reads = false
## Use unregistered reads instead of registered reads
# use_unregistered_reads = false