automotive-message-broker  0.14.803
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Classes
bluemonkey.idl File Reference

Go to the source code of this file.

Classes

interface  Navigator
 Entry point for bluemonkey. More...
 
interface  Bluemonkey
 Bluemonkey interface Bluemonkey provides AMB plugin-like interfaces and allows the loading of other modules, timers, and QObject creation. Typical usage is such: More...
 
interface  PropertyInterface
 PropertyInterface represents an interface to an AMB Property. More...
 
interface  Signal
 Signal represents an way to connect to Qt signals and get a javascript callback. More...
 

Variables

automotive-message-broker Bluemonkey interface documentation

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.

Version
0.12.903
See Also
Qt's QMetaObject system for additional details
callback ChangedCallback = void(any value)
 
callback HistoryCallback = void(PropertyInterface[] data)
 

Detailed Description

Bluemonkey Javascript API Documentation

Version
@

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.

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 Also
Qt's QMetaObject system for additional details

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 mappings documentation. The mappings comes in handy when you want to implement properties that are exported as an DBus API interface (ie, org.automotive.VehicleSpeed).

Example bluemonkey script

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();

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.