File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ type Port struct {
46
46
Protocol string `json:"protocol,omitempty"`
47
47
ProtocolLabel string `json:"protocolLabel,omitempty"`
48
48
Properties * properties.Map `json:"properties,omitempty"`
49
+ HardwareID string `json:"hardwareId,omitempty"`
49
50
}
50
51
51
52
// Discovery is an interface that represents the business logic that
Original file line number Diff line number Diff line change @@ -125,15 +125,17 @@ var dummyCounter = 0
125
125
// createDummyPort creates a Port with fake data
126
126
func createDummyPort () * discovery.Port {
127
127
dummyCounter ++
128
+ mac := fmt .Sprintf ("%d" , dummyCounter * 384782 )
128
129
return & discovery.Port {
129
130
Address : fmt .Sprintf ("%d" , dummyCounter ),
130
131
AddressLabel : "Dummy upload port" ,
131
132
Protocol : "dummy" ,
132
133
ProtocolLabel : "Dummy protocol" ,
134
+ HardwareID : mac ,
133
135
Properties : properties .NewFromHashmap (map [string ]string {
134
136
"vid" : "0x2341" ,
135
137
"pid" : "0x0041" ,
136
- "mac" : fmt . Sprintf ( "%d" , dummyCounter * 384782 ) ,
138
+ "mac" : mac ,
137
139
}),
138
140
}
139
141
}
You can’t perform that action at this time.
0 commit comments