Recent Changes - Search:

edit SideBar

To Do List for the Accessors Project

Key:

  • Completed
  • To Be Checked
  • In Progress
  • Urgent
  • Later

General

  • Life Cycle Management
    • Define setTimeout, setInterval, clearTimeout, clearInterval in commonHost and then keep track of timeouts and intervals.
    • Merge common code from nodeHost.js, capeCodeHost.js and duktapeHost.js into commonHost.js.
      • nodeHost.js needs both instantiate() and instantiateAndInitialize() because we need to bind require so that require looks in the nodeHost/ directory. Is there a way around this
      • Migrate Command Line Arguments from host-specific code to processCommandLineArguments() in commonHost. Node and Nashorn are using this.
  • We need an accessor and module registry to avoid naming conflicts. A mechanism should be provided for "publishing" accessors. Hosts should provide utilities like npm for installing modules. See Accessor Registration.
  • How to support graceful degradation when a required module is not available? Optional ports? See Mutable.
  • Need version management for hosts, accessors, and modules. In particular:
    • Check compatibility at run time between accessors, hosts, and modules.
    • Be able to invoke multiple versions of a module in the same executable.
  • Some approach to testing a physical thing without the physical thing is needed. See Testing -> Test Doubles
  • Figure out the "this" warnings in Coverity Scan
    • TestSpontaneous.js:
      exports.initialize = function () {
          count = 0;
          // Need to record 'this' for use in the callback.
          var thiz = this;
        CID 157082 (#1 of 1): Explicit this expected (EXPLICIT_THIS_EXPECTED)implicit_this_used: Calling function setTimeout with implicit 'this' argument when explicit 'this' is expected.
          handle = setTimeout(function () {
              count += 1;
              thiz.send('output', count);
          }, this.getParameter('interval'));
      };
    • How to access the correct this inside a callback (Stackoverflow) suggests using bind/
    • Current status is that the Duktape2 implementation of setTimeout() was trigging this, so we removed that implementation from the files we submit to Coverity
  • Figure out some sort of debug mechanism so at run time, we can enable and disable debug messages in the hosts.

Documentation

  • We need a better Getting Started document for accessors.
  • We need a tutorial document on how to write accessors. This should go through examples like those in the test library, including explaining how to define local variables in accessors, and how to define variables that are visible to subclasses (see test/TestAccessor.js and test/TestInheritance.js). See Tutor 2017 Tutorial.
  • Update the jsdoc output to include links to code coverage page
  • Update the jsdoc and ptdoc output to include links to tests and demos
  • Update the CapeCode tour in $PTII/ptolemy/configs/capecode/tour.htm

Accessor Management

  • Create subpalettes in Accessors/util that match the Ptolemy II Actors:
    • Utilities
      • Sources
        • Spontaneous Sources
          • Clock: Generate a periodic output. Make this simpler than the DiscreteClock actor: Two parameters: period and value. (Was: TestSpontaneous)
          • SingleEvent (Was: TestSpontaneousOnce)
        • Triggered Sources
          • Counter: Each time an input arrives, produce an output that is a count of the inputs so far. Simpler than Ramp...
      • Sinks
        • Display: This should figure out how to best display the input based on the data type. It should pretty print JSON. The CapeCode implementation should pop up a display window.
      • Discrete Event
        • Merge: Merge some number of input streams into one input stream.
  • Consider creating a colored rating system for accessors that would appear in the JSDoc.
  • Consider creating a table that shows what accessors work with which hosts and that have demos and tests. Ideally, use Javascript that takes Jenkins test results as input, so table updates automatically as new test cases are added. See Status
    • Update the Status page so that it takes into account accessors that extend other accessors.
  • Automatically update Accessor library status page.
  • The PtDoc for the accessors show links for demos, but links point to demos that use JSAccessor, which is all the demos. Instead, we should only link to demos that use a particular accessor.
  • The PtDoc for the accessors should link to tests
  • If we export the Cape Code demos to HTML, then the JSDoc could like to those pages.
    • Running the Cape Code demos might not be that interesting because they typically do actuation and not plotting.

Software Engineering

  • Look for test failures in the ptII and accessors nightly builds
  • Rename modules to follow npm module naming: dashes, not CamelCase.
  • Code Cleaning
  • util.js should not have platform dependency tests, instead we should have a separate module for platform dependencies.
    • There are multiple copies of util.js in the repositoryies. The CapeCode and common util.js files should probably be the same and the others should add host-dependent changes?
      ptolemy/actor/lib/jjs/node/util.js
      org/terraswarm/accessor/accessors/web/hosts/browser/modules/util.js
      org/terraswarm/accessor/accessors/web/hosts/common/modules/util.js
      org/terraswarm/accessor/accessors/web/hosts/cordova/modules/util.js
      org/terraswarm/accessor/accessors/web/hosts/duktape/modules/util.js

Browser Host

  • Browser
  • The implementation of the require() function in the browser host currently doesn't support packages. Only modules defined in a single file are supported.
  • The browser host currently has very few modules implemented. Highest priorities are:
    • httpClient (Beth Osyk, beth@berkeley.edu, has responsibility)
    • webSocket: Mostly complete. See FIXMEs in the file
    • cameras
    • image
    • audio: Need demo audio
    • browser (this module has not yet really been designed)
  • When an accessor extends another, the docs for the base class inputs, outputs, and parameters do not appear in the table. Instead it shows "No description found". See for example test/TestInheritance.
  • test/TestComposite.js shows "undefined" for instances of contained accessors.

CapeCode Host

  • CapeCode should not have duplicate copies of commonHost.js and modules/deterministicTemporalSemantics, instead CapeCode should search $PTII/org/terraswarm/accessor/accessors/web/hosts/common>
    • If users run ./configure, then the accessors repo will be checked out
    • If users execute a model without running ./configure, then the accessors repo should be checked out. If this fails, then CapeCode will not work
    • The installer will have a copy of the accessors repo.
  • Cape Code JUnit Output
  • Error messages are unfriendly. When they give line numbers, they do not identify what file the error occurred in.
    • We should consider have an AccessorError defined in commonHost.js that would defer to the hosts about how to print the stack trace. For example, Cape Code could see if the exception is a Java Exception and if it is, pass a string representation of the Java stack trace. See the code for input handlers in commonHost.js
  • Consider creating a way to run the Cape Code host on a composite accessor from the command line. This would require creating a Java class with a main() method that would take composite accessor(s) as (an) argument(s) and instantiate them. The path for how require() works would need to be set up. See ptolemy.actor.lib.jjs.NashornAccessorHostApplication
  • Review the CapeCode demos
    • AugmentedRealityFeedback
      • demo uses an ImageReader actor. We should have an ImageReader accessor for CapeCode
    • AugmentedRealityVideo
      • demo works under Firefox, not Safari
    • AugmentedRealityFeedback
      • Uses simple tables, is ugly. Use ontology info to synthesize UI. If you have light switch, put a picture of a light switch. Temperature sensor: Use thermometer.
      • Tagless odometery: about knowing where you are, what you are looking at.
    • SpeechSynthesis
    • $PTII/ptolemy/actor/lib/jjs/modules/socket/demo/TCPSocket/TCPSocketImage.xml
      • Sometimes has a corrupt image?
    • Delete useless demos
    • Add descriptions
    • Add authors annotation at the bottom
    • ptolemy/actor/lib/jjs/modules/httpServer/demo/KeyValueStoreClient/KeyValueStoreServer.xml uses ptango
      • Beth wrote: "OK, these test cases are refactored, and the WebServer accessor now outputs parameters and headers:
        • $PTII/ptolemy/actor/lib/jjs/modules/httpClient/test/auto/RESTWithBody.xml
        • $PTII/ptolemy/actor/lib/jjs/modules/httpServer/demo/KeyValueStoreClient/KeyValueStoreServer.xml
        • $PTII/ptolemy/actor/lib/jjs/modules/httpClient/test/auto/RESTPostDataTypes.xml
  • Create a CapeCode Triquetrum product
  • Need a test for AccessorSSHCodeGenerator by sshing to localhost.
  • When the audio demos like $PTII/ptolemy/actor/lib/jjs/modules/audio/demo/Audio/AudioCapture.xml are run on terra.eecs, we get mismatches because there is no audio hardware on the machine. We should gracefully degrade here.
  • In Cape Code, require() and getAccessorCode() should work with jar files without creating temporary copies of files.
    • WebServer Accessor
    • Once we no longer depend on ptango, remove ptango from the Cape Code installer
  • jjs/testing/test/auto/testNestedSuites.js does not run under mocha and it should be moved to a separate mocha/ directory.
  • Accessors
    • Check the status page and add tests.
    • The Mqtt accessors are in a very primitive state. They are barely concept demonstrations. They should be able to handle a much wider range of data types and specifically JSON. They need a lot of work.
  • readURL() in capeCodeHost.js uses ptango. Could it use ptolemy/actor/lib/jjs/modules/httpClient/HttpClientHelper.java instead?
  • Review Memory Leaks

commonHost

  • getResource() is only implemented in Nashorn and CapeCode. getResource() should take a callback. There should be an async version with a timeout and error handler.
  • Monitoring functionality
    • Monitoring Implementation
    • Document
    • Test

Cordova Host

Nashorn Host

  • Invoking (cd $PTII/org/terraswarm/accessor/accessors/web/hosts; java -classpath $PTII ptolemy.actor.lib.jjs.NashornAccessorHostApplication -timeout 10000 hosts/nashorn/test/testNashornHost.js) is non-determinate. (Edward)
  • Refactor NashornAccessorHostApplication to use java.util.concurrent.ScheduleExecutorService (tutorial)
    • In nashornHost.js, processCommandLineArguments() calls System.exit(). In general we should not be calling exit if the code is to be used elsewhere. exit should be disabled, see Sandbox.
    • Interrupt java thread running nashorn script (stackoverflow)
    • It would be helpful if we could use Futures so that we can invoke an Accessor from Java and get back a return value via a Callable. ScheduledExecutorService might provide this.
    • ScheduledExecutorService would possibly make it trivial to implement setTimeout and setInterval
    • In NashornAccessorHostApplication, ActorSubstitute should be renamed to ActorProxy so as to better match the Gang of Four design pattern.
  • Try refactoring capeCodeHost.js so that we have a nashornHost.js that does not include any Ptolemy code. capecode would then require() nashornHost.js
  • Setup JUnit test output
  • Add more tests
  • Add exit handler that invokes wrapup().

Node Host

Duktape Host

  • Set up JUnit test output
  • Use commonHost.js main(), see Command Line Arguments
  • commonHost.js should not attempt to detect the type of accessor host and then require() different files. The fix would be to modify the duktape host so that require() looks in commonHost/modules.
  • Port more accessors to the Maxim Pegasus

Rust Host

Release Products

  • Ptolemy II 11.0 sources, installers
  • CapeCode 1.0
  • @terraswarm/accessors
  • @terraswarm/gdp
    • See $PTII/vendors/gdp/gdp/lang/java/README.txt for how to update.
  • @terraswarm/jsdoc
  • Update copyrights for Node modules that have been checked in See adm/bin/collectLicenses
  • Include ant in the installers$$
  • Test installers on clean installations
    • Linux
    • Mac
    • Windows
      • Eclipse instructions
        • Need to install Cygwin
        • Tell the user to not use the installer
        • No need to check out the accessors repo separately
        • Add the Java path to the beginning of the system path
        • Add Cygwin to the path
        • Docs: Use website does not work.
        • GeneratorRegulatorFMUProtector: Going in to Controller and clicking up link does not work
        • FMU under Windows, need to install Visual Studio
        • Need to edit the Cygwin .bash_profile, not the Windows one.
        • When settng VS170COMNTOOLS, use forward slashes in .bash_profile
      • Support spaces in $PTII

Back to Main Accessors Wiki

Edit - History - Print - Recent Changes - Search
Page last modified on December 22, 2017, at 11:23 AM