Main /
AccessorDemoPolicyWhere to put Cape Code demos in the ptII treeCape Code Host demos specifically for accessors or TerraSwarm should go in Cape Code demos for modules should go into Accessors should be added to http://accessors.org/index.json FIXME: We need to handle hierarchy It is also ok to have your own Demo namingNames should follow the Ptolemy Coding Style
Each demo directory should contain a demo with the same name as the directory.
cd $PTII $PTII/bin/mkptdemo ptolemy/actor/lib/jjs/modules/httpClient/demo/REST2 Multiple Cape Code ModelsEach model directory must have a model with the same name as the directory. If there are multiple models of interest in the directory, then add a LiveLink to refer to the other model(s).
Or use cd $PTII $PTII/bin/mkptlivelinkdemo ptolemy/actor/lib/jjs/modules/httpClient/demo/REST2 See Ptolemy Coding Style for details. Referring to accessors in the modelAccessors should be Ptolemy-independent and should be checked in to the the accessors repo. To check out the repo, see Getting Started. Refer to the accessor using
Note that writing accessors as .js files is preferred. TestingIdeally, each Cape Code demo will have a corresponding test in a nearby Demos that use hardware may be hard to test, consider adding a Testing -> Testing Double like what the camera and serial accessors have. Code GenerationCape Code demos that use only accessors should also have a Accessors should not use NashornNo accessor should use Nashorn. Such an accessor will not be portable, and when we get our security act together with the Ptolemy host, will not run in the Ptolemy/Nashorn host either... An accessor can require a module by name, and the module implementation may use Nashorn. The API of the module should be technology independent, and the designer of that API should be reasonably confident that a Node.js and Nashorn implementation are both feasible. RationaleA description of how things were and why it was a problem There are Ptolemy demos that are duplicated on both the accessors website and in the ptII tree. The right solution is to have the Ptolemy demos and tests only in the ptII tree and to provide links from the accessors website to the svn head of the ptII tree. Reasons:
So, we did the following:
See AlsoBack to Main Accessors Wiki |