AmbSignalMaper: Implement dbc2amb
[profile/ivi/automotive-message-broker.git] / tools / AmbSignalMapper / README
1 AmbSignalMapper
2 ===============
3
4 ABSTRACT:
5
6 The AmbSignalMapper tool serves basic utilities for AMB signal mapping process.
7 Two workflows exist: a classic workflow with an intermediate file and a "direct"
8 workflow with an *.msg file.
9
10 Classic Workflow
11 ----------------
12 It should take place in three steps:
13
14 1. Vector CANdb++ conversion into intermediate file (First phase)
15 2. Manual annotation of intermediate file (Second phase)
16 3. Processing of intermediate file and AMB plugin and WebIDL creation (Third phase)
17
18 The First phase is achieved by software utolity called dbc2json.
19 The second phase needs to be done by humans manually.
20 The third phase is again covered by software utolity called json2amb. 
21
22 Direct Workflow
23 ---------------
24 This workflow is designed for generation of production code. It consists of three steps:
25 1. Obtain a *.dbc file
26 2. Prepare a special *.msg message definition file
27 3. Generate AMB plugin by running
28         dbc2amb I<dbc file> I<msg file> I<outdir> I<plugin name>
29
30 *.msg file contains message definitions marked by the keyword B<RECEIVE>. Messages can be
31 selected by name "Message1" or by id with b<@> prefix "@141". An asterisk can be specified
32 instead of the list of signals to select all signals. 
33
34         RECEIVE Message1 {
35                 Signal1
36         }
37
38         RECEIVE Message2.Signal2;
39
40         RECEIVE @141.*;
41
42
43 PREREQUISITES:
44
45 Perl version 5.006 or higher.
46
47 The following modules are needed to succesfuly build and run the AmbSignalMapper tool:
48     'ExtUtils::MakeMaker'
49     'Test::More',
50     'Parse::RecDescent',
51     'Exporter',
52     'JSON',
53     'Data::UUID',
54     'File::Basename',
55     'File::Spec',
56     'Cwd',
57     'Digest::SHA1'.
58
59 These modules are optional for executing moodule tests:
60     'Test::Pod',
61     'Test::Pod::Coverage',
62
63 The following command is an example of Data::UUID module instalation.
64 Note that sudo credentials might be needed on users linux box. 
65     
66     cpan install Data::UUID
67
68 INSTALLATION
69
70 To install this module, run the following commands:
71
72     perl Makefile.PL
73     make
74     make test
75     make install
76
77 SUPPORT AND DOCUMENTATION
78
79 After installing, you can find documentation for this module with the
80 perldoc command.
81
82     perldoc dbc2json
83     
84     perldoc json2amb   
85
86     perldoc dbc2amb
87
88 LICENSE AND COPYRIGHT
89
90 Copyright (C) 2014  Intel Corporation
91
92 This library is free software; you can redistribute it and/or
93 modify it under the terms of the GNU Lesser General Public
94 License as published by the Free Software Foundation; either
95 version 2.1 of the License, or (at your option) any later version.
96
97 This library is distributed in the hope that it will be useful,
98 but WITHOUT ANY WARRANTY; without even the implied warranty of
99 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
100 Lesser General Public License for more details.
101
102 You should have received a copy of the GNU Lesser General Public
103 License along with this library; if not, write to the Free Software
104 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
105
106