Doc:latest/evalguide/app ide

Revision as of 20:33, 24 October 2011 by Bot (Talk | contribs)



Contents

Appendix A: SAFplus IDE

OpenClovis SAFplus IDE is an Integrated Development Environment designed to simplify and accelerate the development of software with the OpenClovis SDK. It provides a simple and powerful mechanism with easy drag-and-drop features, to create Resources and Components, define attributes and relationships between them. The OpenClovis IDE graphical interface enables you to capture the Information Models through UML notifications and save them as XML files.

This Appendix is only a brief introduction to the IDE and only provides basic information on how to

  • start the OpenClovis IDE
  • view the model which was used to build the the skeleton code for csa101 to csa113
  • generate code based upon the model.

Further information concerning the IDE and creating a model can be found within the OpenClovis IDE User Guide and OpenClovis Sample Application Tutorial.

As previously mentioned, this appendix assumes you have followed the instructions found in the document OpenClovis Installation Guide, and installed the SDK. After installing the SDK, we need to create a project area. You may have already created a project area either by the command cl-create-project-area or cl-eval-wizard. Again to prevent the repetition of data we suggest looking at section Evaluation Wizard - Single Node Setup and Manually Building the Target Images.

Scope

This appendix covers instructions to start the OpenClovis IDE and introduce you to the evaluation model that forms the foundation of the Evaluation System. You will be able to see how the values set for Clovis Sample Applications, affect the source code generated and behavior.

Instructions are provided to generate source code. Once the code is generated you have the opportunity to see how we enhanced the generated source code to create the Clovis Sample Applications which were run in Chapter Sample Applications.

Although the generated code provides a framework for the Sample Applications without any functionality, instructions are provided on how to configure, build and start SAFplus Platform.

Starting the IDE

If you chose to create symbolic links during installation, from the command line enter cl-ide to launch OpenClovis IDE. Otherwise, from the command line you can either:

  • Add the installation directory to the shell's search path. For example with a bash shell,
    export PATH=$PATH:$install_dir/sdk-5.0/bin

    or

  • Execute the command
    <install_dir>/sdk-5.0/bin/cl-ide

The splash screen for OpenClovis IDE is displayed followed by the Workspace Launcher, as presented in Figure OpenClovis IDE Workspace Launcher.

OpenClovis IDE Workspace Launcher

Within the Workspace field the default location of the workspace of IDE is placed. This is the location where information concerning the IDE and models created is saved. This can be altered by pressing the Browse button. Select the workspace directory and click OK to launch OpenClovis IDE as illustrated in the Figure OpenClovis IDE Welcome Screen.

OpenClovis IDE Welcome Screen

Importing the Evaluation Model

First, we need to import the model.

Importing Evaluation Model into Eclipse Workspace

The Clovis Works model is now presented within the Clovis Workspace View. To, view the Resource Editor, right click on eval -> select Clovis -> select Resource Editor. For the Component Editor right click on eval-> select Clovis -> select Component Editor. The Resource and Component Editor views will now be presented. See Figures below.

Component View

Resource View

This is the Evaluation Model used as the foundation of our Evaluation System. From here you have the opportunity to explore the model in its entirety. To understand how to navigate the IDE please refer to the OpenClovis IDE User Guide.

Generating Source Code

To generate source code a number of steps are required. Firstly the location of SAFplus Platform and Python needs to be correct.

Set SAFplus Platform and Python Location
  • SAFplus Platform Location:
    This usually appears by default. This is the location where the SAFplus Platform source code is installed. The default location is usually
    <install_dir>/sdk-5.0/src/SAFplus Platform.
  • Python Location:
    Again the location of Python 2.4.2 should appear by default. If this is not the case python can be located within
    <installation-directory>buildtools/local/bin
    The default <installation-directory> is /opt/clovis for root installation and $HOME/clovis for non root users. This is determined during the installation of the SDK.

Once we are certain the locations of SAFplus Platform and Python 2.4.1 are correct we can now generate the code.

  1. Within the Clovis Workspace View highlight eval; and right click to present a menu.
  2. Within the menu select Generate Source.
  3. A Project Validation pop up window is displayed with the message:
    eval model has errors/warnings. Do you want to continue?
    Press OK

Once OK is pressed the XML and source code is generated and placed within

<project-area_dir>/eval

You will now be able to view this generated source code within

<project-area_dir>/eval/src

You have the opportunity to compare how we built upon the generated code to further develop the Clovis Sample Application found within Chapter Sample Applications.

Configuring & Building Generated Code, and Starting SAFplus Platform

Once the code for the eval model is generated, the first choice you will have to make is decide which hardware setup to run the generated code. This information can be found within is discussed in full within Chapter Runtime Hardware Setup.

The next logical step is to configure and build this code. There are two methods of doing this, the first via the OpenClovis IDE, as covered within the OpenClovis Sample Application Tutorial.

The second method, as discussed earlier, is via the command line. As you already have this document open we suggest looking again at Chapter Building the Evaluation System and Deploying Runtime Images:

Running the Sample Applications

The sample applications can be run via the SAFplus Platform Console, however, as the code is simply generated from the IDE nothing will happen.

Summary and Next Steps

This appendix provided you with specific steps to open the OpenClovis IDE, import and open the Evaluation Model and generate the source code.