Skip to content

Commit 4ae3ced

Browse files
authored
Merge pull request #75 from ecubus/74-node-can-handle-ethlincan-message-same-time
74 node can handle ethlincan message same time
2 parents 72ee9c4 + afe51c3 commit 4ae3ced

File tree

33 files changed

+1232
-1418
lines changed

33 files changed

+1232
-1418
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"typecheck:web": "vue-tsc --noEmit -p tsconfig.web.json --composite false",
2727
"typecheck": "npm run typecheck:node && npm run typecheck:web",
2828
"worker": "cd src/main/worker/secureAccess && npx node-gyp rebuild && cd ../../../.. && npx webpack --config webpack.config.js --mode production",
29+
"worker:js": "npx webpack --config webpack.config.js --mode production",
2930
"start": "electron-vite preview",
3031
"dev": "electron-vite dev",
3132
"test": "vitest --config vitest.config.ts",

resources/examples/can/Can.ecb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68579,7 +68579,7 @@
6857968579
"network": {
6858068580
"pos": {
6858168581
"x": -4,
68582-
"y": -1,
68582+
"y": 0,
6858368583
"w": 600,
6858468584
"h": 407
6858568585
},
@@ -68621,17 +68621,17 @@
6862168621
"pos": {
6862268622
"x": 1350.5,
6862368623
"y": 406,
68624-
"w": 600,
68625-
"h": 400
68624+
"w": 903,
68625+
"h": 406
6862668626
},
6862768627
"title": "graph",
6862868628
"label": "Graph",
6862968629
"id": "graph",
6863068630
"options": {}
6863168631
}
6863268632
},
68633-
"example":{
68634-
"catalog":"CAN"
68633+
"example": {
68634+
"catalog": "CAN"
6863568635
}
6863668636
}
6863768637
}

resources/examples/doip_sim_entity/doip_sim_entity.ecb

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,12 @@
155155
"attachTester": "4c92bfff-29ef-424c-93f0-f8d2224668f3",
156156
"script": "node.ts"
157157
}
158-
}
158+
},
159+
"database": {
160+
"lin": {},
161+
"can": {}
162+
},
163+
"graphs": {}
159164
},
160165
"project": {
161166
"wins": {
@@ -177,34 +182,34 @@
177182
},
178183
"trace": {
179184
"pos": {
180-
"x": 800,
181-
"y": 191,
185+
"x": 288,
186+
"y": 188,
182187
"w": 1120,
183188
"h": 400
184189
},
185190
"title": "trace",
186191
"label": "Trace",
187192
"id": "trace",
188193
"options": {},
189-
"hide": true
194+
"hide": false
190195
},
191196
"network": {
192197
"pos": {
193-
"x": 1160,
194-
"y": 420,
198+
"x": 56,
199+
"y": 1,
195200
"w": 600,
196201
"h": 400
197202
},
198203
"title": "network",
199204
"label": "Network",
200205
"id": "network",
201206
"options": {},
202-
"hide": true
207+
"hide": false
203208
},
204209
"4c92bfff-29ef-424c-93f0-f8d2224668f3_sequence": {
205210
"pos": {
206-
"x": 260,
207-
"y": 20,
211+
"x": 599,
212+
"y": 137,
208213
"w": 700,
209214
"h": 400
210215
},
@@ -217,14 +222,14 @@
217222
},
218223
"name": "Tester_eth_1"
219224
},
220-
"hide": true
225+
"hide": false
221226
},
222227
"tester": {
223228
"pos": {
224-
"x": 0,
225-
"y": -28,
226-
"w": 2560,
227-
"h": 1063
229+
"x": 489,
230+
"y": 72,
231+
"w": 600,
232+
"h": 400
228233
},
229234
"title": "tester",
230235
"label": "UDS Tester",
@@ -237,12 +242,11 @@
237242
"w": 600,
238243
"h": 400
239244
},
240-
"isMax": true
245+
"isMax": false
241246
}
242247
},
243-
"example":{
244-
"catalog":"Ethernet"
248+
"example": {
249+
"catalog": "Ethernet"
245250
}
246251
}
247-
248252
}

resources/examples/doip_sim_entity/node.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ import {DiagResponse, RegisterEthVirtualEntity} from 'ECB'
33

44
Util.Init(async () => {
55
console.log('Registering virtual entity')
6-
await RegisterEthVirtualEntity('127.0.0.1',{
6+
await RegisterEthVirtualEntity({
77
vin:'123456789',
88
eid:'00-00-00-00-00-00',
99
gid:'00-00-00-00-00-00',
1010
logicalAddr:100
11-
})
11+
},'127.0.0.1')
1212
})
1313

1414
Util.On("Tester_eth_1.DiagnosticSessionControl160.send",async (req)=>{
15+
console.log('Received Diag request')
1516
const resp=DiagResponse.fromDiagRequest(req)
1617
await resp.outputDiag()
1718
})

resources/examples/lin/lin.ecb

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
"channel": [
4040
"e4179991-1b87-4889-b365-25b1fd93d97e"
4141
],
42-
"workNode": "Motor2",
42+
"workNode": "lin:Motor2",
4343
"attachTester": "5459ce47-1751-4a82-94a0-9bd33ae289ab",
44-
"script": "node.ts"
44+
"script": ""
4545
},
4646
"69c0b8cc-f674-4142-99fc-9eed944cacf9": {
4747
"name": "Node 2",
@@ -50,7 +50,7 @@
5050
"channel": [
5151
"e4179991-1b87-4889-b365-25b1fd93d97e"
5252
],
53-
"workNode": "SeatECU"
53+
"workNode": "lin:SeatECU"
5454
}
5555
},
5656
"database": {
@@ -625,8 +625,10 @@
625625
},
626626
"name": "lin"
627627
}
628-
}
629-
}
628+
},
629+
"can": {}
630+
},
631+
"graphs": {}
630632
},
631633
"project": {
632634
"wins": {
@@ -648,10 +650,10 @@
648650
},
649651
"network": {
650652
"pos": {
651-
"x": 0,
652-
"y": -28,
653-
"w": 1707,
654-
"h": 670
653+
"x": 431,
654+
"y": 148,
655+
"w": 600,
656+
"h": 400
655657
},
656658
"title": "network",
657659
"label": "Network",
@@ -664,12 +666,12 @@
664666
"w": 600,
665667
"h": 400
666668
},
667-
"isMax": true
669+
"isMax": false
668670
},
669671
"25cec12a-572d-4221-b85e-2728628134f7_ia": {
670672
"pos": {
671-
"x": 0,
672-
"y": 0,
673+
"x": 1279,
674+
"y": 150,
673675
"w": 700,
674676
"h": 400
675677
},
@@ -682,7 +684,7 @@
682684
},
683685
"name": "Lin IA"
684686
},
685-
"hide": true
687+
"hide": false
686688
},
687689
"trace": {
688690
"pos": {

resources/examples/lin_tp/lin_tp.ecb

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
"channel": [
164164
"e4179991-1b87-4889-b365-25b1fd93d97e"
165165
],
166-
"workNode": "SeatECU",
166+
"workNode": "lin:Motor2",
167167
"attachTester": "5459ce47-1751-4a82-94a0-9bd33ae289ab",
168168
"script": "node.ts"
169169
}
@@ -272,7 +272,8 @@
272272
"subscribedBy": [
273273
"SeatECU"
274274
],
275-
"singleType": "Scalar"
275+
"singleType": "Scalar",
276+
"value": 7
276277
},
277278
"Motor2_Dynamic_Sig": {
278279
"signalName": "Motor2_Dynamic_Sig",
@@ -806,8 +807,8 @@
806807
},
807808
"network": {
808809
"pos": {
809-
"x": 950,
810-
"y": 8,
810+
"x": 610,
811+
"y": 29,
811812
"w": 600,
812813
"h": 400
813814
},
@@ -819,8 +820,8 @@
819820
},
820821
"25cec12a-572d-4221-b85e-2728628134f7_ia": {
821822
"pos": {
822-
"x": 314,
823-
"y": 198,
823+
"x": 400,
824+
"y": 144,
824825
"w": 700,
825826
"h": 400
826827
},
@@ -851,12 +852,12 @@
851852
},
852853
"name": "Tester_lin_1"
853854
},
854-
"hide": true
855+
"hide": false
855856
},
856857
"trace": {
857858
"pos": {
858-
"x": 658,
859-
"y": 34,
859+
"x": 900,
860+
"y": 19,
860861
"w": 700,
861862
"h": 400
862863
},
@@ -867,15 +868,27 @@
867868
},
868869
"graph": {
869870
"pos": {
870-
"x": 25,
871-
"y": 27,
871+
"x": 22,
872+
"y": 23,
872873
"w": 600,
873874
"h": 400
874875
},
875876
"title": "graph",
876877
"label": "Graph",
877878
"id": "graph",
878879
"options": {}
880+
},
881+
"tester": {
882+
"pos": {
883+
"x": 200,
884+
"y": 191,
885+
"w": 1095,
886+
"h": 400
887+
},
888+
"title": "tester",
889+
"label": "UDS Tester",
890+
"id": "tester",
891+
"options": {}
879892
}
880893
},
881894
"example": {

resources/examples/uds_hex_file/uds_hex_file.ecb

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,8 @@
383383
},
384384
"f304259b-dc7d-460b-9729-4eee2d1156de_services": {
385385
"pos": {
386-
"x": 33,
387-
"y": 105,
386+
"x": 202,
387+
"y": 74,
388388
"w": 1658,
389389
"h": 404
390390
},
@@ -400,8 +400,8 @@
400400
},
401401
"f304259b-dc7d-460b-9729-4eee2d1156de_sequence": {
402402
"pos": {
403-
"x": 678,
404-
"y": 368,
403+
"x": 670,
404+
"y": 335,
405405
"w": 1590,
406406
"h": 400
407407
},
@@ -417,8 +417,8 @@
417417
},
418418
"trace": {
419419
"pos": {
420-
"x": 398,
421-
"y": 51,
420+
"x": 686,
421+
"y": 281,
422422
"w": 1619,
423423
"h": 566
424424
},
@@ -427,30 +427,18 @@
427427
"id": "trace",
428428
"options": {}
429429
},
430-
"network": {
431-
"pos": {
432-
"x": 311,
433-
"y": 105,
434-
"w": 600,
435-
"h": 400
436-
},
437-
"title": "network",
438-
"label": "Network",
439-
"id": "network",
440-
"options": {}
441-
},
442430
"tester": {
443431
"pos": {
444-
"x": 331,
445-
"y": 125,
432+
"x": 1181,
433+
"y": 119,
446434
"w": 906,
447435
"h": 400
448436
},
449437
"title": "tester",
450438
"label": "UDS Tester",
451439
"id": "tester",
452440
"options": {},
453-
"hide": true
441+
"hide": false
454442
}
455443
},
456444
"example": {

resources/lib/js/sa.node

0 Bytes
Binary file not shown.

resources/lib/js/uds.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)