Starting dflow

Now you are ready to roll and use the system. Since, dataflow interfaces are meant to reduce your burden in specifying complex operations in an easy graphical manner, the rest of this tutorial focuses on what you need to know to use the system effectively.

To start the program simply type in dflow at the command prompt. If you have set your path variable appropriately, it should bring up two windows which are shown below.

The main window has a File menu with menu items to load/save data-flows, to load libraries and to exit the program. It also has a canvas, where the data-flow is created, a button to run the data-flow and an options panel, to edit the command line arguments or flags passed to the individual modules in a data-flow. The trash can icon in the canvas is used to delete modules. There is a status bar below the canvas that displays some useful information.

The second window is the module library window. It provides a pallette of modules that can be used to create a dataflow. A new set of modules can be loaded in here. The module library window has three lists of modules called Inputs, Outputs and Mappers. An input module is one that generates data in some form. It usually has only one or more output ports and no inputs. An output module consumes data, maybe displaying it and has one or more input ports. A mapper module is one that transforms data in some form and thereby has at least on input port and one output port.

Instantiating modules

To add a module of a particular kind from the Module Library, all you have to do is select the module from the library window. This action creates an instance of the module in the data-flow. A button representing this module appears on the canvas. Modules can be moved around by dragging them with your mouse. Selecting the file module and the Xdisp module gives you this.

Deleting a module

To delete a module from the data-flow, simply drag the module over the trash can icon.

Making connections

The left mouse button is used to make connections between modules. Select an output port of some module as the connections start point by clicking on it with the left mouse button. The port is highlighted to indicate that it has been selected. Now choose the second end point of the connection, an input port of a second module, by left clicking on this port. If the ports are compatible, a connection is made between them, represented by a dog-legged line between the ports. Multiple connections can be made from one output port, but only one connection shouldbe made to any input port.

Note: Using the middle mouse button on a port gives information about its name and type on the status bar. This information could help in making connections

Deleting a connection

Removing a connection is exactly the same process as making one. Only this time, the right mouse button is used instead. First select the start point of the connection by clicking with the right mouse button on the output port. This port ishighlighted to show that its been selected. Now choose the end point again using the right mouse button. If a connection exists between these two points, it is removed.

The state of dFlow after adding a connection between the file module and Xdisp is shown below. The status bar shows information on Xdisp's input port. This information was obtained by using the middle mouse button on this port.

Running the dataflow

Once you have defined a data-flow, all you need to do is to click the Run button on the interface and you will see the effects of the composite program. In our example the file program runs first and its output is passed on to Xdisp which displays it.

Saving a dataflow

A data-flow network can be saved to disk by selecting the Save option from the File menu.

This brings up a file browser window which can be used to select or type in the name of the file to save the data-flow to. On completing this step, the data-flow is saved to the specified file.

Loading it back

A saved data-flow network can be loaded into the canvas by selecting the Load option under the File menu. This brings up a file dialog as in the previous case and the user can either select a data-flow file (.df file) or enter the name of the file to load. This action adds the data-flow network contained in the file to the one in the canvas.

Note: If its necessary to move a block of modules as a unit, this can be done as follows. Using the left mouse button to describe a rectangular area on the canvas. First click to define the upper lefr corner then click to specify the lower right corner. This corner can be adjusted by repeatedly using a left mouse click. To move the region within the rectangle to another location in the canvas, use the middle mouse button. The right mouse button cancels or terminates the operation. This feature has not been fully tested!

Starting over

To start over with a clean canvas, select the New option from the File menu. This deletes all modules and connection currently on the canvas.

Exiting dflow

To terminate the program, select the Exit option from the File menu. This will result in losing all unsaved changes to the current data-flow.