Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit323d2a8

Browse files
committed
Added test DBC CAN matrix and generation scripts.
1 parent45209db commit323d2a8

18 files changed

+1692
-0
lines changed

‎run-test-gen.bat‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
start"coder""build/Release/coderdbc.exe" -dbc test\testdb.dbc -out -out test\gencode -drvname testdb -nodeutils -rw
2+
pause

‎run-test-gen.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./build/coderdbc -dbc test/testdb.dbc -out test/gencode -drvname testdb -nodeutils -rw

‎test/gencode/butl/BCM_testdb.c‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include"BCM_testdb.h"
2+
3+
#ifdef__DEF_TESTDB__
4+
5+
testdb_rx_ttestdb_rx;
6+
7+
testdb_tx_ttestdb_tx;
8+
9+
#endif// __DEF_TESTDB__
10+
11+
uint32_ttestdb_Receive(testdb_rx_t*_m,constuint8_t*_d,uint32_t_id,uint8_tdlc_)
12+
{
13+
uint32_trecid=0;
14+
if (_id==0x360U) {
15+
recid=Unpack_FLT_TEST_1_testdb(&(_m->FLT_TEST_1),_d,dlc_);
16+
}else {
17+
if (_id==0x777U) {
18+
recid=Unpack_SIG_TEST_1_testdb(&(_m->SIG_TEST_1),_d,dlc_);
19+
}elseif (_id==0x1FFFFFF6U) {
20+
recid=Unpack_EMPTY_EXT_ID_testdb(&(_m->EMPTY_EXT_ID),_d,dlc_);
21+
}
22+
}
23+
24+
returnrecid;
25+
}
26+

‎test/gencode/butl/BCM_testdb.h‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#pragma once
2+
3+
#ifdef__cplusplus
4+
extern"C" {
5+
#endif
6+
7+
#include"dbccodeconf.h"
8+
9+
#include"testdb.h"
10+
11+
// This version definition comes from main driver version and
12+
// can be compared in user code space for strict compatibility test
13+
#defineVER_TESTDB_MAJ (1U)
14+
#defineVER_TESTDB_MIN (10U)
15+
16+
typedefstruct
17+
{
18+
FLT_TEST_1_tFLT_TEST_1;
19+
SIG_TEST_1_tSIG_TEST_1;
20+
EMPTY_EXT_ID_tEMPTY_EXT_ID;
21+
}testdb_rx_t;
22+
23+
typedefstruct
24+
{
25+
UTEST_2_tUTEST_2;
26+
EMPTY_0_tEMPTY_0;
27+
UTEST_3_tUTEST_3;
28+
EMPTY_EXT_ID_tEMPTY_EXT_ID;
29+
}testdb_tx_t;
30+
31+
uint32_ttestdb_Receive(testdb_rx_t*m,constuint8_t*d,uint32_tmsgid,uint8_tdlc);
32+
33+
#ifdef__DEF_TESTDB__
34+
35+
externtestdb_rx_ttestdb_rx;
36+
37+
externtestdb_tx_ttestdb_tx;
38+
39+
#endif// __DEF_TESTDB__
40+
41+
#ifdef__cplusplus
42+
}
43+
#endif

‎test/gencode/butl/BMS_testdb.c‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#include"BMS_testdb.h"
2+
3+
#ifdef__DEF_TESTDB__
4+
5+
testdb_rx_ttestdb_rx;
6+
7+
testdb_tx_ttestdb_tx;
8+
9+
#endif// __DEF_TESTDB__
10+
11+
uint32_ttestdb_Receive(testdb_rx_t*_m,constuint8_t*_d,uint32_t_id,uint8_tdlc_)
12+
{
13+
uint32_trecid=0;
14+
if ((_id >=0x14DU)&& (_id<0x22BU)) {
15+
if (_id==0x14DU) {
16+
recid=Unpack_UTEST_2_testdb(&(_m->UTEST_2),_d,dlc_);
17+
}elseif (_id==0x160U) {
18+
recid=Unpack_EMPTY_0_testdb(&(_m->EMPTY_0),_d,dlc_);
19+
}
20+
}else {
21+
if (_id==0x22BU) {
22+
recid=Unpack_UTEST_3_testdb(&(_m->UTEST_3),_d,dlc_);
23+
}elseif (_id==0x1FFFFFF6U) {
24+
recid=Unpack_EMPTY_EXT_ID_testdb(&(_m->EMPTY_EXT_ID),_d,dlc_);
25+
}
26+
}
27+
28+
returnrecid;
29+
}
30+

‎test/gencode/butl/BMS_testdb.h‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#pragma once
2+
3+
#ifdef__cplusplus
4+
extern"C" {
5+
#endif
6+
7+
#include"dbccodeconf.h"
8+
9+
#include"testdb.h"
10+
11+
// This version definition comes from main driver version and
12+
// can be compared in user code space for strict compatibility test
13+
#defineVER_TESTDB_MAJ (1U)
14+
#defineVER_TESTDB_MIN (10U)
15+
16+
typedefstruct
17+
{
18+
UTEST_2_tUTEST_2;
19+
EMPTY_0_tEMPTY_0;
20+
UTEST_3_tUTEST_3;
21+
EMPTY_EXT_ID_tEMPTY_EXT_ID;
22+
}testdb_rx_t;
23+
24+
typedefstruct
25+
{
26+
EMPTY_0_tEMPTY_0;
27+
FLT_TEST_1_tFLT_TEST_1;
28+
}testdb_tx_t;
29+
30+
uint32_ttestdb_Receive(testdb_rx_t*m,constuint8_t*d,uint32_tmsgid,uint8_tdlc);
31+
32+
#ifdef__DEF_TESTDB__
33+
34+
externtestdb_rx_ttestdb_rx;
35+
36+
externtestdb_tx_ttestdb_tx;
37+
38+
#endif// __DEF_TESTDB__
39+
40+
#ifdef__cplusplus
41+
}
42+
#endif

‎test/gencode/butl/EPS_testdb.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include"EPS_testdb.h"
2+
3+
#ifdef__DEF_TESTDB__
4+
5+
testdb_tx_ttestdb_tx;
6+
7+
#endif// __DEF_TESTDB__
8+

‎test/gencode/butl/EPS_testdb.h‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#pragma once
2+
3+
#ifdef__cplusplus
4+
extern"C" {
5+
#endif
6+
7+
#include"dbccodeconf.h"
8+
9+
#include"testdb.h"
10+
11+
// This version definition comes from main driver version and
12+
// can be compared in user code space for strict compatibility test
13+
#defineVER_TESTDB_MAJ (1U)
14+
#defineVER_TESTDB_MIN (10U)
15+
16+
// There is no any RX mapped massage.
17+
18+
typedefstruct
19+
{
20+
SIG_TEST_1_tSIG_TEST_1;
21+
}testdb_tx_t;
22+
23+
#ifdef__DEF_TESTDB__
24+
25+
externtestdb_tx_ttestdb_tx;
26+
27+
#endif// __DEF_TESTDB__
28+
29+
#ifdef__cplusplus
30+
}
31+
#endif

‎test/gencode/butl/ESP_testdb.c‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include"ESP_testdb.h"
2+
3+
#ifdef__DEF_TESTDB__
4+
5+
testdb_rx_ttestdb_rx;
6+
7+
testdb_tx_ttestdb_tx;
8+
9+
#endif// __DEF_TESTDB__
10+
11+
uint32_ttestdb_Receive(testdb_rx_t*_m,constuint8_t*_d,uint32_t_id,uint8_tdlc_)
12+
{
13+
uint32_trecid=0;
14+
if (_id==0x14DU) {
15+
recid=Unpack_UTEST_2_testdb(&(_m->UTEST_2),_d,dlc_);
16+
}elseif (_id==0x1FFFFFF6U) {
17+
recid=Unpack_EMPTY_EXT_ID_testdb(&(_m->EMPTY_EXT_ID),_d,dlc_);
18+
}
19+
20+
returnrecid;
21+
}
22+

‎test/gencode/butl/ESP_testdb.h‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#pragma once
2+
3+
#ifdef__cplusplus
4+
extern"C" {
5+
#endif
6+
7+
#include"dbccodeconf.h"
8+
9+
#include"testdb.h"
10+
11+
// This version definition comes from main driver version and
12+
// can be compared in user code space for strict compatibility test
13+
#defineVER_TESTDB_MAJ (1U)
14+
#defineVER_TESTDB_MIN (10U)
15+
16+
typedefstruct
17+
{
18+
UTEST_2_tUTEST_2;
19+
EMPTY_EXT_ID_tEMPTY_EXT_ID;
20+
}testdb_rx_t;
21+
22+
typedefstruct
23+
{
24+
EMPTY_0_tEMPTY_0;
25+
}testdb_tx_t;
26+
27+
uint32_ttestdb_Receive(testdb_rx_t*m,constuint8_t*d,uint32_tmsgid,uint8_tdlc);
28+
29+
#ifdef__DEF_TESTDB__
30+
31+
externtestdb_rx_ttestdb_rx;
32+
33+
externtestdb_tx_ttestdb_tx;
34+
35+
#endif// __DEF_TESTDB__
36+
37+
#ifdef__cplusplus
38+
}
39+
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp