File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ type Port struct {
4646 Protocol string `json:"protocol,omitempty"`
4747 ProtocolLabel string `json:"protocolLabel,omitempty"`
4848 Properties * properties.Map `json:"properties,omitempty"`
49+ HardwareID string `json:"hardwareId,omitempty"`
4950}
5051
5152// 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
125125// createDummyPort creates a Port with fake data
126126func createDummyPort () * discovery.Port {
127127 dummyCounter ++
128+ mac := fmt .Sprintf ("%d" , dummyCounter * 384782 )
128129 return & discovery.Port {
129130 Address : fmt .Sprintf ("%d" , dummyCounter ),
130131 AddressLabel : "Dummy upload port" ,
131132 Protocol : "dummy" ,
132133 ProtocolLabel : "Dummy protocol" ,
134+ HardwareID : mac ,
133135 Properties : properties .NewFromHashmap (map [string ]string {
134136 "vid" : "0x2341" ,
135137 "pid" : "0x0041" ,
136- "mac" : fmt . Sprintf ( "%d" , dummyCounter * 384782 ) ,
138+ "mac" : mac ,
137139 }),
138140 }
139141}
You can’t perform that action at this time.
0 commit comments