]> git.giacomolli.uk - onehouse/blob - driver/m31/module.go
Preserve separate Modbus phase timeouts
[onehouse] / driver / m31 / module.go
1 package m31
2
3 import "time"
4
5 const (
6 // HostModel has eight inputs and eight relay outputs and occupies slot
7 // zero.
8 HostModel = "m31-axax8080g-u"
9
10 // MixedModel adds eight digital inputs and eight digital outputs.
11 MixedModel = "m31-gaxax8080-u"
12
13 // InputModel adds sixteen digital inputs.
14 InputModel = "m31-gaxxxa000-u"
15
16 // OutputModel adds sixteen digital outputs.
17 OutputModel = "m31-gxxax00a0-u"
18
19 // AnalogModel adds eight voltage outputs from zero through ten volts.
20 AnalogModel = "m31-gxxxb0008-u"
21 )
22
23 // Module occupies its slice index in Settings.Modules. PulseWidths maps digital
24 // output channels to hardware pulse widths. Widths must be whole milliseconds
25 // from 50 through 65535 milliseconds. Other digital outputs use level mode. The
26 // constructor copies the topology and does not retain these maps.
27 type Module struct {
28 Model string
29 PulseWidths map[int]time.Duration
30 }