enervent-ctrl/enervent-ctrl-go
Jarno Rankinen f4eb787a10 gh-5 Fetch register data from bus
- goburrow/modbus' ReadHoldingRegisters can only fetch 125 registers at a
time, so updateRegisters does several readings
- modbus.ReadHoldingRegisters returns a []byte, where each even byte represents
  the MSB of a int16/uint16 and every odd byte is the LSB
- updateRegisters loops through each response slice forming the 16-bit
  integers

Still need to figure out a way to properly handle the signed/unsigned
values, and also the enumerations and bitfields. Perhaps changing the
'signed' boolean to a byte and making that a bitfield representing the
value type would be a good way to go. The value can then be properly
formed when fetching it from the in-memory pingvinKL struct, while being
stored as an int(64) internally.
2023-02-01 00:03:47 +02:00
..
pingvinKL gh-5 Fetch register data from bus 2023-02-01 00:03:47 +02:00
coils.csv gh-5 Created registers.csv from Enervent provided xlsx, change csv delimiter to semicolon 2023-01-31 22:57:14 +02:00
go.mod #9 Go: Get single coil 2023-01-29 14:42:03 +02:00
go.sum #9 Go: Get single coil 2023-01-29 14:42:03 +02:00
main.go #10 /api/v1/coils content-type to application/json 2023-01-29 23:43:36 +02:00
registers.csv #5 Remove extra newlines from registers.csv 2023-01-31 22:59:55 +02:00