10.05.2017, 21:57
In my opinion readout.go should be kept clean and short.
Putting the implementation of data exporters into this file blows up and creates a mess.
It should be separated into different files.
Then we need some functions to call.
I belief we can manage to define an interface, which fits it all
- at least for periodic data publication.
The interface may introduce a slice to handle an undefined number of data elements.
Each data element itself (currently voltages, currents, and so on) could be represented by a struct.
This struct contains all relevant data, such as
- value
- unit
- tmie series or accumulated flag
- accuracy
- whatever
Best,
TriCX
Putting the implementation of data exporters into this file blows up and creates a mess.
It should be separated into different files.
Then we need some functions to call.
I belief we can manage to define an interface, which fits it all
- at least for periodic data publication.
The interface may introduce a slice to handle an undefined number of data elements.
Each data element itself (currently voltages, currents, and so on) could be represented by a struct.
This struct contains all relevant data, such as
- value
- unit
- tmie series or accumulated flag
- accuracy
- whatever
Best,
TriCX