The following objects provide bundles of functions. An accessor that uses one or more of these modules must declare that requirement using the require tag or JavaScript function.

As these modules are very much under development, these interface definitions may change. For the most up-to-date interface specifications, see the auto-generated doc files for the current version of the Ptolemy II/Nashorn host implementation of these modules.

Reasonably Well-Developed Networking Modules

  • eventbus: Provide publish and subscribe on a local network through a Vert.x event bus.
  • httpClient: Provide support for HTTP clients.
  • socket: TCP socket communication, including optional message framing.
  • webSocket: Provide full-duplex web socket interfaces and functions for web socket servers.

Reasonably Well-Developed Image Processing Modules

  • aprilTags: Recognize and locate AprilTags in images.
  • cameras: Capture images and video from cameras on the host (built in or USB connected).
  • computerVision : OpenCV image processing library, ported to Javascript by UC Irvine and Intel.
  • imageFilters: Filter images to create new images.
  • motionDetector: Detect and locate motion in streams of images.

Node Modules

Some modules designed for Node.js are pure JavaScript with no particular dependency on Node. These can be required as well by an accessor. These include, at least,

Unfinished Modules

In case-insensitive alphabetical order, please

  • audio: Provide access to the host audio hardware.
  • ble: Provide access to Bluetooth Low Energy peripherals.
  • browser: Provide display in the default browser.
  • coapClient: Provide support for CoAP clients.
  • discovery: Provide device discovery for devices on the local area network.
  • GMTK: GMTK accessor that requires some setup through the webSocket or shell accessors
  • IMUSensor: Provides bluetooth connection and packet output from Roozbeh's IMU Sensors.
  • localStorage: Provide persistent key-value storage based on local files.
  • mapManager?: Provides resources for creating maps and combining information across them.
  • mdnsClient?: mDNS and DNS-SD support.
  • mqtt: Provide support for MQTT protocol clients.
  • obd
  • rabbitmq
  • serial : Provide connection to serial ports.
  • ssdpClient: UPnP device discovery.
  • textToSpeech: Provide spoken word output.
  • UDPSocket: Provide interfaces and functions for UDP sockets.

To implement a module, see the Module Specification.

Back to accessor specification

  • The text above was downloaded from https://accessors.org/wiki/Version0/OptionalJavaScriptModules?action=markdown -O OptionalJavaScriptModules.md
  • The text below is from $PTII/doc/jsdoc/topREADMEEnd.md

Where to find this page on the web


How to get the list of Accessors from the TerraSwarm accessors wiki

Currently, https://accessors.org/wiki/Version0/OptionalJavaScriptModules is not world readable.

However, we use the contents of that URL for the first part of this page. What we do is use wget to get a markdown version of that page using cookies and then concatenate it with $PTII/doc/jsdoc/topREADMEEnd.md to create $PTII/doc/jsdoc/topREADME.md. Running "cd $PTII; ant jsdoc" reads topREADME.md.

The script $PTII/doc/jsdoc/makeptjsdocREADME does this for us and is invoked by the continuous integration build.

If you invoke this script by hand, then you will need ~/.terracookies. To create this, install the Cookies Export plugin into Firefox, log on to the TerraSwarm website and export your cookies to that file. Note that the account that you use to log on should remain logged in for the wget command to work.

Then run $PTII/doc/jsdoc/makeptjsdocREADME.

How to update the JSDoc output in your ptII tree

The JSDoc output is in $PTII/doc/js.

To regenerate that directory:

cd $PTII/vendors; git clone https://github.com/jsdoc3/jsdoc.git cd $PTII ./configure ant jsdoc

How to update the JSDoc output on the web

The ptII continuous integration build at http://terra.eecs.berkeley.edu:8080/job/ptIIci/ checks the ptII svn repository every 5 minutes and if there is a change, then "ant jsdoc" is run and then the codeDoc/ directory is copied to https://chess.eecs.berkeley.edu/ptexternal/src/ptII/doc/codeDoc/js/index.html.

See Also

How to update this file

The source for this file is at $PTII/doc/jsdoc/topREADME.md.

It is copied to $PTII/doc/jsdoc/index.html when JSDoc is invoked with -R $PTII/doc/jsdoc/topREADME.md