Fix tabbing
authorPetr Nechaev <petr.nechaev@cogentembedded.com>
Mon, 23 Mar 2015 00:42:29 +0000 (03:42 +0300)
committerPetr Nechaev <petr.nechaev@cogentembedded.com>
Mon, 30 Mar 2015 11:26:10 +0000 (14:26 +0300)
lib/superptr.hpp
plugins/common/thread.h
plugins/dbus/dbusinterfacemanager.cpp
tools/AmbSignalMapper/bin/dbc2amb
tools/AmbSignalMapper/lib/Intel/IviPoc/DbcGrammar
tools/ambctl.py

index 3723b36..71f8540 100644 (file)
@@ -88,7 +88,7 @@ template<typename T> ::std::unique_ptr<T> make_unique(T* t)
 
 template<typename T> gobject_ptr<T> make_gobject(T* t)
 {
-    return gobject_ptr<T>(t, [](T *ptr) { if(ptr) g_object_unref(ptr);});
+       return gobject_ptr<T>(t, [](T *ptr) { if(ptr) g_object_unref(ptr);});
 }
 
 }
index bf1fd48..7bc26f2 100644 (file)
@@ -126,14 +126,14 @@ public:
        */
        virtual bool start();
 
-    /**
-     * Sets the priority of the thread for FIFO scheduling.
-     * @fn set_priority
-     * @param priority Integer ranging from 1 (lowest) to 99 (highest).
-     * @return True if the operation was successful.
-     * @public
-     */
-    bool setPriority(int priority);
+       /**
+       * Sets the priority of the thread for FIFO scheduling.
+       * @fn set_priority
+       * @param priority Integer ranging from 1 (lowest) to 99 (highest).
+       * @return True if the operation was successful.
+       * @public
+       */
+       bool setPriority(int priority);
 
        /**
        * Stops the thread
index d643a33..b556fd1 100644 (file)
@@ -51,7 +51,7 @@ on_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer user_d
 {
        DBusInterfaceManager* iface = static_cast<DBusInterfaceManager*>(user_data);
 
-    iface->connection = std::shared_ptr<GDBusConnection>(connection, [=](GDBusConnection* conn){
+       iface->connection = std::shared_ptr<GDBusConnection>(connection, [=](GDBusConnection* conn){
                amb::traits<GDBusConnection>::delete_functor functor;
                functor(conn);
        });
index d2c4099..65aa24b 100755 (executable)
@@ -1,8 +1,8 @@
 #!/usr/bin/perl
 
 #      Copyright (C) 2014  Intel Corporation
-#   Copyright (c) 2015  Cogent Embedded Inc.
-#   
+#      Copyright (c) 2015  Cogent Embedded Inc.
+#
 #      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
@@ -93,11 +93,11 @@ local $/;
 my $total = $#ARGV + 1;
 
 if ( $total < 2 or $total > 4) {
-    # get script name and print usage
-    my $scriptname = $0;
-    &printUsage($scriptname);
-    exit;
-    }
+       # get script name and print usage
+       my $scriptname = $0;
+       &printUsage($scriptname);
+       exit;
+}
 
 # First parameter is input dbc filename
 my $dbc_inputfilename = $ARGV[0];
@@ -119,7 +119,7 @@ my $targetDir = ();
 if ( $total <= 2 ) {
        $targetDir = getcwd;
 } else {
-    $targetDir = Cwd::abs_path($ARGV[2]);
+       $targetDir = Cwd::abs_path($ARGV[2]);
 }
 
 # Fourth optional parameter is plugin name
@@ -128,7 +128,7 @@ if ( $total <= 2 ) {
        my ($infilename, $indirectories, $insuffix) = fileparse($dbc_inputfilename, qr/\.[^.]*/);
        $pluginname = $infilename;
 } else {
-    $pluginname = $ARGV[3];
+       $pluginname = $ARGV[3];
 }
 
 # We add one space to dbc file if there is something like  ""ReceiverId to get "" ReceiverId
@@ -169,17 +169,15 @@ Select signals for implementing in an AMB plugin.
 =cut
 
 sub selectSignals {
-    my %dbc_root = %{$_[0]};
-    my %msg_root = %{$_[1]};
+       my %dbc_root = %{$_[0]};
+       my %msg_root = %{$_[1]};
        my $plugin_name = $_[2];
 
        my @electronicControlUnits = ();
        keys $msg_root{'receive'};
        while( my($msg_id, $signals) = each $msg_root{'receive'}) {
-        
-
                for my $ecu (@{$dbc_root{'electronicControlUnits'}}) {
-                       my %add_ecu = ();                       
+                       my %add_ecu = ();
 
                        for my $message (@{$ecu->{'messages'}}) {
                                if ((lc $msg_id eq lc $message->{'canName'}) or ($msg_id eq $message->{'canId'})) {
@@ -211,7 +209,7 @@ sub selectSignals {
        }
 
        my %jsonroot = ();
-    $jsonroot{'pluginName'} = "pluginName";
+       $jsonroot{'pluginName'} = "pluginName";
     $jsonroot{'electronicControlUnits'} = \@electronicControlUnits;
 
        return \%jsonroot;
@@ -224,15 +222,15 @@ Prints out wait information
 =cut
 
 sub printWait {
-    print STDERR ("\n");
-    print STDERR ("Processing input dbc file:\n");
-    print STDERR ("    $_[0]\n");
-    print STDERR ("Processing input msg file:\n");
-    print STDERR ("    $_[1]\n");
-    print STDERR ("Generating output files is in:\n");
-    print STDERR ("    $_[2]\n");
-    print STDERR ("\n");
-    print STDERR ("This operation may take some while. Please wait...\n");
+       print STDERR ("\n");
+       print STDERR ("Processing input dbc file:\n");
+       print STDERR ("    $_[0]\n");
+       print STDERR ("Processing input msg file:\n");
+       print STDERR ("    $_[1]\n");
+       print STDERR ("Generating output files is in:\n");
+       print STDERR ("    $_[2]\n");
+       print STDERR ("\n");
+       print STDERR ("This operation may take some while. Please wait...\n");
 }
 
 =head2 printUsage
@@ -242,15 +240,15 @@ Prints out basic usage help
 =cut
 
 sub printUsage {
-    my $scriptname=$_[0];
-    print STDERR ("$scriptname\n");
-    print STDERR ("Usage: dbc2amb in_dbc_file in_msg_file [outdir [plugin_name]]\n");
-    print STDERR ("  in_dbc_file              Input dbc file. Specify '-' to skip.\n");
-    print STDERR ("  in_msg_file              Input msg file\n");
-    print STDERR ("  outdir                   Target plugin directory (optional) generated to,\n");
-    print STDERR ("                            otherwise current directory.\n");
-    print STDERR ("  plugin_name              Machine-readable name of the plugin\n");
-    print STDERR ("\n");
+       my $scriptname=$_[0];
+       print STDERR ("$scriptname\n");
+       print STDERR ("Usage: dbc2amb in_dbc_file in_msg_file [outdir [plugin_name]]\n");
+       print STDERR ("  in_dbc_file              Input dbc file. Specify '-' to skip.\n");
+       print STDERR ("  in_msg_file              Input msg file\n");
+       print STDERR ("  outdir                   Target plugin directory (optional) generated to,\n");
+       print STDERR ("                            otherwise current directory.\n");
+       print STDERR ("  plugin_name              Machine-readable name of the plugin\n");
+       print STDERR ("\n");
 }
 
 =head1 AUTHOR
index 5e16d34..1f977c5 100644 (file)
@@ -91,7 +91,7 @@ Line: CommentPrefix /.*\n/
         # Not need to output anything
     | 'BU_' ':' <skip:'[ \t]*'> Identifier(s?)
         {
-           # This tag holds the list of ECUs in one line
+        # This tag holds the list of ECUs in one line
             @ecuList = @{$item[4]};
         }
     | 'BO_' Integer Identifier ':' Identifier Identifier Signal(s?)
index b8de518..41c8745 100644 (file)
@@ -159,7 +159,7 @@ def processCommand(command, commandArgs, noMain=True):
                        return None
 
        if command == "list" :
-                managerInterface, bus = getManager()
+               managerInterface, bus = getManager()
                if managerInterface == None:
                        return 0
                supportedList = managerInterface.List()