[Documentation] - restructure of how documentation is generated
authorKevron Rees <tripzero.kev@gmail.com>
Thu, 15 Jan 2015 15:30:54 +0000 (07:30 -0800)
committerKevron Rees <tripzero.kev@gmail.com>
Thu, 15 Jan 2015 15:31:00 +0000 (07:31 -0800)
26 files changed:
README.md
docs/CMakeLists.txt
docs/Doxyfile.in
docs/libamb.in
docs/mainpage.in.idl
plugins/CMakeLists.txt
plugins/bluemonkey/README
plugins/bluemonkey/bluemonkey.in.idl
plugins/database/CMakeLists.txt
plugins/database/README
plugins/database/databasesink.cpp
plugins/dbus/CMakeLists.txt
plugins/dbus/README
plugins/gpsnmea/CMakeLists.txt
plugins/gpsnmea/README
plugins/obd2plugin/CMakeLists.txt
plugins/obd2plugin/README
plugins/opencvlux/CMakeLists.txt
plugins/opencvlux/README
plugins/plugins.in.idl [new file with mode: 0644]
plugins/websocket/CMakeLists.txt
plugins/websocket/Doxyfile.in [deleted file]
plugins/websocket/README
plugins/websocket/protocol.idl
plugins/wheel/CMakeLists.txt
plugins/wheel/README

index 96f4623..8de7054 100644 (file)
--- a/README.md
+++ b/README.md
@@ -60,7 +60,7 @@ You will also need to edit your config to enable the Qt-based mainloop:
 
 ~~~~~~~~~~~~~{.json}
 {
-       "mainloop" : "/usr/lib/i386-linux-gnu/automotive-message-broker/qtmainloopplugin.so",
+       "mainloop" : "/usr/lib/x86_64-linux-gnu/automotive-message-broker/qtmainloopplugin.so",
        "plugins" : "/etc/ambd/plugins.d"
 }
 ~~~~~~~~~~~~~
index 66c9772..8681085 100644 (file)
@@ -11,11 +11,7 @@ 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)
-       configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.idl.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.idl @ONLY)
-       configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.mainpage.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.mainpage @ONLY)
-       add_custom_target(libamb_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(idl ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.idl WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/docs/dbus COMMENT "Generating DBus API documentation with Doxygen" VERBATIM)
-       add_custom_target(mainpage_docs ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile.mainpage WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/docs COMMENT "Generating mainpage documentation with Doxygen" VERBATIM)
+       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)
 
        #generate mappings documentation
        configure_file (${CMAKE_CURRENT_SOURCE_DIR}/libamb.in ${CMAKE_CURRENT_BINARY_DIR}/libamb.h @ONLY)
@@ -23,8 +19,7 @@ if(DOXYGEN_FOUND)
        add_custom_target(genmappings_libamb
                                                                                python ${CMAKE_SOURCE_DIR}/tools/genmapping --output ${CMAKE_CURRENT_BINARY_DIR}/ambdbusmappings.idl ${dbus_mapping_headers}
                                                                                COMMENT "running genmapping")
-       add_dependencies(libamb_docs genmappings_libamb)
-       add_dependencies(idl genmappings_libamb)
+       add_dependencies(docs genmappings_libamb)
 
 endif(DOXYGEN_FOUND)
 
index ae6369e..df3a536 100644 (file)
@@ -1,3 +1,9 @@
 PROJECT_NAME = @PROJECT_NAME@
 PROJECT_NUMBER = @PROJECT_VERSION@
-INPUT = @CMAKE_SOURCE_DIR@/lib/ @CMAKE_CURRENT_BINARY_DIR@/
+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@/
index f2197dd..67c4eb9 100644 (file)
@@ -1,5 +1,6 @@
 /*!
- \mainpage Automotive Message Broker Library Documentation
+ \file libamb.in
+ \section libamb Automotive Message Broker Library Documentation
  \version @PROJECT_VERSION@
 
  <a href="../../html/index.html">Back to AMB Documentation Main</a>
index 186438e..86bfea8 100644 (file)
@@ -4,9 +4,8 @@
 * \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
-* - <a href="../amb/html/index.html">libamb internal API documentation</a> - Developing AMB or AMB plugins
-* - <a href="../plugins/bluemonkey/html/index.html">Bluemonkey Javascript API documentation</a>
-* - <a href="../plugins/websocket/html/index.html">AMB Websocket protocol documentation</a>
+* - \ref libamb - Developing AMB or AMB plugins
+* - \ref plugins - Using Built in AMB plugins
 * - \ref RELEASE.md - Current release notes
 *
 * \section intro Introduction
 * plugins).
 *
 * More information about AMB plugins can be found in the <a href="../amb/html/index.html">library documentation</a>.
-* \section plugins AMB Plugins
-* AMB plugins each have their own usage documentation including any special Properties they define.  Below is a description
-* of several AMB plugins and their documenation:
-* - <a href="../plugins/bluemonkey.README">Bluemonkey</a> - Extensible javascript engine plugin for defining plugin behavior in javascript
-* - <a href="../plugins/database.README">Database</a> - Plugin that logs data in a sqlite database and can play back logs
-* - <a href="../plugins/dbus.README">DBus</a> - Exposes AMB Properties on DBus
-* - <a href="../plugins/gpsnmea.README">GPSNmea</a> - GPS Plugin that provides location position data from NMEA compatible devices
-* - <a href="../plugins/obd2.README">OBD-II</a> - Plugin that provides data from OBD-II compatible vehicles
-* - <a href="../plugins/opencvlux.README">OpenCVLux</a> - Plugin that uses OpenCV to produce ADAS data and perform video logging
-* - <a href="../plugins/websocket.README">Websocket</a> - Both source and sink plugin that uses a websocket protocol to communicate
-* - <a href="../plugins/wheel.README">Wheel</a> - Plugin that generates data using the Logitech G27 racing wheel
 * \section crosswalk Crosswalk Vehicle Extension
 * AMB also comes with a <a href="http://crosswalk-project.org">crosswalk</a> extension that implements the W3C Automotive Business group
 * <a href="https://rawgit.com/w3c/automotive-bg/master/vehicle_spec.html">vehicle</a> and <a href="https://rawgit.com/w3c/automotive-bg/master/data_spec.html">data</a> specifications.
index 32a41be..805679d 100644 (file)
@@ -28,6 +28,20 @@ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/exampleplugins.README DESTINATION ${D
 install (FILES ${CMAKE_CURRENT_BINARY_DIR}/examplesource DESTINATION ${PLUGIN_SEGMENT_INSTALL_PATH})
 install (FILES ${CMAKE_CURRENT_BINARY_DIR}/examplesink DESTINATION ${PLUGIN_SEGMENT_INSTALL_PATH})
 
+
+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)
+
+endif(enable_docs)
+
 add_subdirectory(common)
 
 add_subdirectory(wheel)
index 98ba61f..e40af55 100644 (file)
@@ -1,21 +1,22 @@
-Bluemonkey Source Plugin
+Bluemonkey Plugin                         {#bluemonkey_plugin}
+============
 Version: @PROJECT_VERSION@
 
+[TOC]
+
 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}
+{
+       "name" : "bluemonkey",
+       "path" : "@PLUGIN_INSTALL_PATH@/bluemonkeyplugin.so",
+       "config" : "/etc/ambd/bluemonkey/config.js"
+}
+~~~~~~~~~~~~~
 
-"sources" :
-       [
-               {
-                       "name" : "bluemonkey",
-                       "path" : "@PLUGIN_INSTALL_PATH@/bluemonkeyplugin.so",
-                       "config" : "/etc/ambd/bluemonkey/config.js"
-               }
-       ]
-
-Configuration Key Definitions:
+## Configuration Key Definitions:
 
 "name"
 name of plugin.  This key is not used by the plugin at this moment.
@@ -26,7 +27,7 @@ path to plugin on the filesystem.
 "config"
 path to the bluemonkey configuration script.
 
-Bluemonkey Javascript API:
+## Bluemonkey Javascript API:
 
 see bluemonkey.idl (installed to @DOC_INSTALL_DIR@/plugins/bluemonkey
 
index bddfde5..ab5fde5 100644 (file)
@@ -1,18 +1,22 @@
 /*!
- * \mainpage Automotive Message Broker Library Documentation - Bluemonkey Plugin
+ * \file bluemonkey.idl
+ * \section bluemonkey Bluemonkey Javascript API Documentation
  * \version @PROJECT_VERSION@
  *
- * <a href="../../../html/index.html">Back to AMB Documentation Main</a>
- * \section intro Introduction
+ * \section bluemonkey_intro Introduction
  * Bluemonkey is a javascript rendering engine that allows the scripting of source plugin behavior in javascript.
  * It allows developers a quick way to prototype plugin code as well as a way to create custom properties.
  *
- * \section properties Properties
+ * the bluemonkey script engine is powered by Qt QML's javascript engine.  It supports QObject types as well
+ * as ECMA script (javascript).  All QObject properties, slots, and signals are available in javascript.
+ * \see Qt's QMetaObject system for additional details
+ *
+ * \section bluemonkey_properties Properties
  * Bluemonkey uses internal property names (not DBus API interface names).  These properties are defined in
  * lib/vehicleproperty.h.  There are mappings from AMB internal property names to DBus API properties in the
  * <a href="ambdbusmappings_8idl">mappings documentation</a>.  The mappings comes in handy when you want to implement properties that are
  * exported as an DBus API interface (ie, org.automotive.VehicleSpeed).
- * \section example Example bluemonkey script
+ * \section bluemonkey_example Example bluemonkey script
  * \code
  * var speedProperty = bluemonkey.subscribeTo("VehicleSpeed");
  *
  * });
  * testTimer.start();
  * \endcode
- * \section Javascript API documentation
+ * \section bluemonkey_js_api Javascript API documentation
  * Javascript API documentation is found in bluemonkey.idl and is described using WebIDL.  Plugin configuration documentation can be found in bluemonkey.README.
  */
 
  /*!
- * \file bluemonkey.idl
+ *
  * \name @PROJECT_NAME@ Bluemonkey interface documentation
  * \version @PROJECT_VERSION@
- * \brief the bluemonkey script engine is powered by Qt QML's javascript engine.  It supports QObject types as well
- * as ECMA script (javascript).  All QObject properties, slots, and signals are available in javascript.
- * \see Qt's QMetaObject system for additional details
+ * \brief
  */
 
 /*!
index 7f0dd49..980300b 100644 (file)
@@ -17,12 +17,12 @@ target_link_libraries(databasesinkplugin amb -L${CMAKE_CURRENT_BINARY_DIR}/lib $
 
 install(TARGETS databasesinkplugin LIBRARY DESTINATION ${PLUGIN_INSTALL_PATH})
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/database.README @ONLY)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/database.README.md @ONLY)
 
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/database.in.json ${CMAKE_CURRENT_BINARY_DIR}/database @ONLY)
 
 install (FILES ${CMAKE_CURRENT_BINARY_DIR}/database DESTINATION ${PLUGIN_SEGMENT_INSTALL_PATH})
 
-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/database.README DESTINATION ${DOC_INSTALL_DIR}/plugins)
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/database.README.md DESTINATION ${DOC_INSTALL_DIR}/plugins)
 
 endif(database_plugin)
index 78a5330..c1a38c1 100644 (file)
@@ -1,4 +1,4 @@
-Database plugin
+# Database plugin {#database_plugin}
 Version: @PROJECT_VERSION@
 
 This plugin logs properties in a sqlite database file.  It can also be used as a source to
@@ -10,6 +10,7 @@ cmake -Ddatabase_plugin=On ..
 
 To use the Database plugin, add the following to the "sources" array in /etc/ambd/config:
 
+~~~~~~~~~~~~~{.json}
 {
   "name" : "Database",
   "path" : "@PLUGIN_INSTALL_PATH@/databasesinkplugin.so",
@@ -21,11 +22,12 @@ To use the Database plugin, add the following to the "sources" array in /etc/amb
   "playbackMultiplier" : "1",
   "frequency" : "1"
 }
+~~~~~~~~~~~~~
 
-Configuration Key Definitions:
+## Configuration Key Definitions:
 
 "name"
-name of plugin.  This key is not used by the plugin at this moment.
+name of plugin.
 
 "path"
 path to plugin on the filesystem.
@@ -69,7 +71,7 @@ database will not be written to until it is.
 
 Default: 1
 
-AMB Properties:
+## AMB Properties:
 
 DatabaseFile
 Type: string
@@ -96,3 +98,22 @@ Set to false to turn off playback. This property is mutually exclusive with the
 DatabaseLogging property.  Setting this to true will turn off logging.
 
 Default: false when configuration option "playbackOnLoad" is not set.
+
+
+## AMB DBus Interfaces:
+
+org.automotive.DataLogger
+
+Properties:
+LogFile - Corresponds to "DatabaseFile"
+Logging - Corresponds to "DatabaseLogging"
+Playback - Corresponds to "DatabasePlayback"
+
+~~~~~~~~~~~~~{.idl}
+interface Datalogger
+{
+ attribute DOMString LogFile;
+ attribute boolean Logging;
+ attribute boolean Playback;
+}
+~~~~~~~~~~~~~
index 5a933ef..5888a63 100644 (file)
@@ -5,6 +5,8 @@
 #include "uuidhelper.h"
 #include "ambplugin.h"
 
+#include <dbusplugin.h>
+#include <dbusexport.h>
 #include <thread>
 
 int bufferLength = 100;
@@ -16,6 +18,19 @@ extern "C" void create(AbstractRoutingEngine* routingengine, map<string, string>
        plugin->init();
 }
 
+class DataLogger: public DBusSink
+{
+public:
+       DataLogger(VehicleProperty::Property, AbstractRoutingEngine* re, GDBusConnection* connection)
+               :DBusSink("DataLogger", re, connection, map<string, string>())
+       {
+               wantPropertyVariant(DatabaseLogging, "LogFile", VariantType::ReadWrite);
+               wantPropertyVariant(DatabasePlayback, "Playback", VariantType::ReadWrite);
+               wantPropertyVariant(DatabaseLogging, "Logging", VariantType::ReadWrite);
+       }
+};
+
+
 static void * cbFunc(Shared* shared)
 {
        if(!shared)
@@ -417,6 +432,17 @@ void DatabaseSink::init()
                updateForNewDbFilename();
        }
 
+       routingEngine->subscribeToProperty(DBusConnected, [this](AbstractPropertyType* value)
+       {
+               if(value->name == DBusConnected)
+               {
+                       if(value->value<bool>())
+                       {
+                               amb::Exporter::instance()->exportProperty<DataLogger>(routingEngine);
+                       }
+               }
+       });
+
        DebugOut() << "databaseLogging: " << databaseLogging->value<bool>() << endl;
 
        routingEngine->updateSupported(supported(), PropertyList(), &source);
index c4e6fef..e3cd247 100644 (file)
@@ -25,8 +25,8 @@ set(dbus_mapping_headers ${dbus_mapping_headers} ${CMAKE_CURRENT_SOURCE_DIR}/par
 set(dbus_mapping_headers ${dbus_mapping_headers} ${CMAKE_CURRENT_SOURCE_DIR}/drivingsafety.h CACHE INTERNAL "dbus mapping headers")
 set(dbus_mapping_headers ${dbus_mapping_headers} ${CMAKE_CURRENT_SOURCE_DIR}/personalization.h CACHE INTERNAL "dbus mapping headers")
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/dbus.README @ONLY)
-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/dbus.README DESTINATION ${DOC_INSTALL_DIR}/plugins)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/dbus.README.md @ONLY)
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/dbus.README.md DESTINATION ${DOC_INSTALL_DIR}/plugins)
 
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dbus.in.json ${CMAKE_CURRENT_BINARY_DIR}/dbus @ONLY)
 install (FILES ${CMAKE_CURRENT_BINARY_DIR}/dbus DESTINATION ${PLUGIN_SEGMENT_INSTALL_PATH})
index 2c80dee..f902ffa 100644 (file)
@@ -1,17 +1,19 @@
-DBus plugin
+# DBus plugin                {#dbus_plugin}
 Version: @PROJECT_VERSION@
 
 This plugin provides a nice DBus API to application who want access to AMB data.
 
 To use the DBus plugin, add the following to the "sinks" array in /etc/ambd/config:
 
+~~~~~~~~~~~~~{.json}
 {
        "name" : "dbussink",
        "path" : "@PLUGIN_INSTALL_PATH@/dbussinkplugin.so",
        "frequency" : "60"
 }
+~~~~~~~~~~~~~
 
-Configuration Key Definitions:
+## Configuration Key Definitions:
 
 "name"
 name of plugin.  This key is not used by the plugin at this moment.
index bd1b7e4..2bcbb1d 100644 (file)
@@ -11,8 +11,8 @@ target_link_libraries(gpsnmea amb -L${CMAKE_CURRENT_BINARY_DIR}/lib  amb-plugins
 
 install(TARGETS gpsnmea LIBRARY DESTINATION ${PLUGIN_INSTALL_PATH})
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/gpsnmea.README @ONLY)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/gpsnmea.README.md @ONLY)
 
-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/gpsnmea.README DESTINATION ${DOC_INSTALL_DIR}/plugins)
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/gpsnmea.README.md DESTINATION ${DOC_INSTALL_DIR}/plugins)
 
 endif(gpsnmea_plugin)
index aefcda9..311cc93 100644 (file)
@@ -1,4 +1,4 @@
-GPS NMEA plugin
+# GPS NMEA plugin {#gpsnmea_plugin}
 Version: @PROJECT_VERSION@
 
 This plugin uses NMEA-compatible devices to provide location information to AMB.
@@ -9,6 +9,7 @@ cmake -Dgpsnmea_plugin=On ..
 
 To use the Database plugin, add the following to the "sources" array in /etc/ambd/config:
 
+~~~~~~~~~~~~~{.json}
 {
        "name" : "gpsnmea",
        "path" : "@PLUGIN_INSTALL_PATH@/gpsnmea.so",
@@ -16,8 +17,9 @@ To use the Database plugin, add the following to the "sources" array in /etc/amb
        "baudrate" : "4800",
        "bluetoothAdapter" : "00:00:00:00:00:00"
 }
+~~~~~~~~~~~~~
 
-Configuration Key Definitions:
+## Configuration Key Definitions:
 
 "name"
 name of plugin.  This key is not used by the plugin at this moment.
@@ -41,7 +43,7 @@ If left blank, the system default adapter will be used.
 
 Default: none
 
-AMB Properties:
+## AMB Properties:
 
 GpsTime
 Timestamp in seconds from epoc UTC parsed from the NMEA output.
index 350d2f4..1c64c05 100644 (file)
@@ -15,8 +15,8 @@ target_link_libraries(obd2sourceplugin amb -L${CMAKE_CURRENT_BINARY_DIR}/lib amb
 
 install(TARGETS obd2sourceplugin LIBRARY DESTINATION ${PLUGIN_INSTALL_PATH})
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/obd2.README @ONLY)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/obd2.README.md @ONLY)
 
-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/obd2.README DESTINATION ${DOC_INSTALL_DIR}/plugins)
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/obd2.README.md DESTINATION ${DOC_INSTALL_DIR}/plugins)
 
 endif(obd2_plugin)
index 7dcfa34..c8bdf2e 100644 (file)
@@ -1,4 +1,4 @@
-OBD-II Source Plugin
+# OBD-II Source Plugin {#obd2_plugin}
 Version: @PROJECT_VERSION@
 
 The OBD-II Source plugin uses ELM compatible scantools to get vehicle information.
@@ -10,18 +10,17 @@ OBDPro USB
 
 To use the OBD-II Source plugin, add the following config to your /etc/ambd/config:
 
+~~~~~~~~~~~~~{.json}
+{
+       "name" : "OBD2Source",
+       "path" : "@PLUGIN_INSTALL_PATH@/obd2sourceplugin.so",
+       "device" : "/dev/ttyUSB0",
+       "baud" : "9600",
+       "bluetoothAdapter" : ""
+}
+~~~~~~~~~~~~~
 
-"sources" : [
-               {
-                       "name" : "OBD2Source",
-                       "path" : "@PLUGIN_INSTALL_PATH@/obd2sourceplugin.so",
-                       "device" : "/dev/ttyUSB0",
-                       "baud" : "9600",
-                       "bluetoothAdapter" : ""
-               }
-       ]
-
-Configuration Key Definitions:
+## Configuration Key Definitions:
 
 "name"
 name of plugin.  This key is not used by the plugin at this moment.
@@ -42,7 +41,7 @@ Hardware address of the bluetooth adapter to use.  If value is blank (ie "blueto
 adapter will be used.  The bluetoothAdapter key is only used if the "device" key is also set to a bluetooth device address.
 
 
-Performance
+## Performance
 
 Performance will vary with the scantool and the vehicle.  Here are the current performance numbers per tested scantool
 using the ECUSim2000 from scantool.net:
index da0b8eb..3007de0 100644 (file)
@@ -51,8 +51,8 @@ target_link_libraries(opencvluxplugin amb -L${CMAKE_CURRENT_BINARY_DIR}/lib ${li
 
 install(TARGETS opencvluxplugin LIBRARY DESTINATION ${PLUGIN_INSTALL_PATH})
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/opencvlux.README @ONLY)
-set(opencvlux_doc_files ${CMAKE_CURRENT_BINARY_DIR}/opencvlux.README)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/opencvlux.README.md @ONLY)
+set(opencvlux_doc_files ${CMAKE_CURRENT_BINARY_DIR}/opencvlux.README.md)
 install (FILES ${opencvlux_doc_files} DESTINATION ${DOC_INSTALL_DIR}/plugins)
 
 endif(opencvlux_plugin)
index 96c7b2f..11444b8 100644 (file)
@@ -1,6 +1,9 @@
-OpenCV "lux" plugin
+# OpenCV "lux" plugin {#opencvlux_plugin}
+
 Version: @PROJECT_VERSION@
 
+## Introduction
+
 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.
@@ -13,6 +16,7 @@ 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}
 {
   "name" : "OpenCV LUX",
   "path" : "@PLUGIN_INSTALL_PATH@/opencvluxplugin.so",
@@ -23,10 +27,11 @@ To use the OpenCV plugin, add the following to the "sources" array in /etc/ambd/
   "opencl" : "false",
   "device" : "0"
 }
+~~~~~~~~~~~~~
 
 NOTE: some features require the qtmainloop to be running.  see the main README for details.
 
-Configuration Key Definitions:
+## Configuration Key Definitions:
 
 "name"
 name of plugin.  This key is not used by the plugin at this moment.
@@ -90,7 +95,7 @@ open or closed.  If closed for a period of time, DriverDrowsiness will change to
 Default: "false"
 
 
-Properties:
+## AMB Properties:
 
 VideoLogging
 Turn on and off video logging
diff --git a/plugins/plugins.in.idl b/plugins/plugins.in.idl
new file mode 100644 (file)
index 0000000..9b9b015
--- /dev/null
@@ -0,0 +1,20 @@
+/*!
+ * \section plugins AMB Plugin documentation
+ *
+ * \section intro Introduction
+ * AMB plugins each have their own usage documentation including any special AMB Properties or DBus interfaces they define.  Below is a description
+ * of several AMB plugins and their documenation:
+ * - \ref bluemonkey_plugin - Extensible javascript engine plugin for defining plugin behavior in javascript
+ * - \ref database_plugin - Plugin that logs data in a sqlite database and can play back logs
+ * - \ref dbus_plugin - Exposes AMB Properties on DBus
+ * - \ref gpsnmea_plugin - GPS Plugin that provides location position data from NMEA compatible devices
+ * - \ref obd2_plugin - Plugin that provides data from OBD-II compatible vehicles
+ * - \ref opencvlux_plugin - Plugin that uses OpenCV to produce ADAS data and perform video logging
+ * - \ref websocket_plugin - Both source and sink plugin that uses a websocket protocol to communicate
+ * - \ref wheel_plugin - Plugin that generates data using the Logitech G27 racing wheel
+ *
+ * \section plugins_docs Additional Plugin Documentation
+ * In addition to the plugin documentation listed above, some plugins have additional information.  Here are some links:
+ * - \ref bluemonkey
+ * - \ref websocket
+ */
index 4da95b2..d5fa5cc 100644 (file)
@@ -42,22 +42,11 @@ 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 @ONLY)
+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)
 
-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/websocket.README DESTINATION ${DOC_INSTALL_DIR}/plugins)
+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)
 
-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(websocket_docs ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-                                                                                       COMMENT "Generating Websocket protocol documentation with Doxygen" VERBATIM)
-
-               install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${DOC_INSTALL_DIR}/plugins/websocket COMPONENT Docs)
-               install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test DESTINATION ${DOC_INSTALL_DIR}/plugins/websocket COMPONENT Docs)
-       endif(DOXYGEN_FOUND)
-
-endif(enable_docs)
 
 endif(websocket_plugin)
diff --git a/plugins/websocket/Doxyfile.in b/plugins/websocket/Doxyfile.in
deleted file mode 100644 (file)
index ee0e273..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-PROJECT_NAME = @PROJECT_NAME@
-PROJECT_NUMBER = @PROJECT_VERSION@
-GENERATE_LATEX = NO
-INPUT = @CMAKE_CURRENT_BINARY_DIR@/docs/
index d2a255c..3f8ba05 100644 (file)
@@ -1,4 +1,4 @@
-Websocket plugins
+# Websocket plugins {#websocket_plugin}
 Version: @PROJECT_VERSION@
 
 The websocket sink and source plugins are designed to relay data between devices and
@@ -8,9 +8,9 @@ To enable the websocket plugins, run cmake and enable the websocket_plugin optio
 
 cmake -Dwebsocket_plugin=On ..
 
-
 To use the websocket sink plugin, add the following to the "sinks" array in /etc/ambd/config:
 
+~~~~~~~~~~~~~{.json}
 {
        "name" : "websocket sink",
        "path" : "@PLUGIN_INSTALL_PATH@/websocketsink.so",
@@ -21,9 +21,11 @@ To use the websocket sink plugin, add the following to the "sinks" array in /etc
        "cert" : "libwebsockets-test-server.pem",
        "key" : "libwebsockets-test-server.key.pem"
 }
+~~~~~~~~~~~~~
 
 To use the websocket source plugin, add the following to the "sources" array in /etc/ambd/config:
 
+~~~~~~~~~~~~~{.json}
 {
        "name" : "WebsocketSource",
        "path" : "@PLUGIN_INSTALL_PATH@/websocketsource.so",
@@ -33,11 +35,12 @@ To use the websocket source plugin, add the following to the "sources" array in
        "binaryProtocol" : "true",
        "useExtensions" : "true"
 }
+~~~~~~~~~~~~~
 
-Configuration Key Definitions:
+## Configuration Key Definitions:
 
 "name"
-name of plugin.  This key is not used by the plugin at this moment.
+name of plugin.
 
 "path"
 path to plugin on the filesystem.
index 18b46a3..fd94d40 100644 (file)
@@ -1,15 +1,15 @@
 /*!
- * \mainpage Websocket Plugin Protocol Documentation
+ * \section websocket Websocket Plugin Protocol Documentation
  * \version @PROJECT_VERSION@
  *
  * <a href="../../../html/index.html">Back to AMB Documentation Main</a>
- * \section intro Introduction
+ * \section websocket_intro Introduction
  * This document describes the AMB Websocket protocol.  The messages are passed either as JSON or in binary format.  The binary format is
  * defined by the <a href="http://doc.qt.io/qt-5/qjsondocument.html#toBinaryData">Qt project</a>.  The JSON format is described in protocol.idl.
  *
  * For information about the using the plugin with AMB, see <a href="../../websocket.README">the plugin documentation</a>
  *
- * \section example Example javascript
+ * \section websocket_example Example javascript
  * The following is an example of using the websocket protocol in html5.  For a more complete example, see the <a href="../test/index.html">html test</a>.
  * \code
  * socket = new WebSocket('ws://localhost:23000/');
index fddc58c..ad348e3 100644 (file)
@@ -15,6 +15,6 @@ target_link_libraries(wheelsourceplugin amb -L${CMAKE_CURRENT_BINARY_DIR}/lib ${
 
 install(TARGETS wheelsourceplugin LIBRARY DESTINATION ${PLUGIN_INSTALL_PATH})
 
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/wheel.README @ONLY)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/README ${CMAKE_CURRENT_BINARY_DIR}/wheel.README.md @ONLY)
 
-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/wheel.README DESTINATION ${DOC_INSTALL_DIR}/plugins)
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/wheel.README.md DESTINATION ${DOC_INSTALL_DIR}/plugins)
index 85560fd..6424250 100644 (file)
@@ -1,4 +1,4 @@
-Wheel source plugin
+# Wheel source plugin {#wheel_plugin}
 Version: @PROJECT_VERSION@
 
 The wheel source plugin uses the Logitech G27 (or similar) racing wheel for data.
@@ -8,13 +8,15 @@ The wheel source plugin is enabled by default.
 
 To use the wheel source plugin, add the following to the "sources" array in /etc/ambd/config:
 
+~~~~~~~~~~~~~{.json}
 {
        "name" : "WheelSource",
        "path" : "@PLUGIN_INSTALL_PATH@/wheelsourceplugin.so",
        "device" : "/dev/input/js0"
 }
+~~~~~~~~~~~~~
 
-Configuration Key Definitions:
+## Configuration Key Definitions:
 
 "name"
 name of plugin.  This key is not used by the plugin at this moment.