DRAFT

Contributors

Ben Allan, Rob Armstrong, Colin Potter

Change history

Expected results

Lots more to be added. See TODO-list and then get inspired to extend here.
E.g.
RepositoryService, SemaphoreService,AboutService, HelpService, GeneralDialogService, control of Nestable containers, Port property hints (rendering),
component property hints (rendering), framework properties (rendering). GlobalResourceStringService ala Argonne
integrated with parameter dialog wire protocol. 

Appendix A: Version 0 command Line and wire protocol

The line-oriented string API is identical in the Java and C++ implementations of CCAFFEINE. The table below is an annotated version of the syntax and semantics described by the "help" command of the command-line interpreter. Arguments given in square brackets are [optional]. Arguments in angle brackets are <required>. Commands may be abbreviated to the minimum number of characters needed to be unique among possible commands. Class and instance name arguments are fuzzy matched (watch out!) while Port names must be specified exactly. The parser is case sensitive.
Framework control line commands (with aliases) and meanings
Aliases Arguments and Description
help, ? arguments: [string token]

Prints the help of one or all commands. This table is the annotated version of the "help" output.

exit, bye, quit, x arguments: [string token]

Exits the parser, returning control to the parser caller. If string is given, it is converted to an integer return value.

connect arguments: <using instance> <used Port name> <providing instance> <provided Port name>

Connect two components in the arena. NOTE! According to the draft specification, either or both components may do any of the following when receiving the ConnectionEvent after the connection is made: immediately use the connected port and delete it or other ports, add new ports, or nearly anything else. Expect surprises when using new components.

configure, parameters arguments: <instance> <parameterPortName> <parameterName> [newValue]

Query (or set new value) of named parameter (field) in the named port of the named component instance. The special field (parameterName) ALL is recognized (when newValue is omitted) and causes the framework to send back a full description of the port as outlined in Appendix B.

display arena List component instances known in the arena. (not expected to remain in future releases, see arena below)
display pallet List component classes available in the pallet. (not expected to remain in future releases, see pallet below)
display component arguments: <instanceName>

Show class name and ports defined for the named instance in the arena. (not expected to remain in future releases, see show below)

display chain arguments: <instanceName>

List all connections in the arena. The instance name given is irrelevant. Connections are grouped by their 'using' component. Connections with a releasePort() call outstanding are listed as ACTIVE. (not expected to remain in future releases, see links below)

go, run arguments: [instanceName portName]

Execute the go() function of the named port on the named instance.

Presently, if the names are omitted, all Go ports in the arena are fired in an arbitrary sequence.

create, instantiate, pulldown arguments: <className> [instanceName]

Add an instance of named class to the arena. The instance name may be supplied. If not, a unique instance name will be generated from the class name.

pallet, classes List component classes available in the pallet.
arena, instances List component instances known in the arena.
remove arguments: <instanceName>

Delete the named instance from arena. Probably a very buggy thing to do in alpha releases of the framework.

nuke Destroy all of the components in the arena. Probably a very buggy thing to do in alpha releases of the framework.
path arguments: [keyword] [directory/path]

Manipulate the path searched for CCA components. With no arguments, displays the current path. Keyword init initializes the path from env(CCA_COMPONENT_PATH). Keyword append/prepend followed by a directory name extends the path to include that directory. Keyword set followed by a shell-style path replaces the current search path with a new one.

repository arguments: <keyword> [repositoryClassName]

Keyword list returns the known components in the repository that are not yet loaded. Keyword get followed by a classname returned from repository list dynamically loads the class into the framework. Keyword info followed by a className gives the metadata associated with the className. (Info is not yet implemented).

links (not implemented) List all connections in the arena, grouped by using component. Connections with a releasePort() call outstanding are listed as ACTIVE. (Replacement for "display chain".)
show (not implemented) arguments: <instanceName>

Show class name and ports defined for the named instance in the arena.

Appendix B: Generic Configuration Parameter Dialog

We provide a basic, UI-independent parameter input request protocol that lets the component developer assume primitive input sanity. One GUI rendering of the input request protocol, the paramDialog, is described in the second table below. The first table below gives the protocol itself, the line-oriented commands sent from the framework to the GUI. The UI optional response to these commands is to send back configure commands for one or more of the fields of the parameter dialog according to the description in Appendix A.

The protocol could be easily replaced with a single dialog display command using an XML description of the parameter input request. The series of commands is sent in an order that will allow any reasonable object-oriented UI implementation to build temporary data structures needed to negotiate with the user.

The first shortcoming of the protocol is that it may need to have inserted a lead argument to all commands which lets the UI discriminate among multiple containers. I.e. everywhere in the protocol that arguments instance port appear we may need to extend to containerInstance instance port . The second shortcoming of the protocol is that it requires the UI implementation to associate each paramField received with the most recently received paramTab in the given dialog. It would be preferable to include a tabName in the arguments associated with individual fields.

UI-independent parameter request commands from framework to GUI
command arguments and explanation
paramDialog arguments: <instanceName> <portName> <dialogTitle...>

Inform the UI that the framework wants a dialog to get the values of one or more scalar variables (parameter fields) from the user. Each port of type ParameterPort on a CCA instance is associated with a separate dialog. There may be several such ports, uniquely named, per instance. The dialogTitle is a string terminated by the newline. It cannot be empty.

paramTab arguments: <instanceName> <portName> <groupTitle...>

When the dialog has lots of fields, they need to be broken up into groups of more closely related values. This is typically graphically rendered as a tabbed dialog or other series of panels. The groupTitle is a string, as the dialog title. It cannot be empty.

paramField arguments: <instanceName> <portName> <fieldType> <fieldName>

Add a new field to the most recently defined group. FieldType is one of: DOUBLE, INT, FLOAT, LONG, BOOL, and STRING.

paramPrompt arguments: <instanceName> <portName> <fieldName> <promptString...>

With each field is a (hopefully concise) string to clue the user about what is reqested. The promptString cannot be empty.

paramCurrent arguments: <instanceName> <portName> <fieldName> <value...>

Each field has a current value. Only in the case of un-enumerated STRING fields is it possible that the value is empty, in which case the degenerate form of the command will occur:

arguments: <instanceName> <portName> <fieldName>

paramDefault arguments: <instanceName> <portName> <fieldName> <value...>

Each field has a default value. The description is as for paramCurrent.

paramNumberRange arguments: <instanceName> <portName> <fieldName> <low> <high>

The numerical field types have lower and upper bounds. The UI must use these to filter out bogus input.

paramStringChoice arguments: <instanceName> <portName> <fieldName> <string...>

For STRING parameters which are limited to a selection (such as from a pulldown list) each choice of value is sent in a separate command of this form.

paramHelp

arguments: <instanceName> <portName> <fieldName> <string...>

Each field may have a longer explanation associated with it. That explanation is in the form of a string. It should not be rendered by default, but only when the user asks for it.

paramEndDialog arguments: <instanceName> <portName>

This optional command tells the UI that the framework is done sending information about the dialog specified by instance and port. The UI may choose to render the dialog partially as commands are received from the framework. When a paramEndDialog is received, the UI must render, if it has not already. The UI might, if a reasonable timeout has expired since the last command wrt the dialog was received, assume the dialog request is complete and render anyway.