[Documentation] - Fixed new structure. Enhanced bluemonkey and opencv docs
authorKevron Rees <kevron.m.rees@intel.com>
Thu, 15 Jan 2015 22:21:01 +0000 (14:21 -0800)
committerKevron Rees <kevron.m.rees@intel.com>
Thu, 15 Jan 2015 22:21:09 +0000 (14:21 -0800)
24 files changed:
README.md
RELEASE.in.md
RELEASE.md
docs/CMakeLists.txt
docs/Doxyfile.in
docs/amb.in.fidl
docs/ambd.in.md
docs/libamb.in.h [moved from docs/libamb.in with 90% similarity]
docs/mainpage.in.idl
lib/ambplugin.h
lib/ambpluginimpl.h
plugins/CMakeLists.txt
plugins/bluemonkey/CMakeLists.txt
plugins/bluemonkey/README
plugins/bluemonkey/bluemonkey.in.idl
plugins/common/logger.h
plugins/common/mutex.h
plugins/common/thread.h
plugins/gpsnmea/README
plugins/opencvlux/README
plugins/plugins.in.idl
plugins/websocket/CMakeLists.txt
plugins/websocket/protocol.idl
tools/genmapping.py

index 8de7054..d80a61a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Automotive Message Broker
+# Automotive Message Broker Daemon {#ambd}
 
 Version 0.13.801
 
@@ -60,7 +60,7 @@ You will also need to edit your config to enable the Qt-based mainloop:
 
 ~~~~~~~~~~~~~{.json}
 {
-       "mainloop" : "/usr/lib/x86_64-linux-gnu/automotive-message-broker/qtmainloopplugin.so",
+       "mainloop" : "/usr/lib/i386-linux-gnu/automotive-message-broker/qtmainloopplugin.so",
        "plugins" : "/etc/ambd/plugins.d"
 }
 ~~~~~~~~~~~~~
index 9c49e19..48a2a43 100644 (file)
@@ -1,4 +1,4 @@
-# AMB Release Notes
+# AMB Release Notes {#release_notes}
 Version: @PROJECT_VERSION@
 
 ## New features:
index ba6c9e5..3de6748 100644 (file)
@@ -1,4 +1,4 @@
-# AMB Release Notes
+# AMB Release Notes {#release_notes}
 Version: 0.13.801
 
 ## New features:
index 8681085..5758dc6 100644 (file)
@@ -1,33 +1,27 @@
 if(enable_docs)
-       install (DIRECTORY amb DESTINATION ${DOC_INSTALL_DIR} COMPONENT Docs)
-       install (DIRECTORY dbus DESTINATION ${DOC_INSTALL_DIR} COMPONENT Docs)
-       install (DIRECTORY html DESTINATION ${DOC_INSTALL_DIR} COMPONENT Docs)
-       install (DIRECTORY latex DESTINATION ${DOC_INSTALL_DIR} COMPONENT Docs)
-       install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/amb.fidl DESTINATION ${DOC_INSTALL_DIR}/dbus/html/ COMPONENT Docs)
-       add_custom_target(doc_idl ALL mkdir -p ${CMAKE_CURRENT_SOURCE_DIR}/dbus/html/ && cp ${CMAKE_CURRENT_SOURCE_DIR}/amb.fidl ${CMAKE_CURRENT_SOURCE_DIR}/dbus/html/amb.fidl WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Moving amb.fidl" VERBATIM)
+
 
 # add a target to generate API documentation with Doxygen
 message(STATUS "doxygen doc generation enabled")
 find_package(Doxygen)
 if(DOXYGEN_FOUND)
        configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
-       add_custom_target(docs ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/docs/amb COMMENT "Generating API documentation with Doxygen" VERBATIM)
+       add_custom_target(docs ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} COMMENT "Generating API documentation with Doxygen" VERBATIM)
 
        #generate mappings documentation
-       configure_file (${CMAKE_CURRENT_SOURCE_DIR}/libamb.in ${CMAKE_CURRENT_BINARY_DIR}/libamb.h @ONLY)
-
        add_custom_target(genmappings_libamb
-                                                                               python ${CMAKE_SOURCE_DIR}/tools/genmapping --output ${CMAKE_CURRENT_BINARY_DIR}/ambdbusmappings.idl ${dbus_mapping_headers}
-                                                                               COMMENT "running genmapping")
+                                               python ${CMAKE_SOURCE_DIR}/tools/genmapping --output ${CMAKE_CURRENT_BINARY_DIR}/ambdbusmappings.idl ${dbus_mapping_headers}
+                                               COMMENT "running genmapping")
        add_dependencies(docs genmappings_libamb)
 
+       install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DESTINATION ${DOC_INSTALL_DIR} COMPONENT Docs)
 endif(DOXYGEN_FOUND)
 
 
 endif(enable_docs)
