Accessor: dashboard/UIComponent

dashboard/UIComponent

This interface applies to accessor which are designed for interaction with a seperate user interface app. Such an accessor produces a web component for instantiation in the user interface, and controls the web component's behavior once instantiated in the UI app.

An accessor implementing this interface should produce the following JSON messages on its componentUpdate port. Note: socketID 0 should correspond to the websocket used by dashboard to send its "start" message, which is assumed to be received before the implementing accessor is initialized.

Upon initialization: { "socketID": 0, "message": { "id": "system", "component": } }

After receiving a "ready" message from the initialized component (which will be tagged with this accessor's componentID) communication to the component may be performed with: { "socketID": , "message": { "id": , "update": } }

Version:
  • $$Id$$
Author:
  • Matt Weber
Source:
Inputs:
Name Type Description
userInput A message produced by an implementing accessor's web component to inform the accessor of user interaction with the instantiated web component.
Outputs:
Name Type Description
componentUpdate A websocket message produced by an implementing accessor to communicate with the dashboard app. Upon initialization produce a websocket message containing the javascript escaped string of the web. Also used to inform the accessor's instantiated web component of control updates.
Parameters:
Name Type Description
componentID string A unique ID an implementing accessor uses to configure communication with its web component. The implementing accessor should replace all instances of the special string '__componentID__' in its web component, ensuring web socket messages sent back to the implementing accessor for the instantiated component are labled with the corresponding ID. All communication to and from the instantiated web component will be tagged with this ID.
synchronous boolean True if the implementing accessor should use a synchronous version of getResource to acquire its web component. False if the implementing accessor should use an asynchronous version of getResource.
componentURI string The URI of the web component from which this accessor should use getResource to acquire the component.

dashboard/UIComponent

This interface applies to accessor which are designed for interaction with a separate user interface app. Such an accessor produces a web component for instantiation in the user interface, and controls the web component's behavior once instantiated in the UI app.

An accessor implementing this interface should produce the following JSON messages on its componentUpdate port. Note: socketID 0 should correspond to the websocket used by dashboard to send its "start" message, which is assumed to be received before the implementing accessor is initialized.

Upon initialization: { "socketID": 0, "message": { "id": "system", "component": } }

After receiving a "ready" message from the initialized component (which will be tagged with this accessor's componentID) communication to the component may be performed with: { "socketID": , "message": { "id": , "update": } }

Version:
  • $$Id$$
Author:
  • Matt Weber and Chadlia Jerad
Source:
Inputs:
Name Type Description
userInput A message produced by an implementing accessor's web component to inform the accessor of user interaction with the instantiated web component.
Outputs:
Name Type Description
componentUpdate A websocket message produced by an implementing accessor to communicate with the dashboard app. Upon initialization produce a websocket message containing the javascript escaped string of the web. Also used to inform the accessor's instantiated web component of control updates.
Parameters:
Name Type Description
componentID string A unique ID an implementing accessor uses to configure communication with it's web component. The implementing accessor should replace all instances of the special string '__componentID__' in its web component, ensuring web socket messages sent back to the implementing accessor for the instantiated component are labled with the corresponding ID. All communication to and from the instantiated web component will be tagged with this ID.