chore(inputs.modbus): Deprecate aggressive optimization (#14030)
This commit is contained in:
parent
65d0dc5b4a
commit
a6858b8024
|
|
@ -157,10 +157,6 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||||
## |---rearrange -- Rearrange request boundaries within consecutive address ranges
|
## |---rearrange -- Rearrange request boundaries within consecutive address ranges
|
||||||
## | to reduce the number of requested registers by keeping
|
## | to reduce the number of requested registers by keeping
|
||||||
## | the number of requests.
|
## | the number of requests.
|
||||||
## |---aggressive -- Rearrange request boundaries similar to "rearrange" but
|
|
||||||
## | allow to request registers not specified by the user to
|
|
||||||
## | fill gaps. This usually reduces the number of requests at the
|
|
||||||
## | cost of more requested registers.
|
|
||||||
## |---max_insert -- Rearrange request keeping the number of extra fields below the value
|
## |---max_insert -- Rearrange request keeping the number of extra fields below the value
|
||||||
## provided in "optimization_max_register_fill". It is not necessary to define 'omitted'
|
## provided in "optimization_max_register_fill". It is not necessary to define 'omitted'
|
||||||
## fields as the optimisation will add such field only where needed.
|
## fields as the optimisation will add such field only where needed.
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import (
|
||||||
"hash/maphash"
|
"hash/maphash"
|
||||||
|
|
||||||
"github.com/influxdata/telegraf"
|
"github.com/influxdata/telegraf"
|
||||||
|
"github.com/influxdata/telegraf/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:embed sample_request.conf
|
//go:embed sample_request.conf
|
||||||
|
|
@ -67,7 +68,19 @@ func (c *ConfigurationPerRequest) Check() error {
|
||||||
}
|
}
|
||||||
// Check for valid optimization
|
// Check for valid optimization
|
||||||
switch def.Optimization {
|
switch def.Optimization {
|
||||||
case "", "none", "shrink", "rearrange", "aggressive":
|
case "", "none", "shrink", "rearrange":
|
||||||
|
case "aggressive":
|
||||||
|
models.PrintOptionValueDeprecationNotice(
|
||||||
|
telegraf.Warn,
|
||||||
|
"inputs.modbus",
|
||||||
|
"optimization",
|
||||||
|
"aggressive",
|
||||||
|
telegraf.DeprecationInfo{
|
||||||
|
Since: "1.28.2",
|
||||||
|
RemovalIn: "1.30.0",
|
||||||
|
Notice: `use "max_insert" instead`,
|
||||||
|
},
|
||||||
|
)
|
||||||
case "max_insert":
|
case "max_insert":
|
||||||
switch def.RegisterType {
|
switch def.RegisterType {
|
||||||
case "coil":
|
case "coil":
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,6 @@
|
||||||
## |---rearrange -- Rearrange request boundaries within consecutive address ranges
|
## |---rearrange -- Rearrange request boundaries within consecutive address ranges
|
||||||
## | to reduce the number of requested registers by keeping
|
## | to reduce the number of requested registers by keeping
|
||||||
## | the number of requests.
|
## | the number of requests.
|
||||||
## |---aggressive -- Rearrange request boundaries similar to "rearrange" but
|
|
||||||
## | allow to request registers not specified by the user to
|
|
||||||
## | fill gaps. This usually reduces the number of requests at the
|
|
||||||
## | cost of more requested registers.
|
|
||||||
## |---max_insert -- Rearrange request keeping the number of extra fields below the value
|
## |---max_insert -- Rearrange request keeping the number of extra fields below the value
|
||||||
## provided in "optimization_max_register_fill". It is not necessary to define 'omitted'
|
## provided in "optimization_max_register_fill". It is not necessary to define 'omitted'
|
||||||
## fields as the optimisation will add such field only where needed.
|
## fields as the optimisation will add such field only where needed.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue