FIPER COMPONENT EXAMPLE: plate

Description:

This simple problem is to determine the surface area,
volume, and weight of a thick plate of a specified
shape and size. While this problem could be solved
quite easily using some of the basic existing Fiper
components, the simplicity allows us to demonstrate
the procedures and code for developing Fiper extensions
without the burden of understanding a complex problem.
For this example, a component is developed that accepts
input specifications for the plate and provides the
quantities of interest as outputs.


Supporting Files:

  PlateEditor.java
      Source file for the plate configuration editor.
      This is called from the Design Gateway.

  PlateExecutor.java
      Source file for the plate-properties evaluation
      procedure.  This is called when the component is
      executed (either locally or on a Fiper/Station).

  PlateHandler.java
      Source file for the change-event handler.  This
      is called in response to changes made to the
      model outside of the component which may require
      changes inside the component to maintain model
      validity (or at least the posting of validation
      errors and/or warnings).

  PlatePostProcessor.java
      Source file for the runtime post-processing code.
      This is called to construct the execution results
      summary text for display in the Runtime Gateway
      after a model containing the component has been
      executed.

  plate.gif
      This is the image displayed by icons representing
      the component in the Design and Runtime Gateways.


Instructions:

1) Use the provided build script ('build.sh' on Unix,
   'build.bat' on Windows) to compile the Java source
   files and generate corresponding class files.  You
   MUST have a Java compiler installed, and must set
   the environment variable JAVA_HOME to point to it.
   You must also have Isight installed, and must set
   the environment variable FIPER_HOME to point to it.
   Note that the generated class files will be placed in
   a directory structure under this current example
   directory that mirrors the package structure defined in
   the Java source files (examples/development/components/plate).

2) Run the Isight tool 'sdkGenerator'.  Build the plate
   component as follows:

   a) Name the component.  The value to use as the
      full name is 'examples.development.components.plate',
      which is the Java package name that appears
      at the top of each Java source file.

   b) Select 'plate.gif' as the icon.

   c) Define two properties (as input scalars):

      Shape:    type = 'String', value = 'circle'
      Material: type = 'String', value = 'aluminum'

   d) Define two input parameters:

      Dimensions: structure = aggregate, no members
                  [the editor will add members]
      Thickness: structure = scalar, type = 'Real',
                 value = 0.1

   e) Define three scalar 'Real' output parameters:

      Area
      Volume
      Weight

   f) Set the editor class to PlateEditor.class, the
      executor class to PlateExecutor.class, the
      handler class to PlateHandler.class, and the
      post-processor class to PlatePostProcessor.java
      (these are class files generated in step 1).

   g) Test the editor. When the
      editor GUI comes up, exit by clicking OK to
      ensure that the component will be properly
      defined for execution.  

   h) Test execution. The Fiper Runtime Gateway will
      appear and will display the execution results.
      Modify the dimensions on the Parameters tab and
      re-execute to verify that the execution is working properly.
      Also verify the results on the Summary tab.

   i) Save the component as 'plate.jar'.


3) Either run the Isight tool 'gateway' and raise the
   Library GUI from it, or run the Isight tool 'library'
   directly.  Click on 'publish a file to the library',
   select the JAR file created above, and click OK.

You may now build models containing plate components.
