~~~~~~~~~~~~~{.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"
}
~~~~~~~~~~~~~
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)
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)
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@/
/*!
- \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>
* \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.
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)
-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.
"config"
path to the bluemonkey configuration script.
-Bluemonkey Javascript API:
+## Bluemonkey Javascript API:
see bluemonkey.idl (installed to @DOC_INSTALL_DIR@/plugins/bluemonkey
/*!
- * \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
*/
/*!
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)
-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
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",
"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.
Default: 1
-AMB Properties:
+## AMB Properties:
DatabaseFile
Type: string
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;
+}
+~~~~~~~~~~~~~
#include "uuidhelper.h"
#include "ambplugin.h"
+#include <dbusplugin.h>
+#include <dbusexport.h>
#include <thread>
int bufferLength = 100;
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)
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);
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})
-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.
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)
-GPS NMEA plugin
+# GPS NMEA plugin {#gpsnmea_plugin}
Version: @PROJECT_VERSION@
This plugin uses NMEA-compatible devices to provide location information to AMB.
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",
"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.
Default: none
-AMB Properties:
+## AMB Properties:
GpsTime
Timestamp in seconds from epoc UTC parsed from the NMEA output.
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)
-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.
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.
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:
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)
-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.
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",
"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.
Default: "false"
-Properties:
+## AMB Properties:
VideoLogging
Turn on and off video logging
--- /dev/null
+/*!
+ * \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
+ */
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)
+++ /dev/null
-PROJECT_NAME = @PROJECT_NAME@
-PROJECT_NUMBER = @PROJECT_VERSION@
-GENERATE_LATEX = NO
-INPUT = @CMAKE_CURRENT_BINARY_DIR@/docs/
-Websocket plugins
+# Websocket plugins {#websocket_plugin}
Version: @PROJECT_VERSION@
The websocket sink and source plugins are designed to relay data between devices and
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",
"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",
"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.
/*!
- * \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/');
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)
-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.
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.