9
9
10
10
#define GEN_UTIL_CODE
11
11
12
+ const char * helptext =
13
+ " welcome to dbccoder v1.1.\n\n "
14
+ " author: Andrey Astakhov (https://github.com/astand)\n\n "
15
+ " to use utility you need to provide 3 arguments:\n\n "
16
+ " 1. dbc file path\n "
17
+ " 2. directory for generated source codegen\n "
18
+ " 3. prefix (driver name) which will be used in driver elements naming\n\n "
19
+ " Example: ./dbccoder /home/user/docs/driveshaft.dbc /home/user/docs/gen/ drivedb\n\n " ;
20
+
12
21
DbcScanner* scanner;
13
22
CiMainGenerator* cigen;
14
23
CiUtilGenerator* ciugen;
@@ -25,12 +34,7 @@ int main(int argc, char* argv[])
25
34
ciugen = new CiUtilGenerator;
26
35
fscreator = new FsCreator;
27
36
28
- bool numberLines = false ; // Default is no line numbers.
29
-
30
37
if (argc == 4 )
31
- numberLines = true ;
32
-
33
- if (numberLines)
34
38
{
35
39
std::ifstream reader;
36
40
// copy dbc file name to string variable
@@ -69,10 +73,7 @@ int main(int argc, char* argv[])
69
73
70
74
#if defined (GEN_UTIL_CODE)
71
75
72
-
73
- // test utility generation
74
-
75
- ret = fscreator->PrepareDirectory (dbc_driver_name.c_str () , (source_files_out_path).c_str (), true , info);
76
+ ret = fscreator->PrepareDirectory (dbc_driver_name.c_str (), (source_files_out_path).c_str (), true , info);
76
77
77
78
MsgsClassification groups;
78
79
@@ -91,8 +92,6 @@ int main(int argc, char* argv[])
91
92
}
92
93
else
93
94
{
94
- std::cout << " Argument list is bad. " << std::endl ;
95
+ std::cout << helptext ;
95
96
}
96
-
97
- std::cout << " Finished... Press any key." << std::endl;
98
97
}
0 commit comments