AmbSignalMapper
===============

ABSTRACT:

The AmbSignalMapper tool serves basic utilities for AMB signal mapping process.
Two workflows exist: a classic workflow with an intermediate file and a "direct"
workflow with an *.msg file.

Classic Workflow
----------------
It should take place in three steps:

1. Vector CANdb++ conversion into intermediate file (First phase)
2. Manual annotation of intermediate file (Second phase)
3. Processing of intermediate file and AMB plugin and WebIDL creation (Third phase)

The First phase is achieved by software utolity called dbc2json.
The second phase needs to be done by humans manually.
The third phase is again covered by software utolity called json2amb. 

Direct Workflow
---------------
This workflow is designed for generation of production code. It consists of three steps:
1. Obtain a *.dbc file
2. Prepare a special *.msg message definition file
3. Generate AMB plugin by running
	dbc2amb I<dbc file> I<msg file> I<outdir> I<plugin name>

*.msg file contains message definitions marked by the keyword B<RECEIVE>. Messages can be
selected by name "Message1" or by id with b<@> prefix "@141". An asterisk can be specified
instead of the list of signals to select all signals. 

	RECEIVE Message1 {
		Signal1
	}

	RECEIVE Message2.Signal2;

	RECEIVE @141.*;


PREREQUISITES:

Perl version 5.006 or higher.

The following modules are needed to succesfuly build and run the AmbSignalMapper tool:
    'ExtUtils::MakeMaker'
    'Test::More',
    'Parse::RecDescent',
    'Exporter',
    'JSON',
    'Data::UUID',
    'File::Basename',
    'File::Spec',
    'Cwd',
    'Digest::SHA1'.

These modules are optional for executing moodule tests:
    'Test::Pod',
    'Test::Pod::Coverage',

The following command is an example of Data::UUID module instalation.
Note that sudo credentials might be needed on users linux box. 
    
    cpan install Data::UUID

INSTALLATION

To install this module, run the following commands:

    perl Makefile.PL
    make
    make test
    make install

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
perldoc command.

    perldoc dbc2json
    
    perldoc json2amb   

    perldoc dbc2amb

LICENSE AND COPYRIGHT

Copyright (C) 2014  Intel Corporation

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA


