Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: convert for internal links

Table of Contents
maxLevel2

The My Picos The main page will be at  httpat http://localhost:80803000/#/ , assuming that you have used the default port and are running the pico-engine on your own machine.

Overview of all your picos

When you visit this page, you will see a rounded rectangle which represents your owner pico. It can root pico.

If you have created child picos, they will also be visible on this page, each joined to its parent pico by a solid black 3px line. Each pico can be dragged to move it to a different location on the canvas. You can also drag a corner to reshape and resize it.Image Removed

...

More detail for a single pico

A single left mouse click on the name of the rounded rectangle pico will open it up for a more detailed look at the properties of your owner root pico.Image Removed

...

UI tabs

The information about the pico is organized with tabs.

About tab

...

The About tab shows the pico's

...

engine ui event channel identifier (ECI), and its name. When a pico is created, it is given a system self ECI and an engine ui ECI. Creating a new ECI is done in the Channels tab, described below.

This tab allows you to change

...

a pico's display name

...

and/or color. Make changes to the text box and/or the color picker, and then send the pico the engine_ui:box event by clicking on the Save button provided.

This tab also shows

...

the parent pico if it has one

...

. The root pico has no parent.

Next, this tab shows you a list of all of its direct children. For each child there is a link to switch from this pico to the child pico, and a link to delete the child pico. Only a parent pico is allowed to delete a child pico. If the child pico itself has children, then the delete link will not be shown. The name of each direct child pico is also shown in this list.

Finally, there is a form which you can use to manually create a direct child pico. Fill in the desired name and choose a color, then send the pico the engine_ui:new event by clicking on the Add button provided. After you do so, the UI will refresh to show the new child pico in the list of children.

Rulesets tab

This tab allows you to see and control which rulesets are installed in the pico.

...

It begins with a list of the rulesets currently installed in the pico. A newly created pico will come with three rulesets installed.

  • io.picolabs.pico-engine-ui which allows picos to interact with the UI. This ruleset cannot be deleted.

  • io.picolabs.subscription which allows the pico to establish a two way relationship with another pico. This ruleset can be deleted if not needed.

  • io.picolabs.wrangler which is a kind of operating system for the pico, described more fully in the Wrangler page. This ruleset cannot be deleted.

A checkbox to the left of each ruleset identifier (RID) when checked will allow you to see

...

more information about this ruleset, and buttons to "flush" and "uninstall" the ruleset. You will see the URL from which the ruleset was installed. If you know the content of the resource at that URL has changed, you should click the "flush" button. When you do so, you will see that its hash changes, along with the "Last flushed" date.

There is also an input box that you can use to install a ruleset from a raw KRL source code URL.

...

The ruleset will be compiled, and then if there are no errors, the ruleset will be installed in the pico.

Channels tab

This tab allows you to manage the channels owned by this pico.

...

The first section shows a list of all of the pico's channels. Each channel has an identifier (ECI) and tags, and policies. Clicking on the checkbox beside the ECI shows you the policies for the channel. See the Managing Channels page for an in-depth discussion of channels.

Channels can be deleted (with the exception of family channels). Deletion cannot be undone, so be careful. Doing so revokes the ability of outside applications to use the ECI again.

...

The form at the bottom of the tab allows you to specify tags, an event policy, and a query policy. Clicking on the "Add" button creates a new channel for your pico.

Logging tab

This tab allows you to see detailed logging information concerning events and queries sent to the pico

...

within the last twelve hours.

...

This tab will let you see the latest transactions (either events or queries) which the pico has processed. Click on the checkbox to see detailed logging.

See also the Developer UI -- Logging tab page.

Testing tab

The Testing tab displays a list of rulesets which are installed in the pico.

...

...

You first choose the ECI that you want to use, then check the box beside a ruleset RID

...

to open a list of forms which will permit you to supply arguments and send queries and/or events to the pico. The results of these queries and events will be displayed on the right side of the tab's display area.

...

Subscriptions tab

The tests in the Testing tab are generated from information that you, the developer of a ruleset, define in your ruleset. The information must be bound to the name __testing and that name must be shared by a pragma in the meta block of your ruleset. That is, the meta block must specify that the ruleset shares __testing.

For example, consider this annotated screenshot of a Testing tab. The pico has three rulesets installed. Only the ruleset whose RID is timing_tracker has its checkbox checked, so only its tests are showing. We just clicked on the link "__testing" so the Results area is showing the __testing map itself.

Notice that this ruleset has defined four tests:

  1. the query for __testing
  2. the query for entries
  3. the timing/started event with two event attributes, named number and name
  4. the timing/finished event with one event attribute, named number

By following the green arrows you can see which part of the __testing map specified each test.

Image Removed

The timing_tracker ruleset meta and global blocks are shown here:

Code Block
ruleset timing_tracker {
  meta {
    shares entries, __testing
  }
  global {
    entries = function() {
      ent:timings.defaultsTo({}).values()
    }
    __testing = { "queries": [ { "name": "__testing" },
                               { "name": "entries" } ],
                  "events": [ { "domain": "timing", "type": "started",
                                "attrs": [ "number", "name" ] },
                              { "domain": "timing", "type": "finished",
                                "attrs": [ "number" ] }] }
  }

The name __testing is bound to a map with two keys, "queries" and "events", each of which is an array of maps.

Each query map has a key "name" for the shared name bound to a function or value, and if needed, a key "args" whose value is an array of argument names for a function.

An event map has keys "domain" and "type" for the domain and type of the event, and if needed, a key "attrs" whose value is an array of attribute namesThe Subscriptions tab shows the list of subscriptions in which the pico participates. Checking the box shows more detail about the subscription. There is a set of input boxes on this tab to allow you to initiate subscription requests, and respond to pending subscription requests.