Skip to content

Commit 9ec22c1

Browse files
committed
[feat]:add can setSingal
[feat]:opt can dbc parse [feat]:add signal update
1 parent bc02fd8 commit 9ec22c1

File tree

20 files changed

+924
-400
lines changed

20 files changed

+924
-400
lines changed

resources/examples/can/Can.ecb

Lines changed: 111 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,6 @@
2020
"_X_ROW_KEY": "row_71"
2121
}
2222
}
23-
},
24-
"f30c735b-f257-4d73-a0c2-433aebe2d3e8": {
25-
"type": "can",
26-
"canDevice": {
27-
"id": "f30c735b-f257-4d73-a0c2-433aebe2d3e8",
28-
"name": "SIMULATE_1",
29-
"handle": 1,
30-
"vendor": "simulate",
31-
"canfd": false,
32-
"database": "",
33-
"bitrate": {
34-
"sjw": 1,
35-
"timeSeg1": 13,
36-
"timeSeg2": 2,
37-
"preScaler": 10,
38-
"freq": 500000,
39-
"clock": "80",
40-
"_X_ROW_KEY": "row_11821"
41-
}
42-
}
4323
}
4424
},
4525
"ia": {
@@ -53,32 +33,43 @@
5333
"action": [
5434
{
5535
"trigger": {
56-
"type": "manual"
36+
"type": "periodic"
5737
},
5838
"database": "Model3CAN",
59-
"name": "ID00CUI_status",
60-
"id": "c",
39+
"name": "ID142VCLEFT_liftgateStatus",
40+
"id": "142",
6141
"channel": "30dc0575-1555-40e4-802a-150e76338671",
6242
"type": "can",
6343
"dlc": 8,
6444
"data": [
65-
"1",
45+
"0",
46+
"0",
47+
"4",
6648
"0",
6749
"0",
6850
"0",
6951
"0",
70-
"1c",
71-
"c5",
72-
"c4"
52+
"0"
7353
],
74-
"_X_ROW_KEY": "row_2973"
54+
"_X_ROW_KEY": "row_9162"
7555
}
7656
]
7757
}
7858
},
7959
"tester": {},
8060
"subFunction": {},
81-
"nodes": {},
61+
"nodes": {
62+
"a033fc39-90a2-4982-8f59-cbd28c10b638": {
63+
"name": "Node 1",
64+
"type": "can",
65+
"id": "a033fc39-90a2-4982-8f59-cbd28c10b638",
66+
"channel": [
67+
"30dc0575-1555-40e4-802a-150e76338671"
68+
],
69+
"workNode": "",
70+
"script": "node.ts"
71+
}
72+
},
8273
"database": {
8374
"lin": {},
8475
"can": {
@@ -5941,7 +5932,10 @@
59415932
"label": "LIFTGATE_STATUS_INDEX_INVALID",
59425933
"value": 2
59435934
}
5944-
]
5935+
],
5936+
"value": 0,
5937+
"physValue": 0,
5938+
"_X_ROW_KEY": "row_3008"
59455939
},
59465940
"VCLEFT_liftgateLatchRequest": {
59475941
"messageName": "ID142VCLEFT_liftgateStatus",
@@ -5981,7 +5975,10 @@
59815975
"label": "LATCH_REQUEST_RESET",
59825976
"value": 4
59835977
}
5984-
]
5978+
],
5979+
"_X_ROW_KEY": "row_3009",
5980+
"value": 0,
5981+
"physValue": 0
59855982
},
59865983
"VCLEFT_liftgateMvmntNotAllowedCo": {
59875984
"messageName": "ID142VCLEFT_liftgateStatus",
@@ -6025,7 +6022,10 @@
60256022
"label": "PLG_MVMT_NOT_ALLOWED_VEHICLE_AT_SPEED",
60266023
"value": 2
60276024
}
6028-
]
6025+
],
6026+
"_X_ROW_KEY": "row_3010",
6027+
"value": 0,
6028+
"physValue": 0
60296029
},
60306030
"VCLEFT_liftgatePhysicalChimeRequ": {
60316031
"messageName": "ID142VCLEFT_liftgateStatus",
@@ -6065,7 +6065,10 @@
60656065
"label": "LIFTGATE_CHIME_REQUEST_TWO_SHORT",
60666066
"value": 2
60676067
}
6068-
]
6068+
],
6069+
"_X_ROW_KEY": "row_3011",
6070+
"value": 0,
6071+
"physValue": 0
60696072
},
60706073
"VCLEFT_liftgatePosition": {
60716074
"messageName": "ID142VCLEFT_liftgateStatus",
@@ -6083,7 +6086,10 @@
60836086
"unit": "deg",
60846087
"multiplexerIndicator": "m1",
60856088
"minimum": -5,
6086-
"maximum": 95
6089+
"maximum": 95,
6090+
"_X_ROW_KEY": "row_3031",
6091+
"value": 0,
6092+
"physValue": 46
60876093
},
60886094
"VCLEFT_liftgatePositionCalibrate": {
60896095
"messageName": "ID142VCLEFT_liftgateStatus",
@@ -6101,7 +6107,10 @@
61016107
"unit": "",
61026108
"multiplexerIndicator": "m0",
61036109
"minimum": 0,
6104-
"maximum": 1
6110+
"maximum": 1,
6111+
"_X_ROW_KEY": "row_3012",
6112+
"value": 0,
6113+
"physValue": 0
61056114
},
61066115
"VCLEFT_liftgateRequestSource": {
61076116
"messageName": "ID142VCLEFT_liftgateStatus",
@@ -6153,7 +6162,10 @@
61536162
"label": "PLG_REQUEST_SOURCE_UDS",
61546163
"value": 7
61556164
}
6156-
]
6165+
],
6166+
"_X_ROW_KEY": "row_3013",
6167+
"value": 0,
6168+
"physValue": 0
61576169
},
61586170
"VCLEFT_liftgateSpeed": {
61596171
"messageName": "ID142VCLEFT_liftgateStatus",
@@ -6171,7 +6183,10 @@
61716183
"unit": "deg/s",
61726184
"multiplexerIndicator": "m1",
61736185
"minimum": -30,
6174-
"maximum": 30
6186+
"maximum": 30,
6187+
"_X_ROW_KEY": "row_3032",
6188+
"value": 0,
6189+
"physValue": 0
61756190
},
61766191
"VCLEFT_liftgateState": {
61776192
"messageName": "ID142VCLEFT_liftgateStatus",
@@ -6243,7 +6258,10 @@
62436258
"label": "PLG_STATE_UNKNOWN",
62446259
"value": 9
62456260
}
6246-
]
6261+
],
6262+
"_X_ROW_KEY": "row_3014",
6263+
"value": 0,
6264+
"physValue": 0
62476265
},
62486266
"VCLEFT_liftgateStoppingCondition": {
62496267
"messageName": "ID142VCLEFT_liftgateStatus",
@@ -6311,7 +6329,10 @@
63116329
"label": "PLG_STOPPING_CONDITION_VEHICLE_AT_SPEED",
63126330
"value": 5
63136331
}
6314-
]
6332+
],
6333+
"_X_ROW_KEY": "row_3015",
6334+
"value": 0,
6335+
"physValue": 0
63156336
},
63166337
"VCLEFT_liftgateStrutCurrent": {
63176338
"messageName": "ID142VCLEFT_liftgateStatus",
@@ -6329,7 +6350,10 @@
63296350
"unit": "A",
63306351
"multiplexerIndicator": "m1",
63316352
"minimum": -30,
6332-
"maximum": 30
6353+
"maximum": 30,
6354+
"_X_ROW_KEY": "row_3033",
6355+
"value": 0,
6356+
"physValue": 0
63336357
},
63346358
"VCLEFT_liftgateStrutDutyCycle": {
63356359
"messageName": "ID142VCLEFT_liftgateStatus",
@@ -6347,7 +6371,10 @@
63476371
"unit": "%",
63486372
"multiplexerIndicator": "m1",
63496373
"minimum": -100,
6350-
"maximum": 100
6374+
"maximum": 100,
6375+
"_X_ROW_KEY": "row_3034",
6376+
"value": 2,
6377+
"physValue": 2
63516378
},
63526379
"VCLEFT_liftgateUIChimeRequest": {
63536380
"messageName": "ID142VCLEFT_liftgateStatus",
@@ -6387,7 +6414,10 @@
63876414
"label": "LIFTGATE_CHIME_REQUEST_TWO_SHORT",
63886415
"value": 2
63896416
}
6390-
]
6417+
],
6418+
"_X_ROW_KEY": "row_3016",
6419+
"value": 1,
6420+
"physValue": 1
63916421
}
63926422
},
63936423
"attributes": {}
@@ -68507,7 +68537,27 @@
6850768537
}
6850868538
}
6850968539
},
68510-
"graphs": {}
68540+
"graphs": {
68541+
"can.Model3CAN.signals.VCLEFT_liftgateLatchRequest": {
68542+
"type": "signal",
68543+
"enable": true,
68544+
"id": "can.Model3CAN.signals.VCLEFT_liftgateLatchRequest",
68545+
"name": "VCLEFT_liftgateLatchRequest",
68546+
"color": "#7a9641",
68547+
"yAxis": {
68548+
"min": -0.3300000000000004,
68549+
"max": 6.670000000000001
68550+
},
68551+
"bindValue": {
68552+
"signalName": "VCLEFT_liftgateLatchRequest",
68553+
"startBit": 61,
68554+
"bitLength": 3,
68555+
"dbKey": "bb0c0fb5-3e24-403a-9fb0-ce9e5a927e13",
68556+
"dbName": "Model3CAN",
68557+
"frameId": 322
68558+
}
68559+
}
68560+
}
6851168561
},
6851268562
"project": {
6851368563
"wins": {
@@ -68528,10 +68578,10 @@
6852868578
},
6852968579
"network": {
6853068580
"pos": {
68531-
"x": 56,
68532-
"y": 0,
68581+
"x": -4,
68582+
"y": -1,
6853368583
"w": 600,
68534-
"h": 400
68584+
"h": 407
6853568585
},
6853668586
"title": "network",
6853768587
"label": "Network",
@@ -68540,9 +68590,9 @@
6854068590
},
6854168591
"trace": {
6854268592
"pos": {
68543-
"x": 1277,
68544-
"y": 270,
68545-
"w": 700,
68593+
"x": -2.5,
68594+
"y": 406,
68595+
"w": 1353,
6854668596
"h": 400
6854768597
},
6854868598
"title": "trace",
@@ -68552,10 +68602,10 @@
6855268602
},
6855368603
"a6773bbd-db04-405f-9a23-af32b1c12e70_ia": {
6855468604
"pos": {
68555-
"x": 1461,
68556-
"y": 425,
68557-
"w": 987,
68558-
"h": 400
68605+
"x": 596,
68606+
"y": 0,
68607+
"w": 1358,
68608+
"h": 406
6855968609
},
6856068610
"title": "cani",
6856168611
"label": "IA",
@@ -68567,22 +68617,17 @@
6856768617
"name": "Can IA"
6856868618
}
6856968619
},
68570-
"bb0c0fb5-3e24-403a-9fb0-ce9e5a927e13": {
68620+
"graph": {
6857168621
"pos": {
68572-
"x": 421,
68573-
"y": 191,
68574-
"w": 1040,
68622+
"x": 1350.5,
68623+
"y": 406,
68624+
"w": 600,
6857568625
"h": 400
6857668626
},
68577-
"title": "dbc",
68578-
"label": "DBC",
68579-
"id": "bb0c0fb5-3e24-403a-9fb0-ce9e5a927e13",
68580-
"options": {
68581-
"params": {
68582-
"edit-index": "bb0c0fb5-3e24-403a-9fb0-ce9e5a927e13"
68583-
},
68584-
"name": "Model3CAN"
68585-
}
68627+
"title": "graph",
68628+
"label": "Graph",
68629+
"id": "graph",
68630+
"options": {}
6858668631
}
6858768632
}
6858868633
}

resources/examples/can/node.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import {setSignal} from 'ECB'
2+
let val=0;
3+
setInterval(() => {
4+
setSignal("Model3CAN.VCLEFT_liftgateLatchRequest",(val++)%5);
5+
}, 1000);

resources/lib/js/sa.node

-15.5 KB
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)