Closed alexrudd2 closed 5 months ago
The reason for
Label.value = 'value'
is so the program can use Label.value, while the configuration json uses 'value', that is needed unless you come up with an alternative.
The label can possible be done programmatically....however Label is an enum, and should stay that way.
Apart from that, the whole simulator configuration is way to complex, and it is on my list to make a new version.
But as usual I am open to suggestions....
Just request review when you think it is ready.
I just tried the simulator for the first time today, so hopefully I have a better understanding soon.
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.
This PR was closed because it has been stalled for 10 days with no activity.
See https://github.com/pymodbus-dev/pymodbus/pull/2084. This is mostly a demonstration of how
TypedDict
could be used.However, it made me question whether we should remove the
Label
abstraction.What is the purpose for cases where the label is identical to the key? e.g.
Label.value == 'value'
.Would it not be easier to only use it when they differ e.g.
Label.co_size == 'co size'
?Could the labels be generated programmatically? (It looks like replacing a space with an underscore and remove
type_
prefix would work in all cases).