Recent Changes - Search:

edit SideBar

DirectoryStructure

The current state

The accessors repository contains the following directories:

  • {audio,cameras,...}/: Declarations of the Accessors. Each declaration typically requires a module which must be defined for each accessor host FIXME: consider moving these in to a subdirectory.
  • demo/: Cape Code demos should be in $PTII/org/terraswarm/accessor/demo, see Accessor Demo Policy.
  • doc/: JSDoc output.
  • node_modules/@accessor-hosts/: The accessor host definitions.
    • hosts/browser/ browser host
      • hosts/browser/browser.js The definition of the duktape host. FIXME: consider renaming to browserHost.js
      • hosts/browser/common A symbolic link to ../common/ so that the browser host can find commonHost.js
      • hosts/browser/modules/ Modules for use by the the Browser host
      • hosts/browser/test/ Tests for the Browser, organized by accessor directory.
        • hosts/browser/test/{audio,net,services,test...}/ Browser tests for the corresponding Accessors
        • hosts/browser/test/lib Definitions of packages used by the Browser Tests (chai, mocha, sinon)
    • hosts/common/ common host
      • hosts/common/commonHost.js The definition of the common host. The other accessor hosts use the common host. Note that the Cape Code Host has a copy of this file at $PTII/ptolemy/actor/lib/jjs/commonHost.js.
      • hosts/common/test/
        • hosts/common/test/mocha/ Common host tests that use Mocha
    • hosts/duktape/ duktape host
      • hosts/duktape/duktapeHost.js The definition of the duktape host.
      • hosts/duktape/duktape/ A subset of the Duktape C-source code
      • hosts/duktape/duktape/test/ .js files for testing Duktape
    • hosts/node/ node host
    • hosts/node/nodeHost.js The definition of the node host.
      • hosts/node/node_modules/ Node modules downloaded and installed using npm. These modules are checked in to the repo.
      • hosts/node/test/
        • hosts/node/test/mocha/ Node tests that use Mocha
  • jsdoc/: JSDoc configuration.
  • library/: Used by the browser host to display the accessor library at https://ptolemy.berkeley.edu/accessors/library.
  • test/: Various composite accessors.
  • vendors/: Packages like JSDoc get downloaded to this directory by running ant jsdoc.

The Cape Code Host is in the Ptolemy II tree, below is the layout:

  • $PTII/org/terraswarm/accessor/demo/: Cape Code demos for the accessors. Each demo has its own directory and the name of the model matches the directory name. So we have $PTII/ptolemy/actor/lib/jjs/demo/Factorial/Factorial.xml. These demos are listed in $PTII/ptolemy/configs/doc/completeDemos.htm. See also Accessor Demo Policy.
  • $PTII/org/terraswarm/accessor/test/: Tcl unit tests for JSAccessor.
  • $PTII/org/terraswarm/accessor/JSAccessor.java: The Java file that defines the Ptolemy actor that implements the accessor (JavaDoc
  • $PTII/org/terraswarm/accessor/accessors/web/: The accessors repository gets checked out here by running (cd $PTII/;./configure) and when a JSAccessor actor is loaded.
  • $PTII/ptolemy/actor/lib/jjs/:
    • $PTII/ptolemy/actor/lib/jjs/commonHost.js: The commonHost definition used by the Cape Code host. Note that this file is a duplicate of hosts/common/commonHost.js in the accessors repo (see above).
    • $PTII/ptolemy/actor/lib/jjs/demo/: Ptolemy demos for the JavaScript actor. Each demo has its own directory and the name of the model matches the directory name. So we have $PTII/ptolemy/actor/lib/jjs/demo/Factorial/Factorial.xml. These demos are listed in $PTII/ptolemy/configs/doc/completeDemos.htm. See also Accessor Demo Policy.
    • $PTII/ptolemy/actor/lib/jjs/external/: The definition of the require() function for the Cape Code Host.
    • $PTII/ptolemy/actor/lib/jjs/JavaScript.java: The JavaScript actor, which is the parent actor of JSAccessor. (JavaDoc)
    • $PTII/ptolemy/actor/lib/jjs/modules/: The Cape Code modules (JSDoc)

The modules have layout similar to the audio layout below:

  • $PTII/ptolemy/actor/lib/jjs/modules/audio/: The audio module definition for Cape Code.
    • $PTII/ptolemy/actor/lib/jjs/modules/audio/test/: Tests for the audio module
      • $PTII/ptolemy/actor/lib/jjs/modules/audio/demo/: Cape Code demos for the audio module. Each demo has its own directory and the name of the model matches the directory name. So, we have $PTII/ptolemy/actor/lib/jjs/modules/audio/demo/Audio/Audio.xml. These demos are listed in $PTII/ptolemy/configs/doc/completeDemos.htm. See also Accessor Demo Policy.
      • $PTII/ptolemy/actor/lib/jjs/modules/audio/test/auto: Cape Code models that test the audio module
      • $PTII/ptolemy/actor/lib/jjs/modules/audio/test/junit: JUnit tests that run the Cape Code models in auto/.
  • $PTII/ptolemy/actor/lib/jjs/node_modules/: unmodified versions of Node.js modules that have no dependencies on Node.js so that they will work in Nashorn.
  • $PTII/ptolemy/actor/lib/jjs/node: modified versions of Node.js modules that remove dependencies on Node.js so that they will work in Nashorn and also have various adaptations of the code.
  • $PTII/ptolemy/actor/lib/jjs/test/: Tests for the JavaScript actor
    • $PTII/ptolemy/actor/lib/jjs/test/auto: Ptolemy models that test the JavaScript actor
    • $PTII/ptolemy/actor/lib/jjs/test/junit: JUnit tests that run the Cape Code models in auto/.

See Also


Back to Main Accessors Wiki

Edit - History - Print - Recent Changes - Search
Page last modified on April 30, 2017, at 02:15 pm