-
-configure_file (${CMAKE_CURRENT_SOURCE_DIR}/amb.in.fidl ${CMAKE_CURRENT_SOURCE_DIR}/amb.fidl @ONLY)
-configure_file (${CMAKE_CURRENT_SOURCE_DIR}/mainpage.in.idl ${CMAKE_CURRENT_SOURCE_DIR}/mainpage.idl @ONLY)
-configure_file (${CMAKE_CURRENT_SOURCE_DIR}/ambd-configuration.in.idl ${CMAKE_CURRENT_SOURCE_DIR}/ambd-configuration.idl @ONLY)
-configure_file (${CMAKE_CURRENT_SOURCE_DIR}/ambd.in.md ${CMAKE_CURRENT_SOURCE_DIR}/ambd.md @ONLY)
+configure_file (${CMAKE_CURRENT_SOURCE_DIR}/libamb.in.h ${CMAKE_CURRENT_BINARY_DIR}/libamb.h @ONLY)
+configure_file (${CMAKE_CURRENT_SOURCE_DIR}/amb.in.fidl ${CMAKE_CURRENT_BINARY_DIR}/amb.fidl @ONLY)
+configure_file (${CMAKE_CURRENT_SOURCE_DIR}/mainpage.in.idl ${CMAKE_CURRENT_BINARY_DIR}/mainpage.idl @ONLY)
+configure_file (${CMAKE_CURRENT_SOURCE_DIR}/ambd-configuration.in.idl ${CMAKE_CURRENT_BINARY_DIR}/ambd-configuration.idl @ONLY)
+configure_file (${CMAKE_CURRENT_SOURCE_DIR}/ambd.in.md ${CMAKE_CURRENT_BINARY_DIR}/ambd.md @ONLY)
 configure_file (${CMAKE_CURRENT_SOURCE_DIR}/ambd.in.md ${CMAKE_SOURCE_DIR}/README.md @ONLY)
index df3a536..2c51d1a 100644 (file)
@@ -3,7 +3,9 @@ PROJECT_NUMBER = @PROJECT_VERSION@
 PROJECT_NAME = @PROJECT_NAME@
 PROJECT_NUMBER = @PROJECT_VERSION@
 GENERATE_LATEX = NO
-RECURSIVE = YES
 EXTENSION_MAPPING = fidl=IDL
 FILE_PATTERNS = *.md *.idl *.fidl *.h
-INPUT = @CMAKE_SOURCE_DIR@/lib/ @CMAKE_BINARY_DIR@/plugins @CMAKE_CURRENT_BINARY_DIR@/
+RECURSIVE = YES
+IMAGE_PATH = @CMAKE_SOURCE_DIR@/docs/images
+INPUT = @CMAKE_SOURCE_DIR@/RELEASE.md @CMAKE_SOURCE_DIR@/lib/ @CMAKE_BINARY_DIR@/plugins @CMAKE_BINARY_DIR@/docs
+HTML_OUTPUT=@CMAKE_BINARY_DIR@/docs
index 2fd7830..6d36c5a 100644 (file)
@@ -1,10 +1,18 @@
+/**
+ * \addtogroup dbus_api_module
+ *  @{
+ */
+
 /*!
-* \mainpage Automotive Message Broker DBus API Documentation
+* \file amb.fidl
+* \section dbus_api Automotive Message Broker DBus API Documentation
 * \version @PROJECT_VERSION@
 *
-* <a href="../../html/index.html">Back to AMB Documentation Main</a>
+* \section dbus_api_intro Introduction
+* This document describes the DBus interfaces and data types for the
+* Automotive Message Broker API.  The data types are intended to as-close-as-
+* possible be compatible with the W3C vehicle <a href="https://rawgit.com/w3c/automotive-bg/master/data_spec.html">data spec</a>.
 *
-* \section intro Introduction
 * AMB organizes the API into two general interface categories.  First the Manager interface (see manager.txt)
 * which includes tools for using the other interfaces.  Second is a number of interfaces that
 * represent vehicle data.  The latter follows the schema of "org.automotive.DataType" and are
@@ -17,7 +25,7 @@
 * for your language of choice.  These interfaces types map to internal AMB properties.  To understand the mappings,
 * see the <a href="ambdbusmappings_8idl.html">mapping documentation</a>
 *
-* \section basic_usage Basic Recommended Usage
+* \section dbus_api_basic_usage Basic Recommended Usage
 *
 * It is recommended that the Manager interface be used to find the DBus Object that contains the
 * data type you need.  This is done through the FindObject() call.  It is expected that DBus
@@ -34,9 +42,9 @@
 *
 * console.log("Vehicle Speed: " + speedObject.Speed);
 * \endcode
-* \section automotive_manager Automotive Manager
+* \section dbus_api_automotive_manager Automotive Manager
 * Manager is a helper interface for discovering and finding available objects.  Manager also helps users look up objects by zone and get additional information about a data type (ieorg.automotive.Manager.ZonesForObjectName).
-* \section zones Zones
+* \section dbus_api_zones Zones
 *
 * 'Zone' describes the position in the vehicle where the object is located.  The Zone type is a bitfield of values that can be combined to describe a specific location.  For example
 *
@@ -58,7 +66,7 @@
 * }
 * \endcode
 *
-* \section vehicle_property_type Vehicle Property Type
+* \section dbus_api_vehicle_property_type Vehicle Property Type
 * Vehicle Property Type is the common interface which all Data types are derived.  This interface is as follows:
 *
 * \code
@@ -71,7 +79,7 @@
 * }
 * \endcode
 *
-* \section data_types Data types
+* \section dbus_api_data_types Data types
 *
 * The data types try to conform to the [http://w3c.github.io/automotive-bg/data_spec.html W3C Automotive Business Group Vehicle Data Specification] as much as possible.  There are differences in the Zone type, and this vehicle API contains some additional data types that the W3C Business Group has not yet defined.  'Time' also represents relative time in seconds rather than time in ms since epoch (DOMTimeStamp).  The names of the attributes are also different because of Web vs. DBus conventions.  In this Vehicle API, DBus properties use CamelCase (ie Speed vs speed) vs lowerCamelCase.  Units and types are the same where possible.
 *
 *
 */
 
-/*!
-* \file amb.fidl
-* \name @PROJECT_NAME@
-* \version @PROJECT_VERSION@
-* \brief This document describes the DBus interfaces and data types for the
-* Automotive Message Broker API.  The data types are intended to as-close-as-
-* possible be compatible with the W3C vehicle <a href="https://rawgit.com/w3c/automotive-bg/master/data_spec.html">data spec</a>.
-*/
+/** @} */
 
 /*!
 * Variant
index bdfe0b0..020454c 100644 (file)
@@ -1,4 +1,4 @@
-# Automotive Message Broker
+# Automotive Message Broker Daemon {#ambd}
 
 Version @PROJECT_VERSION@
 
similarity index 90%
rename from docs/libamb.in
rename to docs/libamb.in.h
index 67c4eb9..581afad 100644 (file)
@@ -1,19 +1,17 @@
 /*!
- \file libamb.in
+ \file libamb.h
  \section libamb Automotive Message Broker Library Documentation
  \version @PROJECT_VERSION@
 
- <a href="../../html/index.html">Back to AMB Documentation Main</a>
-
- \section intro Introduction
+ \section libamb_intro Introduction
  Automotive Message Broker (AMB) Library documentation outlines the internal classes and structures for building
  plugins for AMB.
 
- \section architecture General Architecture
+ \section libamb_architecture General Architecture
  AMB has 3 main parts.  Source plugins which provide data, a routing engine that
  routes data and sink plugins that consume the data.
 
- \section properties Properties
+ \section libamb_properties Properties
  AMB defines a number of properties itself.  These properties are defined in vehicleproperty.h.  The DBus plugin
  will take many of these properties and combine them in DBus interfaces.  The mappings of AMB internal properties
  to DBus Interface properties can be found in the <a href="ambdbusmappings_8idl.html">mappings documentation</a>.  This file will come in handy when you want to
@@ -26,7 +24,7 @@
 
  "org.automotive.CustomProperty is the DBus interface and CustomProperty is a DBus property in that interface.
 
- \section plugins Plugins
+ \section libamb_plugins Plugins
  There are two types of plugins: plugins that provide data, called "sources"
  (AbstractSource) and plugins that consume data, called "sinks" (AbstractSink).
  A typical source would get data from the vehicle and then translate the raw data
@@ -40,7 +38,7 @@
 
  Various plugins have separate documentation found in @DOC_INSTALL_DIR@/plugins/.
 
- \section plugin_creation Creating your own plugin
+ \section libamb_plugin_creation Creating your own plugin
  AMB allows you to create your own plugins.  Plugins inherit from either AbstractSource, AbstractSink, or AmbPluginImpl.
 
  It is recommended that new plugins be written using AmbPlugin and AmbPluginImpl.
index 86bfea8..eb0b28b 100644 (file)
@@ -2,11 +2,11 @@
 * \mainpage Automotive Message Broker Documentation
 * \version @PROJECT_VERSION@
 * \section links AMB Documentation Sections
-* - \ref ambd.md - AMB Daemon Documentation
-* - <a href="../dbus/html/index.html">DBus API documentation</a> - Using AMB with your application
+* - \ref ambd
+* - \ref dbus_api - Using AMB with your application
 * - \ref libamb - Developing AMB or AMB plugins
 * - \ref plugins - Using Built in AMB plugins
-* - \ref RELEASE.md - Current release notes
+* - \ref release_notes - Current release notes
 *
 * \section intro Introduction
 * Automotive Message Broker (AMB) is a framework for providing applications with standardized access to vehicle data.
index c8a3773..8c16dbf 100644 (file)
@@ -25,12 +25,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 /*!
  * \file ambplugin.h
- * \brief Contains common code used in all IviPoC II plugins for Automotive message broker(AMB).
+ * \brief Contains common code used in plugins for Automotive message broker(AMB).
  */
 
 /*!
- * AmbPlugin class contains common code used in all IviPoC II plugins for Automotive message broker(AMB).
- * For the AMB library API please visit <a href="https://github.com/otcshare/automotive-message-broker">Automotive message broker web page</a>.
+ * AmbPlugin class contains common code used in plugins for Automotive message broker(AMB).
+ * For the AMB library API please visit \ref libamb</a>.
  *
  * \class AmbPlugin
  *
index 3e4ab9c..94245a0 100644 (file)
@@ -21,15 +21,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 #include "abstractsource.h"
 
-/*! \addtogroup ivipocbase
+/*! \addtogroup libAMB
  *  @{
  */
 
 /*!
  * \brief AmbPlugin private class implementation - base class for all plugin implementations.
  *
- * Contains common code used in all IviPoC II plugins for Automotive message broker(AMB).
- * For the AMB library API please visit <a href="https://github.com/otcshare/automotive-message-broker">Automotive message broker web page</a>.
+ * Contains common code used in plugins for Automotive message broker(AMB).
+ * For the AMB library API please visit \ref libamb.
  *
  * \class AmbPluginImpl
  */
index 805679d..ed744e0 100644 (file)
@@ -30,16 +30,7 @@ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/examplesink DESTINATION ${PLUGIN_SEGM
 
 
 if(enable_docs)
-       find_package(Doxygen)
-       if(DOXYGEN_FOUND)
-               configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
-               configure_file(${CMAKE_CURRENT_SOURCE_DIR}/plugins.in.idl ${CMAKE_CURRENT_BINARY_DIR}/plugins.idl @ONLY)
-               add_custom_target(plugin_docs ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-                                                                                       COMMENT "Generating plugin documentation with Doxygen" VERBATIM)
-
-               install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${DOC_INSTALL_DIR}/plugins COMPONENT Docs)
-       endif(DOXYGEN_FOUND)
-
+  configure_file(${CMAKE_CURRENT_SOURCE_DIR}/plugins.in.idl ${CMAKE_CURRENT_BINARY_DIR}/plugins.idl @ONLY)
 endif(enable_docs)
 
 add_subdirectory(common)
index 5c97b54..71a7569 100644 (file)
@@ -63,25 +63,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/bluemonkey.in.json ${CMAKE_CURRENT_BI
 
 install (FILES ${CMAKE_CURRENT_BINARY_DIR}/bluemonkey DESTINATION ${PLUGIN_SEGMENT_INSTALL_PATH})
 
-set(bluemonkey_doc_files ${CMAKE_CURRENT_BINARY_DIR}/bluemonkey.README ${CMAKE_CURRENT_BINARY_DIR}/docs/bluemonkey.idl)
-
-if(enable_docs)
-       find_package(Doxygen)
-       if(DOXYGEN_FOUND)
-               configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
-               add_custom_target(bluemonkey_docs ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-                                                                                       COMMENT "Generating Bluemonkey javascript API documentation with Doxygen" VERBATIM)
-
-               #generate mappings documentation
-               add_custom_target(genmappings_bluemonkey
-                                                                                       python ${CMAKE_SOURCE_DIR}/tools/genmapping --output ${CMAKE_CURRENT_BINARY_DIR}/docs/ambdbusmappings.idl ${dbus_mapping_headers}
-                                                                                       COMMENT "running genmapping")
-               add_dependencies(bluemonkey_docs genmappings_bluemonkey)
-
-               install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${DOC_INSTALL_DIR}/plugins/bluemonkey COMPONENT Docs)
-       endif(DOXYGEN_FOUND)
-
-endif(enable_docs)
+set(bluemonkey_doc_files ${CMAKE_CURRENT_BINARY_DIR}/bluemonkey.README.md)
 
 install (FILES ${bluemonkey_doc_files} DESTINATION ${DOC_INSTALL_DIR}/plugins)
 
index e40af55..7774829 100644 (file)
@@ -1,14 +1,14 @@
-Bluemonkey Plugin                         {#bluemonkey_plugin}
-============
-Version: @PROJECT_VERSION@
+# Bluemonkey Plugin                         {#bluemonkey_plugin}
 
 [TOC]
+# Bluemonkey Plugin
+Version: @PROJECT_VERSION@
 
 Bluemonkey is a javascript rendering engine that allows the scripting of source plugin behavior in javascript.
 
 To use the OBD-II Source plugin, add the following config to your /etc/ambd/config:
 
-~~~~~~~~~~~~~{.json}
+~~~~~~~~~~~~~{.js}
 {
        "name" : "bluemonkey",
        "path" : "@PLUGIN_INSTALL_PATH@/bluemonkeyplugin.so",
@@ -16,18 +16,16 @@ To use the OBD-II Source plugin, add the following config to your /etc/ambd/conf
 }
 ~~~~~~~~~~~~~
 
-## Configuration Key Definitions:
-
-"name"
-name of plugin.  This key is not used by the plugin at this moment.
+# Configuration Key Definitions:
 
-"path"
-path to plugin on the filesystem.
+| Key               | Definition                                                              |  Default Value     |
+| :---------------- | :---------------------------------------------------------------------- | :----------------- |
+| "name"            | Name of plugin                                                          |                    |
+| "path"            | Path to plugin on the filesystem                                        |                    |
+| "config"          | Path to the bluemonkey configuration script                             | "0"                |
 
-"config"
-path to the bluemonkey configuration script.
 
-## Bluemonkey Javascript API:
+# Bluemonkey Javascript API:
 
-see bluemonkey.idl (installed to @DOC_INSTALL_DIR@/plugins/bluemonkey
+see bluemonkey.idl
 
index ab5fde5..f092f0e 100644 (file)
@@ -1,4 +1,5 @@
 /*!
+ * \tableofcontents
  * \file bluemonkey.idl
  * \section bluemonkey Bluemonkey Javascript API Documentation
  * \version @PROJECT_VERSION@
index db89754..820f3d2 100644 (file)
@@ -32,7 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #include <pthread.h>
 #endif
 
-/** \addtogroup libivipoccommon
+/** \addtogroup libamb-plugins-common
  *  @{
  */
 
@@ -41,7 +41,7 @@ namespace CUtil {
 /**
  * \brief Simple logger to log messages on file and console.
  *
- * This is the implementation of a simple logger in C++. It is implemented 
+ * This is the implementation of a simple logger in C++. It is implemented
  * as a Singleton, so it can be easily called through two DEBUG macros.
  * It is Pthread-safe.
  * It allows to log on both file and screen, and to specify a verbosity
@@ -65,7 +65,7 @@ class Logger
         */
        static pthread_mutex_t lock_;
 #endif
-       
+
        bool configured_;
 
        /**
@@ -79,11 +79,11 @@ class Logger
         */
        std::string logFile_;
 
-    /**
-     * \brief Initial part of the name of the file used for Logging.
-     * Date and time are automatically appended.
-     */
-    std::string logFileName_;
+       /**
+        * \brief Initial part of the name of the file used for Logging.
+        * Date and time are automatically appended.
+        */
+       std::string logFileName_;
 
        /**
         * \brief Current configuration of the logger.
@@ -129,18 +129,18 @@ class Logger
 
 public:
 
-    /**
-    * Logging level
-    * \enum Level
-    * \public
-    */
+       /**
+       * Logging level
+       * \enum Level
+       * \public
+       */
        enum Level {
-           EError = 0,
-           EWarning,
-           EMessage,
-           EInfo,
-           ETrace,
-           EDebug
+               EError = 0,
+               EWarning,
+               EMessage,
+               EInfo,
+               ETrace,
+               EDebug
        };
 
        /**
@@ -153,14 +153,14 @@ public:
         * \endcode
         */
        #define DEBUG_CONF(outputFile, \
-               configuration, \
-               fileVerbosityLevel, \
-               screenVerbosityLevel) { \
-                CUtil::Logger::getInstance().configure(outputFile, \
-                               configuration, \
-                               fileVerbosityLevel, \
-                               screenVerbosityLevel); \
-               }
+                       configuration, \
+                       fileVerbosityLevel, \
+                       screenVerbosityLevel) { \
+                               CUtil::Logger::getInstance().configure(outputFile, \
+                                                       configuration, \
+                                                       fileVerbosityLevel, \
+                                                       screenVerbosityLevel); \
+                       }
 
        /**
         * \brief Macro to print log messages.
@@ -172,75 +172,75 @@ public:
         * \endcode
         */
        #define LOGGER(priority, msg) { \
-           std::ostringstream __debug_stream__; \
-           __debug_stream__ << msg; \
-           CUtil::Logger::getInstance().print(priority, __FILE__, __LINE__, \
-                   __debug_stream__.str()); \
-           }
+               std::ostringstream __debug_stream__; \
+               __debug_stream__ << msg; \
+               CUtil::Logger::getInstance().print(priority, __FILE__, __LINE__, \
+                               __debug_stream__.str()); \
+               }
 
        #ifndef _LOGGER_NO_LOG
 
-    /**
-     * Macro to log errors.
-     * \def LOG_ERROR
-     */
+       /**
+        * Macro to log errors.
+        * \def LOG_ERROR
+        */
        #define LOG_ERROR(M)        LOGGER(CUtil::Logger::EError, M)
        /**
-     * Macro to log warnings.
-     * \def LOG_WARNING
-     */
+        * Macro to log warnings.
+        * \def LOG_WARNING
+        */
        #define LOG_WARNING(M)      LOGGER(CUtil::Logger::EWarning, M)
-    /**
-     * Macro to log messages.
-     * \def LOG_MESSAGE
-     */
+       /**
+        * Macro to log messages.
+        * \def LOG_MESSAGE
+        */
        #define LOG_MESSAGE(M)      LOGGER(CUtil::Logger::EMessage, M)
        /**
-     * Macro to log info messages.
-     * \def LOG_INFO
-     */
-    #define LOG_INFO(M)         LOGGER(CUtil::Logger::EInfo, M)
-    /**
-     * Macro to log trace messages.
-     * \def LOG_TRACE
-     */
+        * Macro to log info messages.
+        * \def LOG_INFO
+        */
+       #define LOG_INFO(M)         LOGGER(CUtil::Logger::EInfo, M)
+       /**
+        * Macro to log trace messages.
+        * \def LOG_TRACE
+        */
        #define LOG_TRACE(M)        LOGGER(CUtil::Logger::ETrace, M)
-    /**
-     * Macro to log debug messages.
-     * \def LOG_DEBUG
-     */
+       /**
+        * Macro to log debug messages.
+        * \def LOG_DEBUG
+        */
        #define LOG_DEBUG(M)        LOGGER(CUtil::Logger::EDebug, M)
 
        #else
 
        #define LOG_ERROR(M)        {}
        #define LOG_WARNING(M)      {}
-    #define LOG_MESSAGE(M)      {}
+       #define LOG_MESSAGE(M)      {}
        #define LOG_INFO(M)         {}
        #define LOG_TRACE(M)        {}
-    #define LOG_DEBUG(M)        {}
+       #define LOG_DEBUG(M)        {}
 
        #endif
 
-    /**
-     * Type used for the configuration
-     */
+       /**
+        * Type used for the configuration
+        */
        typedef loggerConf_ loggerConf;
-    /**
-     * Disable logging to file
-     */
+       /**
+        * Disable logging to file
+        */
        static const loggerConf file_on=        L_nofile_;
-    /**
-     * Enable logging to file
-     */
-    static const loggerConf file_off=  L_file_;
-    /**
-     * Enable logging to screen
-     */
-    static const loggerConf screen_on=         L_noscreen_;
-    /**
-     * Disable logging to screen
-     */
+       /**
+        * Enable logging to file
+        */
+       static const loggerConf file_off=       L_file_;
+       /**
+        * Enable logging to screen
+        */
+       static const loggerConf screen_on=      L_noscreen_;
+       /**
+        * Disable logging to screen
+        */
        static const loggerConf screen_off= L_screen_;
 
        static Logger& getInstance();
@@ -255,12 +255,12 @@ public:
                        const int               fileVerbosityLevel,
                        const int               screenVerbosityLevel);
 
-    /**
-     * Flush output buffer
-     */
+       /**
+        * Flush output buffer
+        */
        inline void flush()
        {
-           out_.flush();
+               out_.flush();
        }
 };
 
index 25f0a59..9367d4b 100644 (file)
@@ -22,15 +22,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #include <pthread.h>
 
 /**
- * @defgroup libivipoccommon ivipoc-common static library.
+ * @defgroup libamb-plugins-common amb-plugins-common static library.
  * \brief Project common C++ utilities.
  *
- * Contains Logger, Thread and Mutex utility classes.
+ * Contains Logger, Thread and Mutex, SerialPort and other utility classes.
  *
  * @{
  */
 
-/** 
+/**
  * \brief Project common C++ utilities namespace
  * @namespace CUtil
  */
@@ -45,30 +45,30 @@ namespace CUtil {
 
 class Mutex
 {
-    /**
-    * Encapsulated posix mutex object
-    * @property mutexID
-    * @private
-    */
-    pthread_mutex_t mutexID;
+       /**
+       * Encapsulated posix mutex object
+       * @property mutexID
+       * @private
+       */
+       pthread_mutex_t mutexID;
 
 public:
 
-    Mutex();
-    ~Mutex();
-
-    /**
-    * Locks mutex object
-    * @fn lock
-    * @public
-    */
-    void lock();
-    /**
-    * Unlocks mutex object
-    * @fn unlock
-    * @public
-    */
-    void unlock();
+       Mutex();
+       ~Mutex();
+
+       /**
+       * Locks mutex object
+       * @fn lock
+       * @public
+       */
+       void lock();
+       /**
+       * Unlocks mutex object
+       * @fn unlock
+       * @public
+       */
+       void unlock();
 };
 
 }
index d8f0b56..8879b5b 100644 (file)
@@ -23,7 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 #include <sys/prctl.h>
 #include "logger.h"
 
-/** \addtogroup libivipoccommon
+/** \addtogroup libamb-plugins-common
  *  @{
  */
 
@@ -37,108 +37,108 @@ namespace CUtil {
  */
 class Thread
 {
-    /**
-    * Condition variable used to signal runnable status changes
-    * @property cond
-    * @private
-    */
-    pthread_cond_t cond;
-    /**
-    * Mutex used to lock runnable status changes
-    * @property mutex
-    * @private
-    */
-    pthread_mutex_t mutex;
-    /**
-    * Instance of the encapsulated posix thread
-    * @property thread
-    * @private
-    */
-    pthread_t thread;
-    /**
-    * Runnable status of the thread. True means that thread is running
-    * @property runnableFlag
-    * @private
-    */
-    bool runnableFlag;
+       /**
+       * Condition variable used to signal runnable status changes
+       * @property cond
+       * @private
+       */
+       pthread_cond_t cond;
+       /**
+       * Mutex used to lock runnable status changes
+       * @property mutex
+       * @private
+       */
+       pthread_mutex_t mutex;
+       /**
+       * Instance of the encapsulated posix thread
+       * @property thread
+       * @private
+       */
+       pthread_t thread;
+       /**
+       * Runnable status of the thread. True means that thread is running
+       * @property runnableFlag
+       * @private
+       */
+       bool runnableFlag;
 
 private:
 
-    /**
-    * Sets new runnable status of the thread. Holds mutex and signals condition variable
-    * @fn setRunnableFlag
-    * @private
-    * @param[in] flag New status of the thread to be set
-    * @return Actual runnable status after operation
-    */
-    bool setRunnableFlag(bool flag);
-
-    /**
-    * Sleeps current thread for specified time in miliseconds. Wait can be canceled if thread is in stopped/stopping state.
-    * @fn wait
-    * @private
-    * @param miliseconds Sleep time in miliseconds.
-    * @return True if wait wasn't canceled, false otherwise.
-    */
-    bool wait( long miliseconds );
+       /**
+       * Sets new runnable status of the thread. Holds mutex and signals condition variable
+       * @fn setRunnableFlag
+       * @private
+       * @param[in] flag New status of the thread to be set
+       * @return Actual runnable status after operation
+       */
+       bool setRunnableFlag(bool flag);
+
+       /**
+       * Sleeps current thread for specified time in miliseconds. Wait can be canceled if thread is in stopped/stopping state.
+       * @fn wait
+       * @private
+       * @param miliseconds Sleep time in miliseconds.
+       * @return True if wait wasn't canceled, false otherwise.
+       */
+       bool wait( long miliseconds );
 
 public:
 
-    /**
-    * Method to be executed in this thread. Has to be overwritten.
-    * @fn run
-    * @public
-    */
-    virtual void run() = 0;
+       /**
+       * Method to be executed in this thread. Has to be overwritten.
+       * @fn run
+       * @public
+       */
+       virtual void run() = 0;
 
 protected:
 
-    /**
-    * Gets runnable status of current thread. Sleeps calling thread for a specified time.
-    * @protected
-    * @fn isRunnable
-    * @param miliseconds Time in miliseconds. 0 means no sleep.
-    * @return True if thread should still run.
-    *
-    * \b Example
-    * @code
-    *
-    *       void MyCustomThread::run()
-    *       {
-    *           while(isRunnable(1000)) { // execute some op once per second. Exits thread if stop() was called.
-    *           ...
-    *           }
-    *       }
-    * @endcode
-    */
-    bool isRunnable(long miliseconds = 0);
+       /**
+       * Gets runnable status of current thread. Sleeps calling thread for a specified time.
+       * @protected
+       * @fn isRunnable
+       * @param miliseconds Time in miliseconds. 0 means no sleep.
+       * @return True if thread should still run.
+       *
+       * \b Example
+       * @code
+       *
+       *       void MyCustomThread::run()
+       *       {
+       *           while(isRunnable(1000)) { // execute some op once per second. Exits thread if stop() was called.
+       *           ...
+       *           }
+       *       }
+       * @endcode
+       */
+       bool isRunnable(long miliseconds = 0);
 
 public:
 
        Thread();
        virtual ~Thread();
 
-    /**
-    * Starts the thread
-    * @fn start
-    * @return True if thread was started
-    * @public
-    */
+       /**
+       * Starts the thread
+       * @fn start
+       * @return True if thread was started
+       * @public
+       */
        virtual bool start();
 
        /**
-    * Stops the thread
-    * @fn stop
-    * @public
-    */
+       * Stops the thread
+       * @fn stop
+       * @public
+       */
        virtual void stop();
 
        /**
-    * Restarts the thread.
-    * @fn restart
-    * @return True if thread was started again
-    * @public
-    */
+       * Restarts the thread.
+       * @fn restart
+       * @return True if thread was started again
+       * @public
+       */
        bool restart()
        {
                stop();
index 311cc93..28c6fcb 100644 (file)
@@ -46,7 +46,54 @@ Default: none
 ## AMB Properties:
 
 GpsTime
-Timestamp in seconds from epoc UTC parsed from the NMEA output.
+Timestamp in seconds from unix epoc (UTC) parsed from the NMEA output.
 
 Type: double
 Access: readonly
+
+GpsSpeed
+Speed as reported by GPS
+
+Type: UInt16
+Access: readonly
+
+GpsFix
+Fix status.
+
+~~~~~~~~~~~~(.cpp}
+enum FixType {
+       NoFix = 1,
+       Fix2D = 2,
+       Fix3D = 3
+};
+~~~~~~~~~~~~
+
+Type: int
+Access: readonly
+
+GpsSatsUsed {#GpsSatsUsed}
+How many satellites are being used in the fix
+
+Type: UInt16
+Access: readonly
+
+GpsNmea
+Raw NMEA message.  Useful for debugging
+
+Type: String
+Access: readonly
+
+## DBus Interfaces:
+
+### org.automotive.GpsInfo
+**Properties**
+GpsTime - Corresponds with the GpsTime AMB Property
+Speed - Corresponds with the GpsSpeed AMB Property
+Fix - Corresponds with the GpsFix AMB Property
+SattelitesUsed - Corresponds with the GpsSatsUsed AMB Property
+RawNmea - Corresponds with the GpsNmea AMB Property
+
+interface GpsInfo
+{
+
+}
index 11444b8..d89004c 100644 (file)
@@ -1,13 +1,19 @@
-# OpenCV "lux" plugin {#opencvlux_plugin}
+# OpenCV plugin {#opencvlux_plugin}
 
+[TOC]
+# OpenCV "lux" plugin
 Version: @PROJECT_VERSION@
 
-## Introduction
+
+# Introduction {#opencv_intro}
 
 This plugin simulates the ExteriorBrigtness property using a traditional webcamera.  It works
 by taking the mean pixel intensity of the web camera image and estimating lux.  The particular
 can be calibrated using the "pixelUpperBound" and "pixelLowerBound" variables.
 
+
+# Setup {#opencv_setup}
+
 To enable the OpenCV "lux" plugin, run cmake and enable the opencvlux_plugin option:
 
 cmake -Dopencvlux_plugin=On ..
@@ -15,8 +21,7 @@ cmake -Dopencvlux_plugin=On ..
 Currently, this plugin has been tested with OpenCV 2.4.4.
 
 To use the OpenCV plugin, add the following to the "sources" array in /etc/ambd/config:
-
-~~~~~~~~~~~~~{.json}
+~~~~~~~~~~~~~{.js}
 {
   "name" : "OpenCV LUX",
   "path" : "@PLUGIN_INSTALL_PATH@/opencvluxplugin.so",
@@ -29,85 +34,28 @@ To use the OpenCV plugin, add the following to the "sources" array in /etc/ambd/
 }
 ~~~~~~~~~~~~~
 
-NOTE: some features require the qtmainloop to be running.  see the main README for details.
-
-## Configuration Key Definitions:
-
-"name"
-name of plugin.  This key is not used by the plugin at this moment.
-
-"path"
-path to plugin on the filesystem.
-
-"device"
-Camera to use.  The string "0" corrisponds to /dev/video0, "1" to /dev/video1, etc.
-
-Default: "0"
-
-"threaded"
-Compute pixel intensity in another thread.  Set to "true" or "false".  You need to use the qtmainloop in
-order for this feature to function.
-
-Default: "false"
-
-"fps"
-How many times per second to poll image data from the camera.
-
-Default: "30"
-
-"pixelLowerBound"
-Lowest calibration value for a camera.  This is the average pixel intensity value the camera reports when
-it is completely covered.
-
-Default: "0"
-
-"pixelUpperBound"
-The highest calibration value for camera.  This is the average pixel intensity value when a very bright
-light (like the sun) is being projected at the camera.
-
-Default: "255"
-
-"opencl" (experimental)
-Use a specialized CPU/GPU device to calculate the mean pixel intensity.  This will only work if OpenCV
-was compiled with OpenCL support.  To enable openCL, pass -Docl=ON to cmake.
-
-Default: "false"
-
-"logging"
-Turn on video logging.
-
-Default: "false"
-
-"logfile"
-File to encode video to.
-
-Default: "/tmp/video.avi"
-
-"codec"
-Fourcc name of codec.  See http://www.fourcc.org/codecs.php
-
-Default: "mjpg"
-
-"ddd" (experimental)
-Driver Drowsiness Detection.  For a driver facing camera, detect whether or not eyes are
-open or closed.  If closed for a period of time, DriverDrowsiness will change to "true".
-
-Default: "false"
+**NOTE:** some features require the qtmainloop to be running.  see the main README for details.
 
+# Configuration Key Definitions: {#opencv_config_keys}
 
-## AMB Properties:
+| Key               | Definition                                                              |  Default Value     |
+| :---------------- | :---------------------------------------------------------------------- | :----------------- |
+| "name"            | Name of plugin.  This key is not used by the plugin at this moment      |                    |
+| "path"            | Path to plugin on the filesystem                                        |                    |
+| "device"          | Camera to use.  The string "0" corrisponds to /dev/video0               | "0"                |
+| "threaded"        | Compute pixel intensity in another thread.  Set to "true" or "false"    | "false"            |
+| "fps"             | How many times per second to poll image data from the camera.           | "30"               |
+| "opencl"          | (experimental) Use a specialized CPU/GPU device to help with processing | "false"            |
+| "logging"         | Turn on video logging.                                                  | "false"            |
+| "logfile"         | File to encode video to.                                                | "/tmp/video.avi"   |
+| "codec"           | Fourcc name of codec.  See <http://www.fourcc.org/codecs.php>           | "mjpg"             |
+| "ddd"             | (experimental) Driver Drowsiness Detection with a driver facing camera detect whether or not eyes are open or closed. If closed for a period  </br> of time, DriverDrowsiness will change to "true". | "false"            |
 
-VideoLogging
-Turn on and off video logging
-Type: bool
-Access: readwrite
 
-DriverDrowsiness
-True if the driver has been detected drowsy.
-Type: bool
-Access: readonly
+# AMB Properties: {#opencv_amb_properties}
 
-OpenCL
-True if OpenCL acceleration is enabled.
-Type: bool
-Access: readonly
+| Property Name     | Description                                                             | Type     | Access    |
+| :---------------- | :---------------------------------------------------------------------- | :------: | :-------- |
+| VideoLogging      | Turn on and off video logging                                           | bool     | readwrite |
+| DriverDrowsiness  | True if the driver has been detected drowsy.                            | bool     | readonly  |
+| OpenCL            | True if OpenCL acceleration is enabled.                                 | bool     | readwrite |
index 9b9b015..7969821 100644 (file)
@@ -1,4 +1,5 @@
 /*!
+ * \file plugins.idl
  * \section plugins AMB Plugin documentation
  *
  * \section intro Introduction
index d5fa5cc..9745e67 100644 (file)
@@ -43,7 +43,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test/index.html ${CMAKE_CURRENT_SOURC
 install(TARGETS websocketsource LIBRARY DESTINATION ${PLUGIN_INSTALL_PATH})
 
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/websocket.README.md @ONLY)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protocol.idl ${CMAKE_CURRENT_BINARY_DIR}/docs/protocol.idl @ONLY)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protocol.idl ${CMAKE_CURRENT_BINARY_DIR}/protocol.idl @ONLY)
 
 install (FILES ${CMAKE_CURRENT_BINARY_DIR}/websocket.README.md DESTINATION ${DOC_INSTALL_DIR}/plugins)
 install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test DESTINATION ${DOC_INSTALL_DIR}/plugins/websocket COMPONENT Docs)
index fd94d40..e812456 100644 (file)
@@ -1,4 +1,5 @@
 /*!
+ * \file protocol.idl
  * \section websocket Websocket Plugin Protocol Documentation
  * \version @PROJECT_VERSION@
  *
index 136f9db..8516bfe 100755 (executable)
@@ -89,7 +89,7 @@ with outputFile:
                " * properties however follow the naming scheme defined in the W3C automotive business group vehicle <a href='http://w3c.github.io/automotive-bg/data_spec.html'>data specification</a>\n"
                " * The pattern each interface is 'const DOMString AMBProperty = DBusProperty' where 'AMBProperty' is the internal name and 'DBusProperty' is the DBus property name.\n"
                " *\n"
-               " * For documentation on the interface and members, please see amb.fidl or the AMB DBus documentation.\n")
+               " * For documentation on the interface and members, please see the \ref dbus_api.\n")
        header += " */\n\n"
        outputFile.write(header)
        for iface in interfaces: