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)
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)
#generate mappings documentation
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/libamb.in ${CMAKE_CURRENT_BINARY_DIR}/libamb.h @ONLY)
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}/dbus.idl ${CMAKE_CURRENT_SOURCE_DIR}/dbus.idl @ONLY)
+configure_file (${CMAKE_CURRENT_SOURCE_DIR}/mainpage.in.idl ${CMAKE_CURRENT_SOURCE_DIR}/mainpage.idl @ONLY)
PROJECT_NAME = @PROJECT_NAME@
PROJECT_NUMBER = @PROJECT_VERSION@
-INPUT = @CMAKE_CURRENT_SOURCE_DIR@ @CMAKE_CURRENT_BINARY_DIR@/ambdbusmappings.idl
+FILE_PATTERNS = *.fidl
+EXTENSION_MAPPING = fidl=IDL
+INPUT = @CMAKE_CURRENT_SOURCE_DIR@/amb.fidl @CMAKE_CURRENT_BINARY_DIR@/ambdbusmappings.idl
+
--- /dev/null
+PROJECT_NAME = @PROJECT_NAME@
+PROJECT_NUMBER = @PROJECT_VERSION@
+INPUT = @CMAKE_SOURCE_DIR@/docs/mainpage.idl
+IMAGE_PATH = @CMAKE_SOURCE_DIR@/docs/images
+/*!
+* \mainpage Automotive Message Broker DBus API Documentation
+*
+* \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
+* contained in verious DBus paths. The DBus paths are generally organized by
+* /{source}/{zone}/DataType. "source" refers to the AMB source that produces the data. "zone"
+* refers to the zone in which the data type is located in the vehicle or "0" for no zone.
+*
+* The interfaces and data types are documented in <a href="amb.fidl">amb.fidl</a>. Franca IDL
+* tools can be used to generate DBus introspection xml which can be used to generate bindings
+* 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
+*
+* 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
+* Object Paths may change and so it is not appropriate to hard code DBus Object Paths.
+*
+* Here is a pseudo-code example of how the api is to be used:
+*
+* \code
+* var manager = dbus.interface("org.automotive.Manager", "/");
+*
+* var speedObjectPaths = manager.FindObject("VehicleSpeed");
+*
+* var speedObject = dbus.interface("org.automotive.VehicleSpeed", speedObjectPaths[0]);
+*
+* console.log("Vehicle Speed: " + speedObject.Speed);
+* \endcode
+* \section 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
+*
+* '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
+*
+* \code
+* Zone.Front | Zone.Left
+* \endcode
+*
+* (which is '9') may represent the driver position.
+*
+* \code
+* enumeration Zone {
+* None = 0,
+* Front = 1,
+* Middle = 1 << 1,
+* Right = 1 << 2,
+* Left = 1 << 3,
+* Rear = 1 << 4,
+* Center = 1 << 5
+* }
+* \endcode
+*
+* \section 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
+* interface VehiclePropertyType {
+* attribute Double Time readonly
+* attribute Zone Zone readonly
+* method GetHistory(Double beginTime, Double endTime) {
+* out{ Dictionary result}
+* }
+* }
+* \endcode
+*
+* \section 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.
+*
+* Also note that many types have been marked "deprecated" and replaced with the W3C version of the type. Deprecated types should not be used in new projects.
+*
+*/
+
/*! amb.fidl
* \name @PROJECT_NAME@
* \version @PROJECT_VERSION@
* \arg endTime time stamp in Seconds since Unix Epoc
*/
method GetHistory(Double beginTime, Double endTime) {
- out{ Dictionary result}
+ out{ Dictionary result}
}
}
* \brief return supported properties
*/
method List {
- out {array of String objectNames}
+ out {array of String objectNames}
}
/*!
* \return list of object paths that provide the given object Name.
*/
method FindObject {
- in {
- String objectName
- }
- out {
- array of String objectPaths
- }
+ in {
+ String objectName
+ }
+ out {
+ array of String objectPaths
+ }
}
/*!
* except that it takes an addition zone argument and only return the path for that zone.
* \arg String property is the requested property to be retrieved.
* \arg Zone zone is the zone which the object
- * \return string representing the DBus Object path.
+ * \return string representing the DBus Object path.
* Possible errors:
* "org.automotive.Manager.InvalidZone"
* "org.automotive.Manager.ObjectNotFound"
*/
method FindObjectForZone {
- in {
- String objectName
- Zone zone
- }
- out {
- String objectPath
- }
+ in {
+ String objectName
+ Zone zone
+ }
+ out {
+ String objectPath
+ }
}
/*!
* \return list of zones for the given objectName (@see Zone)
*/
method ZonesForObjectName {
- in {
- String objectName
- }
- out {
- array of UInt32 zones
- }
+ in {
+ String objectName
+ }
+ out {
+ array of UInt32 zones
+ }
}
/*!
* \return true if Property exists
*/
method SupportsProperty {
- in {
- String propertyName
- }
- out {
- Boolean supported
- }
+ in {
+ String propertyName
+ }
+ out {
+ Boolean supported
+ }
}
}
/*! Status
* \brief MUST return interior light status for the zone. on = true, off = false
*/
- attribute Boolean Status
+ attribute Boolean Status
}
enumeration ConvertibleRoofStatus {
- closed = "closed",
- closing = "closing",
- opening = "opening",
- opened = "opened"
+ closed = "closed",
+ closing = "closing",
+ opening = "opening",
+ opened = "opened"
}
interface org.automotive.ConvertibleRoof extends VehiclePropertyType {
*/
attribute UInt16 Recline readonly
- /*!
+ /*!
* \brief MUST return
*/
attribute UInt16 Slide readonly
interface IgnitionTime : VehicleCommonDataType {
/*!
- * \brief MUST return time at ignition on
- */
- attribute UInt64 ignitionOnTime readonly
+ * \brief MUST return time at ignition on
+ */
+ attribute UInt64 ignitionOnTime readonly
- /*!
- * \brief MUST return time at ignition off
- */
- attribute UInt64 ignitionOffTime readonly
+ /*!
+ * \brief MUST return time at ignition off
+ */
+ attribute UInt64 ignitionOffTime readonly
}
interface org.automotive.YawRate extends VehiclePropertyType {
}
enumeration Button {
- home = "home",
- back = "back",
- search = "search",
- call = "call",
- end_call = "end_call",
- media_play = "media_play",
- media_next = "media_next",
- media_previous = "media_previous",
- media_pause = "media_pause",
- voice_recognize = "voice_recognize",
- enter = "enter",
- left = "left",
- right = "right",
- up = "up",
- down = "down"
+ home = "home",
+ back = "back",
+ search = "search",
+ call = "call",
+ end_call = "end_call",
+ media_play = "media_play",
+ media_next = "media_next",
+ media_previous = "media_previous",
+ media_pause = "media_pause",
+ voice_recognize = "voice_recognize",
+ enter = "enter",
+ left = "left",
+ right = "right",
+ up = "up",
+ down = "down"
}
enumeration ButtonEventType {
- press = "press",
- long_press = "long_press",
- release = "release"
+ press = "press",
+ long_press = "long_press",
+ release = "release"
}
interface VehicleButton {
- /*!
- * \brief MUST return the button corresponding to the event.
- */
+ /*!
+ * \brief MUST return the button corresponding to the event.
+ */
attribute Button button readonly
- /*!
- * \brief MUST return the type of event
- */
+ /*!
+ * \brief MUST return the type of event
+ */
attribute ButtonEventType state readonly
}
attribute UInt32 AccumulatedEngineRuntime readonly
/*!
- * \brief MUST return distance travelled since the codes were last cleared (Unit: meters)
- */
+ * \brief MUST return distance travelled since the codes were last cleared (Unit: meters)
+ */
attribute UInt32 DistanceSinceCodeCleared readonly
/*!
- * \brief MUST return distance travelled with the malfunction indicator light on (Unit: meters)
- */
+ * \brief MUST return distance travelled with the malfunction indicator light on (Unit: meters)
+ */
attribute UInt32 DistanceWithMILOn readonly
/*!
- * \brief MUST return time elapsed with the malfunction indicator light on (Unit: seconds)
- */
+ * \brief MUST return time elapsed with the malfunction indicator light on (Unit: seconds)
+ */
attribute UInt32 TimeRunMILOn readonly
/*!
- * \brief MUST return time elapsed since the trouble codes were last cleared (Unit: seconds)
- */
+ * \brief MUST return time elapsed since the trouble codes were last cleared (Unit: seconds)
+ */
attribute UInt32 TimeTroubleCodeClear readonly
}
}
enumeration LaneDepartureStatus {
- off = "off",
- pause = "pause",
- running = "running"
+ off = "off",
+ pause = "pause",
+ running = "running"
}
interface org.automotive.LaneDepartureDetection extends VehiclePropertyType {
}
enumeration AlarmStatus {
- disarmed = "disarmed",
- prearmed = "prearmed",
- armed = "armed",
- alarmed = "alarmed"
+ disarmed = "disarmed",
+ prearmed = "prearmed",
+ armed = "armed",
+ alarmed = "alarmed"
}
interface org.automotive.Alarm extends VehiclePropertyType {
}
enumeration ParkingBrakeStatus {
- inactive = "inactive",
- active = "active",
- error = "error"
+ inactive = "inactive",
+ active = "active",
+ error = "error"
}
interface org.automotive.ParkingBrake extends VehiclePropertyType {
+++ /dev/null
-/*!
-* \mainpage Automotive Message Broker DBus API Documentation
-*
-* \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
-* contained in verious DBus paths. The DBus paths are generally organized by
-* /{source}/{zone}/DataType. "source" refers to the AMB source that produces the data. "zone"
-* refers to the zone in which the data type is located in the vehicle or "0" for no zone.
-*
-* The interfaces and data types are documented in <a href="amb.fidl">amb.fidl</a>. Franca IDL
-* tools can be used to generate DBus introspection xml which can be used to generate bindings
-* 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
-*
-* 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
-* Object Paths may change and so it is not appropriate to hard code DBus Object Paths.
-*
-* \section example Usage Example
-* Here is a pseudo-code example of how the api is to be used:
-*
-* \code
-* var manager = dbus.interface("org.automotive.Manager", "/");
-*
-* var speedObjectPaths = manager.FindObject("VehicleSpeed");
-*
-* var speedObject = dbus.interface("org.automotive.VehicleSpeed", speedObjectPaths[0]);
-*
-* console.log("Vehicle Speed: " + speedObject.Speed);
-* \endcode
-*/
--- /dev/null
+/*!
+* \mainpage Automotive Message Broker Documentation
+* \version @PROJECT_VERSION@
+* \section links AMB Documentation Sections
+* - <a href="../dbus/html/index.html">DBus API documentation</a>
+* - <a href="../amb/html/index.html">libamb internal API documentation</a>
+* - <a href="../plugins/bluemonkey/html/index.html">Bluemonkey Javascript API documentation</a>
+*
+* \section intro Introduction
+* Automotive Message Broker (AMB) is a framework for providing applications with standardized access to vehicle data.
+* It uses a plugin architecture to allow customization for different vehicles and devices. Here is a diagram of how
+* AMB is architected:
+* \image html AMBArchitecture.png
+*/
--- /dev/null
+/*!
+ * \mainpage Automotive Message Broker Library Documentation - Bluemonkey Plugin
+ * \version 0.12.903
+ * \section 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
+ * 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
+ * \code
+ * var speedProperty = bluemonkey.subscribeTo("VehicleSpeed");
+ *
+ * var testTimer = bluemonkey.createTimer();
+ * testTimer.interval = 3000;
+ * testTimer.singleShot = false;
+ * testTimer.timeout.connect(function() {
+ * //VehicleSpeed
+ * speedProperty.value = Math.floor((Math.random() * 100) + 1);
+ * });
+ * testTimer.start();
+ * \endcode
+ * \section 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.
+ */
+
+ /*!
+ * \name automotive-message-broker Bluemonkey interface documentation
+ * \version 0.12.903
+ * \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 Entry point for bluemonkey
+ */
+partial interface Navigator {
+ readonly attribute Bluemonkey bluemonkey;
+};
+
+/*!
+ * \brief Bluemonkey interface
+ * Bluemonkey provides AMB plugin-like interfaces and allows the loading of other modules, timers, and QObject creation.
+ * Typical usage is such:
+ * \code
+ * var speedProperty = bluemonkey.subscribeTo("VehicleSpeed");
+ * bluemonkey.log("Current speed: " + speedProperty.value);
+ * \endcode
+ */
+interface Bluemonkey {
+ /*!
+ * \brief subscribe to a property
+ * \returns PropertyInterface representing the property
+ */
+ PropertyInterface subscribeTo(DOMString propertyName, optional unsigned short zone, optional DOMString source);
+
+ /*!
+ * \brief return the AMB sources that provide propertyName
+ */
+ DOMString[] sourcesForProperty(DOMString propertyName);
+
+ /*!
+ * \brief returns the available zones that contians propertyName
+ */
+ unsigned short[] zonesForProperty(DOMString propertyName);
+
+ /*!
+ * \brief return supported properties
+ */
+ DOMString[] supportedProperties();
+
+ /*!
+ * \brief load another script
+ */
+ void loadConfig(DOMString configFile);
+
+ /*!
+ * \brief load a bluemonkey module
+ */
+ void loadModule(DOMString moduleFile);
+
+ /*!
+ * \brief log text to AMB output
+ */
+ void log(DOMString text);
+
+ /*!
+ * \brief
+ */
+ QTimer createTimer();
+
+ /*!
+ * \brief
+ */
+ QObject createQObject();
+
+ /*!
+ * \brief return logged data between "begin" and "end"
+ */
+ void getHistory(DOMString[] properties, Date begin, Date end, HistoryCallback callback);
+
+ /*!
+ * \brief
+ */
+ void createCustomProperty(DOMString name, any value, optional unsigned short zone);
+
+};
+
+interface PropertyInterface {
+ /*!
+ * \brief
+ */
+ readonly attribute DOMString type;
+
+ /*!
+ * \brief
+ */
+ readonly attribute unsigned short zone;
+
+ /*!
+ * \brief
+ */
+ readonly attribute any value;
+
+ /*!
+ * \brief
+ */
+ readonly attribute DOMString source;
+
+ /*!
+ * \brief
+ */
+ readonly attribute DOMTimestamp timestamp;
+
+ /*!
+ * \brief
+ */
+ readonly attribute Signal changed;
+
+ void getHistory(Date begin, Date end, HistoryCallback callback);
+};
+
+interface Signal {
+ /*!
+ * \brief
+ */
+ void connect(ChangedCallback callback)
+};
+
+callback ChangedCallback = void(any value); ();
+
+callback HistoryCallback = void(PropertyInterface[] data); ();
+
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_SOURCE_DIR}
+ 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
COMMENT "running genmapping")
add_dependencies(bluemonkey_docs genmappings_bluemonkey)
- install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/html DESTINATION ${DOC_INSTALL_DIR}/plugins/bluemonkey COMPONENT Docs)
- install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/latex DESTINATION ${DOC_INSTALL_DIR}/plugins/bluemonkey COMPONENT Docs)
+ install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${DOC_INSTALL_DIR}/plugins/bluemonkey COMPONENT Docs)
endif(DOXYGEN_FOUND)
endif(enable_docs)
PROJECT_NAME = @PROJECT_NAME@
PROJECT_NUMBER = @PROJECT_VERSION@
+GENERATE_LATEX = NO
INPUT = @CMAKE_CURRENT_BINARY_DIR@/docs/
* \section 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
* 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
*/
/*!
+ * \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
void log(DOMString text);
/*!
- * \brief createTimer
+ * \brief create a QTimer
* \return QTimer object
*/
QTimer createTimer();
/*!
- * \brief createQObject
+ * \brief create a QObject
* \return empty QObject
*/
QObject createQObject();
void getHistory(DOMString[] properties, Date begin, Date end, HistoryCallback callback);
/*!
- * \brief createCustomProperty
+ * \brief creates a custom property
*/
void createCustomProperty(DOMString name, any value, optional unsigned short zone);
readonly attribute DOMString type;
/*!
- * \brief zone for this property
+ * \brief zone in the vehicle where this property is located
*/
readonly attribute unsigned short zone;
readonly attribute DOMString source;
/*!
- * \brief timestamp when property was last updated
+ * \brief timestamp when this property last changed
*/
readonly attribute DOMTimestamp timestamp;
void getHistory(Date begin, Date end, HistoryCallback callback);
};
+/*!
+* \brief Signal represents an way to connect to Qt signals and get a javascript callback
+*/
interface Signal {
/*!
- * \brief connect function.
- * Use to connect to signals
+ * \brief connect to this signal.
+ * callback will be called whenever the signal is emitted.
*/
void connect(ChangedCallback callback)
};