<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://help.openclovis.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://help.openclovis.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stone</id>
		<title>OpenClovis Product Documentation - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://help.openclovis.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Stone"/>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Special:Contributions/Stone"/>
		<updated>2026-04-08T04:28:11Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/tutorial</id>
		<title>Doc:latest/tutorial</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/tutorial"/>
				<updated>2016-12-06T18:43:16Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Customizing main.c */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Preface==&lt;br /&gt;
The ''SAFplus Platform Sample Application Tutorial'' is a comprehensive tutorial designed to highlight the steps involved in using SAFplus software to design and build a high availability system. In this tutorial you will learn to:&lt;br /&gt;
* Design a model using the SAFplus IDE&lt;br /&gt;
* Generate code from this model to provide middleware support&lt;br /&gt;
* Customize this code for a particular application&lt;br /&gt;
* Build and deploy the customized code&lt;br /&gt;
* Run the system to see the SAFplus Platform software in action&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Audience===&lt;br /&gt;
&amp;lt;br&amp;gt; ''SAFplus Platform Sample Application Tutorial''  is designed for system integrators, designers, and system architects. To use SAFplus Platform, you should be aware of the fundamentals of operation, management, and configuration of telecommunication and networking domains. You should also be familiar with C programming, UML notations, and have the basic knowledge of Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; This document assumes that you have installed the SAFplus Platform SDK, following the installation steps found in the ''SAFplus Platform Installation Guide''.&lt;br /&gt;
&lt;br /&gt;
===Documentation Conventions===&lt;br /&gt;
This guide uses different fonts and symbols to differentiate between document elements and types of information. These conventions are summarized in the following table.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#cdd6e6&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#d3e3ff&amp;quot;| Notation&lt;br /&gt;
!style=&amp;quot;background:#d3e3ff&amp;quot;| Description&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;background:#ffccaa&amp;quot; | &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Code&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|This font denotes the C code provided in various examples.&amp;lt;br&amp;gt;This font denotes function and variable names.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;background:#ffffaa&amp;quot; | &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Output&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|Terminal output.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;color:blue&amp;quot; | Cross reference&lt;br /&gt;
|This font denotes a hyperlink. You can click on the hyperlink text to access the reference location, which can be either a section within the guide or a URL link.&amp;lt;br&amp;gt;A cross reference refers to a section name and accesses the first page of that section.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;code&amp;gt;Filenames&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;DIR&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Files names, Directory paths.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|&amp;lt;code&amp;gt;$ Commands ''group_identifier''&amp;lt;/code&amp;gt; &lt;br /&gt;
| Commands to be run from a shell.&amp;lt;br&amp;gt; Italic text indicate an argument. This can be replaced with your desired value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]This indicates the presence of notes or annotations, related to the context of the document. &lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Caution.png]]This indicates that certain precautionary measures must be taken before performing a particular task.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Info.png]]This indicates that additional information is provided to you.&lt;br /&gt;
&lt;br /&gt;
As mentioned in the ''SAFplus Platform Installation Guide'' the default directory for installation is &amp;lt;code&amp;gt;/opt/clovis&amp;lt;/code&amp;gt; for root installation and &amp;lt;code&amp;gt;$HOME/clovis&amp;lt;/code&amp;gt; for non root users. Throughout this document we will use &amp;lt;code&amp;gt;&amp;lt;install_dir&amp;gt;&amp;lt;/code&amp;gt; to refer to the installation directory.&lt;br /&gt;
&lt;br /&gt;
===Related Documents===&lt;br /&gt;
For additional information about OpenClovis products, please refer to the following guides:&lt;br /&gt;
* '''[[Doc:latest/relnotes | SAFplus Platform Release Notes]]''' provides information about the software and the hardware required to install OpenClovis SAFplus Availability/Scalability Platform and Integrated Development Environment (IDE). It summarizes the additional features and enhancements of the product since the previous release. It also summarizes the issues and limitations of the product and provides workarounds wherever applicable.&lt;br /&gt;
* '''[[Doc:latest/safcompliance | SAFplus Platform SA-Forum Compliance]]''' describes the level of compliance of OpenClovis SAFplus Platform and its Application Programming Interface (API) with the relevant Service Availability Forum Specifications.&lt;br /&gt;
* '''[[Doc:latest/installguide | SAFplus Platform Installation Guide]]''' provides the system requirements, installation procedure for OpenClovis SAFplus Platform, IDE, and the Evaluation System.&lt;br /&gt;
* '''[[Doc:latest/tutorial | SAFplus Platform Sample Application Tutorial]]''' explains the steps to create and build a sample model using OpenClovis IDE and OpenClovis SAFplus Platform. It also provides troubleshooting information for this process. This provides the logical first step in understanding the SAFplus Platform offering.&lt;br /&gt;
* '''[[Doc:latest/evalguide | SAFplus Platform Evaluation System User Guide]]''' provides all the required information to configure and run the sample models packaged within the Evaluation System. This document also provides good understanding of OpenClovis SAFplus Platform's functionality. This is the natural follow on to the ''OpenClovis Sample Application Tutorial'' as it builds on the example created in that document. &lt;br /&gt;
* '''[[Doc:latest/sdkguide | SAFplus Platform SDK User Guide]]''' provides information about SAFplus Availability/Scalability Platform architecture, various SAFplus Platform components, and their interactions. This guide helps you to configure the OpenClovis SAFplus Platform components, compile, and execute the SAFplus Platform code to build your custom application.&lt;br /&gt;
* '''[[Doc:latest/ideguide | SAFplus Platform IDE User Guide]]''' describes the usage of Integrated Development Environment (IDE), a graphical development environment that complements the SAFplus Platform. This guide helps you to understand how to use the various features of the IDE to build the application.&lt;br /&gt;
* '''[[Doc:latest/logtoolguide | SAFplus Platform Log Tool User Guide]]''' provides information about the usage of OpenClovis Log Tool. OpenClovis Log Tool is an interactive utility that allows you to view binary log files in a readable format and hence monitor system errors, warnings, and other log information. Log Tool allows you to format the &amp;lt;code&amp;gt;.log&amp;lt;/code&amp;gt; files and filter them to view the required entries.&lt;br /&gt;
* '''SAFplus Platform API Reference Guide [http://www.openclovis.org/doc/latest/apirefs/index.html]''' is provided for each component. It describes the Application Programming Interface (API), Service Model, and Management Information Model of the various OpenClovis Application Service Platform (SAFplus Platform) services. It helps the developer to understand the capabilities of the SAFplus Platform services and the APIs provided by these services.&lt;br /&gt;
* '''[[SAFplus Platform Console Reference Guide]]''' provides details about managing applications built on SAFplus Platform using the SAFplus Platform runtime debug console commands. SAFplus Platform Console commands can be used to manage, monitor, and test your application.&lt;br /&gt;
&lt;br /&gt;
===OpenClovis Online Technical Support===&lt;br /&gt;
OpenClovis customers and partners can register on our Web site and receive personalized services and information. If you need any support or assistance while working on OpenClovis products, you can access the following: URL: http://www.openclovis.com. Send your queries to: support@openclovis.com.&lt;br /&gt;
&lt;br /&gt;
===Documentation Feedback===&lt;br /&gt;
We are interested in hearing from our customers on the documentation provided with the product. Let us know your comments and suggestions on improving the documentation at OpenClovis Inc. Send your comments to: support@openclovis.com. Or even better, edit (or comment in) the page on our documentation wiki located at [http://help.openclovis.com http://help.openclovis.com].&lt;br /&gt;
&lt;br /&gt;
==Our Example: The csa101 System==&lt;br /&gt;
The ''SAFplus Platform Sample Application Tutorial'' will take you through a series of examples each introducing a key concept of the product. Each example builds on the example before it so it is important to go through them in order. The examples are named so that it is easy to determine their sequence. The examples all begin with the letters '''csa''' (standing for Clovis Sample Application) and end with a number. Our first example will be '''csa101'''.&lt;br /&gt;
&lt;br /&gt;
The purpose of our first example is to highlight basic component management. It introduces the basic skeleton of a SAFplus Platform based application component and illustrates how it interacts with the System. It demonstrates basic component registration and life-cycle management.&lt;br /&gt;
&lt;br /&gt;
We will keep this first example very simple. It will consist of the SAFplus Platform running a small component named '''csa101'''. All that this component will do is continuously print 'Hello World!' to a log file. While this component is not very exciting, it will allow us to easily see when the application is in a running state and when it is not. This will allow us to focus on the infrastructure of SAFplus Platform and how the application interfaces with it.&lt;br /&gt;
&lt;br /&gt;
For this example we will assume that we have a chassis with five slots. We will have one type of blade in our example, a '''System Controller'''.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]With the type of model we are developing we would typically define two blade types to install in these slots. The first blade type would be a '''System Controller''' blade (which is responsible for running the SAFplus Platform software which manages application startup, shutdown, failover, etc.) and the second blade type would be a '''Payload''' blade (which is responsible for running our custom '''csa101''' application). However, for the purpose of simplifying the deployment of our system, we will define only the '''System Controller''' blade type and have both the SAFplus Platform and component application run on this one blade. This will allow the example to be run on a single PC.&lt;br /&gt;
&lt;br /&gt;
==Creating the csa101 Model==&lt;br /&gt;
The first step in setting up our example is to create a model which represents the system that we will eventually deploy. This is done through the '''SAFplus Platform IDE'''. In this chapter we will step through the following tasks:&lt;br /&gt;
* Create a project area&lt;br /&gt;
* Launch the '''SAFplus Platform IDE'''&lt;br /&gt;
* Create the IDE project&lt;br /&gt;
* Specify the Resource model (the types of physical hardware in our system)&lt;br /&gt;
* Specify the Component model (the types of components or applications in our system)&lt;br /&gt;
* Specify which Components run on which Resources&lt;br /&gt;
* Specify important build and boot parameters&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Launching the SAFplus Platform IDE===&lt;br /&gt;
You can launch the '''SAFplus Platform IDE''' from the command line. If you chose to create symbolic links during installation you can simply enter &amp;lt;code&amp;gt;'''cl-ide'''&amp;lt;/code&amp;gt; from any directory. If you did not create symbolic links during installation you can either:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the installation directory to the shells search path and then launch the IDE. For example with a bash shell, &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# export PATH=$PATH:$install_dir/6.1/sdk/bin&lt;br /&gt;
# cl-ide&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the command&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# &amp;lt;install_dir&amp;gt;/6.1/sdk/bin/cl-ide&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The splash screen for SAFplus Platform IDE is displayed as illustrated in Figure [[#SAFplus Platform IDE Opening Screen | SAFplus Platform IDE Opening Screen]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Opening Screen'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_GettingStartedIDE_OpeningScreen.png|frame|center| '''SAFplus Platform IDE Opening Screen''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will then be prompted to select a workspace in which to do your work as illustrated in Figure [[#SAFplus Platform IDE Workspace Launcher | SAFplus Platform IDE Workspace Launcher]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Workspace Launcher'&amp;gt;&amp;lt;/span&amp;gt;[[File:Workspace_Launcher.png|frame|center| '''SAFplus Platform IDE Workspace Launcher''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The workspace you select should correspond to the project area that you created in the previous section (in this case &amp;quot;/home/clovis/projectarea1&amp;quot;). Note that the workspace includes a subdirectory of &amp;quot;/ide_workspace&amp;quot;. This is done strictly for organizational purposes. It keeps the IDE models separate from the generated SAFplus Platform models and code.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select the workspace and click  '''OK'''  to launch SAFplus Platform IDE as illustrated in the Figure [[#SAFplus Platform IDE Welcome Screen | SAFplus Platform IDE Welcome Screen]].&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Welcome Screen'&amp;gt;&amp;lt;/span&amp;gt;[[File:IDE_Welcome_Screen.png|frame|center| '''SAFplus Platform IDE Welcome Screen''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''SAFplus Platform''' IDE is launched and you are now looking at the main work area. For more information about the components of this main work area including the SAFplus Platform IDE menu and toolbar, see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Creating the Sample Project===&lt;br /&gt;
We will now create a project within the '''SAFplus Platform IDE'''. This project will hold both the resource model and the component model for our example system. The resource model is a physical view of the resources (the chassis, the blade types, etc.) in our system. The component model is a logical view of the components (applications, etc.) in our system.&lt;br /&gt;
&lt;br /&gt;
We will be using the '''New Project Wizard''' to create our project. The wizard captures some high-level information about the system that we are building and performs a lot of the basic setup for us.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]]The same model that we are building through the wizard could also be created manually through the Resource and Component Editors. For more information on the Resource and Component Editors see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To launch the '''New Project Wizard''' select  '''File'''  &amp;gt;  '''New''' &amp;gt;  '''Project''' from the IDE menu bar.&lt;br /&gt;
&lt;br /&gt;
The  '''New Project Wizard''' is displayed and  '''Clovis System Project'''  is selected by default as illustrated in Figure [[#New Project Wizard | New Project Wizard]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='New Project Wizard'&amp;gt;&amp;lt;/span&amp;gt;[[File:New_Project_Wizard.png|frame|center| '''New Project Wizard''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click  '''Next'''. The  '''Clovis System Project''' window is displayed as illustrated in Figure [[#Clovis System Project | Clovis System Project]].&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id='Clovis System Project'&amp;gt;&amp;lt;/span&amp;gt;[[File:Clovis_System_Project.png|frame|center| '''Clovis System Project''' ]]&lt;br /&gt;
&lt;br /&gt;
Enter the following information:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Project Name''' : Enter the name of your new project as  '''SampleModel'''.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]Do not use spaces or special characters for the project name. The project name can be alphanumeric, but cannot start with a number or have only numbers.&lt;br /&gt;
&amp;lt;br&amp;gt;Select  '''Use default'''  to use the same directory mentioned in the  '''Directory'''  field. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Project Area Location''': Enter the location where the generated source code for the model should be stored.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]This can be any existing directory but is usually the project area that was created in the previous section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Python Location''': Enter the location where Python 2.5.0 or above is installed on your system. If Python 2.5.0 or above was installed by SAFplus Platform SDK, the directory is  &amp;lt;code&amp;gt;'''&amp;lt;installation_directory&amp;gt;/6.1/buildtools/local/bin'''&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Add New Blade Type''' window is displayed. This dialog is used to define the blade types that are in our system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Add New Blade Type'&amp;gt;&amp;lt;/span&amp;gt;[[File:Add_New_Blade_Type.png|frame|center| '''Add New Blade Type''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember that the system we are modelling has only one blade type...a System Controller.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a new blade type to the list. Name this blade type 'SysBlade' (for System Controller blade).&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Add New SAF Node Type''' window is displayed. This dialog is used to define the type of logical node that will be run on the corresponding blade type defined in the previous dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Add New SAF Node Type'&amp;gt;&amp;lt;/span&amp;gt;[[File:Add_New_SAF_Node_Type.png|frame|center| '''Add New SAF Node Type''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Node types represent groups of software. They are classified as either a System Controller class or a Payload class. This distinction gives the node type certain characteristics which cause it to behave in a well-defined manner. Since we have only a System Controller in our system we will add a node type of class System Controller.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a new node type to the list. Name the node type 'SCNode' and ensure that its node class is 'System Controller (SAF Class B)'.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Specify Program Names''' window is displayed. This dialog is used to create programs or SAF Service Types and associate them with the SAF Node Types specified in the previous dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Specify Program Names'&amp;gt;&amp;lt;/span&amp;gt;[[File:SAF_Service_Type_Name.png|frame|center| '''Specify Program Names''' ]]&lt;br /&gt;
&lt;br /&gt;
In our system we need one SAF Service Type which represents our high availability software (csa101 that continously prints &amp;quot;Hello World!&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a program name to the list. Change the program name to 'csa101' and associate the program with the 'SCNode' node type.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Finish'''. This will create the sample model using the blade type, node type, and program name information collected through the 'New Project Wizard' dialogs.&lt;br /&gt;
&lt;br /&gt;
===Viewing the Model===&lt;br /&gt;
&lt;br /&gt;
====The SAFplus Platform IDE Perspective====&lt;br /&gt;
Once the wizard pages are closed you will be returned to the main IDE view also known as the '''SAFplus Platform IDE Perspective'''. On the left hand side of this view you will see the '''Clovis Workspace''' pane which contains the new project you just created with all project related files and folders. The folders are displayed based on your filter settings. With the default filter settings, the folders shown in Figure [[#Clovis Workspace|Clovis Workspace]] is displayed in the '''Clovis Workspace''' pane. For information about filter settings, refer  ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Clovis Workspace'&amp;gt;&amp;lt;/span&amp;gt;[[File:Clovis_Workspace.png|frame|center|Clovis Workspace]]&lt;br /&gt;
&lt;br /&gt;
By default, the '''Resource''' and '''Component''' Editor views are available for the created project. To view them, click '''Clovis''' on the menu bar at the top of the screen and select '''Resource Editor''' or  '''Component Editor'''  from the menu. You can also click '''Resource Editor''' or '''Component Editor''' icons from the tool bar as shown in Figure [[#SAFplus Platform IDE Tool Bar | SAFplus Platform IDE Tool Bar]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Tool Bar'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_Toolbar.png|frame|center| '''SAFplus Platform IDE Tool Bar''' ]]&lt;br /&gt;
&lt;br /&gt;
====Resource Editor View====&lt;br /&gt;
The '''Resource Editor''' shows the types of physical objects in our system. It gives us a place to create new objects and interact with the objects that already exist. The '''Resource Editor''' view for our model should look similar to the following figure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform Resource Editor'&amp;gt;&amp;lt;/span&amp;gt;[[File:Resource_Editor1.png|frame|center| '''SAFplus Platform Resource Editor''' ]]&lt;br /&gt;
&lt;br /&gt;
This editor always has a '''Chassis''' object which is the root of all other objects in the editor. In our case it also has the '''SysBlade''' blade type that we created through the '''Project Creation Wizard'''. You will also notice that the '''SysBlade''' is attached to the '''Chassis''' using a '''Composition''' relationship indicating that '''SysBlade'''s reside within the '''Chassis'''.&lt;br /&gt;
&lt;br /&gt;
On the right hand side of the editor view you will see the '''Palette''' which can be expanded and collapsed. Expanding the '''Palette''' you will see the list of objects that can be dragged onto the editor view to add to our model. Once an object is on the editor view you can view and change its properties by right clicking on the object and selecting '''Properties...''' from the context menu.&lt;br /&gt;
&lt;br /&gt;
For more information about the '''Resource Editor''' view see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
====Component Editor View====&lt;br /&gt;
The '''Component Editor''' shows the types of logical objects in our system. It gives us a place to create new objects and interact with the objects that already exist. The '''Component Editor''' view for our model should look similar to the following figure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform Component Editor'&amp;gt;&amp;lt;/span&amp;gt;[[File:Component_Editor1.png|frame|center| '''SAFplus Platform Component Editor''' ]]&lt;br /&gt;
&lt;br /&gt;
This editor always has a '''Cluster''' object which is the root of all other objects in the editor. In our case it also has the '''SCNode''' node type and the '''csa101''' SAF Service Type (a combination of Service Group, Service Unit, Service Instance, Component Service Instance, and SAF Component) that we created through the '''Project Creation Wizard'''. These have all been automatically attached in a way that makes a working model.&lt;br /&gt;
&lt;br /&gt;
On the right hand side of the editor view you will see the '''Palette''' which can be expanded and collapsed. Expanding the '''Palette''' you will see the list of objects that can be dragged onto the editor view to add to our model. Once an object is on the editor view you can view and change its properties by right clicking on the object and selecting '''Properties...''' from the context menu.&lt;br /&gt;
&lt;br /&gt;
For more information about the '''Component Editor''' view see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Configuring the Components===&lt;br /&gt;
The '''New Project Wizard''' that we used to create our project configured the system using the most common options. We will have to make a few changes to this model in order for our example to work. We will make these changes in the '''Component Editor''' view.&lt;br /&gt;
&lt;br /&gt;
In the Component Editor you will notice seven different objects that were created by the wizard. The first two of these are:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Cluster: The root object of all other objects in the Component Editor view.&lt;br /&gt;
&amp;lt;li&amp;gt;SCNode: This is the SAF Node Type that we specified during project creation.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next five objects all make up the Program or SAF Service Type that we specified on the last dialog of the New Project Wizard. These objects are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;csa101SG: This is the Service Group representing our high availability software component.&lt;br /&gt;
&amp;lt;li&amp;gt;csa101SU: This is the Service Unit that is logically associated with the SCNode SAF Node Type.&lt;br /&gt;
&amp;lt;li&amp;gt;csa101SI: This is the Service Instance&lt;br /&gt;
&amp;lt;li&amp;gt;csa101CSI: This is the Component Service Instance&lt;br /&gt;
&amp;lt;li&amp;gt;csa101: This is the SAF Component which represents our program or executable.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will be making changes to the Service Group (csa101SG), the Service Instance (csa101SI), and the SAF Component (csa101).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Configuring the Service Group====&lt;br /&gt;
To make changes to the Service Group double-click on the box titled '''csa101SG'''. The '''Service Group Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Group_Details.png|frame|center| '''Service Group Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first change we want to make is to the '''Redundancy Model'''. The '''Redundancy Model''' is the strategy that is used by the SAFplus Platform system to recover from a node failure. For our simple model (which only has one node) we are not going to rely on any failover recovery so change the '''Redundancy Model''' to 'No Redundancy' as shown.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]You will notice that when you change the redundancy model some of the other fields are modified automatically and become read-only. This is to ensure integrity of the redundancy models.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The second change that we want to make is to the '''Admin State'''. The '''Admin State''' defines the state of the component when the system is first brought up. In our case we want to change the '''Admin State''' to be 'Locked Initialized'. This means that when the system first starts up this '''Service Group''' (and its subcomponents) will be initialized but not yet put into a running state. So our csa101 application will not yet start printing &amp;quot;Hello World!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When you are finished making the changes click the '''OK''' button to commit the changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Configuring the Service Instance====&lt;br /&gt;
To make changes to the Service Instance double-click on the box titled '''csa101SI'''. The '''Service Instance Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Instance_Details.png|frame|center| '''Service Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The only change we want to make here is to the '''Number of standby assignments'''. This value represents the number of components that will be waiting to take over during a node failure and goes hand-in-hand with the '''Redundancy Model''' that we selected for the Service Group. Since we selected 'No Redundancy' for our '''Redundancy Model''' we need to set this value to 0...since we are not supporting any failover in this model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When you are finished making the changes click the '''OK''' button to commit the changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Configuring the SAF Component====&lt;br /&gt;
To make changes to the SAF Component double-click on the box titled '''csa101'''. The '''SAF Component Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAF Component Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:SAF_Component_Details.png|frame|center| '''SAF Component Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The SAF Component represents our high availabilty program or executable. We need to pass a command line argument to this executable. The reason for this argument is to force the program to print the 'Hello World!' output to a special log file for our viewing. We will look at this more closely when we customize our code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To add command line parameters click the '''Edit...''' button corresponding to the '''Command line Arguments''' label.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''Command line Argument Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Command line Argument Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Command_Line_Argument_Details.png|frame|center| '''Command line Argument Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''New''' button to add a new value to the list.&lt;br /&gt;
&amp;lt;li&amp;gt;Click on the new value in the list and it will become editable. Change the value to '''-p'''.&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''OK''' button to save and close the dialog.&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''OK''' button on the '''SAF Component Details''' dialog to commit the changes to the SAF Component and close the dialog.&lt;br /&gt;
&amp;lt;li&amp;gt;Save the component model using the '''File &amp;gt; Save''' menu item.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Configuring Physical Instances===&lt;br /&gt;
The configuration of our logical models is complete. During this process we have defined all of the 'types' of objects in our system. Now it is time to configure actual instances of those objects so that they can be built and deployed.&lt;br /&gt;
&lt;br /&gt;
Object instance configuration is done through the Availability Management Framework (AMF) via the '''AMF Configuration''' dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To launch this dialog go to the the '''Clovis''' menu and select '''AMF Configuration...'''&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''AMF Configuration''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='AMF Configuration Dialog'&amp;gt;&amp;lt;/span&amp;gt;[[File:AMF_Configuration.png|frame|center| '''AMF Configuration Dialog''' ]]&lt;br /&gt;
&lt;br /&gt;
You will note from the instructions on this page that the physical instances representing the objects in our model can be created manually or by using wizards. Using the wizards will save us both typing and time so we will use these instead of creating each instance manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Creating Node Instances====&lt;br /&gt;
First we will create actual instances of the Node Types (in our case only one Node Type...SCNode) we created in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double-click AMF Configuration in the left hand pane. The Node Instance List appears.&lt;br /&gt;
&amp;lt;li&amp;gt;Click on Node Instance List. The right hand pane displays the fields we must fill out to create our node instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the right hand pane:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select SCNode for the '''Node Type'''.&lt;br /&gt;
&amp;lt;li&amp;gt;Select SysBlade for the '''Blade type'''.&lt;br /&gt;
&amp;lt;li&amp;gt;Enter 1 for the '''Node Count'''.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The complete form should look like the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Node Wizard Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_List.png|frame|center| '''Node Wizard Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''Create Instance Tree''' button to create our node instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expanding the '''Node Instance List''' branch of the '''AMF Configuration''' tree in the left-hand pane reveals a new node instance named SCNodeI0 (indicating SCNode Instance 0).&lt;br /&gt;
&lt;br /&gt;
====Creating Service Group Instances====&lt;br /&gt;
Now we will create actual instances of the Service Groups that we defined in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click on Service Group List. The right hand pane displays the fields we must fill out to create our service group instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the right hand pane:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select csa101SG (the only service group type we defined) for the '''Service Group Type'''.&lt;br /&gt;
*The '''Associated Node Instances''' list will be populated with all of the node instances that can be associated with the selected service group type.&lt;br /&gt;
&amp;lt;li&amp;gt;Select SCNodeI0 from the '''Associated Node Instances''' list.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The completed form should look like the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Wizard Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Group_List.png|frame|center| '''Service Group Wizard Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''Create Instance Tree''' button to create our service group instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you now completely expand the '''AMF Configuration''' branch of the tree in the left-hand pane you will see the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='AMS Configuration Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:AMF_Configuration_Final.png|frame|center| '''AMF Configuration Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
Notice that not only have the wizards created the node and service group instances for you, they have also filled out the entire instance tree. This was accomplished based on two key sets of information. The first of these is the association that was made between the service group type and the node instance in the '''Service Group Wizard'''. The second set of information is the component model that we created through the New Project Wizard and the Component Editor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]For more information regarding the specific properties of the generated instances see [[#Appendix B: AMF Configuration Instance Details|Appendix B: AMF Configuration Instance Details]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Thats it. We are done modelling the csa101 example!&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the OK button to commit our changes and close the dialog. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
Now its time to generate the framework code.&lt;br /&gt;
&lt;br /&gt;
==Generating the csa101 Code==&lt;br /&gt;
In this step we generate the source code for our example. The code that will be created is the framework code that handles all of the low level functionality provided by SAFplus Platform.&lt;br /&gt;
&lt;br /&gt;
To generate the source code go to the '''Project''' menu and select '''Generate Source'''. Several progress dialogs will appear and after a few seconds code generation will be complete.&lt;br /&gt;
&lt;br /&gt;
The source code and configuration XML files are generated and placed in subdirectories of the '''Project Area Location''' that we specified in the '''New Project Wizard'''. You can review this location by using the '''Project &amp;gt; Properties''' menu to get to the '''Project Properties''' dialog and then selecting '''Clovis System Project''' in the left hand pane.&lt;br /&gt;
&lt;br /&gt;
You can review the generated code from within the SAFplus Platform IDE. To do this go to the '''Clovis Workspace''' pane and expand the '''SampleModel''' node. The node tree should look like the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Clovis Workspace Code Tree'&amp;gt;&amp;lt;/span&amp;gt;[[File:Clovis_Workspace_Generate_Source.png|frame|center| '''Clovis Workspace Code Tree''' ]]&lt;br /&gt;
&lt;br /&gt;
The code of particular interest to our example is in the SampleModel/src/app/csa101 branch of the tree. This is the code for our csa101 example. The csa101 example consist of one C module (&amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt;). There is also a make file that will be used for building the application. The &amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt; file implements our 'Hello World!' application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]If you run code generation a second time you will be presented with a dialog box asking if you would like to make a backup copy of the existing source code before proceeding. You can answer No to this dialog.&lt;br /&gt;
&lt;br /&gt;
==Customizing the csa101 Code==&lt;br /&gt;
While the code that was generated in the previous section can be built and run we want to make some changes to it so that we can easily see what our example is doing. For our example we will be changing one source file (&amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt;) and two make files.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]In a real production situation this is the point where you would customize the code to perform the specific tasks of your product.&lt;br /&gt;
&lt;br /&gt;
You will notice in the C file that there are several places where you see the following comment block.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 // ...&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Makefiles have a similar convention but with a slightly different syntax.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|Makefile&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
&lt;br /&gt;
 # ---END_APPLICATION_CODE---&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These are sections of the file where it is safe to enter custom application code without having to worry about that code being overwritten if you were to again perform '''Generate Source''' for your model. This is important since the typical development cycle is an iterative process where you will return to the IDE to make modifications to your model.&lt;br /&gt;
&lt;br /&gt;
To simplify the process of building and running the csa101 example, OpenClovis, Inc. has already made the necessary code customizations and shipped this code with the SAFplus Platform SDK. At this point you can simply replace the generated source files with these customized versions to avoid typing in the changes. We will go over each customization below and explain what was done.&lt;br /&gt;
&lt;br /&gt;
To replace the generated files with the customized versions shipped with the SAFplus Platform SDK follow these instructions.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]  The sample applications containing the csa101 example can be found under the installation directory at &amp;lt;code&amp;gt;&amp;lt;install_dir&amp;gt;/6.1/sdk/src/examples/eval&amp;lt;/code&amp;gt;.  For example, this directory is located at &amp;lt;code&amp;gt;/opt/clovis/6.1/sdk/src/examples/eval&amp;lt;/code&amp;gt; for &amp;quot;default&amp;quot; installations.  We will refer to this directory in the remaining of this section as &amp;lt;code&amp;gt;&amp;lt;eval_dir&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Exit the SAFplus Platform IDE using the '''File &amp;gt; Exit''' menu item. If you are prompted to save changes before exiting answer yes.&lt;br /&gt;
&amp;lt;li&amp;gt;Navigate to the source code work area.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cd /home/clovis/projectarea1/ide_workspace/SampleModel/src/app&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using your favorite editor open the file &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; that resides in this directory. This is the application make file.&lt;br /&gt;
&amp;lt;li&amp;gt;Add the following line to this file within the first &amp;lt;code&amp;gt;BEGIN_APPLICATION_CODE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;END_APPLICATION_CODE&amp;lt;/code&amp;gt; comment block.  This will instruct the build process to build our custom output library.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;SUBDIRS += ev&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Save this file and exit the editor.&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the following command to copy the output package to our working area.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cp -r &amp;lt;eval_dir&amp;gt;/src/app/ev .&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Navigate to the component code work area.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cd csa101&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the following command to copy the csa101 source code.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cp &amp;lt;eval_dir&amp;gt;/src/app/csa101Comp/main.c .&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the following command to copy the component make file.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cp &amp;lt;eval_dir&amp;gt;/src/app/csa101Comp/Makefile .&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Restart the SAFplus Platform IDE.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cl-ide&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Customizing main.c===&lt;br /&gt;
The &amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt; file is the C module which will implement our 'Hello World!' behavior. We have to make changes in several parts of this file.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]If you copied the files as instructed in the section above then these changes have already been made to the files. Use this section to review and understand the changes.&lt;br /&gt;
&lt;br /&gt;
In the include section of this file we have added a new include for &amp;lt;code&amp;gt;ev.h&amp;lt;/code&amp;gt;. This refers to a special output library that we copied to our work area in the previous section. This output library is used to redirect output from the application to a component specific log. This is purely cosmetic but it will allow us to easily monitor what is happening when we run our example.&lt;br /&gt;
Also, we change the logging from the default &amp;quot;application&amp;quot; stream to a custom stream. To do this, we include the header that defines our config routines, change the default &amp;quot;clLogApp&amp;quot; macro to use a different stream, and define that stream as a global variable:&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
   ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;../ev/ev.h&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
 #define clprintf(severity, ...)   clAppLog(gEvalLogStream, severity, 10, &lt;br /&gt;
         &amp;quot;MAI&amp;quot;, CL_LOG_CONTEXT_UNSPECIFIED,__VA_ARGS__)&lt;br /&gt;
 ...&lt;br /&gt;
 ClLogStreamHandleT  gEvalLogStream = CL_HANDLE_INVALID_VALUE;&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Next we define a static variables that will keep track of the state of our application and a function to aid in showing when the application is running. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
   ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 static int running = 0;&lt;br /&gt;
&lt;br /&gt;
 static char*&lt;br /&gt;
 show_progress(void)&lt;br /&gt;
 {&lt;br /&gt;
     static char bar[] = &amp;quot;          .&amp;quot;;&lt;br /&gt;
     static int progress = 0;&lt;br /&gt;
&lt;br /&gt;
     /* Show a little progress bar */&lt;br /&gt;
     return &amp;amp;bar[sizeof(bar)-2-(progress++)%(sizeof(bar)-2)];&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
The &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; flag will be used to indicate whether the current application is active or suspended.&lt;br /&gt;
The function &amp;lt;code&amp;gt;show_progress&amp;lt;/code&amp;gt; returns a pointer to a c string with a number of spaces followed by a '.' character. The number of spaces in the string cycles from zero to an upper bound. This is used later on to provide visual indication of the progress of the application's output.&lt;br /&gt;
&lt;br /&gt;
Next we have added a function &amp;lt;code&amp;gt;activeLoop&amp;lt;/code&amp;gt; to print the output. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void* activeLoop(void* p)&lt;br /&gt;
{&lt;br /&gt;
    while (running)&lt;br /&gt;
    {&lt;br /&gt;
        clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: Threaded Hello World! %s\n&amp;quot;,     &lt;br /&gt;
                 show_progress());&lt;br /&gt;
        sleep(2);&lt;br /&gt;
    }&lt;br /&gt;
    return NULL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Notice the while loop condition. This function uses the &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; variable that was initialized to 0, but set to 1 when the application was told to become active.  The work of the application goes next: printing &amp;quot;Hello World!&amp;quot; along with the progress indicator.  You could replace this with the application's real task.  Finally, the command &amp;lt;code&amp;gt;sleep(2)&amp;lt;/code&amp;gt; simply sleeps for two seconds so as not to fill log files too quickly.&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; becomes zero, we return from the function.  This will happen when the application either quits or the AMF removes its &amp;quot;active&amp;quot; role.&lt;br /&gt;
&lt;br /&gt;
Next, the log stream is initialized in the &amp;lt;code&amp;gt;initializeAmf&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
/*  &lt;br /&gt;
 * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
/* Set up console redirection for demo purposes */&lt;br /&gt;
clEvalAppLogStreamOpen((ClCharT *)appName.value, &amp;amp;gEvalLogStream);&lt;br /&gt;
...&lt;br /&gt;
clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: Instantiated as component instance %s.&amp;quot;, appName.value);&lt;br /&gt;
clprintf(CL_LOG_SEV_INFO,&amp;quot;%s: Waiting for CSI assignment...&amp;quot;, appName.value);&lt;br /&gt;
&lt;br /&gt;
/*  &lt;br /&gt;
 * ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Next we indicate log stream when we are exiting. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
/*  &lt;br /&gt;
 * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 clEvalAppLogStreamClose(gEvalLogStream);&lt;br /&gt;
/*  &lt;br /&gt;
 * ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This will cause &amp;lt;code&amp;gt;activeLoop&amp;lt;/code&amp;gt; function to exit.&lt;br /&gt;
Next we will put in code to manage the state of our application.&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
void safAssignWork(SaInvocationT       invocation,&lt;br /&gt;
                   const SaNameT       *compName,&lt;br /&gt;
                   SaAmfHAStateT       haState,&lt;br /&gt;
                   SaAmfCSIDescriptorT csiDescriptor)&lt;br /&gt;
{&lt;br /&gt;
    /*&lt;br /&gt;
     * ---BEGIN_APPLICATION_CODE--- &lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    // ...&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * ---END_APPLICATION_CODE---&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Print information about the CSI Set&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    clprintf (CL_LOG_SEV_INFO, &amp;quot;Component [%.*s] : PID [%d]. CSI Set Received\n&amp;quot;,&lt;br /&gt;
              compName-&amp;gt;length, compName-&amp;gt;value, mypid);&lt;br /&gt;
&lt;br /&gt;
    printCSI(csiDescriptor, haState);&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Take appropriate action based on state&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    switch ( haState )&lt;br /&gt;
    {&lt;br /&gt;
        case SA_AMF_HA_ACTIVE:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to take the active HA state &lt;br /&gt;
             * for the CSI.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
            &lt;br /&gt;
            pthread_t thr;&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: ACTIVE state requested; activating service\n&amp;quot;);&lt;br /&gt;
            running = 1;&lt;br /&gt;
            pthread_create(&amp;amp;thr,NULL,activeLoop,NULL);&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_STANDBY:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to take the standby HA state &lt;br /&gt;
             * for this CSI.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: Standby state requested&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_QUIESCED:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to quiesce the CSI currently&lt;br /&gt;
             * assigned the active or quiescing HA state. The application &lt;br /&gt;
             * must stop work associated with the CSI immediately.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: Acknowledging new state quiesced&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
        case SA_AMF_HA_QUIESCING:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to quiesce the CSI currently&lt;br /&gt;
             * assigned the active HA state. The application must stop work&lt;br /&gt;
             * associated with the CSI gracefully and not accept any new&lt;br /&gt;
             * workloads while the work is being terminated.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: Signaling completion of QUIESCING&amp;quot;);&lt;br /&gt;
              running = 0;&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfCSIQuiescingComplete(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
We have modified the &amp;lt;code&amp;gt;safAssignWork&amp;lt;/code&amp;gt; callback function to let our application know what to do when the state changes. In the case where the state changes to &amp;lt;code&amp;gt;SA_AMF_HA_ACTIVE&amp;lt;/code&amp;gt; we set the &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; variable to 1. This will cause our application to spawns a thread which calls &amp;lt;code&amp;gt;activeLoop&amp;lt;/code&amp;gt; function and start printing the 'Hello World!' message. For any other state change we set the &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; variable to 0 which will cause the message to stop printing. For any state change we print out a message indicating the new state of the application.&lt;br /&gt;
&lt;br /&gt;
The example also demonstrates a non-threaded approach.  But first, some background: for both threaded and non-threaded applications, the main must have a &amp;quot;dispatch&amp;quot; loop that handles incoming AMF notifications and calls the relevant callback.  So to implement a single threaded SAF aware application, the programmer must modify this dispatch loop adding active (and potentially standby) functionality:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
main(...)&lt;br /&gt;
&lt;br /&gt;
    do&lt;br /&gt;
    {&lt;br /&gt;
        struct timeval timeout;&lt;br /&gt;
        timeout.tv_sec = 2; timeout.tv_usec = 0;&lt;br /&gt;
&lt;br /&gt;
        FD_ZERO(&amp;amp;read_fds);&lt;br /&gt;
        FD_SET(dispatch_fd, &amp;amp;read_fds);&lt;br /&gt;
&lt;br /&gt;
        if( select(dispatch_fd + 1, &amp;amp;read_fds, NULL, NULL, &amp;amp;timeout) &amp;lt; 0)&lt;br /&gt;
        {&lt;br /&gt;
            if (EINTR == errno)&lt;br /&gt;
            {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
		    clprintf (CL_LOG_SEV_ERROR, &amp;quot;Error in select()&amp;quot;);&lt;br /&gt;
			perror(&amp;quot;&amp;quot;);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        if (FD_ISSET(dispatch_fd,&amp;amp;read_fds))&lt;br /&gt;
        {&lt;br /&gt;
            saAmfDispatch(amfHandle, SA_DISPATCH_ALL);&lt;br /&gt;
        }&lt;br /&gt;
        if (running) &lt;br /&gt;
        {&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: Unthreaded Hello World! %s&amp;quot;,&lt;br /&gt;
                     show_progress()); // Run the &amp;quot;active&amp;quot; code&lt;br /&gt;
        }&lt;br /&gt;
        else &lt;br /&gt;
        {&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: idle&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }while(!unblockNow);      &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
This code should be very familiar to anyone who has written single threaded &amp;quot;event loop&amp;quot; style code. As can be seen in the code snippet above, the select is given an idle timeout (in a real application the timeout would be much smaller) and the application only calls &amp;lt;code&amp;gt;saAmfDispatch&amp;lt;/code&amp;gt; if the select actually indicates that the there is data in the FD.  Then it falls down into an &amp;quot;if&amp;quot; statement that checks if we are active &amp;quot;if (running)...&amp;quot; and outputs a log if that is the case.&lt;br /&gt;
&lt;br /&gt;
===Customizing the Component MakeFile===&lt;br /&gt;
We have to make a small change to the component &amp;lt;code&amp;gt;MakeFile&amp;lt;/code&amp;gt; so that it knows about our special output library during the build. To do this we add the following lines. This file is located in &amp;lt;code&amp;gt;/home/clovis/projectarea1/ide_workspace/SampleModel/src/app&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|Component MakeFile&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    # ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
&lt;br /&gt;
    SUBDIRS += ev&lt;br /&gt;
&lt;br /&gt;
    # ---END_APPLICATION_CODE---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Customizing the Application MakeFile===&lt;br /&gt;
We have to make sure that our special output library is built along with our application. To do this we change the line listing the sudirectories to make as follows. This file is located in the directory &amp;lt;code&amp;gt;/home/clovis/projectarea1/ide_workspace/SampleModel/src/app/csa101&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|Application MakeFile&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    # ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
    &lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    EXTRA_LDLIBS += $(LIB_DIR)/libeval.a&lt;br /&gt;
&lt;br /&gt;
    # ---END_APPLICATION_CODE---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are finished customizing our application code!&lt;br /&gt;
&lt;br /&gt;
==Building the csa101 Code==&lt;br /&gt;
&lt;br /&gt;
Now that we have finished customizing the code it is time to build it. The build process is launched using the '''Project &amp;gt; Build Project''' menu item. Once selected the '''Build Configuration''' dialog appears.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Build Configuration Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Build_Configuration.png|frame|center| '''Build Configuration Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The '''Build Configuration''' dialog is used to gather specific information about the build we are about to perform. Using this dialog you can rebuild the same model using different cross builds, or including different chassis managers. We don't have to make any changes to this dialog since the default settings make sense for our sample application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]If you have prebuilt the SAFplus Platform libraries then you can check the '''Use pre built SAFplus''' checkbox and include the location of the prebuilt libraries. For more information about pre-building SAFplus Platform libraries, see ''SAFplus Platform SDK User Guide''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]The '''Include SNMP for North Bound Access''' control is checked by default. This just means that Net SNMP will be started along with our system. If you want end-to-end connectivity you will need to supply an SNMP Sub Agent and a MIB. See the ''SAFplus Platform SDK User Guide'' for more details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]In the '''Project''' menu if the '''Build Project''' entry is not highlighted, then click in the right pane i.e. '''Clovis Workspace''' pane and click the '''Project''' menu again. This not highlighting of the '''Build Project''' is because the '''Clovis Workspace''' is not selected properly because of moving focus to some other pane.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Click the '''OK''' button to begin the build. If this is the first time that the project is being built, or if you have made changes to any setting on this screen, you will initially see a progress dialog indicating that the project is being configured. The configuration step is setting up the project for building. After the configuration has completed you will see a progress dialog indicating that the code is being built.&lt;br /&gt;
&lt;br /&gt;
==Creating the csa101 Images==&lt;br /&gt;
&lt;br /&gt;
Making the csa101 images will create software packages that can be deployed on target machines to run the example. The process of creating images is launched using the '''Project &amp;gt; Make Images''' menu item. Once selected the '''Make Images Configuration''' dialog appears.&lt;br /&gt;
&lt;br /&gt;
The '''Make Images Configuration''' dialog is used to indicate information about the environment on which the images will be deployed. This information is used to tailor the images to run on that environment. Here we will make the following modificaiton.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Make Images Configuration TIPC Specific Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Make_Image_TIPC_Specific.png|frame|center| '''Make Images Configuration TIPC Specific Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enter a value for the '''Trap IP'''. This value specifies where the SNMP sub-agent will send traps at runtime. This field is optional but if specified must be a valid IP address. Enter a value of '127.0.0.1' in this field.&lt;br /&gt;
&amp;lt;li&amp;gt;Enter a value for the '''TIPC Net ID'''. This value represents a unique identifier used by TIPC to set up interprocess communication across the deployed OpenClovis SAFplus Platform cluster. This field is required and should default to '1340'.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Make Images Configuration General Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Make_Images_General.png|frame|center| '''Make Images Configuration General Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Check the '''Create Node Specific Images''' and '''Package Images into Tarballs''' check boxes. This will create tarballs of the images making them easy to deploy to various machines.&lt;br /&gt;
&amp;lt;li&amp;gt;The table on this dialog will hold a row for each node instance defined in the model. In our case this is only one...SCNodeI0. For each of these instances we can define the slot number in the chassis on which the node will run and the network interface that the node will use for communication. In our case enter '1' for the Slot Number and 'eth0' for the Network Interface.&lt;br /&gt;
&amp;lt;li&amp;gt;Click '''OK''' to begin the make image process. A dialog box will appear and after a few seconds the the make images process will be complete.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The images will be populated at &amp;lt;project_area&amp;gt;/target/SampleModel/images. Each node-specific image is provided as a directory containing the run-time files (binaries, libraries, prerequisites, and configuration files) as well as a tarball with the same content.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt; For our model containing one node (&amp;lt;code&amp;gt;SCNodeI0&amp;lt;/code&amp;gt;) the following files and directories are generated for deployment on the run-time system.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;project_area&amp;gt;&lt;br /&gt;
   |+target&lt;br /&gt;
       |+&amp;lt;model&amp;gt;&lt;br /&gt;
           |+images&lt;br /&gt;
               |+SCNodeI0&lt;br /&gt;
               |   |+bin&lt;br /&gt;
               |   |+etc&lt;br /&gt;
               |   |+lib&lt;br /&gt;
               |   |+modules&lt;br /&gt;
               |   |+share&lt;br /&gt;
               |-SCNodeI0.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The rest of the steps in this example are all done from the command line so we can exit the IDE. To do this use the '''File &amp;gt; Exit''' menu item.&lt;br /&gt;
&lt;br /&gt;
==Deploying the csa101 Images==&lt;br /&gt;
Now that the image has been built we must deploy it so that we can run and observe our example. Since we are assuming that the example will be run on the same machine as the images were built this is a fairly trivial exercise. Use the following steps to deploy the runtime image.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First we create a directory where we will install the image. In our case we will use &amp;lt;code&amp;gt;/root/asp&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root&lt;br /&gt;
# mkdir asp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next we navigate to that directory and untar the deployment package.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/asp&lt;br /&gt;
# tar xzvf /home/clovis/projectarea1/target/SampleModel/images/SCNodeI0.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The System Controller is now installed and ready to run.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] If you were going to run the example on a machine other than the one where the images were built you would first copy the installation tarball to that machine before performing the above steps.&lt;br /&gt;
&lt;br /&gt;
==Running the csa101 Example==&lt;br /&gt;
There are two parts to running the csa101 example. First we must start SAFplus Platform, and then we interact with the system components.&lt;br /&gt;
&lt;br /&gt;
===Starting SAFplus Platform===&lt;br /&gt;
&lt;br /&gt;
To start SAFplus Platform on System Controller node.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a shell.&lt;br /&gt;
&amp;lt;li&amp;gt;Run the following commands&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/asp&lt;br /&gt;
# etc/init.d/asp start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] This assumes that you are running the SAFplus Platform example on the same PC that you are executing these commands. If you are running SAFplus Platform on a different machine then you should first ssh to that machine before executing the commands.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] If SAFplus Platform fails to start properly it could be due to the machine's firewall being enabled. SAFplus Platform will not run on a machine which has firewall enabled. See the ''Environment Related Observation'' section of the ''SAFplus Platform Release Notes'' for more information.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] By default the network interface used by the Group Membership Service is set to eth0. During the make images phase of the tutorial we also set the ethernet interface for node SCNodeI0 to be eth0. During image generation these configuration parameters are written to two files in the deployment package.&lt;br /&gt;
*&amp;lt;code&amp;gt;/root/asp/etc/clGmsConfig.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
*&amp;lt;code&amp;gt;/root/asp/etc/asp.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There may be an occasion where you want to switch this interface for a machine on which you are deploying. If you would like to switch this interface on a machine without having to go through the process of rebuilding and redeploying, you can edit these two files and change the 'eth0' references to the interface you would like to use.&lt;br /&gt;
&lt;br /&gt;
===Interacting with the System Components===&lt;br /&gt;
Once SAFplus Platform is up and running the next step is to start csa101 by informing SAFplus Platform that it should start the application. The Evaluation System's model tells SAFplus Platform that csa101 is locked for instantiation. This means that the process will not be started when SAFplus Platform comes up. This method of starting csa's is used for the Evaluation System, allowing users to interact with csa's and clearly see their output/functionality. Usually this would not be the case with applications, where they would run when SAFplus Platform begins.&lt;br /&gt;
&lt;br /&gt;
At this point it would help to be familiar with the Service Availability Forum's notions of  Service Unit, Service Group, and administrative state.  The Service Availability Forum's Application Interface Specification (available from http://www.saforum.org/) is a good place to start.&lt;br /&gt;
&lt;br /&gt;
In brief, the sample applications in the Evaluation System are part of service units which in turn are part of service groups.  Service groups (and the service units that make up the service groups) can be in &amp;quot;administrative&amp;quot; states which include &amp;quot;LockInstantiation&amp;quot;, &amp;quot;LockAssignment&amp;quot;, and &amp;quot;Unlocked&amp;quot;.  There are other states, but these are the ones we care about for the purposes of this Evaluation System.  If the administrative state of a service unit is &amp;quot;LockInstantiation&amp;quot; then the application that is part of that service unit will not even be started.  If the administrative state is &amp;quot;LockAssignment&amp;quot; then the application will be started, but it will not be assigned any work.  If the administrative state is &amp;quot;Unlocked&amp;quot; then it will not only be started, but will have a workload assigned to it, which is to say that it will start doing work (or start providing service), rather than idly sit waiting for work.&lt;br /&gt;
&lt;br /&gt;
The administrative state of a service unit or service group can change from LockInstantiation to LockAssignment, from LockAssignment to Unlocked, or back to LockInstantiation, from Unlocked to LockAssignment.  A picture might help here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;PartialServiceGroupAdministrativeStateDiagram&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; [[File:eval_AdministrativeStateDiagram.png|frame|center| '''Partial Service Group Administrative State Diagram''' ]]&lt;br /&gt;
&lt;br /&gt;
As the figure shows, the administrative state of a service unit (or service group) can change from &amp;quot;LockInstantiation&amp;quot; to &amp;quot;LockAssignment&amp;quot; and from there to &amp;quot;Unlocked&amp;quot;, or back to &amp;quot;LockInstantiation&amp;quot;.  One way to change the administrative state of a service group is with the SAFplus Platform Console command line interface. &lt;br /&gt;
&lt;br /&gt;
To use the SAFplus Platform Console:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a terminal on the Development Machine. (Or ssh into System Controller node as root, if you are running SAFplus Platform on a machine other than the development machine.)&lt;br /&gt;
&amp;lt;li&amp;gt; Change to image bin directory: &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cd /root/asp/bin&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Start the SAFplus Platform Console &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# ./asp_console&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; From within the SAFplus Platform Console: &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cli[Test]-&amp;gt; setc 1&lt;br /&gt;
cli[Test:SCNodeI0]-&amp;gt; setc cpm&lt;br /&gt;
cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockAssignment sg csa101SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above changes the administrative state of the group csa101SGI0 from &amp;quot;locked-for-instantiation&amp;quot; to &amp;quot;locked-for-assignment&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]For the command &amp;lt;code&amp;gt;cli[Test]-&amp;gt; setc 1&amp;lt;/code&amp;gt;, the 1 represents the physical slot number of the System Controller within the Chassis. Remember that we set our System Controller to be in slot 1 in the make images dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Now lets tail the application log file so that we can see whats going on. In another window, as root, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# tail -f /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see the following:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00001 :   INFO) &lt;br /&gt;
 Component [csa101I0] : PID [10950]. Initializing&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00002 :   INFO)    &lt;br /&gt;
 IOC Address             : 0x1&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00003 :   INFO)    &lt;br /&gt;
 IOC Port                : 0x81&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00004 :   INFO) &lt;br /&gt;
 csa101: Instantiated as component instance csa101I0.&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00005 :   INFO) &lt;br /&gt;
 csa101I0: Waiting for CSI assignment...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Next change the administrative state of the csa101SGI0 service group to  &amp;quot;unlocked&amp;quot; by running (in the SAFplus Platform Console) :&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cli[Test:SCNodeI0:CPM]-&amp;gt; amsUnlock sg csa101SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the window where you're running the &amp;quot;tail -f&amp;quot; you should see:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Nov 12 11:59:37.092 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00163 :   INFO) &lt;br /&gt;
 csa101: ACTIVE state requested; activating service&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:37.092 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00164 :   INFO) &lt;br /&gt;
 csa101: Threaded Hello World!  .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:39.094 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00165 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!   .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:39.095 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00166 :   INFO) &lt;br /&gt;
 csa101: Threaded Hello World!    .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:41.095 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00167 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!     .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:41.097 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00168 :   INFO) &lt;br /&gt;
 csa101: Threaded Hello World!      .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:43.095 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00169 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!       .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As you can tell from the output log our component is up and running! It is continuously printing our 'Hello World!' output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Now change the state of the csa101SGI0 service group back to &amp;quot;locked-for-assignment&amp;quot; by running (in the SAFplus Platform Console): &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockAssignment sg csa101SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the tail -f output you should see:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Nov 12 12:07:17.591 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00625 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!  .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00626 :   INFO) &lt;br /&gt;
 Component [csa101I0] : PID [10950]. CSI Set Received&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00627 :   INFO) &lt;br /&gt;
 CSI Flags : [Target One]&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00628 :   INFO) &lt;br /&gt;
 CSI Name : [csa101CSII0]&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00629 :   INFO) &lt;br /&gt;
 HA state : [Quiesced]&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00630 :   INFO) &lt;br /&gt;
 csa101: Acknowledging new state quiesced&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.312 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00632 :   INFO) &lt;br /&gt;
 Component [csa101I0] : PID [10950]. CSI Remove Received&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.312 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00633 :   INFO)    &lt;br /&gt;
 CSI                     : csa101CSII0&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.312 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00634 :   INFO)    &lt;br /&gt;
 CSI Flags               : 0x2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Our component has been put into Lock Assignment state so our 'Hello World!' output has stopped printing to the log.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;At this point you can either unlock the service group to change its state to &amp;quot;unlocked&amp;quot; or you can lock it for instantiation to change it to state  &amp;quot;locked-for-instantiation&amp;quot;.  The latter will cause the csa101 process to die.  From state &amp;quot;locked-for-assignment&amp;quot;, it is possible to change the state to &amp;quot;locked-for-instantiation&amp;quot; by running (in the SAFplus Platform Console):&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockInstantiation sg csa101SGI0&lt;br /&gt;
cli[Test:SCNodeI0:CPM] -&amp;gt; end&lt;br /&gt;
cli[Test:SCNodeI0] -&amp;gt; end&lt;br /&gt;
cli[Test] -&amp;gt; bye&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Stopping SAFplus Platform===&lt;br /&gt;
&lt;br /&gt;
To stop SAFplus Platform on the System Controller&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a shell.&lt;br /&gt;
&amp;lt;li&amp;gt;ssh into the System Controller node as root.&lt;br /&gt;
&amp;lt;li&amp;gt;Once logged in, run the following command&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/asp&lt;br /&gt;
# etc/init.d/asp stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Summary and Next Steps==&lt;br /&gt;
In the csa101 example we learned the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to create a system model using the '''SAFplus Platform IDE'''.&lt;br /&gt;
&amp;lt;li&amp;gt;How to generate the source code.&lt;br /&gt;
&amp;lt;li&amp;gt;How to customize this source code to fit a specific application.&lt;br /&gt;
&amp;lt;li&amp;gt;How to configure and build the customized source code.&lt;br /&gt;
&amp;lt;li&amp;gt;How to make runtime images and deploy them to target machines.&lt;br /&gt;
&amp;lt;li&amp;gt;How to start and stop '''SAFplus'''.&lt;br /&gt;
&amp;lt;li&amp;gt;How to interact with system components using the '''SAFplus Platform Console'''.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next logical step would be to run through the '''SAFplus Platform Evaluation System User Guide'''. This guide goes over more complex system configurations and introduces new concepts.&lt;br /&gt;
&lt;br /&gt;
For more in depth information on the '''SAFplus Platform IDE''' see the '''SAFplus Platform IDE User Guide'''.&lt;br /&gt;
&lt;br /&gt;
For more in depth information on the '''SAFplus Platform SDK''' see the '''SAFplus Platform SDK User Guide'''.&lt;br /&gt;
&lt;br /&gt;
==Appendix A: target.conf Settings==&lt;br /&gt;
&lt;br /&gt;
Below is a description of the values in the settings in the &amp;lt;code&amp;gt;target.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''TRAP_IP''' (Mandatory): Specifies where the SNMP SubAgent should send traps at runtime.  If you do not have an SNMP SubAgent in your model specify '''127.0.0.1''' as the value.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
TRAP_IP=127.0.0.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''CMM_IP''' (Mandatory if deployed on an ATCA chassis): Specifies the IP address of the target system's chassis management module or shelf manager. &amp;lt;i&amp;gt;ATCA chassis Example&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
CMM_IP=169.254.1.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''CMM_USERNAME''' and '''CMM_PASSWORD''' (Mandatory if deployed on an ATCA chassis): Specifies the username and password required for the OpenClovis SAFplus Platform Chassis Manager to connect to the target system's chassis management module. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
CMM_USERNAME=root&lt;br /&gt;
CMM_PASSWORD=password&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''INSTALL_PREREQUISITES=YES|NO''' (Mandatory): Specifies whether the target images will include 3rd party runtime prerequisites or not.  Say '''YES''' if the target nodes do not meet the target host requirements specified in the Installation section of this document.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
INSTALL_PREREQUISITES=YES&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''INSTANTIATE_IMAGES=YES|NO''' (Mandatory): Specifies whether &amp;lt;code&amp;gt;make images&amp;lt;/code&amp;gt; will generate node-instance specific images instead of only generating node-type specific images.  This option is a development optimization for advanced users of SAFplus Platform SDK.  If unsure, say '''YES'''. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
INSTANTIATE_IMAGES=YES&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''CREATE_TARBALLS=YES|NO''' (Mandatory): Specifies whether the node-instance specific images created will be packaged into tarballs for deployment onto the target system.  If unsure, say '''YES'''.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE_TARBALLS=YES&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''TIPC_NETID''' (Mandatory): Specifies a unique identifier used by TIPC to set up interprocess communication across the deployed OpenClovis SAFplus Platform cluster.  This is an unsigned 32-bit integer, and &amp;lt;i&amp;gt;must&amp;lt;/i&amp;gt; be unique for every model that is deployed.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
TIPC_NETID=1340&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Node Instance Details''': These specify the node-instance specific parameters required for deploying the model. For each node in the model there is a corresponding entry in the file:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SLOT_&amp;lt;node instance name&amp;gt;''' (Mandatory): Specifies which slot the node is located in.  The first slot is slot 1 -- DO NOT USE SLOT NUMBER 0, it is invalid.  When deployed to an ATCA chassis, the physical slot in which the blade is actually installed will override this value.  When deployed to regular (non-ATCA) systems, this is a logical slot and must be unique for every node in the cluster. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
SLOT_SCNodeI0=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''LINK_&amp;lt;node instance name&amp;gt;''' (Optional): Specifies the ethernet interface used by the node for OpenClovis SAFplus Platform communication with the rest of the cluster.  If unspecified, this defaults to &amp;lt;code&amp;gt;eth0&amp;lt;/code&amp;gt;.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
LINK_SCNodeI0=eth0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''ARCH_&amp;lt;node instance name&amp;gt;''' (Optional if '''ARCH''' is specified): Specifies the target architecture of the node as a combination of machine architecture (MACH) and linux kernel version.  This is only required on a per-node basis if the target cluster has heterogeneous architectures across the nodes.  If it is a homogeneous cluster, a single '''ARCH''' parameter (described below) will suffice.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
ARCH_SCNodeI0=i386/linux-2.6.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''ARCH''' (Optional if node-specific '''ARCH_''' parameters are specified): Specifies the target architecture of all nodes in a homogeneous cluster as a combination of machine architecture (MACH) and linux kernel version.  Note: The build process automatically populates this variable based on the last target the model is built for.&amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
ARCH=i386/linux-2.6.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
For example, if we have a three-node cluster with the following details:&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot; width=&amp;quot;600&amp;quot;&lt;br /&gt;
|+ align=&amp;quot;bottom&amp;quot; | '''Example Node Instance Detail'''&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Node Name&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Slot Number&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Link Interface&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Architecture&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|SCNodeI0&lt;br /&gt;
|1&lt;br /&gt;
|eth0&lt;br /&gt;
|i386/linux-2.6.14&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|PayloadNodeI0&lt;br /&gt;
|3&lt;br /&gt;
|eth0&lt;br /&gt;
|i386/linux-2.6.14&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|PayloadNodeI1&lt;br /&gt;
|4&lt;br /&gt;
|eth1&lt;br /&gt;
|ppc/linux-2.6.9&lt;br /&gt;
|}&lt;br /&gt;
we would specify the node instance details as:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
SLOT_SCNodeI0=1&lt;br /&gt;
SLOT_PayloadNodeI0=3&lt;br /&gt;
SLOT_PayloadNodeI1=4&lt;br /&gt;
&lt;br /&gt;
LINK_SCNodeI0=eth0&lt;br /&gt;
LINK_PayloadNodeI0=eth0&lt;br /&gt;
LINK_PayloadNodeI1=eth1&lt;br /&gt;
&lt;br /&gt;
ARCH_SCNodeI0=i386/linux-2.6.14&lt;br /&gt;
ARCH_PayloadNodeI0=i386/linux-2.6.14&lt;br /&gt;
ARCH_PayloadNodeI1=ppc/linux-2.6.9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Appendix B: AMF Configuration Details==&lt;br /&gt;
This appendix gives brief descriptions of configuration details for instances of different entities (like Node, Service Group, Service Unit etc) that are present in the '''Clovis''' -&amp;gt; '''AMF Configuration''' dialog box.&lt;br /&gt;
&lt;br /&gt;
===Node Instance===&lt;br /&gt;
This screen displays the node instance that was created by the Node Instance Wizard. This node instance was created because the node type '''SCNode''' was selected on the wizard screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Node Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_Details_SCNodeI0.png|frame|center| '''Node Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Node Instance Name''': This field holds the name of the node instance. This name must be unique. The name that was generated combines the node type (SCNode), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''Node Type''': This field holds the node type that was selected on the wizard screen.&lt;br /&gt;
&amp;lt;li&amp;gt;'''MOID''': This is the unique identifier for the node instance. It was generated by the wizard. The format of this ID is a string representing the one and only instance of the chassis (\Chassis:0) defined in the Resource Editor followed by a string representing the first and only instance of the blade type (\SysBlade:0) that was selected in the Node Instance Wizard.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]'''MOID''' is an acronym for Managed Object Identifier. It must be unique and is used to identify which hardware chassis and blade type this instance will run on.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Unit Instance===&lt;br /&gt;
This screen displays the service unit instance that was created by the Service Group Instance Wizard. This service unit instance was created because the service unit type is associated with both the selected node type (SCNode) and the selected service group type (csa101SG) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SU Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_Details_csa101SUI0.png|frame|center| '''SU Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SU Instance Name''': This field holds the name of the service unit instance. This name must be unique. The name that was generated combines the service unit type (csa101SU), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''Service Unit Type''': This field holds the type of the service unit instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Component Instance===&lt;br /&gt;
This screen displays the component instance that was created by the Service Group Instance Wizard. This component instance was created because the component type is associated with the created parent service unit type (csa101SU) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Component Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_Details_csa101I0.png|frame|center| '''Component Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Component Instance Name''': This field holds the name of the component instance. This name must be unique. The name that was generated combines the component type (csa101), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''Component Type''': This field holds the type of the component instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Group Instance===&lt;br /&gt;
This screen displays the service group instance that was created by the Service Group Instance Wizard. This service group instance was created because the service group type '''csa101SG''' was selected on the wizard screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Group_List_csa101SGI0.png|frame|center| '''Service Group Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SG Instance Name''': This field holds the name of the service group instance. This name must be unique. The name that was generated combines the service group type (csa101SG), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''ServiceGroup Type''': This field holds the type of the service group instance.&lt;br /&gt;
&amp;lt;li&amp;gt;'''Associated Service Units''': This button is used to associate service unit instances with this service group instance. Creating this association indicates that the selected service unit(s) will run within this service group instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clicking the '''Associated Service Units''' Edit... button will display the following dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Associated Service Units Dialog'&amp;gt;&amp;lt;/span&amp;gt;[[File:Associated_Service_Units.png|frame|center| '''Associated Service Units Dialog''' ]]&lt;br /&gt;
&lt;br /&gt;
This dialog lists the service unit instances that can be associated with this service group instance. The list contains only one item, the service unit instance that was created by the wizard. This item is checked indicating that the wizard automatically chose this service unit instance to run within the service group instance.&lt;br /&gt;
&lt;br /&gt;
===Service Instance Instance===&lt;br /&gt;
This screen displays the service instance that was created by the Service Group Instance Wizard. This service instance was created because the service instance type is associated with the parent service group type (csa101SG) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Instance_List_csa101SII0.png|frame|center| '''Service Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Service Instance Name''': This field holds the name of the service instance. This name must be unique. The name that was generated combines the service instance type (csa101SI), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''ServiceInstance Type''': This field holds the type of the service instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Component Service Instance Instance===&lt;br /&gt;
This screen displays the component service instance that was created by the Service Group Instance Wizard. This component service instance was created because the component service instance is associated with the parent service instance type (csa101SI) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Component Service Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Component_Service_Instance_List_csa101CSII0.png|frame|center| '''Component Service Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Component Service Instance Name''': This field holds the name of the component service instance. This name must be unique. The name that was generated combines the component service instance type (csa101CSI), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''ComponentServiceInstance Type''': This field holds the type of the component service instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/tutorial</id>
		<title>Doc:latest/tutorial</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/tutorial"/>
				<updated>2016-12-06T18:40:42Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Customizing main.c */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Preface==&lt;br /&gt;
The ''SAFplus Platform Sample Application Tutorial'' is a comprehensive tutorial designed to highlight the steps involved in using SAFplus software to design and build a high availability system. In this tutorial you will learn to:&lt;br /&gt;
* Design a model using the SAFplus IDE&lt;br /&gt;
* Generate code from this model to provide middleware support&lt;br /&gt;
* Customize this code for a particular application&lt;br /&gt;
* Build and deploy the customized code&lt;br /&gt;
* Run the system to see the SAFplus Platform software in action&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Audience===&lt;br /&gt;
&amp;lt;br&amp;gt; ''SAFplus Platform Sample Application Tutorial''  is designed for system integrators, designers, and system architects. To use SAFplus Platform, you should be aware of the fundamentals of operation, management, and configuration of telecommunication and networking domains. You should also be familiar with C programming, UML notations, and have the basic knowledge of Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; This document assumes that you have installed the SAFplus Platform SDK, following the installation steps found in the ''SAFplus Platform Installation Guide''.&lt;br /&gt;
&lt;br /&gt;
===Documentation Conventions===&lt;br /&gt;
This guide uses different fonts and symbols to differentiate between document elements and types of information. These conventions are summarized in the following table.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#cdd6e6&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#d3e3ff&amp;quot;| Notation&lt;br /&gt;
!style=&amp;quot;background:#d3e3ff&amp;quot;| Description&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;background:#ffccaa&amp;quot; | &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Code&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|This font denotes the C code provided in various examples.&amp;lt;br&amp;gt;This font denotes function and variable names.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;background:#ffffaa&amp;quot; | &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Output&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|Terminal output.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;color:blue&amp;quot; | Cross reference&lt;br /&gt;
|This font denotes a hyperlink. You can click on the hyperlink text to access the reference location, which can be either a section within the guide or a URL link.&amp;lt;br&amp;gt;A cross reference refers to a section name and accesses the first page of that section.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;code&amp;gt;Filenames&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;DIR&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Files names, Directory paths.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|&amp;lt;code&amp;gt;$ Commands ''group_identifier''&amp;lt;/code&amp;gt; &lt;br /&gt;
| Commands to be run from a shell.&amp;lt;br&amp;gt; Italic text indicate an argument. This can be replaced with your desired value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]This indicates the presence of notes or annotations, related to the context of the document. &lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Caution.png]]This indicates that certain precautionary measures must be taken before performing a particular task.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Info.png]]This indicates that additional information is provided to you.&lt;br /&gt;
&lt;br /&gt;
As mentioned in the ''SAFplus Platform Installation Guide'' the default directory for installation is &amp;lt;code&amp;gt;/opt/clovis&amp;lt;/code&amp;gt; for root installation and &amp;lt;code&amp;gt;$HOME/clovis&amp;lt;/code&amp;gt; for non root users. Throughout this document we will use &amp;lt;code&amp;gt;&amp;lt;install_dir&amp;gt;&amp;lt;/code&amp;gt; to refer to the installation directory.&lt;br /&gt;
&lt;br /&gt;
===Related Documents===&lt;br /&gt;
For additional information about OpenClovis products, please refer to the following guides:&lt;br /&gt;
* '''[[Doc:latest/relnotes | SAFplus Platform Release Notes]]''' provides information about the software and the hardware required to install OpenClovis SAFplus Availability/Scalability Platform and Integrated Development Environment (IDE). It summarizes the additional features and enhancements of the product since the previous release. It also summarizes the issues and limitations of the product and provides workarounds wherever applicable.&lt;br /&gt;
* '''[[Doc:latest/safcompliance | SAFplus Platform SA-Forum Compliance]]''' describes the level of compliance of OpenClovis SAFplus Platform and its Application Programming Interface (API) with the relevant Service Availability Forum Specifications.&lt;br /&gt;
* '''[[Doc:latest/installguide | SAFplus Platform Installation Guide]]''' provides the system requirements, installation procedure for OpenClovis SAFplus Platform, IDE, and the Evaluation System.&lt;br /&gt;
* '''[[Doc:latest/tutorial | SAFplus Platform Sample Application Tutorial]]''' explains the steps to create and build a sample model using OpenClovis IDE and OpenClovis SAFplus Platform. It also provides troubleshooting information for this process. This provides the logical first step in understanding the SAFplus Platform offering.&lt;br /&gt;
* '''[[Doc:latest/evalguide | SAFplus Platform Evaluation System User Guide]]''' provides all the required information to configure and run the sample models packaged within the Evaluation System. This document also provides good understanding of OpenClovis SAFplus Platform's functionality. This is the natural follow on to the ''OpenClovis Sample Application Tutorial'' as it builds on the example created in that document. &lt;br /&gt;
* '''[[Doc:latest/sdkguide | SAFplus Platform SDK User Guide]]''' provides information about SAFplus Availability/Scalability Platform architecture, various SAFplus Platform components, and their interactions. This guide helps you to configure the OpenClovis SAFplus Platform components, compile, and execute the SAFplus Platform code to build your custom application.&lt;br /&gt;
* '''[[Doc:latest/ideguide | SAFplus Platform IDE User Guide]]''' describes the usage of Integrated Development Environment (IDE), a graphical development environment that complements the SAFplus Platform. This guide helps you to understand how to use the various features of the IDE to build the application.&lt;br /&gt;
* '''[[Doc:latest/logtoolguide | SAFplus Platform Log Tool User Guide]]''' provides information about the usage of OpenClovis Log Tool. OpenClovis Log Tool is an interactive utility that allows you to view binary log files in a readable format and hence monitor system errors, warnings, and other log information. Log Tool allows you to format the &amp;lt;code&amp;gt;.log&amp;lt;/code&amp;gt; files and filter them to view the required entries.&lt;br /&gt;
* '''SAFplus Platform API Reference Guide [http://www.openclovis.org/doc/latest/apirefs/index.html]''' is provided for each component. It describes the Application Programming Interface (API), Service Model, and Management Information Model of the various OpenClovis Application Service Platform (SAFplus Platform) services. It helps the developer to understand the capabilities of the SAFplus Platform services and the APIs provided by these services.&lt;br /&gt;
* '''[[SAFplus Platform Console Reference Guide]]''' provides details about managing applications built on SAFplus Platform using the SAFplus Platform runtime debug console commands. SAFplus Platform Console commands can be used to manage, monitor, and test your application.&lt;br /&gt;
&lt;br /&gt;
===OpenClovis Online Technical Support===&lt;br /&gt;
OpenClovis customers and partners can register on our Web site and receive personalized services and information. If you need any support or assistance while working on OpenClovis products, you can access the following: URL: http://www.openclovis.com. Send your queries to: support@openclovis.com.&lt;br /&gt;
&lt;br /&gt;
===Documentation Feedback===&lt;br /&gt;
We are interested in hearing from our customers on the documentation provided with the product. Let us know your comments and suggestions on improving the documentation at OpenClovis Inc. Send your comments to: support@openclovis.com. Or even better, edit (or comment in) the page on our documentation wiki located at [http://help.openclovis.com http://help.openclovis.com].&lt;br /&gt;
&lt;br /&gt;
==Our Example: The csa101 System==&lt;br /&gt;
The ''SAFplus Platform Sample Application Tutorial'' will take you through a series of examples each introducing a key concept of the product. Each example builds on the example before it so it is important to go through them in order. The examples are named so that it is easy to determine their sequence. The examples all begin with the letters '''csa''' (standing for Clovis Sample Application) and end with a number. Our first example will be '''csa101'''.&lt;br /&gt;
&lt;br /&gt;
The purpose of our first example is to highlight basic component management. It introduces the basic skeleton of a SAFplus Platform based application component and illustrates how it interacts with the System. It demonstrates basic component registration and life-cycle management.&lt;br /&gt;
&lt;br /&gt;
We will keep this first example very simple. It will consist of the SAFplus Platform running a small component named '''csa101'''. All that this component will do is continuously print 'Hello World!' to a log file. While this component is not very exciting, it will allow us to easily see when the application is in a running state and when it is not. This will allow us to focus on the infrastructure of SAFplus Platform and how the application interfaces with it.&lt;br /&gt;
&lt;br /&gt;
For this example we will assume that we have a chassis with five slots. We will have one type of blade in our example, a '''System Controller'''.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]With the type of model we are developing we would typically define two blade types to install in these slots. The first blade type would be a '''System Controller''' blade (which is responsible for running the SAFplus Platform software which manages application startup, shutdown, failover, etc.) and the second blade type would be a '''Payload''' blade (which is responsible for running our custom '''csa101''' application). However, for the purpose of simplifying the deployment of our system, we will define only the '''System Controller''' blade type and have both the SAFplus Platform and component application run on this one blade. This will allow the example to be run on a single PC.&lt;br /&gt;
&lt;br /&gt;
==Creating the csa101 Model==&lt;br /&gt;
The first step in setting up our example is to create a model which represents the system that we will eventually deploy. This is done through the '''SAFplus Platform IDE'''. In this chapter we will step through the following tasks:&lt;br /&gt;
* Create a project area&lt;br /&gt;
* Launch the '''SAFplus Platform IDE'''&lt;br /&gt;
* Create the IDE project&lt;br /&gt;
* Specify the Resource model (the types of physical hardware in our system)&lt;br /&gt;
* Specify the Component model (the types of components or applications in our system)&lt;br /&gt;
* Specify which Components run on which Resources&lt;br /&gt;
* Specify important build and boot parameters&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Launching the SAFplus Platform IDE===&lt;br /&gt;
You can launch the '''SAFplus Platform IDE''' from the command line. If you chose to create symbolic links during installation you can simply enter &amp;lt;code&amp;gt;'''cl-ide'''&amp;lt;/code&amp;gt; from any directory. If you did not create symbolic links during installation you can either:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the installation directory to the shells search path and then launch the IDE. For example with a bash shell, &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# export PATH=$PATH:$install_dir/6.1/sdk/bin&lt;br /&gt;
# cl-ide&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the command&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# &amp;lt;install_dir&amp;gt;/6.1/sdk/bin/cl-ide&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The splash screen for SAFplus Platform IDE is displayed as illustrated in Figure [[#SAFplus Platform IDE Opening Screen | SAFplus Platform IDE Opening Screen]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Opening Screen'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_GettingStartedIDE_OpeningScreen.png|frame|center| '''SAFplus Platform IDE Opening Screen''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will then be prompted to select a workspace in which to do your work as illustrated in Figure [[#SAFplus Platform IDE Workspace Launcher | SAFplus Platform IDE Workspace Launcher]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Workspace Launcher'&amp;gt;&amp;lt;/span&amp;gt;[[File:Workspace_Launcher.png|frame|center| '''SAFplus Platform IDE Workspace Launcher''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The workspace you select should correspond to the project area that you created in the previous section (in this case &amp;quot;/home/clovis/projectarea1&amp;quot;). Note that the workspace includes a subdirectory of &amp;quot;/ide_workspace&amp;quot;. This is done strictly for organizational purposes. It keeps the IDE models separate from the generated SAFplus Platform models and code.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select the workspace and click  '''OK'''  to launch SAFplus Platform IDE as illustrated in the Figure [[#SAFplus Platform IDE Welcome Screen | SAFplus Platform IDE Welcome Screen]].&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Welcome Screen'&amp;gt;&amp;lt;/span&amp;gt;[[File:IDE_Welcome_Screen.png|frame|center| '''SAFplus Platform IDE Welcome Screen''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''SAFplus Platform''' IDE is launched and you are now looking at the main work area. For more information about the components of this main work area including the SAFplus Platform IDE menu and toolbar, see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Creating the Sample Project===&lt;br /&gt;
We will now create a project within the '''SAFplus Platform IDE'''. This project will hold both the resource model and the component model for our example system. The resource model is a physical view of the resources (the chassis, the blade types, etc.) in our system. The component model is a logical view of the components (applications, etc.) in our system.&lt;br /&gt;
&lt;br /&gt;
We will be using the '''New Project Wizard''' to create our project. The wizard captures some high-level information about the system that we are building and performs a lot of the basic setup for us.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]]The same model that we are building through the wizard could also be created manually through the Resource and Component Editors. For more information on the Resource and Component Editors see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To launch the '''New Project Wizard''' select  '''File'''  &amp;gt;  '''New''' &amp;gt;  '''Project''' from the IDE menu bar.&lt;br /&gt;
&lt;br /&gt;
The  '''New Project Wizard''' is displayed and  '''Clovis System Project'''  is selected by default as illustrated in Figure [[#New Project Wizard | New Project Wizard]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='New Project Wizard'&amp;gt;&amp;lt;/span&amp;gt;[[File:New_Project_Wizard.png|frame|center| '''New Project Wizard''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click  '''Next'''. The  '''Clovis System Project''' window is displayed as illustrated in Figure [[#Clovis System Project | Clovis System Project]].&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id='Clovis System Project'&amp;gt;&amp;lt;/span&amp;gt;[[File:Clovis_System_Project.png|frame|center| '''Clovis System Project''' ]]&lt;br /&gt;
&lt;br /&gt;
Enter the following information:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Project Name''' : Enter the name of your new project as  '''SampleModel'''.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]Do not use spaces or special characters for the project name. The project name can be alphanumeric, but cannot start with a number or have only numbers.&lt;br /&gt;
&amp;lt;br&amp;gt;Select  '''Use default'''  to use the same directory mentioned in the  '''Directory'''  field. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Project Area Location''': Enter the location where the generated source code for the model should be stored.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]This can be any existing directory but is usually the project area that was created in the previous section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Python Location''': Enter the location where Python 2.5.0 or above is installed on your system. If Python 2.5.0 or above was installed by SAFplus Platform SDK, the directory is  &amp;lt;code&amp;gt;'''&amp;lt;installation_directory&amp;gt;/6.1/buildtools/local/bin'''&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Add New Blade Type''' window is displayed. This dialog is used to define the blade types that are in our system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Add New Blade Type'&amp;gt;&amp;lt;/span&amp;gt;[[File:Add_New_Blade_Type.png|frame|center| '''Add New Blade Type''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember that the system we are modelling has only one blade type...a System Controller.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a new blade type to the list. Name this blade type 'SysBlade' (for System Controller blade).&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Add New SAF Node Type''' window is displayed. This dialog is used to define the type of logical node that will be run on the corresponding blade type defined in the previous dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Add New SAF Node Type'&amp;gt;&amp;lt;/span&amp;gt;[[File:Add_New_SAF_Node_Type.png|frame|center| '''Add New SAF Node Type''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Node types represent groups of software. They are classified as either a System Controller class or a Payload class. This distinction gives the node type certain characteristics which cause it to behave in a well-defined manner. Since we have only a System Controller in our system we will add a node type of class System Controller.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a new node type to the list. Name the node type 'SCNode' and ensure that its node class is 'System Controller (SAF Class B)'.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Specify Program Names''' window is displayed. This dialog is used to create programs or SAF Service Types and associate them with the SAF Node Types specified in the previous dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Specify Program Names'&amp;gt;&amp;lt;/span&amp;gt;[[File:SAF_Service_Type_Name.png|frame|center| '''Specify Program Names''' ]]&lt;br /&gt;
&lt;br /&gt;
In our system we need one SAF Service Type which represents our high availability software (csa101 that continously prints &amp;quot;Hello World!&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a program name to the list. Change the program name to 'csa101' and associate the program with the 'SCNode' node type.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Finish'''. This will create the sample model using the blade type, node type, and program name information collected through the 'New Project Wizard' dialogs.&lt;br /&gt;
&lt;br /&gt;
===Viewing the Model===&lt;br /&gt;
&lt;br /&gt;
====The SAFplus Platform IDE Perspective====&lt;br /&gt;
Once the wizard pages are closed you will be returned to the main IDE view also known as the '''SAFplus Platform IDE Perspective'''. On the left hand side of this view you will see the '''Clovis Workspace''' pane which contains the new project you just created with all project related files and folders. The folders are displayed based on your filter settings. With the default filter settings, the folders shown in Figure [[#Clovis Workspace|Clovis Workspace]] is displayed in the '''Clovis Workspace''' pane. For information about filter settings, refer  ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Clovis Workspace'&amp;gt;&amp;lt;/span&amp;gt;[[File:Clovis_Workspace.png|frame|center|Clovis Workspace]]&lt;br /&gt;
&lt;br /&gt;
By default, the '''Resource''' and '''Component''' Editor views are available for the created project. To view them, click '''Clovis''' on the menu bar at the top of the screen and select '''Resource Editor''' or  '''Component Editor'''  from the menu. You can also click '''Resource Editor''' or '''Component Editor''' icons from the tool bar as shown in Figure [[#SAFplus Platform IDE Tool Bar | SAFplus Platform IDE Tool Bar]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Tool Bar'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_Toolbar.png|frame|center| '''SAFplus Platform IDE Tool Bar''' ]]&lt;br /&gt;
&lt;br /&gt;
====Resource Editor View====&lt;br /&gt;
The '''Resource Editor''' shows the types of physical objects in our system. It gives us a place to create new objects and interact with the objects that already exist. The '''Resource Editor''' view for our model should look similar to the following figure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform Resource Editor'&amp;gt;&amp;lt;/span&amp;gt;[[File:Resource_Editor1.png|frame|center| '''SAFplus Platform Resource Editor''' ]]&lt;br /&gt;
&lt;br /&gt;
This editor always has a '''Chassis''' object which is the root of all other objects in the editor. In our case it also has the '''SysBlade''' blade type that we created through the '''Project Creation Wizard'''. You will also notice that the '''SysBlade''' is attached to the '''Chassis''' using a '''Composition''' relationship indicating that '''SysBlade'''s reside within the '''Chassis'''.&lt;br /&gt;
&lt;br /&gt;
On the right hand side of the editor view you will see the '''Palette''' which can be expanded and collapsed. Expanding the '''Palette''' you will see the list of objects that can be dragged onto the editor view to add to our model. Once an object is on the editor view you can view and change its properties by right clicking on the object and selecting '''Properties...''' from the context menu.&lt;br /&gt;
&lt;br /&gt;
For more information about the '''Resource Editor''' view see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
====Component Editor View====&lt;br /&gt;
The '''Component Editor''' shows the types of logical objects in our system. It gives us a place to create new objects and interact with the objects that already exist. The '''Component Editor''' view for our model should look similar to the following figure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform Component Editor'&amp;gt;&amp;lt;/span&amp;gt;[[File:Component_Editor1.png|frame|center| '''SAFplus Platform Component Editor''' ]]&lt;br /&gt;
&lt;br /&gt;
This editor always has a '''Cluster''' object which is the root of all other objects in the editor. In our case it also has the '''SCNode''' node type and the '''csa101''' SAF Service Type (a combination of Service Group, Service Unit, Service Instance, Component Service Instance, and SAF Component) that we created through the '''Project Creation Wizard'''. These have all been automatically attached in a way that makes a working model.&lt;br /&gt;
&lt;br /&gt;
On the right hand side of the editor view you will see the '''Palette''' which can be expanded and collapsed. Expanding the '''Palette''' you will see the list of objects that can be dragged onto the editor view to add to our model. Once an object is on the editor view you can view and change its properties by right clicking on the object and selecting '''Properties...''' from the context menu.&lt;br /&gt;
&lt;br /&gt;
For more information about the '''Component Editor''' view see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Configuring the Components===&lt;br /&gt;
The '''New Project Wizard''' that we used to create our project configured the system using the most common options. We will have to make a few changes to this model in order for our example to work. We will make these changes in the '''Component Editor''' view.&lt;br /&gt;
&lt;br /&gt;
In the Component Editor you will notice seven different objects that were created by the wizard. The first two of these are:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Cluster: The root object of all other objects in the Component Editor view.&lt;br /&gt;
&amp;lt;li&amp;gt;SCNode: This is the SAF Node Type that we specified during project creation.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next five objects all make up the Program or SAF Service Type that we specified on the last dialog of the New Project Wizard. These objects are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;csa101SG: This is the Service Group representing our high availability software component.&lt;br /&gt;
&amp;lt;li&amp;gt;csa101SU: This is the Service Unit that is logically associated with the SCNode SAF Node Type.&lt;br /&gt;
&amp;lt;li&amp;gt;csa101SI: This is the Service Instance&lt;br /&gt;
&amp;lt;li&amp;gt;csa101CSI: This is the Component Service Instance&lt;br /&gt;
&amp;lt;li&amp;gt;csa101: This is the SAF Component which represents our program or executable.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will be making changes to the Service Group (csa101SG), the Service Instance (csa101SI), and the SAF Component (csa101).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Configuring the Service Group====&lt;br /&gt;
To make changes to the Service Group double-click on the box titled '''csa101SG'''. The '''Service Group Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Group_Details.png|frame|center| '''Service Group Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first change we want to make is to the '''Redundancy Model'''. The '''Redundancy Model''' is the strategy that is used by the SAFplus Platform system to recover from a node failure. For our simple model (which only has one node) we are not going to rely on any failover recovery so change the '''Redundancy Model''' to 'No Redundancy' as shown.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]You will notice that when you change the redundancy model some of the other fields are modified automatically and become read-only. This is to ensure integrity of the redundancy models.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The second change that we want to make is to the '''Admin State'''. The '''Admin State''' defines the state of the component when the system is first brought up. In our case we want to change the '''Admin State''' to be 'Locked Initialized'. This means that when the system first starts up this '''Service Group''' (and its subcomponents) will be initialized but not yet put into a running state. So our csa101 application will not yet start printing &amp;quot;Hello World!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When you are finished making the changes click the '''OK''' button to commit the changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Configuring the Service Instance====&lt;br /&gt;
To make changes to the Service Instance double-click on the box titled '''csa101SI'''. The '''Service Instance Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Instance_Details.png|frame|center| '''Service Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The only change we want to make here is to the '''Number of standby assignments'''. This value represents the number of components that will be waiting to take over during a node failure and goes hand-in-hand with the '''Redundancy Model''' that we selected for the Service Group. Since we selected 'No Redundancy' for our '''Redundancy Model''' we need to set this value to 0...since we are not supporting any failover in this model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When you are finished making the changes click the '''OK''' button to commit the changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Configuring the SAF Component====&lt;br /&gt;
To make changes to the SAF Component double-click on the box titled '''csa101'''. The '''SAF Component Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAF Component Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:SAF_Component_Details.png|frame|center| '''SAF Component Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The SAF Component represents our high availabilty program or executable. We need to pass a command line argument to this executable. The reason for this argument is to force the program to print the 'Hello World!' output to a special log file for our viewing. We will look at this more closely when we customize our code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To add command line parameters click the '''Edit...''' button corresponding to the '''Command line Arguments''' label.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''Command line Argument Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Command line Argument Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Command_Line_Argument_Details.png|frame|center| '''Command line Argument Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''New''' button to add a new value to the list.&lt;br /&gt;
&amp;lt;li&amp;gt;Click on the new value in the list and it will become editable. Change the value to '''-p'''.&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''OK''' button to save and close the dialog.&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''OK''' button on the '''SAF Component Details''' dialog to commit the changes to the SAF Component and close the dialog.&lt;br /&gt;
&amp;lt;li&amp;gt;Save the component model using the '''File &amp;gt; Save''' menu item.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Configuring Physical Instances===&lt;br /&gt;
The configuration of our logical models is complete. During this process we have defined all of the 'types' of objects in our system. Now it is time to configure actual instances of those objects so that they can be built and deployed.&lt;br /&gt;
&lt;br /&gt;
Object instance configuration is done through the Availability Management Framework (AMF) via the '''AMF Configuration''' dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To launch this dialog go to the the '''Clovis''' menu and select '''AMF Configuration...'''&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''AMF Configuration''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='AMF Configuration Dialog'&amp;gt;&amp;lt;/span&amp;gt;[[File:AMF_Configuration.png|frame|center| '''AMF Configuration Dialog''' ]]&lt;br /&gt;
&lt;br /&gt;
You will note from the instructions on this page that the physical instances representing the objects in our model can be created manually or by using wizards. Using the wizards will save us both typing and time so we will use these instead of creating each instance manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Creating Node Instances====&lt;br /&gt;
First we will create actual instances of the Node Types (in our case only one Node Type...SCNode) we created in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double-click AMF Configuration in the left hand pane. The Node Instance List appears.&lt;br /&gt;
&amp;lt;li&amp;gt;Click on Node Instance List. The right hand pane displays the fields we must fill out to create our node instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the right hand pane:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select SCNode for the '''Node Type'''.&lt;br /&gt;
&amp;lt;li&amp;gt;Select SysBlade for the '''Blade type'''.&lt;br /&gt;
&amp;lt;li&amp;gt;Enter 1 for the '''Node Count'''.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The complete form should look like the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Node Wizard Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_List.png|frame|center| '''Node Wizard Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''Create Instance Tree''' button to create our node instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expanding the '''Node Instance List''' branch of the '''AMF Configuration''' tree in the left-hand pane reveals a new node instance named SCNodeI0 (indicating SCNode Instance 0).&lt;br /&gt;
&lt;br /&gt;
====Creating Service Group Instances====&lt;br /&gt;
Now we will create actual instances of the Service Groups that we defined in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click on Service Group List. The right hand pane displays the fields we must fill out to create our service group instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the right hand pane:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select csa101SG (the only service group type we defined) for the '''Service Group Type'''.&lt;br /&gt;
*The '''Associated Node Instances''' list will be populated with all of the node instances that can be associated with the selected service group type.&lt;br /&gt;
&amp;lt;li&amp;gt;Select SCNodeI0 from the '''Associated Node Instances''' list.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The completed form should look like the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Wizard Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Group_List.png|frame|center| '''Service Group Wizard Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''Create Instance Tree''' button to create our service group instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you now completely expand the '''AMF Configuration''' branch of the tree in the left-hand pane you will see the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='AMS Configuration Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:AMF_Configuration_Final.png|frame|center| '''AMF Configuration Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
Notice that not only have the wizards created the node and service group instances for you, they have also filled out the entire instance tree. This was accomplished based on two key sets of information. The first of these is the association that was made between the service group type and the node instance in the '''Service Group Wizard'''. The second set of information is the component model that we created through the New Project Wizard and the Component Editor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]For more information regarding the specific properties of the generated instances see [[#Appendix B: AMF Configuration Instance Details|Appendix B: AMF Configuration Instance Details]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Thats it. We are done modelling the csa101 example!&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the OK button to commit our changes and close the dialog. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
Now its time to generate the framework code.&lt;br /&gt;
&lt;br /&gt;
==Generating the csa101 Code==&lt;br /&gt;
In this step we generate the source code for our example. The code that will be created is the framework code that handles all of the low level functionality provided by SAFplus Platform.&lt;br /&gt;
&lt;br /&gt;
To generate the source code go to the '''Project''' menu and select '''Generate Source'''. Several progress dialogs will appear and after a few seconds code generation will be complete.&lt;br /&gt;
&lt;br /&gt;
The source code and configuration XML files are generated and placed in subdirectories of the '''Project Area Location''' that we specified in the '''New Project Wizard'''. You can review this location by using the '''Project &amp;gt; Properties''' menu to get to the '''Project Properties''' dialog and then selecting '''Clovis System Project''' in the left hand pane.&lt;br /&gt;
&lt;br /&gt;
You can review the generated code from within the SAFplus Platform IDE. To do this go to the '''Clovis Workspace''' pane and expand the '''SampleModel''' node. The node tree should look like the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Clovis Workspace Code Tree'&amp;gt;&amp;lt;/span&amp;gt;[[File:Clovis_Workspace_Generate_Source.png|frame|center| '''Clovis Workspace Code Tree''' ]]&lt;br /&gt;
&lt;br /&gt;
The code of particular interest to our example is in the SampleModel/src/app/csa101 branch of the tree. This is the code for our csa101 example. The csa101 example consist of one C module (&amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt;). There is also a make file that will be used for building the application. The &amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt; file implements our 'Hello World!' application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]If you run code generation a second time you will be presented with a dialog box asking if you would like to make a backup copy of the existing source code before proceeding. You can answer No to this dialog.&lt;br /&gt;
&lt;br /&gt;
==Customizing the csa101 Code==&lt;br /&gt;
While the code that was generated in the previous section can be built and run we want to make some changes to it so that we can easily see what our example is doing. For our example we will be changing one source file (&amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt;) and two make files.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]In a real production situation this is the point where you would customize the code to perform the specific tasks of your product.&lt;br /&gt;
&lt;br /&gt;
You will notice in the C file that there are several places where you see the following comment block.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 // ...&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Makefiles have a similar convention but with a slightly different syntax.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|Makefile&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
&lt;br /&gt;
 # ---END_APPLICATION_CODE---&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These are sections of the file where it is safe to enter custom application code without having to worry about that code being overwritten if you were to again perform '''Generate Source''' for your model. This is important since the typical development cycle is an iterative process where you will return to the IDE to make modifications to your model.&lt;br /&gt;
&lt;br /&gt;
To simplify the process of building and running the csa101 example, OpenClovis, Inc. has already made the necessary code customizations and shipped this code with the SAFplus Platform SDK. At this point you can simply replace the generated source files with these customized versions to avoid typing in the changes. We will go over each customization below and explain what was done.&lt;br /&gt;
&lt;br /&gt;
To replace the generated files with the customized versions shipped with the SAFplus Platform SDK follow these instructions.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]  The sample applications containing the csa101 example can be found under the installation directory at &amp;lt;code&amp;gt;&amp;lt;install_dir&amp;gt;/6.1/sdk/src/examples/eval&amp;lt;/code&amp;gt;.  For example, this directory is located at &amp;lt;code&amp;gt;/opt/clovis/6.1/sdk/src/examples/eval&amp;lt;/code&amp;gt; for &amp;quot;default&amp;quot; installations.  We will refer to this directory in the remaining of this section as &amp;lt;code&amp;gt;&amp;lt;eval_dir&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Exit the SAFplus Platform IDE using the '''File &amp;gt; Exit''' menu item. If you are prompted to save changes before exiting answer yes.&lt;br /&gt;
&amp;lt;li&amp;gt;Navigate to the source code work area.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cd /home/clovis/projectarea1/ide_workspace/SampleModel/src/app&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using your favorite editor open the file &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; that resides in this directory. This is the application make file.&lt;br /&gt;
&amp;lt;li&amp;gt;Add the following line to this file within the first &amp;lt;code&amp;gt;BEGIN_APPLICATION_CODE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;END_APPLICATION_CODE&amp;lt;/code&amp;gt; comment block.  This will instruct the build process to build our custom output library.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;SUBDIRS += ev&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Save this file and exit the editor.&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the following command to copy the output package to our working area.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cp -r &amp;lt;eval_dir&amp;gt;/src/app/ev .&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Navigate to the component code work area.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cd csa101&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the following command to copy the csa101 source code.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cp &amp;lt;eval_dir&amp;gt;/src/app/csa101Comp/main.c .&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the following command to copy the component make file.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cp &amp;lt;eval_dir&amp;gt;/src/app/csa101Comp/Makefile .&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Restart the SAFplus Platform IDE.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cl-ide&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Customizing main.c===&lt;br /&gt;
The &amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt; file is the C module which will implement our 'Hello World!' behavior. We have to make changes in several parts of this file.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]If you copied the files as instructed in the section above then these changes have already been made to the files. Use this section to review and understand the changes.&lt;br /&gt;
&lt;br /&gt;
In the include section of this file we have added a new include for &amp;lt;code&amp;gt;ev.h&amp;lt;/code&amp;gt;. This refers to a special output library that we copied to our work area in the previous section. This output library is used to redirect output from the application to a component specific log. This is purely cosmetic but it will allow us to easily monitor what is happening when we run our example.&lt;br /&gt;
Also, we change the logging from the default &amp;quot;application&amp;quot; stream to a custom stream. To do this, we include the header that defines our config routines, change the default &amp;quot;clLogApp&amp;quot; macro to use a different stream, and define that stream as a global variable:&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
   ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;../ev/ev.h&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
 #define clprintf(severity, ...)   clAppLog(gEvalLogStream, severity, 10, &lt;br /&gt;
         &amp;quot;MAI&amp;quot;, CL_LOG_CONTEXT_UNSPECIFIED,__VA_ARGS__)&lt;br /&gt;
 ...&lt;br /&gt;
 ClLogStreamHandleT  gEvalLogStream = CL_HANDLE_INVALID_VALUE;&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Next we define a static variables that will keep track of the state of our application and a function to aid in showing when the application is running. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
   ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 static int running = 0;&lt;br /&gt;
&lt;br /&gt;
 static char*&lt;br /&gt;
 show_progress(void)&lt;br /&gt;
 {&lt;br /&gt;
     static char bar[] = &amp;quot;          .&amp;quot;;&lt;br /&gt;
     static int progress = 0;&lt;br /&gt;
&lt;br /&gt;
     /* Show a little progress bar */&lt;br /&gt;
     return &amp;amp;bar[sizeof(bar)-2-(progress++)%(sizeof(bar)-2)];&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
The &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; flag will be used to indicate whether the current application is active or suspended.&lt;br /&gt;
The function &amp;lt;code&amp;gt;show_progress&amp;lt;/code&amp;gt; returns a pointer to a c string with a number of spaces followed by a '.' character. The number of spaces in the string cycles from zero to an upper bound. This is used later on to provide visual indication of the progress of the application's output.&lt;br /&gt;
&lt;br /&gt;
Next we have added a function &amp;lt;code&amp;gt;activeLoop&amp;lt;/code&amp;gt; to print the output. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void* activeLoop(void* p)&lt;br /&gt;
{&lt;br /&gt;
    while (running)&lt;br /&gt;
    {&lt;br /&gt;
        clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: Threaded Hello World! %s\n&amp;quot;,     &lt;br /&gt;
                 show_progress());&lt;br /&gt;
        sleep(2);&lt;br /&gt;
    }&lt;br /&gt;
    return NULL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Notice the while loop condition. This function uses the &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; variable that was initialized to 0, but set to 1 when the application was told to become active. The loop will keep running until &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; is set to 0, when the application either stops or told to stop being active. The work of the application goes next: printing &amp;quot;Hello World!&amp;quot; along with the progress indicator.  You could replace this with the application's real task.  Finally, the command &amp;lt;code&amp;gt;sleep(2)&amp;lt;/code&amp;gt; simply sleeps for two seconds so as not to fill log files too quickly.&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; becomes zero, we return from the function. &lt;br /&gt;
&lt;br /&gt;
Next, the log stream is initialized in the &amp;lt;code&amp;gt;initializeAmf&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
/*  &lt;br /&gt;
 * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
/* Set up console redirection for demo purposes */&lt;br /&gt;
clEvalAppLogStreamOpen((ClCharT *)appName.value, &amp;amp;gEvalLogStream);&lt;br /&gt;
...&lt;br /&gt;
clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: Instantiated as component instance %s.&amp;quot;, appName.value);&lt;br /&gt;
clprintf(CL_LOG_SEV_INFO,&amp;quot;%s: Waiting for CSI assignment...&amp;quot;, appName.value);&lt;br /&gt;
&lt;br /&gt;
/*  &lt;br /&gt;
 * ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Next we indicate log stream when we are exiting. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
/*  &lt;br /&gt;
 * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 clEvalAppLogStreamClose(gEvalLogStream);&lt;br /&gt;
/*  &lt;br /&gt;
 * ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This will cause &amp;lt;code&amp;gt;activeLoop&amp;lt;/code&amp;gt; function to exit.&lt;br /&gt;
Next we will put in code to manage the state of our application.&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
void safAssignWork(SaInvocationT       invocation,&lt;br /&gt;
                   const SaNameT       *compName,&lt;br /&gt;
                   SaAmfHAStateT       haState,&lt;br /&gt;
                   SaAmfCSIDescriptorT csiDescriptor)&lt;br /&gt;
{&lt;br /&gt;
    /*&lt;br /&gt;
     * ---BEGIN_APPLICATION_CODE--- &lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    // ...&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * ---END_APPLICATION_CODE---&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Print information about the CSI Set&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    clprintf (CL_LOG_SEV_INFO, &amp;quot;Component [%.*s] : PID [%d]. CSI Set Received\n&amp;quot;,&lt;br /&gt;
              compName-&amp;gt;length, compName-&amp;gt;value, mypid);&lt;br /&gt;
&lt;br /&gt;
    printCSI(csiDescriptor, haState);&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Take appropriate action based on state&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    switch ( haState )&lt;br /&gt;
    {&lt;br /&gt;
        case SA_AMF_HA_ACTIVE:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to take the active HA state &lt;br /&gt;
             * for the CSI.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
            &lt;br /&gt;
            pthread_t thr;&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: ACTIVE state requested; activating service\n&amp;quot;);&lt;br /&gt;
            running = 1;&lt;br /&gt;
            pthread_create(&amp;amp;thr,NULL,activeLoop,NULL);&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_STANDBY:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to take the standby HA state &lt;br /&gt;
             * for this CSI.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: Standby state requested&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_QUIESCED:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to quiesce the CSI currently&lt;br /&gt;
             * assigned the active or quiescing HA state. The application &lt;br /&gt;
             * must stop work associated with the CSI immediately.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: Acknowledging new state quiesced&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
        case SA_AMF_HA_QUIESCING:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to quiesce the CSI currently&lt;br /&gt;
             * assigned the active HA state. The application must stop work&lt;br /&gt;
             * associated with the CSI gracefully and not accept any new&lt;br /&gt;
             * workloads while the work is being terminated.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: Signaling completion of QUIESCING&amp;quot;);&lt;br /&gt;
              running = 0;&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfCSIQuiescingComplete(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
We have modified the &amp;lt;code&amp;gt;safAssignWork&amp;lt;/code&amp;gt; callback function to let our application know what to do when the state changes. In the case where the state changes to &amp;lt;code&amp;gt;SA_AMF_HA_ACTIVE&amp;lt;/code&amp;gt; we set the &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; variable to 1. This will cause our application to spawns a thread which calls &amp;lt;code&amp;gt;activeLoop&amp;lt;/code&amp;gt; function and start printing the 'Hello World!' message. For any other state change we set the &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; variable to 0 which will cause the message to stop printing. For any state change we print out a message indicating the new state of the application.&lt;br /&gt;
&lt;br /&gt;
The example also demonstrates a non-threaded approach.  But first, some background: for both threaded and non-threaded applications, the main must have a &amp;quot;dispatch&amp;quot; loop that handles incoming AMF notifications and calls the relevant callback.  So to implement a single threaded SAF aware application, the programmer must modify this dispatch loop adding active (and potentially standby) functionality:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
main(...)&lt;br /&gt;
&lt;br /&gt;
    do&lt;br /&gt;
    {&lt;br /&gt;
        struct timeval timeout;&lt;br /&gt;
        timeout.tv_sec = 2; timeout.tv_usec = 0;&lt;br /&gt;
&lt;br /&gt;
        FD_ZERO(&amp;amp;read_fds);&lt;br /&gt;
        FD_SET(dispatch_fd, &amp;amp;read_fds);&lt;br /&gt;
&lt;br /&gt;
        if( select(dispatch_fd + 1, &amp;amp;read_fds, NULL, NULL, &amp;amp;timeout) &amp;lt; 0)&lt;br /&gt;
        {&lt;br /&gt;
            if (EINTR == errno)&lt;br /&gt;
            {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
		    clprintf (CL_LOG_SEV_ERROR, &amp;quot;Error in select()&amp;quot;);&lt;br /&gt;
			perror(&amp;quot;&amp;quot;);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        if (FD_ISSET(dispatch_fd,&amp;amp;read_fds))&lt;br /&gt;
        {&lt;br /&gt;
            saAmfDispatch(amfHandle, SA_DISPATCH_ALL);&lt;br /&gt;
        }&lt;br /&gt;
        if (running) &lt;br /&gt;
        {&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: Unthreaded Hello World! %s&amp;quot;,&lt;br /&gt;
                     show_progress()); // Run the &amp;quot;active&amp;quot; code&lt;br /&gt;
        }&lt;br /&gt;
        else &lt;br /&gt;
        {&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: idle&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }while(!unblockNow);      &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
This code should be very familiar to anyone who has written single threaded &amp;quot;event loop&amp;quot; style code. As can be seen in the code snippet above, the select is given an idle timeout (in a real application the timeout would be much smaller) and the application only calls &amp;lt;code&amp;gt;saAmfDispatch&amp;lt;/code&amp;gt; if the select actually indicates that the there is data in the FD.  Then it falls down into an &amp;quot;if&amp;quot; statement that checks if we are active &amp;quot;if (running)...&amp;quot; and outputs a log if that is the case.&lt;br /&gt;
&lt;br /&gt;
===Customizing the Component MakeFile===&lt;br /&gt;
We have to make a small change to the component &amp;lt;code&amp;gt;MakeFile&amp;lt;/code&amp;gt; so that it knows about our special output library during the build. To do this we add the following lines. This file is located in &amp;lt;code&amp;gt;/home/clovis/projectarea1/ide_workspace/SampleModel/src/app&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|Component MakeFile&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    # ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
&lt;br /&gt;
    SUBDIRS += ev&lt;br /&gt;
&lt;br /&gt;
    # ---END_APPLICATION_CODE---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Customizing the Application MakeFile===&lt;br /&gt;
We have to make sure that our special output library is built along with our application. To do this we change the line listing the sudirectories to make as follows. This file is located in the directory &amp;lt;code&amp;gt;/home/clovis/projectarea1/ide_workspace/SampleModel/src/app/csa101&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|Application MakeFile&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    # ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
    &lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    EXTRA_LDLIBS += $(LIB_DIR)/libeval.a&lt;br /&gt;
&lt;br /&gt;
    # ---END_APPLICATION_CODE---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are finished customizing our application code!&lt;br /&gt;
&lt;br /&gt;
==Building the csa101 Code==&lt;br /&gt;
&lt;br /&gt;
Now that we have finished customizing the code it is time to build it. The build process is launched using the '''Project &amp;gt; Build Project''' menu item. Once selected the '''Build Configuration''' dialog appears.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Build Configuration Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Build_Configuration.png|frame|center| '''Build Configuration Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The '''Build Configuration''' dialog is used to gather specific information about the build we are about to perform. Using this dialog you can rebuild the same model using different cross builds, or including different chassis managers. We don't have to make any changes to this dialog since the default settings make sense for our sample application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]If you have prebuilt the SAFplus Platform libraries then you can check the '''Use pre built SAFplus''' checkbox and include the location of the prebuilt libraries. For more information about pre-building SAFplus Platform libraries, see ''SAFplus Platform SDK User Guide''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]The '''Include SNMP for North Bound Access''' control is checked by default. This just means that Net SNMP will be started along with our system. If you want end-to-end connectivity you will need to supply an SNMP Sub Agent and a MIB. See the ''SAFplus Platform SDK User Guide'' for more details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]In the '''Project''' menu if the '''Build Project''' entry is not highlighted, then click in the right pane i.e. '''Clovis Workspace''' pane and click the '''Project''' menu again. This not highlighting of the '''Build Project''' is because the '''Clovis Workspace''' is not selected properly because of moving focus to some other pane.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Click the '''OK''' button to begin the build. If this is the first time that the project is being built, or if you have made changes to any setting on this screen, you will initially see a progress dialog indicating that the project is being configured. The configuration step is setting up the project for building. After the configuration has completed you will see a progress dialog indicating that the code is being built.&lt;br /&gt;
&lt;br /&gt;
==Creating the csa101 Images==&lt;br /&gt;
&lt;br /&gt;
Making the csa101 images will create software packages that can be deployed on target machines to run the example. The process of creating images is launched using the '''Project &amp;gt; Make Images''' menu item. Once selected the '''Make Images Configuration''' dialog appears.&lt;br /&gt;
&lt;br /&gt;
The '''Make Images Configuration''' dialog is used to indicate information about the environment on which the images will be deployed. This information is used to tailor the images to run on that environment. Here we will make the following modificaiton.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Make Images Configuration TIPC Specific Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Make_Image_TIPC_Specific.png|frame|center| '''Make Images Configuration TIPC Specific Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enter a value for the '''Trap IP'''. This value specifies where the SNMP sub-agent will send traps at runtime. This field is optional but if specified must be a valid IP address. Enter a value of '127.0.0.1' in this field.&lt;br /&gt;
&amp;lt;li&amp;gt;Enter a value for the '''TIPC Net ID'''. This value represents a unique identifier used by TIPC to set up interprocess communication across the deployed OpenClovis SAFplus Platform cluster. This field is required and should default to '1340'.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Make Images Configuration General Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Make_Images_General.png|frame|center| '''Make Images Configuration General Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Check the '''Create Node Specific Images''' and '''Package Images into Tarballs''' check boxes. This will create tarballs of the images making them easy to deploy to various machines.&lt;br /&gt;
&amp;lt;li&amp;gt;The table on this dialog will hold a row for each node instance defined in the model. In our case this is only one...SCNodeI0. For each of these instances we can define the slot number in the chassis on which the node will run and the network interface that the node will use for communication. In our case enter '1' for the Slot Number and 'eth0' for the Network Interface.&lt;br /&gt;
&amp;lt;li&amp;gt;Click '''OK''' to begin the make image process. A dialog box will appear and after a few seconds the the make images process will be complete.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The images will be populated at &amp;lt;project_area&amp;gt;/target/SampleModel/images. Each node-specific image is provided as a directory containing the run-time files (binaries, libraries, prerequisites, and configuration files) as well as a tarball with the same content.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt; For our model containing one node (&amp;lt;code&amp;gt;SCNodeI0&amp;lt;/code&amp;gt;) the following files and directories are generated for deployment on the run-time system.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;project_area&amp;gt;&lt;br /&gt;
   |+target&lt;br /&gt;
       |+&amp;lt;model&amp;gt;&lt;br /&gt;
           |+images&lt;br /&gt;
               |+SCNodeI0&lt;br /&gt;
               |   |+bin&lt;br /&gt;
               |   |+etc&lt;br /&gt;
               |   |+lib&lt;br /&gt;
               |   |+modules&lt;br /&gt;
               |   |+share&lt;br /&gt;
               |-SCNodeI0.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The rest of the steps in this example are all done from the command line so we can exit the IDE. To do this use the '''File &amp;gt; Exit''' menu item.&lt;br /&gt;
&lt;br /&gt;
==Deploying the csa101 Images==&lt;br /&gt;
Now that the image has been built we must deploy it so that we can run and observe our example. Since we are assuming that the example will be run on the same machine as the images were built this is a fairly trivial exercise. Use the following steps to deploy the runtime image.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First we create a directory where we will install the image. In our case we will use &amp;lt;code&amp;gt;/root/asp&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root&lt;br /&gt;
# mkdir asp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next we navigate to that directory and untar the deployment package.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/asp&lt;br /&gt;
# tar xzvf /home/clovis/projectarea1/target/SampleModel/images/SCNodeI0.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The System Controller is now installed and ready to run.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] If you were going to run the example on a machine other than the one where the images were built you would first copy the installation tarball to that machine before performing the above steps.&lt;br /&gt;
&lt;br /&gt;
==Running the csa101 Example==&lt;br /&gt;
There are two parts to running the csa101 example. First we must start SAFplus Platform, and then we interact with the system components.&lt;br /&gt;
&lt;br /&gt;
===Starting SAFplus Platform===&lt;br /&gt;
&lt;br /&gt;
To start SAFplus Platform on System Controller node.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a shell.&lt;br /&gt;
&amp;lt;li&amp;gt;Run the following commands&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/asp&lt;br /&gt;
# etc/init.d/asp start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] This assumes that you are running the SAFplus Platform example on the same PC that you are executing these commands. If you are running SAFplus Platform on a different machine then you should first ssh to that machine before executing the commands.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] If SAFplus Platform fails to start properly it could be due to the machine's firewall being enabled. SAFplus Platform will not run on a machine which has firewall enabled. See the ''Environment Related Observation'' section of the ''SAFplus Platform Release Notes'' for more information.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] By default the network interface used by the Group Membership Service is set to eth0. During the make images phase of the tutorial we also set the ethernet interface for node SCNodeI0 to be eth0. During image generation these configuration parameters are written to two files in the deployment package.&lt;br /&gt;
*&amp;lt;code&amp;gt;/root/asp/etc/clGmsConfig.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
*&amp;lt;code&amp;gt;/root/asp/etc/asp.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There may be an occasion where you want to switch this interface for a machine on which you are deploying. If you would like to switch this interface on a machine without having to go through the process of rebuilding and redeploying, you can edit these two files and change the 'eth0' references to the interface you would like to use.&lt;br /&gt;
&lt;br /&gt;
===Interacting with the System Components===&lt;br /&gt;
Once SAFplus Platform is up and running the next step is to start csa101 by informing SAFplus Platform that it should start the application. The Evaluation System's model tells SAFplus Platform that csa101 is locked for instantiation. This means that the process will not be started when SAFplus Platform comes up. This method of starting csa's is used for the Evaluation System, allowing users to interact with csa's and clearly see their output/functionality. Usually this would not be the case with applications, where they would run when SAFplus Platform begins.&lt;br /&gt;
&lt;br /&gt;
At this point it would help to be familiar with the Service Availability Forum's notions of  Service Unit, Service Group, and administrative state.  The Service Availability Forum's Application Interface Specification (available from http://www.saforum.org/) is a good place to start.&lt;br /&gt;
&lt;br /&gt;
In brief, the sample applications in the Evaluation System are part of service units which in turn are part of service groups.  Service groups (and the service units that make up the service groups) can be in &amp;quot;administrative&amp;quot; states which include &amp;quot;LockInstantiation&amp;quot;, &amp;quot;LockAssignment&amp;quot;, and &amp;quot;Unlocked&amp;quot;.  There are other states, but these are the ones we care about for the purposes of this Evaluation System.  If the administrative state of a service unit is &amp;quot;LockInstantiation&amp;quot; then the application that is part of that service unit will not even be started.  If the administrative state is &amp;quot;LockAssignment&amp;quot; then the application will be started, but it will not be assigned any work.  If the administrative state is &amp;quot;Unlocked&amp;quot; then it will not only be started, but will have a workload assigned to it, which is to say that it will start doing work (or start providing service), rather than idly sit waiting for work.&lt;br /&gt;
&lt;br /&gt;
The administrative state of a service unit or service group can change from LockInstantiation to LockAssignment, from LockAssignment to Unlocked, or back to LockInstantiation, from Unlocked to LockAssignment.  A picture might help here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;PartialServiceGroupAdministrativeStateDiagram&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; [[File:eval_AdministrativeStateDiagram.png|frame|center| '''Partial Service Group Administrative State Diagram''' ]]&lt;br /&gt;
&lt;br /&gt;
As the figure shows, the administrative state of a service unit (or service group) can change from &amp;quot;LockInstantiation&amp;quot; to &amp;quot;LockAssignment&amp;quot; and from there to &amp;quot;Unlocked&amp;quot;, or back to &amp;quot;LockInstantiation&amp;quot;.  One way to change the administrative state of a service group is with the SAFplus Platform Console command line interface. &lt;br /&gt;
&lt;br /&gt;
To use the SAFplus Platform Console:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a terminal on the Development Machine. (Or ssh into System Controller node as root, if you are running SAFplus Platform on a machine other than the development machine.)&lt;br /&gt;
&amp;lt;li&amp;gt; Change to image bin directory: &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cd /root/asp/bin&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Start the SAFplus Platform Console &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# ./asp_console&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; From within the SAFplus Platform Console: &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cli[Test]-&amp;gt; setc 1&lt;br /&gt;
cli[Test:SCNodeI0]-&amp;gt; setc cpm&lt;br /&gt;
cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockAssignment sg csa101SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above changes the administrative state of the group csa101SGI0 from &amp;quot;locked-for-instantiation&amp;quot; to &amp;quot;locked-for-assignment&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]For the command &amp;lt;code&amp;gt;cli[Test]-&amp;gt; setc 1&amp;lt;/code&amp;gt;, the 1 represents the physical slot number of the System Controller within the Chassis. Remember that we set our System Controller to be in slot 1 in the make images dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Now lets tail the application log file so that we can see whats going on. In another window, as root, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# tail -f /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see the following:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00001 :   INFO) &lt;br /&gt;
 Component [csa101I0] : PID [10950]. Initializing&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00002 :   INFO)    &lt;br /&gt;
 IOC Address             : 0x1&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00003 :   INFO)    &lt;br /&gt;
 IOC Port                : 0x81&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00004 :   INFO) &lt;br /&gt;
 csa101: Instantiated as component instance csa101I0.&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00005 :   INFO) &lt;br /&gt;
 csa101I0: Waiting for CSI assignment...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Next change the administrative state of the csa101SGI0 service group to  &amp;quot;unlocked&amp;quot; by running (in the SAFplus Platform Console) :&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cli[Test:SCNodeI0:CPM]-&amp;gt; amsUnlock sg csa101SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the window where you're running the &amp;quot;tail -f&amp;quot; you should see:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Nov 12 11:59:37.092 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00163 :   INFO) &lt;br /&gt;
 csa101: ACTIVE state requested; activating service&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:37.092 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00164 :   INFO) &lt;br /&gt;
 csa101: Threaded Hello World!  .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:39.094 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00165 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!   .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:39.095 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00166 :   INFO) &lt;br /&gt;
 csa101: Threaded Hello World!    .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:41.095 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00167 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!     .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:41.097 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00168 :   INFO) &lt;br /&gt;
 csa101: Threaded Hello World!      .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:43.095 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00169 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!       .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As you can tell from the output log our component is up and running! It is continuously printing our 'Hello World!' output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Now change the state of the csa101SGI0 service group back to &amp;quot;locked-for-assignment&amp;quot; by running (in the SAFplus Platform Console): &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockAssignment sg csa101SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the tail -f output you should see:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Nov 12 12:07:17.591 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00625 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!  .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00626 :   INFO) &lt;br /&gt;
 Component [csa101I0] : PID [10950]. CSI Set Received&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00627 :   INFO) &lt;br /&gt;
 CSI Flags : [Target One]&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00628 :   INFO) &lt;br /&gt;
 CSI Name : [csa101CSII0]&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00629 :   INFO) &lt;br /&gt;
 HA state : [Quiesced]&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00630 :   INFO) &lt;br /&gt;
 csa101: Acknowledging new state quiesced&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.312 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00632 :   INFO) &lt;br /&gt;
 Component [csa101I0] : PID [10950]. CSI Remove Received&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.312 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00633 :   INFO)    &lt;br /&gt;
 CSI                     : csa101CSII0&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.312 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00634 :   INFO)    &lt;br /&gt;
 CSI Flags               : 0x2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Our component has been put into Lock Assignment state so our 'Hello World!' output has stopped printing to the log.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;At this point you can either unlock the service group to change its state to &amp;quot;unlocked&amp;quot; or you can lock it for instantiation to change it to state  &amp;quot;locked-for-instantiation&amp;quot;.  The latter will cause the csa101 process to die.  From state &amp;quot;locked-for-assignment&amp;quot;, it is possible to change the state to &amp;quot;locked-for-instantiation&amp;quot; by running (in the SAFplus Platform Console):&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockInstantiation sg csa101SGI0&lt;br /&gt;
cli[Test:SCNodeI0:CPM] -&amp;gt; end&lt;br /&gt;
cli[Test:SCNodeI0] -&amp;gt; end&lt;br /&gt;
cli[Test] -&amp;gt; bye&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Stopping SAFplus Platform===&lt;br /&gt;
&lt;br /&gt;
To stop SAFplus Platform on the System Controller&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a shell.&lt;br /&gt;
&amp;lt;li&amp;gt;ssh into the System Controller node as root.&lt;br /&gt;
&amp;lt;li&amp;gt;Once logged in, run the following command&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/asp&lt;br /&gt;
# etc/init.d/asp stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Summary and Next Steps==&lt;br /&gt;
In the csa101 example we learned the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to create a system model using the '''SAFplus Platform IDE'''.&lt;br /&gt;
&amp;lt;li&amp;gt;How to generate the source code.&lt;br /&gt;
&amp;lt;li&amp;gt;How to customize this source code to fit a specific application.&lt;br /&gt;
&amp;lt;li&amp;gt;How to configure and build the customized source code.&lt;br /&gt;
&amp;lt;li&amp;gt;How to make runtime images and deploy them to target machines.&lt;br /&gt;
&amp;lt;li&amp;gt;How to start and stop '''SAFplus'''.&lt;br /&gt;
&amp;lt;li&amp;gt;How to interact with system components using the '''SAFplus Platform Console'''.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next logical step would be to run through the '''SAFplus Platform Evaluation System User Guide'''. This guide goes over more complex system configurations and introduces new concepts.&lt;br /&gt;
&lt;br /&gt;
For more in depth information on the '''SAFplus Platform IDE''' see the '''SAFplus Platform IDE User Guide'''.&lt;br /&gt;
&lt;br /&gt;
For more in depth information on the '''SAFplus Platform SDK''' see the '''SAFplus Platform SDK User Guide'''.&lt;br /&gt;
&lt;br /&gt;
==Appendix A: target.conf Settings==&lt;br /&gt;
&lt;br /&gt;
Below is a description of the values in the settings in the &amp;lt;code&amp;gt;target.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''TRAP_IP''' (Mandatory): Specifies where the SNMP SubAgent should send traps at runtime.  If you do not have an SNMP SubAgent in your model specify '''127.0.0.1''' as the value.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
TRAP_IP=127.0.0.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''CMM_IP''' (Mandatory if deployed on an ATCA chassis): Specifies the IP address of the target system's chassis management module or shelf manager. &amp;lt;i&amp;gt;ATCA chassis Example&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
CMM_IP=169.254.1.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''CMM_USERNAME''' and '''CMM_PASSWORD''' (Mandatory if deployed on an ATCA chassis): Specifies the username and password required for the OpenClovis SAFplus Platform Chassis Manager to connect to the target system's chassis management module. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
CMM_USERNAME=root&lt;br /&gt;
CMM_PASSWORD=password&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''INSTALL_PREREQUISITES=YES|NO''' (Mandatory): Specifies whether the target images will include 3rd party runtime prerequisites or not.  Say '''YES''' if the target nodes do not meet the target host requirements specified in the Installation section of this document.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
INSTALL_PREREQUISITES=YES&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''INSTANTIATE_IMAGES=YES|NO''' (Mandatory): Specifies whether &amp;lt;code&amp;gt;make images&amp;lt;/code&amp;gt; will generate node-instance specific images instead of only generating node-type specific images.  This option is a development optimization for advanced users of SAFplus Platform SDK.  If unsure, say '''YES'''. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
INSTANTIATE_IMAGES=YES&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''CREATE_TARBALLS=YES|NO''' (Mandatory): Specifies whether the node-instance specific images created will be packaged into tarballs for deployment onto the target system.  If unsure, say '''YES'''.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE_TARBALLS=YES&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''TIPC_NETID''' (Mandatory): Specifies a unique identifier used by TIPC to set up interprocess communication across the deployed OpenClovis SAFplus Platform cluster.  This is an unsigned 32-bit integer, and &amp;lt;i&amp;gt;must&amp;lt;/i&amp;gt; be unique for every model that is deployed.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
TIPC_NETID=1340&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Node Instance Details''': These specify the node-instance specific parameters required for deploying the model. For each node in the model there is a corresponding entry in the file:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SLOT_&amp;lt;node instance name&amp;gt;''' (Mandatory): Specifies which slot the node is located in.  The first slot is slot 1 -- DO NOT USE SLOT NUMBER 0, it is invalid.  When deployed to an ATCA chassis, the physical slot in which the blade is actually installed will override this value.  When deployed to regular (non-ATCA) systems, this is a logical slot and must be unique for every node in the cluster. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
SLOT_SCNodeI0=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''LINK_&amp;lt;node instance name&amp;gt;''' (Optional): Specifies the ethernet interface used by the node for OpenClovis SAFplus Platform communication with the rest of the cluster.  If unspecified, this defaults to &amp;lt;code&amp;gt;eth0&amp;lt;/code&amp;gt;.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
LINK_SCNodeI0=eth0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''ARCH_&amp;lt;node instance name&amp;gt;''' (Optional if '''ARCH''' is specified): Specifies the target architecture of the node as a combination of machine architecture (MACH) and linux kernel version.  This is only required on a per-node basis if the target cluster has heterogeneous architectures across the nodes.  If it is a homogeneous cluster, a single '''ARCH''' parameter (described below) will suffice.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
ARCH_SCNodeI0=i386/linux-2.6.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''ARCH''' (Optional if node-specific '''ARCH_''' parameters are specified): Specifies the target architecture of all nodes in a homogeneous cluster as a combination of machine architecture (MACH) and linux kernel version.  Note: The build process automatically populates this variable based on the last target the model is built for.&amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
ARCH=i386/linux-2.6.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
For example, if we have a three-node cluster with the following details:&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot; width=&amp;quot;600&amp;quot;&lt;br /&gt;
|+ align=&amp;quot;bottom&amp;quot; | '''Example Node Instance Detail'''&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Node Name&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Slot Number&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Link Interface&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Architecture&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|SCNodeI0&lt;br /&gt;
|1&lt;br /&gt;
|eth0&lt;br /&gt;
|i386/linux-2.6.14&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|PayloadNodeI0&lt;br /&gt;
|3&lt;br /&gt;
|eth0&lt;br /&gt;
|i386/linux-2.6.14&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|PayloadNodeI1&lt;br /&gt;
|4&lt;br /&gt;
|eth1&lt;br /&gt;
|ppc/linux-2.6.9&lt;br /&gt;
|}&lt;br /&gt;
we would specify the node instance details as:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
SLOT_SCNodeI0=1&lt;br /&gt;
SLOT_PayloadNodeI0=3&lt;br /&gt;
SLOT_PayloadNodeI1=4&lt;br /&gt;
&lt;br /&gt;
LINK_SCNodeI0=eth0&lt;br /&gt;
LINK_PayloadNodeI0=eth0&lt;br /&gt;
LINK_PayloadNodeI1=eth1&lt;br /&gt;
&lt;br /&gt;
ARCH_SCNodeI0=i386/linux-2.6.14&lt;br /&gt;
ARCH_PayloadNodeI0=i386/linux-2.6.14&lt;br /&gt;
ARCH_PayloadNodeI1=ppc/linux-2.6.9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Appendix B: AMF Configuration Details==&lt;br /&gt;
This appendix gives brief descriptions of configuration details for instances of different entities (like Node, Service Group, Service Unit etc) that are present in the '''Clovis''' -&amp;gt; '''AMF Configuration''' dialog box.&lt;br /&gt;
&lt;br /&gt;
===Node Instance===&lt;br /&gt;
This screen displays the node instance that was created by the Node Instance Wizard. This node instance was created because the node type '''SCNode''' was selected on the wizard screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Node Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_Details_SCNodeI0.png|frame|center| '''Node Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Node Instance Name''': This field holds the name of the node instance. This name must be unique. The name that was generated combines the node type (SCNode), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''Node Type''': This field holds the node type that was selected on the wizard screen.&lt;br /&gt;
&amp;lt;li&amp;gt;'''MOID''': This is the unique identifier for the node instance. It was generated by the wizard. The format of this ID is a string representing the one and only instance of the chassis (\Chassis:0) defined in the Resource Editor followed by a string representing the first and only instance of the blade type (\SysBlade:0) that was selected in the Node Instance Wizard.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]'''MOID''' is an acronym for Managed Object Identifier. It must be unique and is used to identify which hardware chassis and blade type this instance will run on.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Unit Instance===&lt;br /&gt;
This screen displays the service unit instance that was created by the Service Group Instance Wizard. This service unit instance was created because the service unit type is associated with both the selected node type (SCNode) and the selected service group type (csa101SG) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SU Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_Details_csa101SUI0.png|frame|center| '''SU Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SU Instance Name''': This field holds the name of the service unit instance. This name must be unique. The name that was generated combines the service unit type (csa101SU), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''Service Unit Type''': This field holds the type of the service unit instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Component Instance===&lt;br /&gt;
This screen displays the component instance that was created by the Service Group Instance Wizard. This component instance was created because the component type is associated with the created parent service unit type (csa101SU) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Component Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_Details_csa101I0.png|frame|center| '''Component Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Component Instance Name''': This field holds the name of the component instance. This name must be unique. The name that was generated combines the component type (csa101), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''Component Type''': This field holds the type of the component instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Group Instance===&lt;br /&gt;
This screen displays the service group instance that was created by the Service Group Instance Wizard. This service group instance was created because the service group type '''csa101SG''' was selected on the wizard screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Group_List_csa101SGI0.png|frame|center| '''Service Group Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SG Instance Name''': This field holds the name of the service group instance. This name must be unique. The name that was generated combines the service group type (csa101SG), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''ServiceGroup Type''': This field holds the type of the service group instance.&lt;br /&gt;
&amp;lt;li&amp;gt;'''Associated Service Units''': This button is used to associate service unit instances with this service group instance. Creating this association indicates that the selected service unit(s) will run within this service group instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clicking the '''Associated Service Units''' Edit... button will display the following dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Associated Service Units Dialog'&amp;gt;&amp;lt;/span&amp;gt;[[File:Associated_Service_Units.png|frame|center| '''Associated Service Units Dialog''' ]]&lt;br /&gt;
&lt;br /&gt;
This dialog lists the service unit instances that can be associated with this service group instance. The list contains only one item, the service unit instance that was created by the wizard. This item is checked indicating that the wizard automatically chose this service unit instance to run within the service group instance.&lt;br /&gt;
&lt;br /&gt;
===Service Instance Instance===&lt;br /&gt;
This screen displays the service instance that was created by the Service Group Instance Wizard. This service instance was created because the service instance type is associated with the parent service group type (csa101SG) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Instance_List_csa101SII0.png|frame|center| '''Service Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Service Instance Name''': This field holds the name of the service instance. This name must be unique. The name that was generated combines the service instance type (csa101SI), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''ServiceInstance Type''': This field holds the type of the service instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Component Service Instance Instance===&lt;br /&gt;
This screen displays the component service instance that was created by the Service Group Instance Wizard. This component service instance was created because the component service instance is associated with the parent service instance type (csa101SI) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Component Service Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Component_Service_Instance_List_csa101CSII0.png|frame|center| '''Component Service Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Component Service Instance Name''': This field holds the name of the component service instance. This name must be unique. The name that was generated combines the component service instance type (csa101CSI), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''ComponentServiceInstance Type''': This field holds the type of the component service instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/tutorial</id>
		<title>Doc:latest/tutorial</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/tutorial"/>
				<updated>2016-12-06T18:13:31Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Customizing the csa101 Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Preface==&lt;br /&gt;
The ''SAFplus Platform Sample Application Tutorial'' is a comprehensive tutorial designed to highlight the steps involved in using SAFplus software to design and build a high availability system. In this tutorial you will learn to:&lt;br /&gt;
* Design a model using the SAFplus IDE&lt;br /&gt;
* Generate code from this model to provide middleware support&lt;br /&gt;
* Customize this code for a particular application&lt;br /&gt;
* Build and deploy the customized code&lt;br /&gt;
* Run the system to see the SAFplus Platform software in action&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Audience===&lt;br /&gt;
&amp;lt;br&amp;gt; ''SAFplus Platform Sample Application Tutorial''  is designed for system integrators, designers, and system architects. To use SAFplus Platform, you should be aware of the fundamentals of operation, management, and configuration of telecommunication and networking domains. You should also be familiar with C programming, UML notations, and have the basic knowledge of Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; This document assumes that you have installed the SAFplus Platform SDK, following the installation steps found in the ''SAFplus Platform Installation Guide''.&lt;br /&gt;
&lt;br /&gt;
===Documentation Conventions===&lt;br /&gt;
This guide uses different fonts and symbols to differentiate between document elements and types of information. These conventions are summarized in the following table.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#cdd6e6&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#d3e3ff&amp;quot;| Notation&lt;br /&gt;
!style=&amp;quot;background:#d3e3ff&amp;quot;| Description&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;background:#ffccaa&amp;quot; | &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Code&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|This font denotes the C code provided in various examples.&amp;lt;br&amp;gt;This font denotes function and variable names.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;background:#ffffaa&amp;quot; | &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Output&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|Terminal output.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;color:blue&amp;quot; | Cross reference&lt;br /&gt;
|This font denotes a hyperlink. You can click on the hyperlink text to access the reference location, which can be either a section within the guide or a URL link.&amp;lt;br&amp;gt;A cross reference refers to a section name and accesses the first page of that section.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;code&amp;gt;Filenames&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;DIR&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Files names, Directory paths.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|&amp;lt;code&amp;gt;$ Commands ''group_identifier''&amp;lt;/code&amp;gt; &lt;br /&gt;
| Commands to be run from a shell.&amp;lt;br&amp;gt; Italic text indicate an argument. This can be replaced with your desired value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]This indicates the presence of notes or annotations, related to the context of the document. &lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Caution.png]]This indicates that certain precautionary measures must be taken before performing a particular task.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Info.png]]This indicates that additional information is provided to you.&lt;br /&gt;
&lt;br /&gt;
As mentioned in the ''SAFplus Platform Installation Guide'' the default directory for installation is &amp;lt;code&amp;gt;/opt/clovis&amp;lt;/code&amp;gt; for root installation and &amp;lt;code&amp;gt;$HOME/clovis&amp;lt;/code&amp;gt; for non root users. Throughout this document we will use &amp;lt;code&amp;gt;&amp;lt;install_dir&amp;gt;&amp;lt;/code&amp;gt; to refer to the installation directory.&lt;br /&gt;
&lt;br /&gt;
===Related Documents===&lt;br /&gt;
For additional information about OpenClovis products, please refer to the following guides:&lt;br /&gt;
* '''[[Doc:latest/relnotes | SAFplus Platform Release Notes]]''' provides information about the software and the hardware required to install OpenClovis SAFplus Availability/Scalability Platform and Integrated Development Environment (IDE). It summarizes the additional features and enhancements of the product since the previous release. It also summarizes the issues and limitations of the product and provides workarounds wherever applicable.&lt;br /&gt;
* '''[[Doc:latest/safcompliance | SAFplus Platform SA-Forum Compliance]]''' describes the level of compliance of OpenClovis SAFplus Platform and its Application Programming Interface (API) with the relevant Service Availability Forum Specifications.&lt;br /&gt;
* '''[[Doc:latest/installguide | SAFplus Platform Installation Guide]]''' provides the system requirements, installation procedure for OpenClovis SAFplus Platform, IDE, and the Evaluation System.&lt;br /&gt;
* '''[[Doc:latest/tutorial | SAFplus Platform Sample Application Tutorial]]''' explains the steps to create and build a sample model using OpenClovis IDE and OpenClovis SAFplus Platform. It also provides troubleshooting information for this process. This provides the logical first step in understanding the SAFplus Platform offering.&lt;br /&gt;
* '''[[Doc:latest/evalguide | SAFplus Platform Evaluation System User Guide]]''' provides all the required information to configure and run the sample models packaged within the Evaluation System. This document also provides good understanding of OpenClovis SAFplus Platform's functionality. This is the natural follow on to the ''OpenClovis Sample Application Tutorial'' as it builds on the example created in that document. &lt;br /&gt;
* '''[[Doc:latest/sdkguide | SAFplus Platform SDK User Guide]]''' provides information about SAFplus Availability/Scalability Platform architecture, various SAFplus Platform components, and their interactions. This guide helps you to configure the OpenClovis SAFplus Platform components, compile, and execute the SAFplus Platform code to build your custom application.&lt;br /&gt;
* '''[[Doc:latest/ideguide | SAFplus Platform IDE User Guide]]''' describes the usage of Integrated Development Environment (IDE), a graphical development environment that complements the SAFplus Platform. This guide helps you to understand how to use the various features of the IDE to build the application.&lt;br /&gt;
* '''[[Doc:latest/logtoolguide | SAFplus Platform Log Tool User Guide]]''' provides information about the usage of OpenClovis Log Tool. OpenClovis Log Tool is an interactive utility that allows you to view binary log files in a readable format and hence monitor system errors, warnings, and other log information. Log Tool allows you to format the &amp;lt;code&amp;gt;.log&amp;lt;/code&amp;gt; files and filter them to view the required entries.&lt;br /&gt;
* '''SAFplus Platform API Reference Guide [http://www.openclovis.org/doc/latest/apirefs/index.html]''' is provided for each component. It describes the Application Programming Interface (API), Service Model, and Management Information Model of the various OpenClovis Application Service Platform (SAFplus Platform) services. It helps the developer to understand the capabilities of the SAFplus Platform services and the APIs provided by these services.&lt;br /&gt;
* '''[[SAFplus Platform Console Reference Guide]]''' provides details about managing applications built on SAFplus Platform using the SAFplus Platform runtime debug console commands. SAFplus Platform Console commands can be used to manage, monitor, and test your application.&lt;br /&gt;
&lt;br /&gt;
===OpenClovis Online Technical Support===&lt;br /&gt;
OpenClovis customers and partners can register on our Web site and receive personalized services and information. If you need any support or assistance while working on OpenClovis products, you can access the following: URL: http://www.openclovis.com. Send your queries to: support@openclovis.com.&lt;br /&gt;
&lt;br /&gt;
===Documentation Feedback===&lt;br /&gt;
We are interested in hearing from our customers on the documentation provided with the product. Let us know your comments and suggestions on improving the documentation at OpenClovis Inc. Send your comments to: support@openclovis.com. Or even better, edit (or comment in) the page on our documentation wiki located at [http://help.openclovis.com http://help.openclovis.com].&lt;br /&gt;
&lt;br /&gt;
==Our Example: The csa101 System==&lt;br /&gt;
The ''SAFplus Platform Sample Application Tutorial'' will take you through a series of examples each introducing a key concept of the product. Each example builds on the example before it so it is important to go through them in order. The examples are named so that it is easy to determine their sequence. The examples all begin with the letters '''csa''' (standing for Clovis Sample Application) and end with a number. Our first example will be '''csa101'''.&lt;br /&gt;
&lt;br /&gt;
The purpose of our first example is to highlight basic component management. It introduces the basic skeleton of a SAFplus Platform based application component and illustrates how it interacts with the System. It demonstrates basic component registration and life-cycle management.&lt;br /&gt;
&lt;br /&gt;
We will keep this first example very simple. It will consist of the SAFplus Platform running a small component named '''csa101'''. All that this component will do is continuously print 'Hello World!' to a log file. While this component is not very exciting, it will allow us to easily see when the application is in a running state and when it is not. This will allow us to focus on the infrastructure of SAFplus Platform and how the application interfaces with it.&lt;br /&gt;
&lt;br /&gt;
For this example we will assume that we have a chassis with five slots. We will have one type of blade in our example, a '''System Controller'''.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]With the type of model we are developing we would typically define two blade types to install in these slots. The first blade type would be a '''System Controller''' blade (which is responsible for running the SAFplus Platform software which manages application startup, shutdown, failover, etc.) and the second blade type would be a '''Payload''' blade (which is responsible for running our custom '''csa101''' application). However, for the purpose of simplifying the deployment of our system, we will define only the '''System Controller''' blade type and have both the SAFplus Platform and component application run on this one blade. This will allow the example to be run on a single PC.&lt;br /&gt;
&lt;br /&gt;
==Creating the csa101 Model==&lt;br /&gt;
The first step in setting up our example is to create a model which represents the system that we will eventually deploy. This is done through the '''SAFplus Platform IDE'''. In this chapter we will step through the following tasks:&lt;br /&gt;
* Create a project area&lt;br /&gt;
* Launch the '''SAFplus Platform IDE'''&lt;br /&gt;
* Create the IDE project&lt;br /&gt;
* Specify the Resource model (the types of physical hardware in our system)&lt;br /&gt;
* Specify the Component model (the types of components or applications in our system)&lt;br /&gt;
* Specify which Components run on which Resources&lt;br /&gt;
* Specify important build and boot parameters&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Launching the SAFplus Platform IDE===&lt;br /&gt;
You can launch the '''SAFplus Platform IDE''' from the command line. If you chose to create symbolic links during installation you can simply enter &amp;lt;code&amp;gt;'''cl-ide'''&amp;lt;/code&amp;gt; from any directory. If you did not create symbolic links during installation you can either:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the installation directory to the shells search path and then launch the IDE. For example with a bash shell, &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# export PATH=$PATH:$install_dir/6.1/sdk/bin&lt;br /&gt;
# cl-ide&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the command&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# &amp;lt;install_dir&amp;gt;/6.1/sdk/bin/cl-ide&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The splash screen for SAFplus Platform IDE is displayed as illustrated in Figure [[#SAFplus Platform IDE Opening Screen | SAFplus Platform IDE Opening Screen]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Opening Screen'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_GettingStartedIDE_OpeningScreen.png|frame|center| '''SAFplus Platform IDE Opening Screen''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will then be prompted to select a workspace in which to do your work as illustrated in Figure [[#SAFplus Platform IDE Workspace Launcher | SAFplus Platform IDE Workspace Launcher]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Workspace Launcher'&amp;gt;&amp;lt;/span&amp;gt;[[File:Workspace_Launcher.png|frame|center| '''SAFplus Platform IDE Workspace Launcher''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The workspace you select should correspond to the project area that you created in the previous section (in this case &amp;quot;/home/clovis/projectarea1&amp;quot;). Note that the workspace includes a subdirectory of &amp;quot;/ide_workspace&amp;quot;. This is done strictly for organizational purposes. It keeps the IDE models separate from the generated SAFplus Platform models and code.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select the workspace and click  '''OK'''  to launch SAFplus Platform IDE as illustrated in the Figure [[#SAFplus Platform IDE Welcome Screen | SAFplus Platform IDE Welcome Screen]].&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Welcome Screen'&amp;gt;&amp;lt;/span&amp;gt;[[File:IDE_Welcome_Screen.png|frame|center| '''SAFplus Platform IDE Welcome Screen''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''SAFplus Platform''' IDE is launched and you are now looking at the main work area. For more information about the components of this main work area including the SAFplus Platform IDE menu and toolbar, see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Creating the Sample Project===&lt;br /&gt;
We will now create a project within the '''SAFplus Platform IDE'''. This project will hold both the resource model and the component model for our example system. The resource model is a physical view of the resources (the chassis, the blade types, etc.) in our system. The component model is a logical view of the components (applications, etc.) in our system.&lt;br /&gt;
&lt;br /&gt;
We will be using the '''New Project Wizard''' to create our project. The wizard captures some high-level information about the system that we are building and performs a lot of the basic setup for us.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]]The same model that we are building through the wizard could also be created manually through the Resource and Component Editors. For more information on the Resource and Component Editors see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To launch the '''New Project Wizard''' select  '''File'''  &amp;gt;  '''New''' &amp;gt;  '''Project''' from the IDE menu bar.&lt;br /&gt;
&lt;br /&gt;
The  '''New Project Wizard''' is displayed and  '''Clovis System Project'''  is selected by default as illustrated in Figure [[#New Project Wizard | New Project Wizard]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='New Project Wizard'&amp;gt;&amp;lt;/span&amp;gt;[[File:New_Project_Wizard.png|frame|center| '''New Project Wizard''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click  '''Next'''. The  '''Clovis System Project''' window is displayed as illustrated in Figure [[#Clovis System Project | Clovis System Project]].&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id='Clovis System Project'&amp;gt;&amp;lt;/span&amp;gt;[[File:Clovis_System_Project.png|frame|center| '''Clovis System Project''' ]]&lt;br /&gt;
&lt;br /&gt;
Enter the following information:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Project Name''' : Enter the name of your new project as  '''SampleModel'''.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]Do not use spaces or special characters for the project name. The project name can be alphanumeric, but cannot start with a number or have only numbers.&lt;br /&gt;
&amp;lt;br&amp;gt;Select  '''Use default'''  to use the same directory mentioned in the  '''Directory'''  field. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Project Area Location''': Enter the location where the generated source code for the model should be stored.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]This can be any existing directory but is usually the project area that was created in the previous section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Python Location''': Enter the location where Python 2.5.0 or above is installed on your system. If Python 2.5.0 or above was installed by SAFplus Platform SDK, the directory is  &amp;lt;code&amp;gt;'''&amp;lt;installation_directory&amp;gt;/6.1/buildtools/local/bin'''&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Add New Blade Type''' window is displayed. This dialog is used to define the blade types that are in our system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Add New Blade Type'&amp;gt;&amp;lt;/span&amp;gt;[[File:Add_New_Blade_Type.png|frame|center| '''Add New Blade Type''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember that the system we are modelling has only one blade type...a System Controller.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a new blade type to the list. Name this blade type 'SysBlade' (for System Controller blade).&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Add New SAF Node Type''' window is displayed. This dialog is used to define the type of logical node that will be run on the corresponding blade type defined in the previous dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Add New SAF Node Type'&amp;gt;&amp;lt;/span&amp;gt;[[File:Add_New_SAF_Node_Type.png|frame|center| '''Add New SAF Node Type''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Node types represent groups of software. They are classified as either a System Controller class or a Payload class. This distinction gives the node type certain characteristics which cause it to behave in a well-defined manner. Since we have only a System Controller in our system we will add a node type of class System Controller.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a new node type to the list. Name the node type 'SCNode' and ensure that its node class is 'System Controller (SAF Class B)'.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Specify Program Names''' window is displayed. This dialog is used to create programs or SAF Service Types and associate them with the SAF Node Types specified in the previous dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Specify Program Names'&amp;gt;&amp;lt;/span&amp;gt;[[File:SAF_Service_Type_Name.png|frame|center| '''Specify Program Names''' ]]&lt;br /&gt;
&lt;br /&gt;
In our system we need one SAF Service Type which represents our high availability software (csa101 that continously prints &amp;quot;Hello World!&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a program name to the list. Change the program name to 'csa101' and associate the program with the 'SCNode' node type.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Finish'''. This will create the sample model using the blade type, node type, and program name information collected through the 'New Project Wizard' dialogs.&lt;br /&gt;
&lt;br /&gt;
===Viewing the Model===&lt;br /&gt;
&lt;br /&gt;
====The SAFplus Platform IDE Perspective====&lt;br /&gt;
Once the wizard pages are closed you will be returned to the main IDE view also known as the '''SAFplus Platform IDE Perspective'''. On the left hand side of this view you will see the '''Clovis Workspace''' pane which contains the new project you just created with all project related files and folders. The folders are displayed based on your filter settings. With the default filter settings, the folders shown in Figure [[#Clovis Workspace|Clovis Workspace]] is displayed in the '''Clovis Workspace''' pane. For information about filter settings, refer  ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Clovis Workspace'&amp;gt;&amp;lt;/span&amp;gt;[[File:Clovis_Workspace.png|frame|center|Clovis Workspace]]&lt;br /&gt;
&lt;br /&gt;
By default, the '''Resource''' and '''Component''' Editor views are available for the created project. To view them, click '''Clovis''' on the menu bar at the top of the screen and select '''Resource Editor''' or  '''Component Editor'''  from the menu. You can also click '''Resource Editor''' or '''Component Editor''' icons from the tool bar as shown in Figure [[#SAFplus Platform IDE Tool Bar | SAFplus Platform IDE Tool Bar]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Tool Bar'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_Toolbar.png|frame|center| '''SAFplus Platform IDE Tool Bar''' ]]&lt;br /&gt;
&lt;br /&gt;
====Resource Editor View====&lt;br /&gt;
The '''Resource Editor''' shows the types of physical objects in our system. It gives us a place to create new objects and interact with the objects that already exist. The '''Resource Editor''' view for our model should look similar to the following figure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform Resource Editor'&amp;gt;&amp;lt;/span&amp;gt;[[File:Resource_Editor1.png|frame|center| '''SAFplus Platform Resource Editor''' ]]&lt;br /&gt;
&lt;br /&gt;
This editor always has a '''Chassis''' object which is the root of all other objects in the editor. In our case it also has the '''SysBlade''' blade type that we created through the '''Project Creation Wizard'''. You will also notice that the '''SysBlade''' is attached to the '''Chassis''' using a '''Composition''' relationship indicating that '''SysBlade'''s reside within the '''Chassis'''.&lt;br /&gt;
&lt;br /&gt;
On the right hand side of the editor view you will see the '''Palette''' which can be expanded and collapsed. Expanding the '''Palette''' you will see the list of objects that can be dragged onto the editor view to add to our model. Once an object is on the editor view you can view and change its properties by right clicking on the object and selecting '''Properties...''' from the context menu.&lt;br /&gt;
&lt;br /&gt;
For more information about the '''Resource Editor''' view see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
====Component Editor View====&lt;br /&gt;
The '''Component Editor''' shows the types of logical objects in our system. It gives us a place to create new objects and interact with the objects that already exist. The '''Component Editor''' view for our model should look similar to the following figure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform Component Editor'&amp;gt;&amp;lt;/span&amp;gt;[[File:Component_Editor1.png|frame|center| '''SAFplus Platform Component Editor''' ]]&lt;br /&gt;
&lt;br /&gt;
This editor always has a '''Cluster''' object which is the root of all other objects in the editor. In our case it also has the '''SCNode''' node type and the '''csa101''' SAF Service Type (a combination of Service Group, Service Unit, Service Instance, Component Service Instance, and SAF Component) that we created through the '''Project Creation Wizard'''. These have all been automatically attached in a way that makes a working model.&lt;br /&gt;
&lt;br /&gt;
On the right hand side of the editor view you will see the '''Palette''' which can be expanded and collapsed. Expanding the '''Palette''' you will see the list of objects that can be dragged onto the editor view to add to our model. Once an object is on the editor view you can view and change its properties by right clicking on the object and selecting '''Properties...''' from the context menu.&lt;br /&gt;
&lt;br /&gt;
For more information about the '''Component Editor''' view see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Configuring the Components===&lt;br /&gt;
The '''New Project Wizard''' that we used to create our project configured the system using the most common options. We will have to make a few changes to this model in order for our example to work. We will make these changes in the '''Component Editor''' view.&lt;br /&gt;
&lt;br /&gt;
In the Component Editor you will notice seven different objects that were created by the wizard. The first two of these are:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Cluster: The root object of all other objects in the Component Editor view.&lt;br /&gt;
&amp;lt;li&amp;gt;SCNode: This is the SAF Node Type that we specified during project creation.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next five objects all make up the Program or SAF Service Type that we specified on the last dialog of the New Project Wizard. These objects are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;csa101SG: This is the Service Group representing our high availability software component.&lt;br /&gt;
&amp;lt;li&amp;gt;csa101SU: This is the Service Unit that is logically associated with the SCNode SAF Node Type.&lt;br /&gt;
&amp;lt;li&amp;gt;csa101SI: This is the Service Instance&lt;br /&gt;
&amp;lt;li&amp;gt;csa101CSI: This is the Component Service Instance&lt;br /&gt;
&amp;lt;li&amp;gt;csa101: This is the SAF Component which represents our program or executable.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will be making changes to the Service Group (csa101SG), the Service Instance (csa101SI), and the SAF Component (csa101).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Configuring the Service Group====&lt;br /&gt;
To make changes to the Service Group double-click on the box titled '''csa101SG'''. The '''Service Group Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Group_Details.png|frame|center| '''Service Group Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first change we want to make is to the '''Redundancy Model'''. The '''Redundancy Model''' is the strategy that is used by the SAFplus Platform system to recover from a node failure. For our simple model (which only has one node) we are not going to rely on any failover recovery so change the '''Redundancy Model''' to 'No Redundancy' as shown.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]You will notice that when you change the redundancy model some of the other fields are modified automatically and become read-only. This is to ensure integrity of the redundancy models.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The second change that we want to make is to the '''Admin State'''. The '''Admin State''' defines the state of the component when the system is first brought up. In our case we want to change the '''Admin State''' to be 'Locked Initialized'. This means that when the system first starts up this '''Service Group''' (and its subcomponents) will be initialized but not yet put into a running state. So our csa101 application will not yet start printing &amp;quot;Hello World!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When you are finished making the changes click the '''OK''' button to commit the changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Configuring the Service Instance====&lt;br /&gt;
To make changes to the Service Instance double-click on the box titled '''csa101SI'''. The '''Service Instance Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Instance_Details.png|frame|center| '''Service Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The only change we want to make here is to the '''Number of standby assignments'''. This value represents the number of components that will be waiting to take over during a node failure and goes hand-in-hand with the '''Redundancy Model''' that we selected for the Service Group. Since we selected 'No Redundancy' for our '''Redundancy Model''' we need to set this value to 0...since we are not supporting any failover in this model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When you are finished making the changes click the '''OK''' button to commit the changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Configuring the SAF Component====&lt;br /&gt;
To make changes to the SAF Component double-click on the box titled '''csa101'''. The '''SAF Component Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAF Component Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:SAF_Component_Details.png|frame|center| '''SAF Component Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The SAF Component represents our high availabilty program or executable. We need to pass a command line argument to this executable. The reason for this argument is to force the program to print the 'Hello World!' output to a special log file for our viewing. We will look at this more closely when we customize our code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To add command line parameters click the '''Edit...''' button corresponding to the '''Command line Arguments''' label.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''Command line Argument Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Command line Argument Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Command_Line_Argument_Details.png|frame|center| '''Command line Argument Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''New''' button to add a new value to the list.&lt;br /&gt;
&amp;lt;li&amp;gt;Click on the new value in the list and it will become editable. Change the value to '''-p'''.&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''OK''' button to save and close the dialog.&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''OK''' button on the '''SAF Component Details''' dialog to commit the changes to the SAF Component and close the dialog.&lt;br /&gt;
&amp;lt;li&amp;gt;Save the component model using the '''File &amp;gt; Save''' menu item.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Configuring Physical Instances===&lt;br /&gt;
The configuration of our logical models is complete. During this process we have defined all of the 'types' of objects in our system. Now it is time to configure actual instances of those objects so that they can be built and deployed.&lt;br /&gt;
&lt;br /&gt;
Object instance configuration is done through the Availability Management Framework (AMF) via the '''AMF Configuration''' dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To launch this dialog go to the the '''Clovis''' menu and select '''AMF Configuration...'''&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''AMF Configuration''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='AMF Configuration Dialog'&amp;gt;&amp;lt;/span&amp;gt;[[File:AMF_Configuration.png|frame|center| '''AMF Configuration Dialog''' ]]&lt;br /&gt;
&lt;br /&gt;
You will note from the instructions on this page that the physical instances representing the objects in our model can be created manually or by using wizards. Using the wizards will save us both typing and time so we will use these instead of creating each instance manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Creating Node Instances====&lt;br /&gt;
First we will create actual instances of the Node Types (in our case only one Node Type...SCNode) we created in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double-click AMF Configuration in the left hand pane. The Node Instance List appears.&lt;br /&gt;
&amp;lt;li&amp;gt;Click on Node Instance List. The right hand pane displays the fields we must fill out to create our node instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the right hand pane:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select SCNode for the '''Node Type'''.&lt;br /&gt;
&amp;lt;li&amp;gt;Select SysBlade for the '''Blade type'''.&lt;br /&gt;
&amp;lt;li&amp;gt;Enter 1 for the '''Node Count'''.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The complete form should look like the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Node Wizard Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_List.png|frame|center| '''Node Wizard Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''Create Instance Tree''' button to create our node instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expanding the '''Node Instance List''' branch of the '''AMF Configuration''' tree in the left-hand pane reveals a new node instance named SCNodeI0 (indicating SCNode Instance 0).&lt;br /&gt;
&lt;br /&gt;
====Creating Service Group Instances====&lt;br /&gt;
Now we will create actual instances of the Service Groups that we defined in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click on Service Group List. The right hand pane displays the fields we must fill out to create our service group instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the right hand pane:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select csa101SG (the only service group type we defined) for the '''Service Group Type'''.&lt;br /&gt;
*The '''Associated Node Instances''' list will be populated with all of the node instances that can be associated with the selected service group type.&lt;br /&gt;
&amp;lt;li&amp;gt;Select SCNodeI0 from the '''Associated Node Instances''' list.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The completed form should look like the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Wizard Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Group_List.png|frame|center| '''Service Group Wizard Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''Create Instance Tree''' button to create our service group instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you now completely expand the '''AMF Configuration''' branch of the tree in the left-hand pane you will see the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='AMS Configuration Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:AMF_Configuration_Final.png|frame|center| '''AMF Configuration Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
Notice that not only have the wizards created the node and service group instances for you, they have also filled out the entire instance tree. This was accomplished based on two key sets of information. The first of these is the association that was made between the service group type and the node instance in the '''Service Group Wizard'''. The second set of information is the component model that we created through the New Project Wizard and the Component Editor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]For more information regarding the specific properties of the generated instances see [[#Appendix B: AMF Configuration Instance Details|Appendix B: AMF Configuration Instance Details]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Thats it. We are done modelling the csa101 example!&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the OK button to commit our changes and close the dialog. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
Now its time to generate the framework code.&lt;br /&gt;
&lt;br /&gt;
==Generating the csa101 Code==&lt;br /&gt;
In this step we generate the source code for our example. The code that will be created is the framework code that handles all of the low level functionality provided by SAFplus Platform.&lt;br /&gt;
&lt;br /&gt;
To generate the source code go to the '''Project''' menu and select '''Generate Source'''. Several progress dialogs will appear and after a few seconds code generation will be complete.&lt;br /&gt;
&lt;br /&gt;
The source code and configuration XML files are generated and placed in subdirectories of the '''Project Area Location''' that we specified in the '''New Project Wizard'''. You can review this location by using the '''Project &amp;gt; Properties''' menu to get to the '''Project Properties''' dialog and then selecting '''Clovis System Project''' in the left hand pane.&lt;br /&gt;
&lt;br /&gt;
You can review the generated code from within the SAFplus Platform IDE. To do this go to the '''Clovis Workspace''' pane and expand the '''SampleModel''' node. The node tree should look like the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Clovis Workspace Code Tree'&amp;gt;&amp;lt;/span&amp;gt;[[File:Clovis_Workspace_Generate_Source.png|frame|center| '''Clovis Workspace Code Tree''' ]]&lt;br /&gt;
&lt;br /&gt;
The code of particular interest to our example is in the SampleModel/src/app/csa101 branch of the tree. This is the code for our csa101 example. The csa101 example consist of one C module (&amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt;). There is also a make file that will be used for building the application. The &amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt; file implements our 'Hello World!' application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]If you run code generation a second time you will be presented with a dialog box asking if you would like to make a backup copy of the existing source code before proceeding. You can answer No to this dialog.&lt;br /&gt;
&lt;br /&gt;
==Customizing the csa101 Code==&lt;br /&gt;
While the code that was generated in the previous section can be built and run we want to make some changes to it so that we can easily see what our example is doing. For our example we will be changing one source file (&amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt;) and two make files.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]In a real production situation this is the point where you would customize the code to perform the specific tasks of your product.&lt;br /&gt;
&lt;br /&gt;
You will notice in the C file that there are several places where you see the following comment block.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 // ...&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Makefiles have a similar convention but with a slightly different syntax.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|Makefile&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
&lt;br /&gt;
 # ---END_APPLICATION_CODE---&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These are sections of the file where it is safe to enter custom application code without having to worry about that code being overwritten if you were to again perform '''Generate Source''' for your model. This is important since the typical development cycle is an iterative process where you will return to the IDE to make modifications to your model.&lt;br /&gt;
&lt;br /&gt;
To simplify the process of building and running the csa101 example, OpenClovis, Inc. has already made the necessary code customizations and shipped this code with the SAFplus Platform SDK. At this point you can simply replace the generated source files with these customized versions to avoid typing in the changes. We will go over each customization below and explain what was done.&lt;br /&gt;
&lt;br /&gt;
To replace the generated files with the customized versions shipped with the SAFplus Platform SDK follow these instructions.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]  The sample applications containing the csa101 example can be found under the installation directory at &amp;lt;code&amp;gt;&amp;lt;install_dir&amp;gt;/6.1/sdk/src/examples/eval&amp;lt;/code&amp;gt;.  For example, this directory is located at &amp;lt;code&amp;gt;/opt/clovis/6.1/sdk/src/examples/eval&amp;lt;/code&amp;gt; for &amp;quot;default&amp;quot; installations.  We will refer to this directory in the remaining of this section as &amp;lt;code&amp;gt;&amp;lt;eval_dir&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Exit the SAFplus Platform IDE using the '''File &amp;gt; Exit''' menu item. If you are prompted to save changes before exiting answer yes.&lt;br /&gt;
&amp;lt;li&amp;gt;Navigate to the source code work area.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cd /home/clovis/projectarea1/ide_workspace/SampleModel/src/app&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using your favorite editor open the file &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; that resides in this directory. This is the application make file.&lt;br /&gt;
&amp;lt;li&amp;gt;Add the following line to this file within the first &amp;lt;code&amp;gt;BEGIN_APPLICATION_CODE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;END_APPLICATION_CODE&amp;lt;/code&amp;gt; comment block.  This will instruct the build process to build our custom output library.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;SUBDIRS += ev&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Save this file and exit the editor.&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the following command to copy the output package to our working area.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cp -r &amp;lt;eval_dir&amp;gt;/src/app/ev .&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Navigate to the component code work area.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cd csa101&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the following command to copy the csa101 source code.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cp &amp;lt;eval_dir&amp;gt;/src/app/csa101Comp/main.c .&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the following command to copy the component make file.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cp &amp;lt;eval_dir&amp;gt;/src/app/csa101Comp/Makefile .&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Restart the SAFplus Platform IDE.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cl-ide&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Customizing main.c===&lt;br /&gt;
The &amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt; file is the C module which will implement our 'Hello World!' behavior. We have to make changes in several parts of this file.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]If you copied the files as instructed in the section above then these changes have already been made to the files. Use this section to review and understand the changes.&lt;br /&gt;
&lt;br /&gt;
In the include section of this file we have added a new include for &amp;lt;code&amp;gt;ev.h&amp;lt;/code&amp;gt;. This refers to a special output library that we copied to our work area in the previous section. This output library is used to redirect output from the application to a component specific log. This is purely cosmetic but it will allow us to easily monitor what is happening when we run our example.&lt;br /&gt;
Also, we change the logging from the default &amp;quot;application&amp;quot; stream to a custom stream. To do this, we include the header that defines our config routines, change the default &amp;quot;clLogApp&amp;quot; macro to use a different stream, and define that stream as a global variable:&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
   ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;../ev/ev.h&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
 #define clprintf(severity, ...)   clAppLog(gEvalLogStream, severity, 10, &lt;br /&gt;
         &amp;quot;MAI&amp;quot;, CL_LOG_CONTEXT_UNSPECIFIED,__VA_ARGS__)&lt;br /&gt;
 ...&lt;br /&gt;
 ClLogStreamHandleT  gEvalLogStream = CL_HANDLE_INVALID_VALUE;&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Next we define a static variables that will keep track of the state of our application and a function to aid in showing when the application is running. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
   ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 static int running = 0;&lt;br /&gt;
&lt;br /&gt;
 static char*&lt;br /&gt;
 show_progress(void)&lt;br /&gt;
 {&lt;br /&gt;
     static char bar[] = &amp;quot;          .&amp;quot;;&lt;br /&gt;
     static int progress = 0;&lt;br /&gt;
&lt;br /&gt;
     /* Show a little progress bar */&lt;br /&gt;
     return &amp;amp;bar[sizeof(bar)-2-(progress++)%(sizeof(bar)-2)];&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
The &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; flag will be used to indicate whether the current application is active or suspended.&lt;br /&gt;
The function &amp;lt;code&amp;gt;show_progress&amp;lt;/code&amp;gt; returns a pointer to a c string with a number of spaces followed by a '.' character. The number of spaces in the string cycles from zero to an upper bound. This is used later on to provide visual indication of the progress of the application's output.&lt;br /&gt;
&lt;br /&gt;
Next we have added a function &amp;lt;code&amp;gt;activeLoop&amp;lt;/code&amp;gt; to print the output. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void* activeLoop(void* p)&lt;br /&gt;
{&lt;br /&gt;
    while (running)&lt;br /&gt;
    {&lt;br /&gt;
        clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: Threaded Hello World! %s\n&amp;quot;,     &lt;br /&gt;
                 show_progress());&lt;br /&gt;
        sleep(2);&lt;br /&gt;
    }&lt;br /&gt;
    return NULL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Notice the while loop condition. This function uses the &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; variable that was initialized to 0. The loop will keep running until &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; is set to non-zero. The work of the application: printing &amp;quot;Hello World!&amp;quot; along with the progress indicator.  Next the command &amp;lt;code&amp;gt;sleep(2)&amp;lt;/code&amp;gt; simply sleeps for two seconds so as not to fill log files too quickly or completely swamp the CPU.&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; becomes non-zero, we return from the function. &lt;br /&gt;
&lt;br /&gt;
Next, the log stream is initialized in the &amp;lt;code&amp;gt;initializeAmf&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
/*  &lt;br /&gt;
 * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
/* Set up console redirection for demo purposes */&lt;br /&gt;
clEvalAppLogStreamOpen((ClCharT *)appName.value, &amp;amp;gEvalLogStream);&lt;br /&gt;
...&lt;br /&gt;
clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: Instantiated as component instance %s.&amp;quot;, appName.value);&lt;br /&gt;
clprintf(CL_LOG_SEV_INFO,&amp;quot;%s: Waiting for CSI assignment...&amp;quot;, appName.value);&lt;br /&gt;
&lt;br /&gt;
/*  &lt;br /&gt;
 * ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Next we indicate log stream when we are exiting. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
/*  &lt;br /&gt;
 * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 clEvalAppLogStreamClose(gEvalLogStream);&lt;br /&gt;
/*  &lt;br /&gt;
 * ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This will cause &amp;lt;code&amp;gt;activeLoop&amp;lt;/code&amp;gt; function to exit.&lt;br /&gt;
Next we will put in code to manage the state of our application.&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
void safAssignWork(SaInvocationT       invocation,&lt;br /&gt;
                   const SaNameT       *compName,&lt;br /&gt;
                   SaAmfHAStateT       haState,&lt;br /&gt;
                   SaAmfCSIDescriptorT csiDescriptor)&lt;br /&gt;
{&lt;br /&gt;
    /*&lt;br /&gt;
     * ---BEGIN_APPLICATION_CODE--- &lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    // ...&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * ---END_APPLICATION_CODE---&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Print information about the CSI Set&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    clprintf (CL_LOG_SEV_INFO, &amp;quot;Component [%.*s] : PID [%d]. CSI Set Received\n&amp;quot;,&lt;br /&gt;
              compName-&amp;gt;length, compName-&amp;gt;value, mypid);&lt;br /&gt;
&lt;br /&gt;
    printCSI(csiDescriptor, haState);&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Take appropriate action based on state&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    switch ( haState )&lt;br /&gt;
    {&lt;br /&gt;
        case SA_AMF_HA_ACTIVE:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to take the active HA state &lt;br /&gt;
             * for the CSI.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
            &lt;br /&gt;
            pthread_t thr;&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: ACTIVE state requested; activating service\n&amp;quot;);&lt;br /&gt;
            running = 1;&lt;br /&gt;
            pthread_create(&amp;amp;thr,NULL,activeLoop,NULL);&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_STANDBY:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to take the standby HA state &lt;br /&gt;
             * for this CSI.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: Standby state requested&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_QUIESCED:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to quiesce the CSI currently&lt;br /&gt;
             * assigned the active or quiescing HA state. The application &lt;br /&gt;
             * must stop work associated with the CSI immediately.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: Acknowledging new state quiesced&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
        case SA_AMF_HA_QUIESCING:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to quiesce the CSI currently&lt;br /&gt;
             * assigned the active HA state. The application must stop work&lt;br /&gt;
             * associated with the CSI gracefully and not accept any new&lt;br /&gt;
             * workloads while the work is being terminated.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: Signaling completion of QUIESCING&amp;quot;);&lt;br /&gt;
              running = 0;&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfCSIQuiescingComplete(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
We have modified the &amp;lt;code&amp;gt;safAssignWork&amp;lt;/code&amp;gt; callback function to let our application know what to do when the state changes. In the case where the state changes to &amp;lt;code&amp;gt;SA_AMF_HA_ACTIVE&amp;lt;/code&amp;gt; we set the &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; variable to 1. This will cause our application to spawns a thread which calls &amp;lt;code&amp;gt;activeLoop&amp;lt;/code&amp;gt; function and start printing the 'Hello World!' message. For any other state change we set the &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; variable to 0 which will cause the message to stop printing. For any state change we print out a message indicating the new state of the application.&lt;br /&gt;
&lt;br /&gt;
The example also demonstrates a non-threaded approach.  But first, some background: for both threaded and non-threaded applications, the main must have a &amp;quot;dispatch&amp;quot; loop that handles incoming AMF notifications and calls the relevant callback.  So to implement a single threaded SAF aware application, the programmer must modify this dispatch loop adding active (and potentially standby) functionality:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
main(...)&lt;br /&gt;
&lt;br /&gt;
    do&lt;br /&gt;
    {&lt;br /&gt;
        struct timeval timeout;&lt;br /&gt;
        timeout.tv_sec = 2; timeout.tv_usec = 0;&lt;br /&gt;
&lt;br /&gt;
        FD_ZERO(&amp;amp;read_fds);&lt;br /&gt;
        FD_SET(dispatch_fd, &amp;amp;read_fds);&lt;br /&gt;
&lt;br /&gt;
        if( select(dispatch_fd + 1, &amp;amp;read_fds, NULL, NULL, &amp;amp;timeout) &amp;lt; 0)&lt;br /&gt;
        {&lt;br /&gt;
            if (EINTR == errno)&lt;br /&gt;
            {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
		    clprintf (CL_LOG_SEV_ERROR, &amp;quot;Error in select()&amp;quot;);&lt;br /&gt;
			perror(&amp;quot;&amp;quot;);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        if (FD_ISSET(dispatch_fd,&amp;amp;read_fds))&lt;br /&gt;
        {&lt;br /&gt;
            saAmfDispatch(amfHandle, SA_DISPATCH_ALL);&lt;br /&gt;
        }&lt;br /&gt;
        if (running) &lt;br /&gt;
        {&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: Unthreaded Hello World! %s&amp;quot;,&lt;br /&gt;
                     show_progress()); // Run the &amp;quot;active&amp;quot; code&lt;br /&gt;
        }&lt;br /&gt;
        else &lt;br /&gt;
        {&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: idle&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }while(!unblockNow);      &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
This code should be very familiar to anyone who has written single threaded &amp;quot;event loop&amp;quot; style code. As can be seen in the code snippet above, the select is given an idle timeout (in a real application the timeout would be much smaller) and the application only calls &amp;lt;code&amp;gt;saAmfDispatch&amp;lt;/code&amp;gt; if the select actually indicates that the there is data in the FD.  Then it falls down into an &amp;quot;if&amp;quot; statement that checks if we are active &amp;quot;if (running)...&amp;quot; and outputs a log if that is the case.&lt;br /&gt;
&lt;br /&gt;
===Customizing the Component MakeFile===&lt;br /&gt;
We have to make a small change to the component &amp;lt;code&amp;gt;MakeFile&amp;lt;/code&amp;gt; so that it knows about our special output library during the build. To do this we add the following lines. This file is located in &amp;lt;code&amp;gt;/home/clovis/projectarea1/ide_workspace/SampleModel/src/app&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|Component MakeFile&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    # ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
&lt;br /&gt;
    SUBDIRS += ev&lt;br /&gt;
&lt;br /&gt;
    # ---END_APPLICATION_CODE---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Customizing the Application MakeFile===&lt;br /&gt;
We have to make sure that our special output library is built along with our application. To do this we change the line listing the sudirectories to make as follows. This file is located in the directory &amp;lt;code&amp;gt;/home/clovis/projectarea1/ide_workspace/SampleModel/src/app/csa101&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|Application MakeFile&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    # ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
    &lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    EXTRA_LDLIBS += $(LIB_DIR)/libeval.a&lt;br /&gt;
&lt;br /&gt;
    # ---END_APPLICATION_CODE---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are finished customizing our application code!&lt;br /&gt;
&lt;br /&gt;
==Building the csa101 Code==&lt;br /&gt;
&lt;br /&gt;
Now that we have finished customizing the code it is time to build it. The build process is launched using the '''Project &amp;gt; Build Project''' menu item. Once selected the '''Build Configuration''' dialog appears.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Build Configuration Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Build_Configuration.png|frame|center| '''Build Configuration Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The '''Build Configuration''' dialog is used to gather specific information about the build we are about to perform. Using this dialog you can rebuild the same model using different cross builds, or including different chassis managers. We don't have to make any changes to this dialog since the default settings make sense for our sample application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]If you have prebuilt the SAFplus Platform libraries then you can check the '''Use pre built SAFplus''' checkbox and include the location of the prebuilt libraries. For more information about pre-building SAFplus Platform libraries, see ''SAFplus Platform SDK User Guide''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]The '''Include SNMP for North Bound Access''' control is checked by default. This just means that Net SNMP will be started along with our system. If you want end-to-end connectivity you will need to supply an SNMP Sub Agent and a MIB. See the ''SAFplus Platform SDK User Guide'' for more details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]In the '''Project''' menu if the '''Build Project''' entry is not highlighted, then click in the right pane i.e. '''Clovis Workspace''' pane and click the '''Project''' menu again. This not highlighting of the '''Build Project''' is because the '''Clovis Workspace''' is not selected properly because of moving focus to some other pane.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Click the '''OK''' button to begin the build. If this is the first time that the project is being built, or if you have made changes to any setting on this screen, you will initially see a progress dialog indicating that the project is being configured. The configuration step is setting up the project for building. After the configuration has completed you will see a progress dialog indicating that the code is being built.&lt;br /&gt;
&lt;br /&gt;
==Creating the csa101 Images==&lt;br /&gt;
&lt;br /&gt;
Making the csa101 images will create software packages that can be deployed on target machines to run the example. The process of creating images is launched using the '''Project &amp;gt; Make Images''' menu item. Once selected the '''Make Images Configuration''' dialog appears.&lt;br /&gt;
&lt;br /&gt;
The '''Make Images Configuration''' dialog is used to indicate information about the environment on which the images will be deployed. This information is used to tailor the images to run on that environment. Here we will make the following modificaiton.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Make Images Configuration TIPC Specific Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Make_Image_TIPC_Specific.png|frame|center| '''Make Images Configuration TIPC Specific Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enter a value for the '''Trap IP'''. This value specifies where the SNMP sub-agent will send traps at runtime. This field is optional but if specified must be a valid IP address. Enter a value of '127.0.0.1' in this field.&lt;br /&gt;
&amp;lt;li&amp;gt;Enter a value for the '''TIPC Net ID'''. This value represents a unique identifier used by TIPC to set up interprocess communication across the deployed OpenClovis SAFplus Platform cluster. This field is required and should default to '1340'.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Make Images Configuration General Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Make_Images_General.png|frame|center| '''Make Images Configuration General Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Check the '''Create Node Specific Images''' and '''Package Images into Tarballs''' check boxes. This will create tarballs of the images making them easy to deploy to various machines.&lt;br /&gt;
&amp;lt;li&amp;gt;The table on this dialog will hold a row for each node instance defined in the model. In our case this is only one...SCNodeI0. For each of these instances we can define the slot number in the chassis on which the node will run and the network interface that the node will use for communication. In our case enter '1' for the Slot Number and 'eth0' for the Network Interface.&lt;br /&gt;
&amp;lt;li&amp;gt;Click '''OK''' to begin the make image process. A dialog box will appear and after a few seconds the the make images process will be complete.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The images will be populated at &amp;lt;project_area&amp;gt;/target/SampleModel/images. Each node-specific image is provided as a directory containing the run-time files (binaries, libraries, prerequisites, and configuration files) as well as a tarball with the same content.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt; For our model containing one node (&amp;lt;code&amp;gt;SCNodeI0&amp;lt;/code&amp;gt;) the following files and directories are generated for deployment on the run-time system.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;project_area&amp;gt;&lt;br /&gt;
   |+target&lt;br /&gt;
       |+&amp;lt;model&amp;gt;&lt;br /&gt;
           |+images&lt;br /&gt;
               |+SCNodeI0&lt;br /&gt;
               |   |+bin&lt;br /&gt;
               |   |+etc&lt;br /&gt;
               |   |+lib&lt;br /&gt;
               |   |+modules&lt;br /&gt;
               |   |+share&lt;br /&gt;
               |-SCNodeI0.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The rest of the steps in this example are all done from the command line so we can exit the IDE. To do this use the '''File &amp;gt; Exit''' menu item.&lt;br /&gt;
&lt;br /&gt;
==Deploying the csa101 Images==&lt;br /&gt;
Now that the image has been built we must deploy it so that we can run and observe our example. Since we are assuming that the example will be run on the same machine as the images were built this is a fairly trivial exercise. Use the following steps to deploy the runtime image.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First we create a directory where we will install the image. In our case we will use &amp;lt;code&amp;gt;/root/asp&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root&lt;br /&gt;
# mkdir asp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next we navigate to that directory and untar the deployment package.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/asp&lt;br /&gt;
# tar xzvf /home/clovis/projectarea1/target/SampleModel/images/SCNodeI0.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The System Controller is now installed and ready to run.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] If you were going to run the example on a machine other than the one where the images were built you would first copy the installation tarball to that machine before performing the above steps.&lt;br /&gt;
&lt;br /&gt;
==Running the csa101 Example==&lt;br /&gt;
There are two parts to running the csa101 example. First we must start SAFplus Platform, and then we interact with the system components.&lt;br /&gt;
&lt;br /&gt;
===Starting SAFplus Platform===&lt;br /&gt;
&lt;br /&gt;
To start SAFplus Platform on System Controller node.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a shell.&lt;br /&gt;
&amp;lt;li&amp;gt;Run the following commands&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/asp&lt;br /&gt;
# etc/init.d/asp start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] This assumes that you are running the SAFplus Platform example on the same PC that you are executing these commands. If you are running SAFplus Platform on a different machine then you should first ssh to that machine before executing the commands.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] If SAFplus Platform fails to start properly it could be due to the machine's firewall being enabled. SAFplus Platform will not run on a machine which has firewall enabled. See the ''Environment Related Observation'' section of the ''SAFplus Platform Release Notes'' for more information.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] By default the network interface used by the Group Membership Service is set to eth0. During the make images phase of the tutorial we also set the ethernet interface for node SCNodeI0 to be eth0. During image generation these configuration parameters are written to two files in the deployment package.&lt;br /&gt;
*&amp;lt;code&amp;gt;/root/asp/etc/clGmsConfig.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
*&amp;lt;code&amp;gt;/root/asp/etc/asp.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There may be an occasion where you want to switch this interface for a machine on which you are deploying. If you would like to switch this interface on a machine without having to go through the process of rebuilding and redeploying, you can edit these two files and change the 'eth0' references to the interface you would like to use.&lt;br /&gt;
&lt;br /&gt;
===Interacting with the System Components===&lt;br /&gt;
Once SAFplus Platform is up and running the next step is to start csa101 by informing SAFplus Platform that it should start the application. The Evaluation System's model tells SAFplus Platform that csa101 is locked for instantiation. This means that the process will not be started when SAFplus Platform comes up. This method of starting csa's is used for the Evaluation System, allowing users to interact with csa's and clearly see their output/functionality. Usually this would not be the case with applications, where they would run when SAFplus Platform begins.&lt;br /&gt;
&lt;br /&gt;
At this point it would help to be familiar with the Service Availability Forum's notions of  Service Unit, Service Group, and administrative state.  The Service Availability Forum's Application Interface Specification (available from http://www.saforum.org/) is a good place to start.&lt;br /&gt;
&lt;br /&gt;
In brief, the sample applications in the Evaluation System are part of service units which in turn are part of service groups.  Service groups (and the service units that make up the service groups) can be in &amp;quot;administrative&amp;quot; states which include &amp;quot;LockInstantiation&amp;quot;, &amp;quot;LockAssignment&amp;quot;, and &amp;quot;Unlocked&amp;quot;.  There are other states, but these are the ones we care about for the purposes of this Evaluation System.  If the administrative state of a service unit is &amp;quot;LockInstantiation&amp;quot; then the application that is part of that service unit will not even be started.  If the administrative state is &amp;quot;LockAssignment&amp;quot; then the application will be started, but it will not be assigned any work.  If the administrative state is &amp;quot;Unlocked&amp;quot; then it will not only be started, but will have a workload assigned to it, which is to say that it will start doing work (or start providing service), rather than idly sit waiting for work.&lt;br /&gt;
&lt;br /&gt;
The administrative state of a service unit or service group can change from LockInstantiation to LockAssignment, from LockAssignment to Unlocked, or back to LockInstantiation, from Unlocked to LockAssignment.  A picture might help here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;PartialServiceGroupAdministrativeStateDiagram&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; [[File:eval_AdministrativeStateDiagram.png|frame|center| '''Partial Service Group Administrative State Diagram''' ]]&lt;br /&gt;
&lt;br /&gt;
As the figure shows, the administrative state of a service unit (or service group) can change from &amp;quot;LockInstantiation&amp;quot; to &amp;quot;LockAssignment&amp;quot; and from there to &amp;quot;Unlocked&amp;quot;, or back to &amp;quot;LockInstantiation&amp;quot;.  One way to change the administrative state of a service group is with the SAFplus Platform Console command line interface. &lt;br /&gt;
&lt;br /&gt;
To use the SAFplus Platform Console:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a terminal on the Development Machine. (Or ssh into System Controller node as root, if you are running SAFplus Platform on a machine other than the development machine.)&lt;br /&gt;
&amp;lt;li&amp;gt; Change to image bin directory: &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cd /root/asp/bin&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Start the SAFplus Platform Console &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# ./asp_console&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; From within the SAFplus Platform Console: &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cli[Test]-&amp;gt; setc 1&lt;br /&gt;
cli[Test:SCNodeI0]-&amp;gt; setc cpm&lt;br /&gt;
cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockAssignment sg csa101SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above changes the administrative state of the group csa101SGI0 from &amp;quot;locked-for-instantiation&amp;quot; to &amp;quot;locked-for-assignment&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]For the command &amp;lt;code&amp;gt;cli[Test]-&amp;gt; setc 1&amp;lt;/code&amp;gt;, the 1 represents the physical slot number of the System Controller within the Chassis. Remember that we set our System Controller to be in slot 1 in the make images dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Now lets tail the application log file so that we can see whats going on. In another window, as root, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# tail -f /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see the following:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00001 :   INFO) &lt;br /&gt;
 Component [csa101I0] : PID [10950]. Initializing&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00002 :   INFO)    &lt;br /&gt;
 IOC Address             : 0x1&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00003 :   INFO)    &lt;br /&gt;
 IOC Port                : 0x81&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00004 :   INFO) &lt;br /&gt;
 csa101: Instantiated as component instance csa101I0.&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00005 :   INFO) &lt;br /&gt;
 csa101I0: Waiting for CSI assignment...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Next change the administrative state of the csa101SGI0 service group to  &amp;quot;unlocked&amp;quot; by running (in the SAFplus Platform Console) :&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cli[Test:SCNodeI0:CPM]-&amp;gt; amsUnlock sg csa101SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the window where you're running the &amp;quot;tail -f&amp;quot; you should see:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Nov 12 11:59:37.092 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00163 :   INFO) &lt;br /&gt;
 csa101: ACTIVE state requested; activating service&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:37.092 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00164 :   INFO) &lt;br /&gt;
 csa101: Threaded Hello World!  .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:39.094 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00165 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!   .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:39.095 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00166 :   INFO) &lt;br /&gt;
 csa101: Threaded Hello World!    .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:41.095 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00167 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!     .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:41.097 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00168 :   INFO) &lt;br /&gt;
 csa101: Threaded Hello World!      .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:43.095 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00169 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!       .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As you can tell from the output log our component is up and running! It is continuously printing our 'Hello World!' output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Now change the state of the csa101SGI0 service group back to &amp;quot;locked-for-assignment&amp;quot; by running (in the SAFplus Platform Console): &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockAssignment sg csa101SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the tail -f output you should see:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Nov 12 12:07:17.591 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00625 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!  .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00626 :   INFO) &lt;br /&gt;
 Component [csa101I0] : PID [10950]. CSI Set Received&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00627 :   INFO) &lt;br /&gt;
 CSI Flags : [Target One]&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00628 :   INFO) &lt;br /&gt;
 CSI Name : [csa101CSII0]&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00629 :   INFO) &lt;br /&gt;
 HA state : [Quiesced]&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00630 :   INFO) &lt;br /&gt;
 csa101: Acknowledging new state quiesced&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.312 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00632 :   INFO) &lt;br /&gt;
 Component [csa101I0] : PID [10950]. CSI Remove Received&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.312 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00633 :   INFO)    &lt;br /&gt;
 CSI                     : csa101CSII0&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.312 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00634 :   INFO)    &lt;br /&gt;
 CSI Flags               : 0x2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Our component has been put into Lock Assignment state so our 'Hello World!' output has stopped printing to the log.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;At this point you can either unlock the service group to change its state to &amp;quot;unlocked&amp;quot; or you can lock it for instantiation to change it to state  &amp;quot;locked-for-instantiation&amp;quot;.  The latter will cause the csa101 process to die.  From state &amp;quot;locked-for-assignment&amp;quot;, it is possible to change the state to &amp;quot;locked-for-instantiation&amp;quot; by running (in the SAFplus Platform Console):&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockInstantiation sg csa101SGI0&lt;br /&gt;
cli[Test:SCNodeI0:CPM] -&amp;gt; end&lt;br /&gt;
cli[Test:SCNodeI0] -&amp;gt; end&lt;br /&gt;
cli[Test] -&amp;gt; bye&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Stopping SAFplus Platform===&lt;br /&gt;
&lt;br /&gt;
To stop SAFplus Platform on the System Controller&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a shell.&lt;br /&gt;
&amp;lt;li&amp;gt;ssh into the System Controller node as root.&lt;br /&gt;
&amp;lt;li&amp;gt;Once logged in, run the following command&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/asp&lt;br /&gt;
# etc/init.d/asp stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Summary and Next Steps==&lt;br /&gt;
In the csa101 example we learned the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to create a system model using the '''SAFplus Platform IDE'''.&lt;br /&gt;
&amp;lt;li&amp;gt;How to generate the source code.&lt;br /&gt;
&amp;lt;li&amp;gt;How to customize this source code to fit a specific application.&lt;br /&gt;
&amp;lt;li&amp;gt;How to configure and build the customized source code.&lt;br /&gt;
&amp;lt;li&amp;gt;How to make runtime images and deploy them to target machines.&lt;br /&gt;
&amp;lt;li&amp;gt;How to start and stop '''SAFplus'''.&lt;br /&gt;
&amp;lt;li&amp;gt;How to interact with system components using the '''SAFplus Platform Console'''.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next logical step would be to run through the '''SAFplus Platform Evaluation System User Guide'''. This guide goes over more complex system configurations and introduces new concepts.&lt;br /&gt;
&lt;br /&gt;
For more in depth information on the '''SAFplus Platform IDE''' see the '''SAFplus Platform IDE User Guide'''.&lt;br /&gt;
&lt;br /&gt;
For more in depth information on the '''SAFplus Platform SDK''' see the '''SAFplus Platform SDK User Guide'''.&lt;br /&gt;
&lt;br /&gt;
==Appendix A: target.conf Settings==&lt;br /&gt;
&lt;br /&gt;
Below is a description of the values in the settings in the &amp;lt;code&amp;gt;target.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''TRAP_IP''' (Mandatory): Specifies where the SNMP SubAgent should send traps at runtime.  If you do not have an SNMP SubAgent in your model specify '''127.0.0.1''' as the value.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
TRAP_IP=127.0.0.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''CMM_IP''' (Mandatory if deployed on an ATCA chassis): Specifies the IP address of the target system's chassis management module or shelf manager. &amp;lt;i&amp;gt;ATCA chassis Example&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
CMM_IP=169.254.1.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''CMM_USERNAME''' and '''CMM_PASSWORD''' (Mandatory if deployed on an ATCA chassis): Specifies the username and password required for the OpenClovis SAFplus Platform Chassis Manager to connect to the target system's chassis management module. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
CMM_USERNAME=root&lt;br /&gt;
CMM_PASSWORD=password&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''INSTALL_PREREQUISITES=YES|NO''' (Mandatory): Specifies whether the target images will include 3rd party runtime prerequisites or not.  Say '''YES''' if the target nodes do not meet the target host requirements specified in the Installation section of this document.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
INSTALL_PREREQUISITES=YES&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''INSTANTIATE_IMAGES=YES|NO''' (Mandatory): Specifies whether &amp;lt;code&amp;gt;make images&amp;lt;/code&amp;gt; will generate node-instance specific images instead of only generating node-type specific images.  This option is a development optimization for advanced users of SAFplus Platform SDK.  If unsure, say '''YES'''. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
INSTANTIATE_IMAGES=YES&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''CREATE_TARBALLS=YES|NO''' (Mandatory): Specifies whether the node-instance specific images created will be packaged into tarballs for deployment onto the target system.  If unsure, say '''YES'''.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE_TARBALLS=YES&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''TIPC_NETID''' (Mandatory): Specifies a unique identifier used by TIPC to set up interprocess communication across the deployed OpenClovis SAFplus Platform cluster.  This is an unsigned 32-bit integer, and &amp;lt;i&amp;gt;must&amp;lt;/i&amp;gt; be unique for every model that is deployed.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
TIPC_NETID=1340&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Node Instance Details''': These specify the node-instance specific parameters required for deploying the model. For each node in the model there is a corresponding entry in the file:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SLOT_&amp;lt;node instance name&amp;gt;''' (Mandatory): Specifies which slot the node is located in.  The first slot is slot 1 -- DO NOT USE SLOT NUMBER 0, it is invalid.  When deployed to an ATCA chassis, the physical slot in which the blade is actually installed will override this value.  When deployed to regular (non-ATCA) systems, this is a logical slot and must be unique for every node in the cluster. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
SLOT_SCNodeI0=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''LINK_&amp;lt;node instance name&amp;gt;''' (Optional): Specifies the ethernet interface used by the node for OpenClovis SAFplus Platform communication with the rest of the cluster.  If unspecified, this defaults to &amp;lt;code&amp;gt;eth0&amp;lt;/code&amp;gt;.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
LINK_SCNodeI0=eth0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''ARCH_&amp;lt;node instance name&amp;gt;''' (Optional if '''ARCH''' is specified): Specifies the target architecture of the node as a combination of machine architecture (MACH) and linux kernel version.  This is only required on a per-node basis if the target cluster has heterogeneous architectures across the nodes.  If it is a homogeneous cluster, a single '''ARCH''' parameter (described below) will suffice.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
ARCH_SCNodeI0=i386/linux-2.6.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''ARCH''' (Optional if node-specific '''ARCH_''' parameters are specified): Specifies the target architecture of all nodes in a homogeneous cluster as a combination of machine architecture (MACH) and linux kernel version.  Note: The build process automatically populates this variable based on the last target the model is built for.&amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
ARCH=i386/linux-2.6.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
For example, if we have a three-node cluster with the following details:&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot; width=&amp;quot;600&amp;quot;&lt;br /&gt;
|+ align=&amp;quot;bottom&amp;quot; | '''Example Node Instance Detail'''&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Node Name&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Slot Number&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Link Interface&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Architecture&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|SCNodeI0&lt;br /&gt;
|1&lt;br /&gt;
|eth0&lt;br /&gt;
|i386/linux-2.6.14&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|PayloadNodeI0&lt;br /&gt;
|3&lt;br /&gt;
|eth0&lt;br /&gt;
|i386/linux-2.6.14&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|PayloadNodeI1&lt;br /&gt;
|4&lt;br /&gt;
|eth1&lt;br /&gt;
|ppc/linux-2.6.9&lt;br /&gt;
|}&lt;br /&gt;
we would specify the node instance details as:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
SLOT_SCNodeI0=1&lt;br /&gt;
SLOT_PayloadNodeI0=3&lt;br /&gt;
SLOT_PayloadNodeI1=4&lt;br /&gt;
&lt;br /&gt;
LINK_SCNodeI0=eth0&lt;br /&gt;
LINK_PayloadNodeI0=eth0&lt;br /&gt;
LINK_PayloadNodeI1=eth1&lt;br /&gt;
&lt;br /&gt;
ARCH_SCNodeI0=i386/linux-2.6.14&lt;br /&gt;
ARCH_PayloadNodeI0=i386/linux-2.6.14&lt;br /&gt;
ARCH_PayloadNodeI1=ppc/linux-2.6.9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Appendix B: AMF Configuration Details==&lt;br /&gt;
This appendix gives brief descriptions of configuration details for instances of different entities (like Node, Service Group, Service Unit etc) that are present in the '''Clovis''' -&amp;gt; '''AMF Configuration''' dialog box.&lt;br /&gt;
&lt;br /&gt;
===Node Instance===&lt;br /&gt;
This screen displays the node instance that was created by the Node Instance Wizard. This node instance was created because the node type '''SCNode''' was selected on the wizard screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Node Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_Details_SCNodeI0.png|frame|center| '''Node Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Node Instance Name''': This field holds the name of the node instance. This name must be unique. The name that was generated combines the node type (SCNode), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''Node Type''': This field holds the node type that was selected on the wizard screen.&lt;br /&gt;
&amp;lt;li&amp;gt;'''MOID''': This is the unique identifier for the node instance. It was generated by the wizard. The format of this ID is a string representing the one and only instance of the chassis (\Chassis:0) defined in the Resource Editor followed by a string representing the first and only instance of the blade type (\SysBlade:0) that was selected in the Node Instance Wizard.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]'''MOID''' is an acronym for Managed Object Identifier. It must be unique and is used to identify which hardware chassis and blade type this instance will run on.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Unit Instance===&lt;br /&gt;
This screen displays the service unit instance that was created by the Service Group Instance Wizard. This service unit instance was created because the service unit type is associated with both the selected node type (SCNode) and the selected service group type (csa101SG) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SU Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_Details_csa101SUI0.png|frame|center| '''SU Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SU Instance Name''': This field holds the name of the service unit instance. This name must be unique. The name that was generated combines the service unit type (csa101SU), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''Service Unit Type''': This field holds the type of the service unit instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Component Instance===&lt;br /&gt;
This screen displays the component instance that was created by the Service Group Instance Wizard. This component instance was created because the component type is associated with the created parent service unit type (csa101SU) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Component Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_Details_csa101I0.png|frame|center| '''Component Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Component Instance Name''': This field holds the name of the component instance. This name must be unique. The name that was generated combines the component type (csa101), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''Component Type''': This field holds the type of the component instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Group Instance===&lt;br /&gt;
This screen displays the service group instance that was created by the Service Group Instance Wizard. This service group instance was created because the service group type '''csa101SG''' was selected on the wizard screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Group_List_csa101SGI0.png|frame|center| '''Service Group Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SG Instance Name''': This field holds the name of the service group instance. This name must be unique. The name that was generated combines the service group type (csa101SG), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''ServiceGroup Type''': This field holds the type of the service group instance.&lt;br /&gt;
&amp;lt;li&amp;gt;'''Associated Service Units''': This button is used to associate service unit instances with this service group instance. Creating this association indicates that the selected service unit(s) will run within this service group instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clicking the '''Associated Service Units''' Edit... button will display the following dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Associated Service Units Dialog'&amp;gt;&amp;lt;/span&amp;gt;[[File:Associated_Service_Units.png|frame|center| '''Associated Service Units Dialog''' ]]&lt;br /&gt;
&lt;br /&gt;
This dialog lists the service unit instances that can be associated with this service group instance. The list contains only one item, the service unit instance that was created by the wizard. This item is checked indicating that the wizard automatically chose this service unit instance to run within the service group instance.&lt;br /&gt;
&lt;br /&gt;
===Service Instance Instance===&lt;br /&gt;
This screen displays the service instance that was created by the Service Group Instance Wizard. This service instance was created because the service instance type is associated with the parent service group type (csa101SG) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Instance_List_csa101SII0.png|frame|center| '''Service Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Service Instance Name''': This field holds the name of the service instance. This name must be unique. The name that was generated combines the service instance type (csa101SI), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''ServiceInstance Type''': This field holds the type of the service instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Component Service Instance Instance===&lt;br /&gt;
This screen displays the component service instance that was created by the Service Group Instance Wizard. This component service instance was created because the component service instance is associated with the parent service instance type (csa101SI) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Component Service Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Component_Service_Instance_List_csa101CSII0.png|frame|center| '''Component Service Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Component Service Instance Name''': This field holds the name of the component service instance. This name must be unique. The name that was generated combines the component service instance type (csa101CSI), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''ComponentServiceInstance Type''': This field holds the type of the component service instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/tutorial</id>
		<title>Doc:latest/tutorial</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/tutorial"/>
				<updated>2016-12-05T19:48:32Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Creating a New Project Area */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Preface==&lt;br /&gt;
The ''SAFplus Platform Sample Application Tutorial'' is a comprehensive tutorial designed to highlight the steps involved in using SAFplus software to design and build a high availability system. In this tutorial you will learn to:&lt;br /&gt;
* Design a model using the SAFplus IDE&lt;br /&gt;
* Generate code from this model to provide middleware support&lt;br /&gt;
* Customize this code for a particular application&lt;br /&gt;
* Build and deploy the customized code&lt;br /&gt;
* Run the system to see the SAFplus Platform software in action&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Audience===&lt;br /&gt;
&amp;lt;br&amp;gt; ''SAFplus Platform Sample Application Tutorial''  is designed for system integrators, designers, and system architects. To use SAFplus Platform, you should be aware of the fundamentals of operation, management, and configuration of telecommunication and networking domains. You should also be familiar with C programming, UML notations, and have the basic knowledge of Linux.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt; This document assumes that you have installed the SAFplus Platform SDK, following the installation steps found in the ''SAFplus Platform Installation Guide''.&lt;br /&gt;
&lt;br /&gt;
===Documentation Conventions===&lt;br /&gt;
This guide uses different fonts and symbols to differentiate between document elements and types of information. These conventions are summarized in the following table.&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;5&amp;quot;&lt;br /&gt;
|- style=&amp;quot;background:#cdd6e6&amp;quot;&lt;br /&gt;
!style=&amp;quot;background:#d3e3ff&amp;quot;| Notation&lt;br /&gt;
!style=&amp;quot;background:#d3e3ff&amp;quot;| Description&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;background:#ffccaa&amp;quot; | &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Code&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|This font denotes the C code provided in various examples.&amp;lt;br&amp;gt;This font denotes function and variable names.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;background:#ffffaa&amp;quot; | &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Output&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|Terminal output.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|style=&amp;quot;color:blue&amp;quot; | Cross reference&lt;br /&gt;
|This font denotes a hyperlink. You can click on the hyperlink text to access the reference location, which can be either a section within the guide or a URL link.&amp;lt;br&amp;gt;A cross reference refers to a section name and accesses the first page of that section.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
| &amp;lt;code&amp;gt;Filenames&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;&amp;lt;DIR&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Files names, Directory paths.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|&amp;lt;code&amp;gt;$ Commands ''group_identifier''&amp;lt;/code&amp;gt; &lt;br /&gt;
| Commands to be run from a shell.&amp;lt;br&amp;gt; Italic text indicate an argument. This can be replaced with your desired value.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]This indicates the presence of notes or annotations, related to the context of the document. &lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Caution.png]]This indicates that certain precautionary measures must be taken before performing a particular task.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Info.png]]This indicates that additional information is provided to you.&lt;br /&gt;
&lt;br /&gt;
As mentioned in the ''SAFplus Platform Installation Guide'' the default directory for installation is &amp;lt;code&amp;gt;/opt/clovis&amp;lt;/code&amp;gt; for root installation and &amp;lt;code&amp;gt;$HOME/clovis&amp;lt;/code&amp;gt; for non root users. Throughout this document we will use &amp;lt;code&amp;gt;&amp;lt;install_dir&amp;gt;&amp;lt;/code&amp;gt; to refer to the installation directory.&lt;br /&gt;
&lt;br /&gt;
===Related Documents===&lt;br /&gt;
For additional information about OpenClovis products, please refer to the following guides:&lt;br /&gt;
* '''[[Doc:latest/relnotes | SAFplus Platform Release Notes]]''' provides information about the software and the hardware required to install OpenClovis SAFplus Availability/Scalability Platform and Integrated Development Environment (IDE). It summarizes the additional features and enhancements of the product since the previous release. It also summarizes the issues and limitations of the product and provides workarounds wherever applicable.&lt;br /&gt;
* '''[[Doc:latest/safcompliance | SAFplus Platform SA-Forum Compliance]]''' describes the level of compliance of OpenClovis SAFplus Platform and its Application Programming Interface (API) with the relevant Service Availability Forum Specifications.&lt;br /&gt;
* '''[[Doc:latest/installguide | SAFplus Platform Installation Guide]]''' provides the system requirements, installation procedure for OpenClovis SAFplus Platform, IDE, and the Evaluation System.&lt;br /&gt;
* '''[[Doc:latest/tutorial | SAFplus Platform Sample Application Tutorial]]''' explains the steps to create and build a sample model using OpenClovis IDE and OpenClovis SAFplus Platform. It also provides troubleshooting information for this process. This provides the logical first step in understanding the SAFplus Platform offering.&lt;br /&gt;
* '''[[Doc:latest/evalguide | SAFplus Platform Evaluation System User Guide]]''' provides all the required information to configure and run the sample models packaged within the Evaluation System. This document also provides good understanding of OpenClovis SAFplus Platform's functionality. This is the natural follow on to the ''OpenClovis Sample Application Tutorial'' as it builds on the example created in that document. &lt;br /&gt;
* '''[[Doc:latest/sdkguide | SAFplus Platform SDK User Guide]]''' provides information about SAFplus Availability/Scalability Platform architecture, various SAFplus Platform components, and their interactions. This guide helps you to configure the OpenClovis SAFplus Platform components, compile, and execute the SAFplus Platform code to build your custom application.&lt;br /&gt;
* '''[[Doc:latest/ideguide | SAFplus Platform IDE User Guide]]''' describes the usage of Integrated Development Environment (IDE), a graphical development environment that complements the SAFplus Platform. This guide helps you to understand how to use the various features of the IDE to build the application.&lt;br /&gt;
* '''[[Doc:latest/logtoolguide | SAFplus Platform Log Tool User Guide]]''' provides information about the usage of OpenClovis Log Tool. OpenClovis Log Tool is an interactive utility that allows you to view binary log files in a readable format and hence monitor system errors, warnings, and other log information. Log Tool allows you to format the &amp;lt;code&amp;gt;.log&amp;lt;/code&amp;gt; files and filter them to view the required entries.&lt;br /&gt;
* '''SAFplus Platform API Reference Guide [http://www.openclovis.org/doc/latest/apirefs/index.html]''' is provided for each component. It describes the Application Programming Interface (API), Service Model, and Management Information Model of the various OpenClovis Application Service Platform (SAFplus Platform) services. It helps the developer to understand the capabilities of the SAFplus Platform services and the APIs provided by these services.&lt;br /&gt;
* '''[[SAFplus Platform Console Reference Guide]]''' provides details about managing applications built on SAFplus Platform using the SAFplus Platform runtime debug console commands. SAFplus Platform Console commands can be used to manage, monitor, and test your application.&lt;br /&gt;
&lt;br /&gt;
===OpenClovis Online Technical Support===&lt;br /&gt;
OpenClovis customers and partners can register on our Web site and receive personalized services and information. If you need any support or assistance while working on OpenClovis products, you can access the following: URL: http://www.openclovis.com. Send your queries to: support@openclovis.com.&lt;br /&gt;
&lt;br /&gt;
===Documentation Feedback===&lt;br /&gt;
We are interested in hearing from our customers on the documentation provided with the product. Let us know your comments and suggestions on improving the documentation at OpenClovis Inc. Send your comments to: support@openclovis.com. Or even better, edit (or comment in) the page on our documentation wiki located at [http://help.openclovis.com http://help.openclovis.com].&lt;br /&gt;
&lt;br /&gt;
==Our Example: The csa101 System==&lt;br /&gt;
The ''SAFplus Platform Sample Application Tutorial'' will take you through a series of examples each introducing a key concept of the product. Each example builds on the example before it so it is important to go through them in order. The examples are named so that it is easy to determine their sequence. The examples all begin with the letters '''csa''' (standing for Clovis Sample Application) and end with a number. Our first example will be '''csa101'''.&lt;br /&gt;
&lt;br /&gt;
The purpose of our first example is to highlight basic component management. It introduces the basic skeleton of a SAFplus Platform based application component and illustrates how it interacts with the System. It demonstrates basic component registration and life-cycle management.&lt;br /&gt;
&lt;br /&gt;
We will keep this first example very simple. It will consist of the SAFplus Platform running a small component named '''csa101'''. All that this component will do is continuously print 'Hello World!' to a log file. While this component is not very exciting, it will allow us to easily see when the application is in a running state and when it is not. This will allow us to focus on the infrastructure of SAFplus Platform and how the application interfaces with it.&lt;br /&gt;
&lt;br /&gt;
For this example we will assume that we have a chassis with five slots. We will have one type of blade in our example, a '''System Controller'''.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]With the type of model we are developing we would typically define two blade types to install in these slots. The first blade type would be a '''System Controller''' blade (which is responsible for running the SAFplus Platform software which manages application startup, shutdown, failover, etc.) and the second blade type would be a '''Payload''' blade (which is responsible for running our custom '''csa101''' application). However, for the purpose of simplifying the deployment of our system, we will define only the '''System Controller''' blade type and have both the SAFplus Platform and component application run on this one blade. This will allow the example to be run on a single PC.&lt;br /&gt;
&lt;br /&gt;
==Creating the csa101 Model==&lt;br /&gt;
The first step in setting up our example is to create a model which represents the system that we will eventually deploy. This is done through the '''SAFplus Platform IDE'''. In this chapter we will step through the following tasks:&lt;br /&gt;
* Create a project area&lt;br /&gt;
* Launch the '''SAFplus Platform IDE'''&lt;br /&gt;
* Create the IDE project&lt;br /&gt;
* Specify the Resource model (the types of physical hardware in our system)&lt;br /&gt;
* Specify the Component model (the types of components or applications in our system)&lt;br /&gt;
* Specify which Components run on which Resources&lt;br /&gt;
* Specify important build and boot parameters&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Launching the SAFplus Platform IDE===&lt;br /&gt;
You can launch the '''SAFplus Platform IDE''' from the command line. If you chose to create symbolic links during installation you can simply enter &amp;lt;code&amp;gt;'''cl-ide'''&amp;lt;/code&amp;gt; from any directory. If you did not create symbolic links during installation you can either:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the installation directory to the shells search path and then launch the IDE. For example with a bash shell, &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# export PATH=$PATH:$install_dir/6.1/sdk/bin&lt;br /&gt;
# cl-ide&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the command&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# &amp;lt;install_dir&amp;gt;/6.1/sdk/bin/cl-ide&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The splash screen for SAFplus Platform IDE is displayed as illustrated in Figure [[#SAFplus Platform IDE Opening Screen | SAFplus Platform IDE Opening Screen]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Opening Screen'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_GettingStartedIDE_OpeningScreen.png|frame|center| '''SAFplus Platform IDE Opening Screen''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will then be prompted to select a workspace in which to do your work as illustrated in Figure [[#SAFplus Platform IDE Workspace Launcher | SAFplus Platform IDE Workspace Launcher]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Workspace Launcher'&amp;gt;&amp;lt;/span&amp;gt;[[File:Workspace_Launcher.png|frame|center| '''SAFplus Platform IDE Workspace Launcher''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The workspace you select should correspond to the project area that you created in the previous section (in this case &amp;quot;/home/clovis/projectarea1&amp;quot;). Note that the workspace includes a subdirectory of &amp;quot;/ide_workspace&amp;quot;. This is done strictly for organizational purposes. It keeps the IDE models separate from the generated SAFplus Platform models and code.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select the workspace and click  '''OK'''  to launch SAFplus Platform IDE as illustrated in the Figure [[#SAFplus Platform IDE Welcome Screen | SAFplus Platform IDE Welcome Screen]].&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Welcome Screen'&amp;gt;&amp;lt;/span&amp;gt;[[File:IDE_Welcome_Screen.png|frame|center| '''SAFplus Platform IDE Welcome Screen''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''SAFplus Platform''' IDE is launched and you are now looking at the main work area. For more information about the components of this main work area including the SAFplus Platform IDE menu and toolbar, see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Creating the Sample Project===&lt;br /&gt;
We will now create a project within the '''SAFplus Platform IDE'''. This project will hold both the resource model and the component model for our example system. The resource model is a physical view of the resources (the chassis, the blade types, etc.) in our system. The component model is a logical view of the components (applications, etc.) in our system.&lt;br /&gt;
&lt;br /&gt;
We will be using the '''New Project Wizard''' to create our project. The wizard captures some high-level information about the system that we are building and performs a lot of the basic setup for us.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]]The same model that we are building through the wizard could also be created manually through the Resource and Component Editors. For more information on the Resource and Component Editors see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To launch the '''New Project Wizard''' select  '''File'''  &amp;gt;  '''New''' &amp;gt;  '''Project''' from the IDE menu bar.&lt;br /&gt;
&lt;br /&gt;
The  '''New Project Wizard''' is displayed and  '''Clovis System Project'''  is selected by default as illustrated in Figure [[#New Project Wizard | New Project Wizard]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='New Project Wizard'&amp;gt;&amp;lt;/span&amp;gt;[[File:New_Project_Wizard.png|frame|center| '''New Project Wizard''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click  '''Next'''. The  '''Clovis System Project''' window is displayed as illustrated in Figure [[#Clovis System Project | Clovis System Project]].&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;span id='Clovis System Project'&amp;gt;&amp;lt;/span&amp;gt;[[File:Clovis_System_Project.png|frame|center| '''Clovis System Project''' ]]&lt;br /&gt;
&lt;br /&gt;
Enter the following information:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Project Name''' : Enter the name of your new project as  '''SampleModel'''.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]Do not use spaces or special characters for the project name. The project name can be alphanumeric, but cannot start with a number or have only numbers.&lt;br /&gt;
&amp;lt;br&amp;gt;Select  '''Use default'''  to use the same directory mentioned in the  '''Directory'''  field. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Project Area Location''': Enter the location where the generated source code for the model should be stored.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]This can be any existing directory but is usually the project area that was created in the previous section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Python Location''': Enter the location where Python 2.5.0 or above is installed on your system. If Python 2.5.0 or above was installed by SAFplus Platform SDK, the directory is  &amp;lt;code&amp;gt;'''&amp;lt;installation_directory&amp;gt;/6.1/buildtools/local/bin'''&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Add New Blade Type''' window is displayed. This dialog is used to define the blade types that are in our system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Add New Blade Type'&amp;gt;&amp;lt;/span&amp;gt;[[File:Add_New_Blade_Type.png|frame|center| '''Add New Blade Type''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Remember that the system we are modelling has only one blade type...a System Controller.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a new blade type to the list. Name this blade type 'SysBlade' (for System Controller blade).&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Add New SAF Node Type''' window is displayed. This dialog is used to define the type of logical node that will be run on the corresponding blade type defined in the previous dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Add New SAF Node Type'&amp;gt;&amp;lt;/span&amp;gt;[[File:Add_New_SAF_Node_Type.png|frame|center| '''Add New SAF Node Type''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Node types represent groups of software. They are classified as either a System Controller class or a Payload class. This distinction gives the node type certain characteristics which cause it to behave in a well-defined manner. Since we have only a System Controller in our system we will add a node type of class System Controller.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a new node type to the list. Name the node type 'SCNode' and ensure that its node class is 'System Controller (SAF Class B)'.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Specify Program Names''' window is displayed. This dialog is used to create programs or SAF Service Types and associate them with the SAF Node Types specified in the previous dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Specify Program Names'&amp;gt;&amp;lt;/span&amp;gt;[[File:SAF_Service_Type_Name.png|frame|center| '''Specify Program Names''' ]]&lt;br /&gt;
&lt;br /&gt;
In our system we need one SAF Service Type which represents our high availability software (csa101 that continously prints &amp;quot;Hello World!&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a program name to the list. Change the program name to 'csa101' and associate the program with the 'SCNode' node type.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Finish'''. This will create the sample model using the blade type, node type, and program name information collected through the 'New Project Wizard' dialogs.&lt;br /&gt;
&lt;br /&gt;
===Viewing the Model===&lt;br /&gt;
&lt;br /&gt;
====The SAFplus Platform IDE Perspective====&lt;br /&gt;
Once the wizard pages are closed you will be returned to the main IDE view also known as the '''SAFplus Platform IDE Perspective'''. On the left hand side of this view you will see the '''Clovis Workspace''' pane which contains the new project you just created with all project related files and folders. The folders are displayed based on your filter settings. With the default filter settings, the folders shown in Figure [[#Clovis Workspace|Clovis Workspace]] is displayed in the '''Clovis Workspace''' pane. For information about filter settings, refer  ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Clovis Workspace'&amp;gt;&amp;lt;/span&amp;gt;[[File:Clovis_Workspace.png|frame|center|Clovis Workspace]]&lt;br /&gt;
&lt;br /&gt;
By default, the '''Resource''' and '''Component''' Editor views are available for the created project. To view them, click '''Clovis''' on the menu bar at the top of the screen and select '''Resource Editor''' or  '''Component Editor'''  from the menu. You can also click '''Resource Editor''' or '''Component Editor''' icons from the tool bar as shown in Figure [[#SAFplus Platform IDE Tool Bar | SAFplus Platform IDE Tool Bar]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Tool Bar'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_Toolbar.png|frame|center| '''SAFplus Platform IDE Tool Bar''' ]]&lt;br /&gt;
&lt;br /&gt;
====Resource Editor View====&lt;br /&gt;
The '''Resource Editor''' shows the types of physical objects in our system. It gives us a place to create new objects and interact with the objects that already exist. The '''Resource Editor''' view for our model should look similar to the following figure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform Resource Editor'&amp;gt;&amp;lt;/span&amp;gt;[[File:Resource_Editor1.png|frame|center| '''SAFplus Platform Resource Editor''' ]]&lt;br /&gt;
&lt;br /&gt;
This editor always has a '''Chassis''' object which is the root of all other objects in the editor. In our case it also has the '''SysBlade''' blade type that we created through the '''Project Creation Wizard'''. You will also notice that the '''SysBlade''' is attached to the '''Chassis''' using a '''Composition''' relationship indicating that '''SysBlade'''s reside within the '''Chassis'''.&lt;br /&gt;
&lt;br /&gt;
On the right hand side of the editor view you will see the '''Palette''' which can be expanded and collapsed. Expanding the '''Palette''' you will see the list of objects that can be dragged onto the editor view to add to our model. Once an object is on the editor view you can view and change its properties by right clicking on the object and selecting '''Properties...''' from the context menu.&lt;br /&gt;
&lt;br /&gt;
For more information about the '''Resource Editor''' view see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
====Component Editor View====&lt;br /&gt;
The '''Component Editor''' shows the types of logical objects in our system. It gives us a place to create new objects and interact with the objects that already exist. The '''Component Editor''' view for our model should look similar to the following figure.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform Component Editor'&amp;gt;&amp;lt;/span&amp;gt;[[File:Component_Editor1.png|frame|center| '''SAFplus Platform Component Editor''' ]]&lt;br /&gt;
&lt;br /&gt;
This editor always has a '''Cluster''' object which is the root of all other objects in the editor. In our case it also has the '''SCNode''' node type and the '''csa101''' SAF Service Type (a combination of Service Group, Service Unit, Service Instance, Component Service Instance, and SAF Component) that we created through the '''Project Creation Wizard'''. These have all been automatically attached in a way that makes a working model.&lt;br /&gt;
&lt;br /&gt;
On the right hand side of the editor view you will see the '''Palette''' which can be expanded and collapsed. Expanding the '''Palette''' you will see the list of objects that can be dragged onto the editor view to add to our model. Once an object is on the editor view you can view and change its properties by right clicking on the object and selecting '''Properties...''' from the context menu.&lt;br /&gt;
&lt;br /&gt;
For more information about the '''Component Editor''' view see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Configuring the Components===&lt;br /&gt;
The '''New Project Wizard''' that we used to create our project configured the system using the most common options. We will have to make a few changes to this model in order for our example to work. We will make these changes in the '''Component Editor''' view.&lt;br /&gt;
&lt;br /&gt;
In the Component Editor you will notice seven different objects that were created by the wizard. The first two of these are:&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Cluster: The root object of all other objects in the Component Editor view.&lt;br /&gt;
&amp;lt;li&amp;gt;SCNode: This is the SAF Node Type that we specified during project creation.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next five objects all make up the Program or SAF Service Type that we specified on the last dialog of the New Project Wizard. These objects are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;csa101SG: This is the Service Group representing our high availability software component.&lt;br /&gt;
&amp;lt;li&amp;gt;csa101SU: This is the Service Unit that is logically associated with the SCNode SAF Node Type.&lt;br /&gt;
&amp;lt;li&amp;gt;csa101SI: This is the Service Instance&lt;br /&gt;
&amp;lt;li&amp;gt;csa101CSI: This is the Component Service Instance&lt;br /&gt;
&amp;lt;li&amp;gt;csa101: This is the SAF Component which represents our program or executable.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will be making changes to the Service Group (csa101SG), the Service Instance (csa101SI), and the SAF Component (csa101).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Configuring the Service Group====&lt;br /&gt;
To make changes to the Service Group double-click on the box titled '''csa101SG'''. The '''Service Group Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Group_Details.png|frame|center| '''Service Group Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first change we want to make is to the '''Redundancy Model'''. The '''Redundancy Model''' is the strategy that is used by the SAFplus Platform system to recover from a node failure. For our simple model (which only has one node) we are not going to rely on any failover recovery so change the '''Redundancy Model''' to 'No Redundancy' as shown.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]You will notice that when you change the redundancy model some of the other fields are modified automatically and become read-only. This is to ensure integrity of the redundancy models.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The second change that we want to make is to the '''Admin State'''. The '''Admin State''' defines the state of the component when the system is first brought up. In our case we want to change the '''Admin State''' to be 'Locked Initialized'. This means that when the system first starts up this '''Service Group''' (and its subcomponents) will be initialized but not yet put into a running state. So our csa101 application will not yet start printing &amp;quot;Hello World!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When you are finished making the changes click the '''OK''' button to commit the changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Configuring the Service Instance====&lt;br /&gt;
To make changes to the Service Instance double-click on the box titled '''csa101SI'''. The '''Service Instance Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Instance_Details.png|frame|center| '''Service Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The only change we want to make here is to the '''Number of standby assignments'''. This value represents the number of components that will be waiting to take over during a node failure and goes hand-in-hand with the '''Redundancy Model''' that we selected for the Service Group. Since we selected 'No Redundancy' for our '''Redundancy Model''' we need to set this value to 0...since we are not supporting any failover in this model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;When you are finished making the changes click the '''OK''' button to commit the changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Configuring the SAF Component====&lt;br /&gt;
To make changes to the SAF Component double-click on the box titled '''csa101'''. The '''SAF Component Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAF Component Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:SAF_Component_Details.png|frame|center| '''SAF Component Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The SAF Component represents our high availabilty program or executable. We need to pass a command line argument to this executable. The reason for this argument is to force the program to print the 'Hello World!' output to a special log file for our viewing. We will look at this more closely when we customize our code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To add command line parameters click the '''Edit...''' button corresponding to the '''Command line Arguments''' label.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''Command line Argument Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Command line Argument Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Command_Line_Argument_Details.png|frame|center| '''Command line Argument Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''New''' button to add a new value to the list.&lt;br /&gt;
&amp;lt;li&amp;gt;Click on the new value in the list and it will become editable. Change the value to '''-p'''.&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''OK''' button to save and close the dialog.&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''OK''' button on the '''SAF Component Details''' dialog to commit the changes to the SAF Component and close the dialog.&lt;br /&gt;
&amp;lt;li&amp;gt;Save the component model using the '''File &amp;gt; Save''' menu item.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Configuring Physical Instances===&lt;br /&gt;
The configuration of our logical models is complete. During this process we have defined all of the 'types' of objects in our system. Now it is time to configure actual instances of those objects so that they can be built and deployed.&lt;br /&gt;
&lt;br /&gt;
Object instance configuration is done through the Availability Management Framework (AMF) via the '''AMF Configuration''' dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To launch this dialog go to the the '''Clovis''' menu and select '''AMF Configuration...'''&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''AMF Configuration''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='AMF Configuration Dialog'&amp;gt;&amp;lt;/span&amp;gt;[[File:AMF_Configuration.png|frame|center| '''AMF Configuration Dialog''' ]]&lt;br /&gt;
&lt;br /&gt;
You will note from the instructions on this page that the physical instances representing the objects in our model can be created manually or by using wizards. Using the wizards will save us both typing and time so we will use these instead of creating each instance manually.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Creating Node Instances====&lt;br /&gt;
First we will create actual instances of the Node Types (in our case only one Node Type...SCNode) we created in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Double-click AMF Configuration in the left hand pane. The Node Instance List appears.&lt;br /&gt;
&amp;lt;li&amp;gt;Click on Node Instance List. The right hand pane displays the fields we must fill out to create our node instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the right hand pane:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select SCNode for the '''Node Type'''.&lt;br /&gt;
&amp;lt;li&amp;gt;Select SysBlade for the '''Blade type'''.&lt;br /&gt;
&amp;lt;li&amp;gt;Enter 1 for the '''Node Count'''.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The complete form should look like the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Node Wizard Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_List.png|frame|center| '''Node Wizard Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''Create Instance Tree''' button to create our node instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Expanding the '''Node Instance List''' branch of the '''AMF Configuration''' tree in the left-hand pane reveals a new node instance named SCNodeI0 (indicating SCNode Instance 0).&lt;br /&gt;
&lt;br /&gt;
====Creating Service Group Instances====&lt;br /&gt;
Now we will create actual instances of the Service Groups that we defined in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click on Service Group List. The right hand pane displays the fields we must fill out to create our service group instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the right hand pane:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select csa101SG (the only service group type we defined) for the '''Service Group Type'''.&lt;br /&gt;
*The '''Associated Node Instances''' list will be populated with all of the node instances that can be associated with the selected service group type.&lt;br /&gt;
&amp;lt;li&amp;gt;Select SCNodeI0 from the '''Associated Node Instances''' list.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The completed form should look like the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Wizard Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Group_List.png|frame|center| '''Service Group Wizard Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the '''Create Instance Tree''' button to create our service group instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If you now completely expand the '''AMF Configuration''' branch of the tree in the left-hand pane you will see the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='AMS Configuration Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:AMF_Configuration_Final.png|frame|center| '''AMF Configuration Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
Notice that not only have the wizards created the node and service group instances for you, they have also filled out the entire instance tree. This was accomplished based on two key sets of information. The first of these is the association that was made between the service group type and the node instance in the '''Service Group Wizard'''. The second set of information is the component model that we created through the New Project Wizard and the Component Editor.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]For more information regarding the specific properties of the generated instances see [[#Appendix B: AMF Configuration Instance Details|Appendix B: AMF Configuration Instance Details]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Thats it. We are done modelling the csa101 example!&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Click the OK button to commit our changes and close the dialog. &lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
Now its time to generate the framework code.&lt;br /&gt;
&lt;br /&gt;
==Generating the csa101 Code==&lt;br /&gt;
In this step we generate the source code for our example. The code that will be created is the framework code that handles all of the low level functionality provided by SAFplus Platform.&lt;br /&gt;
&lt;br /&gt;
To generate the source code go to the '''Project''' menu and select '''Generate Source'''. Several progress dialogs will appear and after a few seconds code generation will be complete.&lt;br /&gt;
&lt;br /&gt;
The source code and configuration XML files are generated and placed in subdirectories of the '''Project Area Location''' that we specified in the '''New Project Wizard'''. You can review this location by using the '''Project &amp;gt; Properties''' menu to get to the '''Project Properties''' dialog and then selecting '''Clovis System Project''' in the left hand pane.&lt;br /&gt;
&lt;br /&gt;
You can review the generated code from within the SAFplus Platform IDE. To do this go to the '''Clovis Workspace''' pane and expand the '''SampleModel''' node. The node tree should look like the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Clovis Workspace Code Tree'&amp;gt;&amp;lt;/span&amp;gt;[[File:Clovis_Workspace_Generate_Source.png|frame|center| '''Clovis Workspace Code Tree''' ]]&lt;br /&gt;
&lt;br /&gt;
The code of particular interest to our example is in the SampleModel/src/app/csa101 branch of the tree. This is the code for our csa101 example. The csa101 example consist of one C module (&amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt;). There is also a make file that will be used for building the application. The &amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt; file implements our 'Hello World!' application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]If you run code generation a second time you will be presented with a dialog box asking if you would like to make a backup copy of the existing source code before proceeding. You can answer No to this dialog.&lt;br /&gt;
&lt;br /&gt;
==Customizing the csa101 Code==&lt;br /&gt;
While the code that was generated in the previous section can be built and run we want to make some changes to it so that we can easily see what our example is doing. For our example we will be changing one source file (&amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt;) and two make files.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]In a real production situation this is the point where you would customize the code to perform the specific tasks of your product.&lt;br /&gt;
&lt;br /&gt;
You will notice in the C file that there are several places where you see the following comment block.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 // ...&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Makefiles have a similar convention but with a slightly different syntax.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|Makefile&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 # ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
&lt;br /&gt;
 # ---END_APPLICATION_CODE---&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These are sections of the file where it is safe to enter custom application code without having to worry about that code being overwritten if you were to again perform '''Generate Source''' for your model. This is important since the typical development cycle is an iterative process where you will return to the IDE to make modifications to your model.&lt;br /&gt;
&lt;br /&gt;
To simplify the process of building and running the csa101 example, OpenClovis, Inc. has already made the necessary code customizations and shipped this code with the SAFplus Platform SDK. At this point you can simply replace the generated source files with these customized versions to avoid typing in the changes. We will go over each customization below and explain what was done.&lt;br /&gt;
&lt;br /&gt;
To replace the generated files with the customized versions shipped with the SAFplus Platform SDK follow these instructions.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]  The sample applications containing the csa101 example can be found under the installation directory at &amp;lt;code&amp;gt;&amp;lt;install_dir&amp;gt;/6.1/sdk/src/examples/eval&amp;lt;/code&amp;gt;. We will refer to this directory in the remaining of this section as &amp;lt;code&amp;gt;&amp;lt;eval_dir&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Exit the SAFplus Platform IDE using the '''File &amp;gt; Exit''' menu item. If you are prompted to save changes before exiting answer yes.&lt;br /&gt;
&amp;lt;li&amp;gt;Navigate to the source code work area.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cd /home/clovis/projectarea1/ide_workspace/SampleModel/src/app&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Using your favorite editor open the file &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; that resides in this directory. This is the application make file.&lt;br /&gt;
&amp;lt;li&amp;gt;Add the following line to this file within the first &amp;lt;code&amp;gt;BEGIN_APPLICATION_CODE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;END_APPLICATION_CODE&amp;lt;/code&amp;gt; comment block.  This will instruct the build process to build our custom output library.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;SUBDIRS += ev&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Save this file and exit the editor.&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the following command to copy the output package to our working area.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cp -r &amp;lt;eval_dir&amp;gt;/src/app/ev .&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Navigate to the component code work area.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cd csa101&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the following command to copy the csa101 source code.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cp &amp;lt;eval_dir&amp;gt;/src/app/csa101Comp/main.c .&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Execute the following command to copy the component make file.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cp &amp;lt;eval_dir&amp;gt;/src/app/csa101Comp/Makefile .&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Restart the SAFplus Platform IDE.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cl-ide&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Customizing main.c===&lt;br /&gt;
The &amp;lt;code&amp;gt;main.c&amp;lt;/code&amp;gt; file is the C module which will implement our 'Hello World!' behavior. We have to make changes in several parts of this file.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]If you copied the files as instructed in the section above then these changes have already been made to the files. Use this section to review and understand the changes.&lt;br /&gt;
&lt;br /&gt;
In the include section of this file we have added a new include for &amp;lt;code&amp;gt;ev.h&amp;lt;/code&amp;gt;. This refers to a special output library that we copied to our work area in the previous section. This output library is used to redirect output from the application to a component specific log. This is purely cosmetic but it will allow us to easily monitor what is happening when we run our example.&lt;br /&gt;
Also, we change the logging from the default &amp;quot;application&amp;quot; stream to a custom stream. To do this, we include the header that defines our config routines, change the default &amp;quot;clLogApp&amp;quot; macro to use a different stream, and define that stream as a global variable:&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
   ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 #include &amp;quot;../ev/ev.h&amp;quot;&lt;br /&gt;
 ...&lt;br /&gt;
 #define clprintf(severity, ...)   clAppLog(gEvalLogStream, severity, 10, &lt;br /&gt;
         &amp;quot;MAI&amp;quot;, CL_LOG_CONTEXT_UNSPECIFIED,__VA_ARGS__)&lt;br /&gt;
 ...&lt;br /&gt;
 ClLogStreamHandleT  gEvalLogStream = CL_HANDLE_INVALID_VALUE;&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Next we define a static variables that will keep track of the state of our application and a function to aid in showing when the application is running. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 /*&lt;br /&gt;
   ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 static int running = 0;&lt;br /&gt;
&lt;br /&gt;
 static char*&lt;br /&gt;
 show_progress(void)&lt;br /&gt;
 {&lt;br /&gt;
     static char bar[] = &amp;quot;          .&amp;quot;;&lt;br /&gt;
     static int progress = 0;&lt;br /&gt;
&lt;br /&gt;
     /* Show a little progress bar */&lt;br /&gt;
     return &amp;amp;bar[sizeof(bar)-2-(progress++)%(sizeof(bar)-2)];&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 /*&lt;br /&gt;
   ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
The &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; flag will be used to indicate whether the current application is active or suspended.&lt;br /&gt;
The function &amp;lt;code&amp;gt;show_progress&amp;lt;/code&amp;gt; returns a pointer to a c string with a number of spaces followed by a '.' character. The number of spaces in the string cycles from zero to an upper bound. This is used later on to provide visual indication of the progress of the application's output.&lt;br /&gt;
&lt;br /&gt;
Next we have added a function &amp;lt;code&amp;gt;activeLoop&amp;lt;/code&amp;gt; to print the output. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void* activeLoop(void* p)&lt;br /&gt;
{&lt;br /&gt;
    while (running)&lt;br /&gt;
    {&lt;br /&gt;
        clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: Threaded Hello World! %s\n&amp;quot;,     &lt;br /&gt;
                 show_progress());&lt;br /&gt;
        sleep(2);&lt;br /&gt;
    }&lt;br /&gt;
    return NULL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
Notice the while loop condition. This function uses the &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; variable that was initialized to 0. The loop will keep running until &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; is set to non-zero. The work of the application: printing &amp;quot;Hello World!&amp;quot; along with the progress indicator.  Next the command &amp;lt;code&amp;gt;sleep(2)&amp;lt;/code&amp;gt; simply sleeps for two seconds so as not to fill log files too quickly or completely swamp the CPU.&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; becomes non-zero, we return from the function. &lt;br /&gt;
&lt;br /&gt;
Next, the log stream is initialized in the &amp;lt;code&amp;gt;initializeAmf&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
/*  &lt;br /&gt;
 * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
/* Set up console redirection for demo purposes */&lt;br /&gt;
clEvalAppLogStreamOpen((ClCharT *)appName.value, &amp;amp;gEvalLogStream);&lt;br /&gt;
...&lt;br /&gt;
clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: Instantiated as component instance %s.&amp;quot;, appName.value);&lt;br /&gt;
clprintf(CL_LOG_SEV_INFO,&amp;quot;%s: Waiting for CSI assignment...&amp;quot;, appName.value);&lt;br /&gt;
&lt;br /&gt;
/*  &lt;br /&gt;
 * ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Next we indicate log stream when we are exiting. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
/*  &lt;br /&gt;
 * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
 clEvalAppLogStreamClose(gEvalLogStream);&lt;br /&gt;
/*  &lt;br /&gt;
 * ---END_APPLICATION_CODE---&lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
This will cause &amp;lt;code&amp;gt;activeLoop&amp;lt;/code&amp;gt; function to exit.&lt;br /&gt;
Next we will put in code to manage the state of our application.&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
void safAssignWork(SaInvocationT       invocation,&lt;br /&gt;
                   const SaNameT       *compName,&lt;br /&gt;
                   SaAmfHAStateT       haState,&lt;br /&gt;
                   SaAmfCSIDescriptorT csiDescriptor)&lt;br /&gt;
{&lt;br /&gt;
    /*&lt;br /&gt;
     * ---BEGIN_APPLICATION_CODE--- &lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    // ...&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * ---END_APPLICATION_CODE---&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Print information about the CSI Set&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    clprintf (CL_LOG_SEV_INFO, &amp;quot;Component [%.*s] : PID [%d]. CSI Set Received\n&amp;quot;,&lt;br /&gt;
              compName-&amp;gt;length, compName-&amp;gt;value, mypid);&lt;br /&gt;
&lt;br /&gt;
    printCSI(csiDescriptor, haState);&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Take appropriate action based on state&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    switch ( haState )&lt;br /&gt;
    {&lt;br /&gt;
        case SA_AMF_HA_ACTIVE:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to take the active HA state &lt;br /&gt;
             * for the CSI.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
            &lt;br /&gt;
            pthread_t thr;&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: ACTIVE state requested; activating service\n&amp;quot;);&lt;br /&gt;
            running = 1;&lt;br /&gt;
            pthread_create(&amp;amp;thr,NULL,activeLoop,NULL);&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_STANDBY:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to take the standby HA state &lt;br /&gt;
             * for this CSI.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: Standby state requested&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_QUIESCED:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to quiesce the CSI currently&lt;br /&gt;
             * assigned the active or quiescing HA state. The application &lt;br /&gt;
             * must stop work associated with the CSI immediately.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: Acknowledging new state quiesced&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
        case SA_AMF_HA_QUIESCING:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to quiesce the CSI currently&lt;br /&gt;
             * assigned the active HA state. The application must stop work&lt;br /&gt;
             * associated with the CSI gracefully and not accept any new&lt;br /&gt;
             * workloads while the work is being terminated.&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO, &amp;quot;csa101: Signaling completion of QUIESCING&amp;quot;);&lt;br /&gt;
              running = 0;&lt;br /&gt;
&lt;br /&gt;
            /*&lt;br /&gt;
             * ---END_APPLICATION_CODE---&lt;br /&gt;
             */&lt;br /&gt;
&lt;br /&gt;
            saAmfCSIQuiescingComplete(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
We have modified the &amp;lt;code&amp;gt;safAssignWork&amp;lt;/code&amp;gt; callback function to let our application know what to do when the state changes. In the case where the state changes to &amp;lt;code&amp;gt;SA_AMF_HA_ACTIVE&amp;lt;/code&amp;gt; we set the &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; variable to 1. This will cause our application to spawns a thread which calls &amp;lt;code&amp;gt;activeLoop&amp;lt;/code&amp;gt; function and start printing the 'Hello World!' message. For any other state change we set the &amp;lt;code&amp;gt;running&amp;lt;/code&amp;gt; variable to 0 which will cause the message to stop printing. For any state change we print out a message indicating the new state of the application.&lt;br /&gt;
&lt;br /&gt;
The example also demonstrates a non-threaded approach.  But first, some background: for both threaded and non-threaded applications, the main must have a &amp;quot;dispatch&amp;quot; loop that handles incoming AMF notifications and calls the relevant callback.  So to implement a single threaded SAF aware application, the programmer must modify this dispatch loop adding active (and potentially standby) functionality:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|main.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
main(...)&lt;br /&gt;
&lt;br /&gt;
    do&lt;br /&gt;
    {&lt;br /&gt;
        struct timeval timeout;&lt;br /&gt;
        timeout.tv_sec = 2; timeout.tv_usec = 0;&lt;br /&gt;
&lt;br /&gt;
        FD_ZERO(&amp;amp;read_fds);&lt;br /&gt;
        FD_SET(dispatch_fd, &amp;amp;read_fds);&lt;br /&gt;
&lt;br /&gt;
        if( select(dispatch_fd + 1, &amp;amp;read_fds, NULL, NULL, &amp;amp;timeout) &amp;lt; 0)&lt;br /&gt;
        {&lt;br /&gt;
            if (EINTR == errno)&lt;br /&gt;
            {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
		    clprintf (CL_LOG_SEV_ERROR, &amp;quot;Error in select()&amp;quot;);&lt;br /&gt;
			perror(&amp;quot;&amp;quot;);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        if (FD_ISSET(dispatch_fd,&amp;amp;read_fds))&lt;br /&gt;
        {&lt;br /&gt;
            saAmfDispatch(amfHandle, SA_DISPATCH_ALL);&lt;br /&gt;
        }&lt;br /&gt;
        if (running) &lt;br /&gt;
        {&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: Unthreaded Hello World! %s&amp;quot;,&lt;br /&gt;
                     show_progress()); // Run the &amp;quot;active&amp;quot; code&lt;br /&gt;
        }&lt;br /&gt;
        else &lt;br /&gt;
        {&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa101: idle&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
    }while(!unblockNow);      &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
This code should be very familiar to anyone who has written single threaded &amp;quot;event loop&amp;quot; style code. As can be seen in the code snippet above, the select is given an idle timeout (in a real application the timeout would be much smaller) and the application only calls &amp;lt;code&amp;gt;saAmfDispatch&amp;lt;/code&amp;gt; if the select actually indicates that the there is data in the FD.  Then it falls down into an &amp;quot;if&amp;quot; statement that checks if we are active &amp;quot;if (running)...&amp;quot; and outputs a log if that is the case.&lt;br /&gt;
&lt;br /&gt;
===Customizing the Component MakeFile===&lt;br /&gt;
We have to make a small change to the component &amp;lt;code&amp;gt;MakeFile&amp;lt;/code&amp;gt; so that it knows about our special output library during the build. To do this we add the following lines. This file is located in &amp;lt;code&amp;gt;/home/clovis/projectarea1/ide_workspace/SampleModel/src/app&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|Component MakeFile&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    # ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
&lt;br /&gt;
    SUBDIRS += ev&lt;br /&gt;
&lt;br /&gt;
    # ---END_APPLICATION_CODE---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Customizing the Application MakeFile===&lt;br /&gt;
We have to make sure that our special output library is built along with our application. To do this we change the line listing the sudirectories to make as follows. This file is located in the directory &amp;lt;code&amp;gt;/home/clovis/projectarea1/ide_workspace/SampleModel/src/app/csa101&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;|Application MakeFile&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    # ---BEGIN_APPLICATION_CODE---&lt;br /&gt;
    &lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    EXTRA_LDLIBS += $(LIB_DIR)/libeval.a&lt;br /&gt;
&lt;br /&gt;
    # ---END_APPLICATION_CODE---&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are finished customizing our application code!&lt;br /&gt;
&lt;br /&gt;
==Building the csa101 Code==&lt;br /&gt;
&lt;br /&gt;
Now that we have finished customizing the code it is time to build it. The build process is launched using the '''Project &amp;gt; Build Project''' menu item. Once selected the '''Build Configuration''' dialog appears.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Build Configuration Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Build_Configuration.png|frame|center| '''Build Configuration Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The '''Build Configuration''' dialog is used to gather specific information about the build we are about to perform. Using this dialog you can rebuild the same model using different cross builds, or including different chassis managers. We don't have to make any changes to this dialog since the default settings make sense for our sample application.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]If you have prebuilt the SAFplus Platform libraries then you can check the '''Use pre built SAFplus''' checkbox and include the location of the prebuilt libraries. For more information about pre-building SAFplus Platform libraries, see ''SAFplus Platform SDK User Guide''.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]The '''Include SNMP for North Bound Access''' control is checked by default. This just means that Net SNMP will be started along with our system. If you want end-to-end connectivity you will need to supply an SNMP Sub Agent and a MIB. See the ''SAFplus Platform SDK User Guide'' for more details.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]In the '''Project''' menu if the '''Build Project''' entry is not highlighted, then click in the right pane i.e. '''Clovis Workspace''' pane and click the '''Project''' menu again. This not highlighting of the '''Build Project''' is because the '''Clovis Workspace''' is not selected properly because of moving focus to some other pane.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Click the '''OK''' button to begin the build. If this is the first time that the project is being built, or if you have made changes to any setting on this screen, you will initially see a progress dialog indicating that the project is being configured. The configuration step is setting up the project for building. After the configuration has completed you will see a progress dialog indicating that the code is being built.&lt;br /&gt;
&lt;br /&gt;
==Creating the csa101 Images==&lt;br /&gt;
&lt;br /&gt;
Making the csa101 images will create software packages that can be deployed on target machines to run the example. The process of creating images is launched using the '''Project &amp;gt; Make Images''' menu item. Once selected the '''Make Images Configuration''' dialog appears.&lt;br /&gt;
&lt;br /&gt;
The '''Make Images Configuration''' dialog is used to indicate information about the environment on which the images will be deployed. This information is used to tailor the images to run on that environment. Here we will make the following modificaiton.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Make Images Configuration TIPC Specific Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Make_Image_TIPC_Specific.png|frame|center| '''Make Images Configuration TIPC Specific Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Enter a value for the '''Trap IP'''. This value specifies where the SNMP sub-agent will send traps at runtime. This field is optional but if specified must be a valid IP address. Enter a value of '127.0.0.1' in this field.&lt;br /&gt;
&amp;lt;li&amp;gt;Enter a value for the '''TIPC Net ID'''. This value represents a unique identifier used by TIPC to set up interprocess communication across the deployed OpenClovis SAFplus Platform cluster. This field is required and should default to '1340'.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Make Images Configuration General Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Make_Images_General.png|frame|center| '''Make Images Configuration General Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Check the '''Create Node Specific Images''' and '''Package Images into Tarballs''' check boxes. This will create tarballs of the images making them easy to deploy to various machines.&lt;br /&gt;
&amp;lt;li&amp;gt;The table on this dialog will hold a row for each node instance defined in the model. In our case this is only one...SCNodeI0. For each of these instances we can define the slot number in the chassis on which the node will run and the network interface that the node will use for communication. In our case enter '1' for the Slot Number and 'eth0' for the Network Interface.&lt;br /&gt;
&amp;lt;li&amp;gt;Click '''OK''' to begin the make image process. A dialog box will appear and after a few seconds the the make images process will be complete.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The images will be populated at &amp;lt;project_area&amp;gt;/target/SampleModel/images. Each node-specific image is provided as a directory containing the run-time files (binaries, libraries, prerequisites, and configuration files) as well as a tarball with the same content.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt; For our model containing one node (&amp;lt;code&amp;gt;SCNodeI0&amp;lt;/code&amp;gt;) the following files and directories are generated for deployment on the run-time system.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;project_area&amp;gt;&lt;br /&gt;
   |+target&lt;br /&gt;
       |+&amp;lt;model&amp;gt;&lt;br /&gt;
           |+images&lt;br /&gt;
               |+SCNodeI0&lt;br /&gt;
               |   |+bin&lt;br /&gt;
               |   |+etc&lt;br /&gt;
               |   |+lib&lt;br /&gt;
               |   |+modules&lt;br /&gt;
               |   |+share&lt;br /&gt;
               |-SCNodeI0.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The rest of the steps in this example are all done from the command line so we can exit the IDE. To do this use the '''File &amp;gt; Exit''' menu item.&lt;br /&gt;
&lt;br /&gt;
==Deploying the csa101 Images==&lt;br /&gt;
Now that the image has been built we must deploy it so that we can run and observe our example. Since we are assuming that the example will be run on the same machine as the images were built this is a fairly trivial exercise. Use the following steps to deploy the runtime image.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;First we create a directory where we will install the image. In our case we will use &amp;lt;code&amp;gt;/root/asp&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root&lt;br /&gt;
# mkdir asp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next we navigate to that directory and untar the deployment package.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/asp&lt;br /&gt;
# tar xzvf /home/clovis/projectarea1/target/SampleModel/images/SCNodeI0.tgz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The System Controller is now installed and ready to run.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] If you were going to run the example on a machine other than the one where the images were built you would first copy the installation tarball to that machine before performing the above steps.&lt;br /&gt;
&lt;br /&gt;
==Running the csa101 Example==&lt;br /&gt;
There are two parts to running the csa101 example. First we must start SAFplus Platform, and then we interact with the system components.&lt;br /&gt;
&lt;br /&gt;
===Starting SAFplus Platform===&lt;br /&gt;
&lt;br /&gt;
To start SAFplus Platform on System Controller node.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a shell.&lt;br /&gt;
&amp;lt;li&amp;gt;Run the following commands&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/asp&lt;br /&gt;
# etc/init.d/asp start&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] This assumes that you are running the SAFplus Platform example on the same PC that you are executing these commands. If you are running SAFplus Platform on a different machine then you should first ssh to that machine before executing the commands.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] If SAFplus Platform fails to start properly it could be due to the machine's firewall being enabled. SAFplus Platform will not run on a machine which has firewall enabled. See the ''Environment Related Observation'' section of the ''SAFplus Platform Release Notes'' for more information.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] By default the network interface used by the Group Membership Service is set to eth0. During the make images phase of the tutorial we also set the ethernet interface for node SCNodeI0 to be eth0. During image generation these configuration parameters are written to two files in the deployment package.&lt;br /&gt;
*&amp;lt;code&amp;gt;/root/asp/etc/clGmsConfig.xml&amp;lt;/code&amp;gt;&lt;br /&gt;
*&amp;lt;code&amp;gt;/root/asp/etc/asp.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There may be an occasion where you want to switch this interface for a machine on which you are deploying. If you would like to switch this interface on a machine without having to go through the process of rebuilding and redeploying, you can edit these two files and change the 'eth0' references to the interface you would like to use.&lt;br /&gt;
&lt;br /&gt;
===Interacting with the System Components===&lt;br /&gt;
Once SAFplus Platform is up and running the next step is to start csa101 by informing SAFplus Platform that it should start the application. The Evaluation System's model tells SAFplus Platform that csa101 is locked for instantiation. This means that the process will not be started when SAFplus Platform comes up. This method of starting csa's is used for the Evaluation System, allowing users to interact with csa's and clearly see their output/functionality. Usually this would not be the case with applications, where they would run when SAFplus Platform begins.&lt;br /&gt;
&lt;br /&gt;
At this point it would help to be familiar with the Service Availability Forum's notions of  Service Unit, Service Group, and administrative state.  The Service Availability Forum's Application Interface Specification (available from http://www.saforum.org/) is a good place to start.&lt;br /&gt;
&lt;br /&gt;
In brief, the sample applications in the Evaluation System are part of service units which in turn are part of service groups.  Service groups (and the service units that make up the service groups) can be in &amp;quot;administrative&amp;quot; states which include &amp;quot;LockInstantiation&amp;quot;, &amp;quot;LockAssignment&amp;quot;, and &amp;quot;Unlocked&amp;quot;.  There are other states, but these are the ones we care about for the purposes of this Evaluation System.  If the administrative state of a service unit is &amp;quot;LockInstantiation&amp;quot; then the application that is part of that service unit will not even be started.  If the administrative state is &amp;quot;LockAssignment&amp;quot; then the application will be started, but it will not be assigned any work.  If the administrative state is &amp;quot;Unlocked&amp;quot; then it will not only be started, but will have a workload assigned to it, which is to say that it will start doing work (or start providing service), rather than idly sit waiting for work.&lt;br /&gt;
&lt;br /&gt;
The administrative state of a service unit or service group can change from LockInstantiation to LockAssignment, from LockAssignment to Unlocked, or back to LockInstantiation, from Unlocked to LockAssignment.  A picture might help here:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id=&amp;quot;PartialServiceGroupAdministrativeStateDiagram&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; [[File:eval_AdministrativeStateDiagram.png|frame|center| '''Partial Service Group Administrative State Diagram''' ]]&lt;br /&gt;
&lt;br /&gt;
As the figure shows, the administrative state of a service unit (or service group) can change from &amp;quot;LockInstantiation&amp;quot; to &amp;quot;LockAssignment&amp;quot; and from there to &amp;quot;Unlocked&amp;quot;, or back to &amp;quot;LockInstantiation&amp;quot;.  One way to change the administrative state of a service group is with the SAFplus Platform Console command line interface. &lt;br /&gt;
&lt;br /&gt;
To use the SAFplus Platform Console:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; Open a terminal on the Development Machine. (Or ssh into System Controller node as root, if you are running SAFplus Platform on a machine other than the development machine.)&lt;br /&gt;
&amp;lt;li&amp;gt; Change to image bin directory: &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# cd /root/asp/bin&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; Start the SAFplus Platform Console &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;# ./asp_console&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt; From within the SAFplus Platform Console: &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cli[Test]-&amp;gt; setc 1&lt;br /&gt;
cli[Test:SCNodeI0]-&amp;gt; setc cpm&lt;br /&gt;
cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockAssignment sg csa101SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above changes the administrative state of the group csa101SGI0 from &amp;quot;locked-for-instantiation&amp;quot; to &amp;quot;locked-for-assignment&amp;quot;.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]For the command &amp;lt;code&amp;gt;cli[Test]-&amp;gt; setc 1&amp;lt;/code&amp;gt;, the 1 represents the physical slot number of the System Controller within the Chassis. Remember that we set our System Controller to be in slot 1 in the make images dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Now lets tail the application log file so that we can see whats going on. In another window, as root, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# tail -f /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see the following:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00001 :   INFO) &lt;br /&gt;
 Component [csa101I0] : PID [10950]. Initializing&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00002 :   INFO)    &lt;br /&gt;
 IOC Address             : 0x1&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00003 :   INFO)    &lt;br /&gt;
 IOC Port                : 0x81&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00004 :   INFO) &lt;br /&gt;
 csa101: Instantiated as component instance csa101I0.&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:54:38.424 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00005 :   INFO) &lt;br /&gt;
 csa101I0: Waiting for CSI assignment...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Next change the administrative state of the csa101SGI0 service group to  &amp;quot;unlocked&amp;quot; by running (in the SAFplus Platform Console) :&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cli[Test:SCNodeI0:CPM]-&amp;gt; amsUnlock sg csa101SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the window where you're running the &amp;quot;tail -f&amp;quot; you should see:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Nov 12 11:59:37.092 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00163 :   INFO) &lt;br /&gt;
 csa101: ACTIVE state requested; activating service&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:37.092 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00164 :   INFO) &lt;br /&gt;
 csa101: Threaded Hello World!  .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:39.094 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00165 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!   .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:39.095 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00166 :   INFO) &lt;br /&gt;
 csa101: Threaded Hello World!    .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:41.095 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00167 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!     .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:41.097 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00168 :   INFO) &lt;br /&gt;
 csa101: Threaded Hello World!      .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 11:59:43.095 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00169 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!       .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As you can tell from the output log our component is up and running! It is continuously printing our 'Hello World!' output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Now change the state of the csa101SGI0 service group back to &amp;quot;locked-for-assignment&amp;quot; by running (in the SAFplus Platform Console): &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockAssignment sg csa101SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the tail -f output you should see:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa101I0Log.latest&lt;br /&gt;
 |-&lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Nov 12 12:07:17.591 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00625 :   INFO) &lt;br /&gt;
 csa101: Unthreaded Hello World!  .&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00626 :   INFO) &lt;br /&gt;
 Component [csa101I0] : PID [10950]. CSI Set Received&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00627 :   INFO) &lt;br /&gt;
 CSI Flags : [Target One]&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00628 :   INFO) &lt;br /&gt;
 CSI Name : [csa101CSII0]&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00629 :   INFO) &lt;br /&gt;
 HA state : [Quiesced]&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.281 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00630 :   INFO) &lt;br /&gt;
 csa101: Acknowledging new state quiesced&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.312 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00632 :   INFO) &lt;br /&gt;
 Component [csa101I0] : PID [10950]. CSI Remove Received&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.312 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00633 :   INFO)    &lt;br /&gt;
 CSI                     : csa101CSII0&lt;br /&gt;
&lt;br /&gt;
Wed Nov 12 12:07:19.312 2014 (SCNodeI0.10950 : csa101I0.MAI.---.00634 :   INFO)    &lt;br /&gt;
 CSI Flags               : 0x2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Our component has been put into Lock Assignment state so our 'Hello World!' output has stopped printing to the log.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;At this point you can either unlock the service group to change its state to &amp;quot;unlocked&amp;quot; or you can lock it for instantiation to change it to state  &amp;quot;locked-for-instantiation&amp;quot;.  The latter will cause the csa101 process to die.  From state &amp;quot;locked-for-assignment&amp;quot;, it is possible to change the state to &amp;quot;locked-for-instantiation&amp;quot; by running (in the SAFplus Platform Console):&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockInstantiation sg csa101SGI0&lt;br /&gt;
cli[Test:SCNodeI0:CPM] -&amp;gt; end&lt;br /&gt;
cli[Test:SCNodeI0] -&amp;gt; end&lt;br /&gt;
cli[Test] -&amp;gt; bye&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Stopping SAFplus Platform===&lt;br /&gt;
&lt;br /&gt;
To stop SAFplus Platform on the System Controller&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a shell.&lt;br /&gt;
&amp;lt;li&amp;gt;ssh into the System Controller node as root.&lt;br /&gt;
&amp;lt;li&amp;gt;Once logged in, run the following command&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /root/asp&lt;br /&gt;
# etc/init.d/asp stop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Summary and Next Steps==&lt;br /&gt;
In the csa101 example we learned the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;How to create a system model using the '''SAFplus Platform IDE'''.&lt;br /&gt;
&amp;lt;li&amp;gt;How to generate the source code.&lt;br /&gt;
&amp;lt;li&amp;gt;How to customize this source code to fit a specific application.&lt;br /&gt;
&amp;lt;li&amp;gt;How to configure and build the customized source code.&lt;br /&gt;
&amp;lt;li&amp;gt;How to make runtime images and deploy them to target machines.&lt;br /&gt;
&amp;lt;li&amp;gt;How to start and stop '''SAFplus'''.&lt;br /&gt;
&amp;lt;li&amp;gt;How to interact with system components using the '''SAFplus Platform Console'''.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next logical step would be to run through the '''SAFplus Platform Evaluation System User Guide'''. This guide goes over more complex system configurations and introduces new concepts.&lt;br /&gt;
&lt;br /&gt;
For more in depth information on the '''SAFplus Platform IDE''' see the '''SAFplus Platform IDE User Guide'''.&lt;br /&gt;
&lt;br /&gt;
For more in depth information on the '''SAFplus Platform SDK''' see the '''SAFplus Platform SDK User Guide'''.&lt;br /&gt;
&lt;br /&gt;
==Appendix A: target.conf Settings==&lt;br /&gt;
&lt;br /&gt;
Below is a description of the values in the settings in the &amp;lt;code&amp;gt;target.conf&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''TRAP_IP''' (Mandatory): Specifies where the SNMP SubAgent should send traps at runtime.  If you do not have an SNMP SubAgent in your model specify '''127.0.0.1''' as the value.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
TRAP_IP=127.0.0.1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''CMM_IP''' (Mandatory if deployed on an ATCA chassis): Specifies the IP address of the target system's chassis management module or shelf manager. &amp;lt;i&amp;gt;ATCA chassis Example&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
CMM_IP=169.254.1.2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''CMM_USERNAME''' and '''CMM_PASSWORD''' (Mandatory if deployed on an ATCA chassis): Specifies the username and password required for the OpenClovis SAFplus Platform Chassis Manager to connect to the target system's chassis management module. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
CMM_USERNAME=root&lt;br /&gt;
CMM_PASSWORD=password&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''INSTALL_PREREQUISITES=YES|NO''' (Mandatory): Specifies whether the target images will include 3rd party runtime prerequisites or not.  Say '''YES''' if the target nodes do not meet the target host requirements specified in the Installation section of this document.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
INSTALL_PREREQUISITES=YES&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''INSTANTIATE_IMAGES=YES|NO''' (Mandatory): Specifies whether &amp;lt;code&amp;gt;make images&amp;lt;/code&amp;gt; will generate node-instance specific images instead of only generating node-type specific images.  This option is a development optimization for advanced users of SAFplus Platform SDK.  If unsure, say '''YES'''. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
INSTANTIATE_IMAGES=YES&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''CREATE_TARBALLS=YES|NO''' (Mandatory): Specifies whether the node-instance specific images created will be packaged into tarballs for deployment onto the target system.  If unsure, say '''YES'''.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
CREATE_TARBALLS=YES&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''TIPC_NETID''' (Mandatory): Specifies a unique identifier used by TIPC to set up interprocess communication across the deployed OpenClovis SAFplus Platform cluster.  This is an unsigned 32-bit integer, and &amp;lt;i&amp;gt;must&amp;lt;/i&amp;gt; be unique for every model that is deployed.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
TIPC_NETID=1340&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Node Instance Details''': These specify the node-instance specific parameters required for deploying the model. For each node in the model there is a corresponding entry in the file:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SLOT_&amp;lt;node instance name&amp;gt;''' (Mandatory): Specifies which slot the node is located in.  The first slot is slot 1 -- DO NOT USE SLOT NUMBER 0, it is invalid.  When deployed to an ATCA chassis, the physical slot in which the blade is actually installed will override this value.  When deployed to regular (non-ATCA) systems, this is a logical slot and must be unique for every node in the cluster. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
SLOT_SCNodeI0=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''LINK_&amp;lt;node instance name&amp;gt;''' (Optional): Specifies the ethernet interface used by the node for OpenClovis SAFplus Platform communication with the rest of the cluster.  If unspecified, this defaults to &amp;lt;code&amp;gt;eth0&amp;lt;/code&amp;gt;.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
LINK_SCNodeI0=eth0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''ARCH_&amp;lt;node instance name&amp;gt;''' (Optional if '''ARCH''' is specified): Specifies the target architecture of the node as a combination of machine architecture (MACH) and linux kernel version.  This is only required on a per-node basis if the target cluster has heterogeneous architectures across the nodes.  If it is a homogeneous cluster, a single '''ARCH''' parameter (described below) will suffice.  &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
ARCH_SCNodeI0=i386/linux-2.6.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''ARCH''' (Optional if node-specific '''ARCH_''' parameters are specified): Specifies the target architecture of all nodes in a homogeneous cluster as a combination of machine architecture (MACH) and linux kernel version.  Note: The build process automatically populates this variable based on the last target the model is built for.&amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
ARCH=i386/linux-2.6.14&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
For example, if we have a three-node cluster with the following details:&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot; width=&amp;quot;600&amp;quot;&lt;br /&gt;
|+ align=&amp;quot;bottom&amp;quot; | '''Example Node Instance Detail'''&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Node Name&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Slot Number&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Link Interface&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Architecture&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|SCNodeI0&lt;br /&gt;
|1&lt;br /&gt;
|eth0&lt;br /&gt;
|i386/linux-2.6.14&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|PayloadNodeI0&lt;br /&gt;
|3&lt;br /&gt;
|eth0&lt;br /&gt;
|i386/linux-2.6.14&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|PayloadNodeI1&lt;br /&gt;
|4&lt;br /&gt;
|eth1&lt;br /&gt;
|ppc/linux-2.6.9&lt;br /&gt;
|}&lt;br /&gt;
we would specify the node instance details as:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
SLOT_SCNodeI0=1&lt;br /&gt;
SLOT_PayloadNodeI0=3&lt;br /&gt;
SLOT_PayloadNodeI1=4&lt;br /&gt;
&lt;br /&gt;
LINK_SCNodeI0=eth0&lt;br /&gt;
LINK_PayloadNodeI0=eth0&lt;br /&gt;
LINK_PayloadNodeI1=eth1&lt;br /&gt;
&lt;br /&gt;
ARCH_SCNodeI0=i386/linux-2.6.14&lt;br /&gt;
ARCH_PayloadNodeI0=i386/linux-2.6.14&lt;br /&gt;
ARCH_PayloadNodeI1=ppc/linux-2.6.9&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Appendix B: AMF Configuration Details==&lt;br /&gt;
This appendix gives brief descriptions of configuration details for instances of different entities (like Node, Service Group, Service Unit etc) that are present in the '''Clovis''' -&amp;gt; '''AMF Configuration''' dialog box.&lt;br /&gt;
&lt;br /&gt;
===Node Instance===&lt;br /&gt;
This screen displays the node instance that was created by the Node Instance Wizard. This node instance was created because the node type '''SCNode''' was selected on the wizard screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Node Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_Details_SCNodeI0.png|frame|center| '''Node Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Node Instance Name''': This field holds the name of the node instance. This name must be unique. The name that was generated combines the node type (SCNode), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''Node Type''': This field holds the node type that was selected on the wizard screen.&lt;br /&gt;
&amp;lt;li&amp;gt;'''MOID''': This is the unique identifier for the node instance. It was generated by the wizard. The format of this ID is a string representing the one and only instance of the chassis (\Chassis:0) defined in the Resource Editor followed by a string representing the first and only instance of the blade type (\SysBlade:0) that was selected in the Node Instance Wizard.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]'''MOID''' is an acronym for Managed Object Identifier. It must be unique and is used to identify which hardware chassis and blade type this instance will run on.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Unit Instance===&lt;br /&gt;
This screen displays the service unit instance that was created by the Service Group Instance Wizard. This service unit instance was created because the service unit type is associated with both the selected node type (SCNode) and the selected service group type (csa101SG) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SU Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_Details_csa101SUI0.png|frame|center| '''SU Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SU Instance Name''': This field holds the name of the service unit instance. This name must be unique. The name that was generated combines the service unit type (csa101SU), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''Service Unit Type''': This field holds the type of the service unit instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Component Instance===&lt;br /&gt;
This screen displays the component instance that was created by the Service Group Instance Wizard. This component instance was created because the component type is associated with the created parent service unit type (csa101SU) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Component Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Node_Instance_Details_csa101I0.png|frame|center| '''Component Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Component Instance Name''': This field holds the name of the component instance. This name must be unique. The name that was generated combines the component type (csa101), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''Component Type''': This field holds the type of the component instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Service Group Instance===&lt;br /&gt;
This screen displays the service group instance that was created by the Service Group Instance Wizard. This service group instance was created because the service group type '''csa101SG''' was selected on the wizard screen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Group_List_csa101SGI0.png|frame|center| '''Service Group Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SG Instance Name''': This field holds the name of the service group instance. This name must be unique. The name that was generated combines the service group type (csa101SG), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''ServiceGroup Type''': This field holds the type of the service group instance.&lt;br /&gt;
&amp;lt;li&amp;gt;'''Associated Service Units''': This button is used to associate service unit instances with this service group instance. Creating this association indicates that the selected service unit(s) will run within this service group instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clicking the '''Associated Service Units''' Edit... button will display the following dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Associated Service Units Dialog'&amp;gt;&amp;lt;/span&amp;gt;[[File:Associated_Service_Units.png|frame|center| '''Associated Service Units Dialog''' ]]&lt;br /&gt;
&lt;br /&gt;
This dialog lists the service unit instances that can be associated with this service group instance. The list contains only one item, the service unit instance that was created by the wizard. This item is checked indicating that the wizard automatically chose this service unit instance to run within the service group instance.&lt;br /&gt;
&lt;br /&gt;
===Service Instance Instance===&lt;br /&gt;
This screen displays the service instance that was created by the Service Group Instance Wizard. This service instance was created because the service instance type is associated with the parent service group type (csa101SG) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Service_Instance_List_csa101SII0.png|frame|center| '''Service Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Service Instance Name''': This field holds the name of the service instance. This name must be unique. The name that was generated combines the service instance type (csa101SI), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''ServiceInstance Type''': This field holds the type of the service instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Component Service Instance Instance===&lt;br /&gt;
This screen displays the component service instance that was created by the Service Group Instance Wizard. This component service instance was created because the component service instance is associated with the parent service instance type (csa101SI) in our model.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Component Service Instance Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Component_Service_Instance_List_csa101CSII0.png|frame|center| '''Component Service Instance Details''' ]]&lt;br /&gt;
&lt;br /&gt;
The information on this screen is described below.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Component Service Instance Name''': This field holds the name of the component service instance. This name must be unique. The name that was generated combines the component service instance type (csa101CSI), the letter I (for Instance), and the number 0 (since this is the first instance of this type).&lt;br /&gt;
&amp;lt;li&amp;gt;'''ComponentServiceInstance Type''': This field holds the type of the component service instance.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latestsdkguide/debugging</id>
		<title>Doc:latestsdkguide/debugging</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latestsdkguide/debugging"/>
				<updated>2016-11-01T17:08:47Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Debugging Applications and SAFplus Platform Components */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Debugging Applications and SAFplus Platform Components==&lt;br /&gt;
&lt;br /&gt;
The high availability features of the SAFplus Platform interfere with debugging applications because the act of debugging an application breaks the performance and availability &amp;quot;contract&amp;quot; between the SAFplus Platform and an application and therefore causes the SAFplus Platform to restart the application.&lt;br /&gt;
&lt;br /&gt;
This HOWTO describes strategies that can be used to debug within an high availability environment.  It is not a primer on gdb.  In fact, it assumes an in-depth knowledge of debugging using gdb (or gdb derivatives such as Wind River's IDE) and therefore focuses exclusively on the interactions between the debugger and the SAFplus Platform.&lt;br /&gt;
&lt;br /&gt;
It is useful to toggle the following debugging interventions on an as needed basis since many &amp;quot;defeat&amp;quot; the high availability features of the SAFplus Platform.  Therefore the examples below use a global variable (that you could define in your component's clCompAppMain.c) called debuggingOn to control some features.&lt;br /&gt;
&lt;br /&gt;
 int debuggingOn = 1; /* Set to 0 to turn debugging off, 1 to turn it on */&lt;br /&gt;
&lt;br /&gt;
=== Debugging Configuration Settings ===&lt;br /&gt;
&lt;br /&gt;
To aid in debugging, options exist to &amp;quot;defeat&amp;quot; the normal SAFplus monitoring of processes and threads.  The following settings are accessible either via global or environment variables.  The global variable can be used to initiate debugging behavior some time during the execution of your process.  The environment variable will cause debugging behavior across the entire SAFplus model.  These variables are all &amp;quot;FALSE&amp;quot; (not in debug mode) by default, setting to TRUE will enable their effects.  In the following list, the global variable is first and the environment variable is in parenthesis.&lt;br /&gt;
&lt;br /&gt;
*  '''clDbgPauseOn (CL_DEBUG_PAUSE)'''&lt;br /&gt;
&lt;br /&gt;
If a thread is going to abort or assert, SAFplus can cause the thread to block on a semaphore instead.  This allows the engineer to attach to the process via gdb and look at the thread's state.&lt;br /&gt;
&lt;br /&gt;
*  '''clDbgPauseOnCodeError (CL_DEBUG_PAUSE_CODE_ERROR)'''&lt;br /&gt;
&lt;br /&gt;
If clDbgPauseOn is TRUE, then this variable enables &amp;quot;pauses&amp;quot; on errors that are clearly application bugs -- such as passing a NULL pointer to a SAFplus API.  Normally, SAFplus API calls return an error in these cases.  But realistically, an application's error handling code can rarely solve bugs in itself -- other then via very granular solutions such as running with reduced functionality or by exiting gracefully.  By pausing at the moment the bug is detected, the stack remains available for analysis through gdb. &lt;br /&gt;
&lt;br /&gt;
*  '''clDbgNoKillComponents (CL_DEBUG_COMP_NO_KILL)'''&lt;br /&gt;
This global variable exists in the AMF server and your component.  If the AMF was going to kill a component for any reason, or a SAFplus library is going to assert for issues like thread pool timeouts, it will not do so with this variable set to TRUE.  This allows the developer to attach to it via gdb.  However, note that the AMF or application will continue as if it had actually killed the component and so proper AMF (application) operation after the event is not guaranteed.  For this reason, other ways to avoid common cases where the AMF kills a component are discussed in the next sections.&lt;br /&gt;
&lt;br /&gt;
*  '''clDbgCompTimeoutOverride (CL_DEBUG_COMP_TIMEOUT_OVERRIDE)'''&lt;br /&gt;
This global variable exists in the AMF server.  If the AMF was going to kill a component due to a timeout, it will not do so.  This allows the developer to attach to it via gdb.  However, note that the AMF will continue as if it had actually killed the component and so proper AMF operation after the event is not guaranteed.  For this reason, other ways to avoid component timeouts are discussed in the next few sections.&lt;br /&gt;
&lt;br /&gt;
=== Stopping Process Health Monitoring ===&lt;br /&gt;
&lt;br /&gt;
It is extremely irritating to attach to your process via a debugger only to have the SAFplus's high availability features intervene and kill the process you are trying to debug!  Certain techniques can be used to temporarily &amp;quot;defeat&amp;quot; this feature to allow debugging to occur.  Of course, while the feature is &amp;quot;off&amp;quot; the high availability features do not work.&lt;br /&gt;
&lt;br /&gt;
==== Turning off heartbeat  ====&lt;br /&gt;
&lt;br /&gt;
Use saAmfHealthcheckStop() to stop heartbeat, or do not call saAmfHealthcheckStart() to begin with.  AMF heartbeating is discussed in detail in [http://help.openclovis.com/saf/SAI-AIS-AMF-B.04.01.AL/#pe8 the SAF AMF Specification]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ACK&amp;quot;ing Messages Early  ====&lt;br /&gt;
&lt;br /&gt;
The SAFplus Platform also monitors the response of certain crucial messages to your component.  If your component does not respond in time, the SAFplus Platform kills your component.  This feature ensures that your application does not have a bug in the handling of these messages; however when debugging the message handling we must &amp;quot;defeat&amp;quot; this feature.  The most common messages are the CSI (work) assignment messages, which trigger the &amp;quot;clCompAppAMFCSISet&amp;quot; (clCompAppMain.c) function call.  When debugging your component, it is best to &amp;quot;ACK&amp;quot; the message right away so the SAFplus Platform will think that you have handled the message.  However, it is important to NOT do so when not in debugging mode, to ensure that the HA features work.  &lt;br /&gt;
&lt;br /&gt;
In the routine below, note that the &amp;quot;clCpmResponse(cpmHandle, invocation, CL_OK);&amp;quot; function has been moved above the switch statement when debugging is on (and moved to below it, for succinctness, when debugging is off).&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 ClRcT clCompAppAMFCSISet(&lt;br /&gt;
    ClInvocationT       invocation,&lt;br /&gt;
    const ClNameT       *compName,&lt;br /&gt;
    ClAmsHAStateT       haState,&lt;br /&gt;
    ClAmsCSIDescriptorT csiDescriptor)&lt;br /&gt;
 { &lt;br /&gt;
    /* If component hang detection is off, then reply with an OK first, &lt;br /&gt;
       so that this call won't time out causing the controller to kill me. &lt;br /&gt;
       &amp;quot;debuggingOn&amp;quot; is NOT part of SAFplus.  It is a global variable that &lt;br /&gt;
       you could define in your own application to control this behavior. &lt;br /&gt;
     */&lt;br /&gt;
    if (debuggingOn)&lt;br /&gt;
      {&lt;br /&gt;
        if (haState != CL_AMS_HA_STATE_QUIESCING)&lt;br /&gt;
          clCpmResponse(cpmHandle, invocation, CL_OK);&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
    /* DO NOT SET BREAKPOINTS ABOVE THIS LINE (IN THIS FUNCTION)&lt;br /&gt;
 &lt;br /&gt;
       (the controller will think that your process is dead)&lt;br /&gt;
 &lt;br /&gt;
       To set a breakpoint in this routine:&lt;br /&gt;
 &lt;br /&gt;
       1. First set &amp;quot;debuggingOn&amp;quot; to 1&lt;br /&gt;
       2. Set your breakpoint below this comment&lt;br /&gt;
       3. Continue&lt;br /&gt;
    */  &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    /* Print information about the CSI Set */&lt;br /&gt;
    clprintf (&amp;quot;Component [%s] : PID [%d]. CSI Set Received\n&amp;quot;, &lt;br /&gt;
               compName-&amp;gt;value, mypid);&lt;br /&gt;
    clCompAppAMFPrintCSI(csiDescriptor, haState);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    /* Take appropriate action based on state */&lt;br /&gt;
    switch ( haState )&lt;br /&gt;
    {&lt;br /&gt;
        case CL_AMS_HA_STATE_ACTIVE:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to take the active HA state &lt;br /&gt;
               for the CSI.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_STANDBY:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to take the standby HA state &lt;br /&gt;
               for this CSI.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_QUIESCED:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to quiesce the CSI currently&lt;br /&gt;
               assigned the active or quiescing HA state. The application &lt;br /&gt;
               must stop work associated with the CSI immediately.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_QUIESCING:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to quiesce the CSI currently&lt;br /&gt;
               assigned the active HA state. The application must stop work&lt;br /&gt;
               associated with the CSI gracefully and not accept any new&lt;br /&gt;
               workloads while the work is being terminated.&lt;br /&gt;
            */&lt;br /&gt;
            clCpmCSIQuiescingComplete(cpmHandle, invocation, CL_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               Should never happen. Ignore.&lt;br /&gt;
            */&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    /* If I'm am killing components, then reply with an OK after&lt;br /&gt;
       execution, to ensure that the handling did not hang */&lt;br /&gt;
    if (!debuggingOn)&lt;br /&gt;
      {&lt;br /&gt;
        if (haState != CL_AMS_HA_STATE_QUIESCING)&lt;br /&gt;
          clCpmResponse(cpmHandle, invocation, CL_OK);&lt;br /&gt;
      }&lt;br /&gt;
    return CL_OK;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Component State Transition Timeouts ====&lt;br /&gt;
&lt;br /&gt;
The SAFplus Platform also ensures that your component transitions through various states within reasonable a time.  To debug during these transitions (startup, shutdown, etc) it is necessary to increase these timeouts.  These timeouts are available in the IDE, or directly in the XML configuration files for temporary changes.&lt;br /&gt;
&lt;br /&gt;
Search for the following XML in your &amp;quot;etc/clAmfDefinitions.xml&amp;quot; file and change the numbers for every component you need to debug to large values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
          &amp;lt;timeouts&amp;gt;&lt;br /&gt;
            &amp;lt;instantiateTimeout&amp;gt;1000000&amp;lt;/instantiateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;terminateTimeout&amp;gt;1000000&amp;lt;/terminateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;cleanupTimeout&amp;gt;1000000&amp;lt;/cleanupTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;amStartTimeout&amp;gt;1000000&amp;lt;/amStartTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;amStopTimeout&amp;gt;1000000&amp;lt;/amStopTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;quiescingCompleteTimeout&amp;gt;1000000&amp;lt;/quiescingCompleteTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;csiSetTimeout&amp;gt;1000000&amp;lt;/csiSetTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;csiRemoveTimeout&amp;gt;1000000&amp;lt;/csiRemoveTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;proxiedCompInstantiateTimeout&amp;gt;1000000&amp;lt;/proxiedCompInstantiateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;proxiedCompCleanupTimeout&amp;gt;1000000&amp;lt;/proxiedCompCleanupTimeout&amp;gt;&lt;br /&gt;
          &amp;lt;/timeouts&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Creating core files on failure ===&lt;br /&gt;
&lt;br /&gt;
Core files are configured to be automatically created and will be found int the &amp;quot;var/run&amp;quot; directory.  If core files are not being created, your environment configuration may be overriding our changes.&lt;br /&gt;
&lt;br /&gt;
Make sure the core file size is &amp;quot;unlimited&amp;quot; by running &amp;quot;ulimit -c unlimited&amp;quot; before executing SAFplus.&lt;br /&gt;
&lt;br /&gt;
You can test core creation by jamming a SEGFAULT into a program by doing &amp;quot;kill -SEGV &amp;lt;process id&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Pausing and Resuming a Thread ===&lt;br /&gt;
&lt;br /&gt;
Sometimes a problem occurs during startup -- before you have the opportunity to attach to a process, set a breakpoint, and resume the process.    In a standard application this is easy to debug because &amp;quot;gdb&amp;quot; starts up with your program &amp;quot;stopped&amp;quot;.  But in a high availability framework, where the SAFplus Platform starts and stops programs, this is trickier.&lt;br /&gt;
 &lt;br /&gt;
To debug this, 2 functions are available from &amp;quot;clDebugApi.h&amp;quot;, one which &amp;quot;pauses&amp;quot; the calling thread, the other &amp;quot;resumes&amp;quot; it.  The programmer adds the &amp;quot;pause&amp;quot; function to the code and recompiles.  When the function is called and the global variable clDbgPauseOn (or CL_DEBUG_PAUSE environment variable) is true, the thread will output a log and block on a semaphore.  The programmer can then check the logs to see if a thread was paused.  If so, he goes into gdb, attaches to the process, finds the thread that is paused  -- &amp;quot;thread apply all backtrace&amp;quot; (&amp;quot;thr a a bt&amp;quot;) and look for a call to &amp;quot;pause&amp;quot; -- switches to that thread (&amp;quot;thread x&amp;quot;), and then debugs the thread.  The programmer can even &amp;quot;resume&amp;quot; the thread by calling the clDbgResume function from gdb's prompt:&lt;br /&gt;
&lt;br /&gt;
 gdb&amp;gt; call clDbgResume()&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;pause&amp;quot; function is actually a macro so that the file and line from which the function was called can be passed.  This information is very useful if a log is all that is provided for debugging.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Intercepting the Automatic Start of a Component ===&lt;br /&gt;
&lt;br /&gt;
It is possible to run your component within a wrapper application (such as gdb or purify).  When the SAFplus Platform is deployed on a target, all applications are placed in the &amp;quot;bin&amp;quot; subdirectory of the SAFplus Platform tree (for example &amp;quot;/root/asp/bin&amp;quot;).  To intercept the application start for debugging purposes:&lt;br /&gt;
# rename your application&lt;br /&gt;
# create a script and name it the same as the original application name&lt;br /&gt;
# edit the script to add your wrapper.&lt;br /&gt;
## Note that you will have to start a separate window for applications that need a console (like gdb)&lt;br /&gt;
&lt;br /&gt;
For example the following simple script can be used to make your application start within gdb (note though that it must be used in conjunction with the techniques described in the &amp;quot;Stopping Process Health Monitoring&amp;quot; section above unless you are a very fast typist, since your application's initialization will be monitored by the OpenClovis HA infrastructure to ensure that it succeeds). This script assumes that your application is called &amp;quot;myapp&amp;quot; and that you moved it to &amp;quot;/root/asp/bin/myapp.orig&amp;quot;.  It also assumes that your Linux installation has X-windows and the gnome desktop environment installed (however, a similar technique can be used for other window managers):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
/usr/bin/gnome-terminal --window --command &amp;quot;gdb /root/asp/bin/myapp.orig $1 $2 $3 $4 $5 $6 $7 $8 $9&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Useful Environment Variables ===&lt;br /&gt;
&lt;br /&gt;
* ASP_NODE_REBOOT_DISABLE&lt;br /&gt;
Disable reboot of nodes, even if the AMF high availability algorithm determines a reboot is necessary.&lt;br /&gt;
Example:&lt;br /&gt;
export ASP_NODE_REBOOT_DISABLE=1&lt;br /&gt;
&lt;br /&gt;
* CL_LOG_CODE_LOCATION_ENABLE&lt;br /&gt;
Adds file/line to each log message, so logs can be easily found in the source code.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
export CL_LOG_CODE_LOCATION_ENABLE=1&lt;br /&gt;
&lt;br /&gt;
* CL_LOG_TO_FILE &lt;br /&gt;
Sends all logs to a file or stdout. This environment variable is very helpful when debugging problems that occur before the SAFplus log server has started. For example:&lt;br /&gt;
 export CL_LOG_TO_FILE=stdout&lt;br /&gt;
 export CL_LOG_TO_FILE=/var/log/mylog.txt&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Command_Line_and_environment_variables_FAQ</id>
		<title>Command Line and environment variables FAQ</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Command_Line_and_environment_variables_FAQ"/>
				<updated>2016-08-25T21:21:12Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Environment Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Environment Variables ==&lt;br /&gt;
&lt;br /&gt;
=== Logging ===&lt;br /&gt;
&lt;br /&gt;
* '''CPM_LOG_FILE_SIZE'''&lt;br /&gt;
This variable defines the maximum size of the stdout (console) log.  Use a number + K for kilobytes, M for megabytes and G for gigabytes.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CPM_LOG_FILE_SIZE=100K&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''CPM_LOG_FILE_ROTATIONS'''&lt;br /&gt;
This variable defines the number of log files (i.e) name1.log name2.log, etc to use before restarting the count.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CPM_LOG_FILE_ROTATIONS=100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''CL_LOG_TO_FILE'''&lt;br /&gt;
Sends all logs to a file or stdout.  This environment variable is very helpful when debugging problems that occur before the SAFplus log server has started.  For example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 export CL_LOG_TO_FILE=stdout&lt;br /&gt;
 export CL_LOG_TO_FILE=/var/log/mylog.txt&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''ASP_STDOUT_LOGFILE''' (deprecates ASP_CPM_LOGFILE)  [version 5.1+]&lt;br /&gt;
This variable overrides the log file name for the safplus_amf.  Use either an absolute path (beginning with /) or a path relative to the ASP log directory.&lt;br /&gt;
The special name &amp;quot;console&amp;quot; will output to the console instead of a file.&amp;lt;br/&amp;gt;&lt;br /&gt;
Note, setting this variable to &amp;quot;console&amp;quot; is equivalent starting with the command &amp;quot;etc/init.d/asp consolestart&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ASP_STDOUT_LOGFILE=/tmp/stdoutlog.txt&lt;br /&gt;
export ASP_STDOUT_LOGFILE=stdoutlog.txt&lt;br /&gt;
export ASP_STDOUT_LOGFILE=console&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''CL_LOG_CODE_LOCATION_ENABLE'''&lt;br /&gt;
&lt;br /&gt;
Adds file/line to each log message, so logs can be tracked in the source code&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CL_LOG_CODE_LOCATION_ENABLE=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''CL_LOG_TIME_ENABLE'''&lt;br /&gt;
&lt;br /&gt;
Adds a timestamp to each log message (default is true)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CL_LOG_TIME_ENABLE=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
&lt;br /&gt;
* '''ASP_NODE_REBOOT_DISABLE'''&lt;br /&gt;
&lt;br /&gt;
Disable reboot of nodes, even if the AMF HA algorithm determines a reboot is necessary.&lt;br /&gt;
&lt;br /&gt;
 export ASP_NODE_REBOOT_DISABLE=1&lt;br /&gt;
&lt;br /&gt;
* '''ASP_NODE_RESTART'''&lt;br /&gt;
 &lt;br /&gt;
Restart the SAFplus on node recovery, rather then wait for operator intervention.&lt;br /&gt;
&lt;br /&gt;
 export ASP_NODE_RESTART=1&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Command_Line_and_environment_variables_FAQ</id>
		<title>Command Line and environment variables FAQ</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Command_Line_and_environment_variables_FAQ"/>
				<updated>2016-08-25T21:19:19Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Logging */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Environment Variables ==&lt;br /&gt;
&lt;br /&gt;
=== Logging ===&lt;br /&gt;
&lt;br /&gt;
* '''CPM_LOG_FILE_SIZE'''&lt;br /&gt;
This variable defines the maximum size of the stdout (console) log.  Use a number + K for kilobytes, M for megabytes and G for gigabytes.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CPM_LOG_FILE_SIZE=100K&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''CPM_LOG_FILE_ROTATIONS'''&lt;br /&gt;
This variable defines the number of log files (i.e) name1.log name2.log, etc to use before restarting the count.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CPM_LOG_FILE_ROTATIONS=100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''ASP_STDOUT_LOGFILE''' (deprecates ASP_CPM_LOGFILE)  [version 5.1+]&lt;br /&gt;
This variable overrides the log file name.  Use either an absolute path (beginning with /) or a path relative to the ASP log directory.&lt;br /&gt;
The special name &amp;quot;console&amp;quot; will output to the console instead of a file.&amp;lt;br/&amp;gt;&lt;br /&gt;
Note, setting this variable to &amp;quot;console&amp;quot; is equivalent starting with the command &amp;quot;etc/init.d/asp consolestart&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ASP_STDOUT_LOGFILE=/tmp/stdoutlog.txt&lt;br /&gt;
export ASP_STDOUT_LOGFILE=stdoutlog.txt&lt;br /&gt;
export ASP_STDOUT_LOGFILE=console&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''CL_LOG_CODE_LOCATION_ENABLE'''&lt;br /&gt;
&lt;br /&gt;
Adds file/line to each log message, so logs can be tracked in the source code&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CL_LOG_CODE_LOCATION_ENABLE=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''CL_LOG_TIME_ENABLE'''&lt;br /&gt;
&lt;br /&gt;
Adds a timestamp to each log message (default is true)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CL_LOG_TIME_ENABLE=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
&lt;br /&gt;
* ASP_NODE_REBOOT_DISABLE &lt;br /&gt;
&lt;br /&gt;
Disable reboot of nodes, even if the AMF HA algorithm determines a reboot is necessary.&lt;br /&gt;
&lt;br /&gt;
 export ASP_NODE_REBOOT_DISABLE=1&lt;br /&gt;
&lt;br /&gt;
* ASP_NODE_RESTART&lt;br /&gt;
 &lt;br /&gt;
Restart the SAFplus on node recovery, rather then wait for operator intervention.&lt;br /&gt;
&lt;br /&gt;
 export ASP_NODE_RESTART=1&lt;br /&gt;
&lt;br /&gt;
* CL_LOG_TO_FILE&lt;br /&gt;
&lt;br /&gt;
Sends all logs to a file or stdout.  This environment variable is very helpful when debugging problems that occur before the SAFplus log server has started.  For example:&lt;br /&gt;
 export CL_LOG_TO_FILE=stdout&lt;br /&gt;
 export CL_LOG_TO_FILE=/var/log/mylog.txt&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/sdkguide/commandref</id>
		<title>Doc:latest/sdkguide/commandref</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/sdkguide/commandref"/>
				<updated>2016-08-25T21:17:09Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Logging */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SAFplus Platform Command Line and Environment Variable Reference==&lt;br /&gt;
&lt;br /&gt;
===Environment Variables===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Variables controlling automatic restart or reboot of SAFplus Platform or Node====&lt;br /&gt;
* '''ASP_RESTART_SAFplus''' -- If set to 1 will restart SAFplus Platform in case AMF crashed or SAFplus Platform was not able to come up for some reason, if set to 0 will not restart SAFplus Platform. Default value is 1.&lt;br /&gt;
* '''ASP_NODE_REBOOT_DISABLE''' -- &lt;br /&gt;
* '''ASP_NODE_RESTART''' --&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This table describes the interaction between the various SAFplus Platform restart and reboot variables:&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| ASP_NODE_REBOOT_DISABLE&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| ASP_RESTART_SAFplus Platform&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| ASP_NODE_RESTART&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Action taken&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
| undefined&lt;br /&gt;
| undefined&lt;br /&gt;
| undefined&lt;br /&gt;
| reboot&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
| 1 &lt;br /&gt;
| undefined &lt;br /&gt;
| undefined &lt;br /&gt;
| Restart SAFplus Platform&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| 0&lt;br /&gt;
| undefined&lt;br /&gt;
| SAFplus Platform stopped&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| 0&lt;br /&gt;
| 1&lt;br /&gt;
| Restart SAFplus Platform&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Cluster Membership Configuration (GMS)====&lt;br /&gt;
* '''CL_LEADER_NODE_ID''' --&lt;br /&gt;
* '''LINK_NAME''' -- This tells SAFplus Platform which Network Interface (ex. eth0, bind0, lo, etc.) to be used for communication with other SAFplus Platform's on same/other nodes.&lt;br /&gt;
* '''ASP_MULTINODE''' -- This environment variable must be used, when multiple SAFplus Platform's are to be run on single machine. Then user must export this environment variable before starting each of SAFplus Platform's.&lt;br /&gt;
&lt;br /&gt;
====ValGrind====&lt;br /&gt;
* '''ASP_VALGRIND_FILTER''' --&lt;br /&gt;
* '''ASP_VALGRIND_CMD''' --&lt;br /&gt;
&lt;br /&gt;
====Logging====&lt;br /&gt;
&lt;br /&gt;
* '''ASP_LOG_FILTER_DIR''' -- place where log filter file should be present. It should be named logfilter.txt. Default value /tmp&lt;br /&gt;
* '''CL_LOG_SEVERITY''' -- Environment variable used to set the log filter. You can export this env variable to any log severity like DEBUG, INFO, NOTICE, ERROR, etc. Note that setting of this env variable has higher priority than the log filter file explained above.&lt;br /&gt;
* '''CL_LOG_CODE_LOCATION_ENABLE''' -- Environment variable if set to 1, will show the file name, function name and line number when displaying logs. Default value is 0.&lt;br /&gt;
* '''CL_LOG_TO_FILE''' -- sends all logs to a file or stdout.  Very useful when debugging issues that occur before the SAFplus log server is up&lt;br /&gt;
 export CL_LOG_TO_FILE=stdout &lt;br /&gt;
* '''CL_LOG_STREAM_ENABLE'''&lt;br /&gt;
* '''CL_LOG_TIME_ENABLE'''&lt;br /&gt;
* '''CL_LOG_DEBUG_LEVEL''' (clLogDebug.c)&lt;br /&gt;
* '''ASP_SAVE_PREV_LOGS''' -- if set to 1 will save logs in the sandbox from the previous run of SAFplus Platform (if any) during SAFplus Platform startup into location specified by the environment variable ASP_PREV_LOG_DIR or to /tmp/asp_saved_logs, creating the directory if necessary. If set to 0, the logs will deleted. Default value is 1.&lt;br /&gt;
* '''ASP_PREV_LOG_DIR''' -- place where logs of previous SAFplus Platform run will be stored. Default value is /tmp/asp_saved_logs&lt;br /&gt;
* '''AMS_DEBUG''' -- Enable special availability management framework console logging.  This occurs outside of the normal log infrastructure since the AMF process manages the logging process. &lt;br /&gt;
* '''AMS_NOTIFICATION_DEBUG''' --&lt;br /&gt;
* '''CPM_LOG_FILE_SIZE''' --&lt;br /&gt;
* '''CPM_LOG_FILE_ROTATIONS''' --&lt;br /&gt;
* '''ASP_CPM_LOGFILE''' --&lt;br /&gt;
&lt;br /&gt;
====Miscellaneous====&lt;br /&gt;
* '''ASP_RMD_METRIC''' --&lt;br /&gt;
* '''CL_TXN_DSBLE_CKPT''' --&lt;br /&gt;
* '''CL_HEAP_DEBUG''' --&lt;br /&gt;
* '''CL_MEM_TIME''' --&lt;br /&gt;
* '''ASP_WITHOUT_CPM''' --&lt;br /&gt;
* '''CL_NODE_REPRESENTATIVE''' --&lt;br /&gt;
* '''ASP_DB_SYNC''' --&lt;br /&gt;
&lt;br /&gt;
====Debugging====&lt;br /&gt;
* '''CL_DEBUG_PAUSE''' --&lt;br /&gt;
* '''CL_DEBUG_PAUSE_CODE_ERROR''' --&lt;br /&gt;
* '''CL_DEBUG_COMP_NO_KILL''' --&lt;br /&gt;
* '''CL_DEBUG_COMP_TIMEOUT_OVERRIDE''' --&lt;br /&gt;
* '''CL_DEBUG_LOG_LEVEL''' --&lt;br /&gt;
* '''CL_DEBUG_RESOURCE_LOG_LEVEL''' --&lt;br /&gt;
* '''CL_DEBUG_REVERSE_TIMING''' --&lt;br /&gt;
&lt;br /&gt;
====Intra-Cluster Message Traffic Shaping====&lt;br /&gt;
OpenClovis SAFplus Platform optionally uses a well known traffic shaping algorithm to modulate intracluster traffic.  This is very useful if the internal communications between your applications can potentially overwhelm an application with requests.  But if your application's inter-communication is designed to ensure that this cannot happen then the traffic shaping is not needed.  By default (compile time) it is off.&lt;br /&gt;
&lt;br /&gt;
These environment variables can be used to override the default leaky bucket intra-cluster message shaping parameters.  &lt;br /&gt;
* '''CL_LEAKY_BUCKET_VOL''' -- Leaky bucket volume in bytes&lt;br /&gt;
* '''CL_LEAKY_BUCKET_LEAK_SIZE''' -- Leaky bucket removal in bytes&lt;br /&gt;
* '''CL_LEAKY_BUCKET_LEAK_INTERVAL''' -- How often the leak occurs in milliSeconds&lt;br /&gt;
&lt;br /&gt;
===Environment Variables Set by OpenClovis SAFplus Platform===&lt;br /&gt;
These variables are available for use in your application:&lt;br /&gt;
&lt;br /&gt;
====Locations====&lt;br /&gt;
Note these environment variables have equivalent &amp;quot;C&amp;quot; global variables (defined in clEoApi.h) which are recommended over using the environment variable directly.&lt;br /&gt;
&lt;br /&gt;
* '''ASP_NODENAME''' -- The name of the node (as defined in the SAF AMF model)&lt;br /&gt;
* '''ASP_COMPNAME''' -- The name of this component (as defined in the SAF AMF model)&lt;br /&gt;
* '''ASP_RUNDIR''' -- The &amp;quot;current working directory&amp;quot; SAFplus Platform runs from&lt;br /&gt;
* '''ASP_LOGDIR''' -- The SAFplus Platform log directory&lt;br /&gt;
* '''ASP_BINDIR''' -- The location of SAFplus Platform binaries &lt;br /&gt;
* '''ASP_APP_BINDIR''' -- The location of the program binary.  This is often, but not always the same as ASP_BINDIR.&lt;br /&gt;
* '''ASP_CONFIG''' -- Directory of the SAFplus Platform configuration files (normally &amp;lt;asp install dir&amp;gt;/etc)&lt;br /&gt;
* '''ASP_CPM_CWD''' -- The current working directory to use for SAFplus Platform and programs started by SAFplus Platform (defaults to var/run)&lt;br /&gt;
* '''ASP_DBDIR''' -- The location the SAFplus Platform stores its database files&lt;br /&gt;
&lt;br /&gt;
===Starting and Stopping SAFplus Platform: &amp;lt;aspDir&amp;gt;/etc/init.d/asp===&lt;br /&gt;
Usage : asp {start|stop|restart|console|status|zap|help} [options]&lt;br /&gt;
&lt;br /&gt;
options can be one of the following : (these options only work with start command, e.g. etc/init.d/asp start -v etc.)&lt;br /&gt;
&lt;br /&gt;
-v                            :  Be verbose&lt;br /&gt;
--enforce-tipc-settings       :  Use etc/asp.conf's TIPC settings overriding the system TIPC settings&lt;br /&gt;
--ignore-tipc-settings        :  Use systems TIPC settings ignoring the etc/asp.conf's settings&lt;br /&gt;
--remove-persistent-db        :  Delete all of the SAFplus Platform persistent database files&lt;br /&gt;
--asp-log-level &amp;lt;level&amp;gt;       :  Start SAFplus Platform with particular log level. &amp;lt;level&amp;gt; is [trace|debug|info|notice|warning|error|critical]&lt;br /&gt;
&lt;br /&gt;
===CLI===&lt;br /&gt;
&lt;br /&gt;
====bin/asp_console====&lt;br /&gt;
SAFplus Platform console is a comprehensive CLI for examination and debugging of the SAFplus Platform system.  SAFplus Platform console documentation is available as a separate document.&lt;br /&gt;
&lt;br /&gt;
Start:&lt;br /&gt;
&amp;lt;aspDir&amp;gt;/etc/init.d/asp console&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;aspDir&amp;gt;/bin/asp_console&lt;br /&gt;
&lt;br /&gt;
====bin/asp_info====&lt;br /&gt;
The SAFplus Platform info CLI is a simple interface for display of SAFplus Platform status and basic control&lt;br /&gt;
&lt;br /&gt;
&amp;lt;aspDir&amp;gt;/bin/asp_info&lt;br /&gt;
&lt;br /&gt;
===Directly running a component: bin/asp_run===&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Command_Line_and_environment_variables_FAQ</id>
		<title>Command Line and environment variables FAQ</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Command_Line_and_environment_variables_FAQ"/>
				<updated>2016-08-25T21:14:05Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Environment Variables ==&lt;br /&gt;
&lt;br /&gt;
=== Logging ===&lt;br /&gt;
&lt;br /&gt;
* CPM_LOG_FILE_SIZE&lt;br /&gt;
This variable defines the maximum size of the stdout (console) log.  Use a number + K for kilobytes, M for megabytes and G for gigabytes.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CPM_LOG_FILE_SIZE=100K&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CPM_LOG_FILE_ROTATIONS&lt;br /&gt;
This variable defines the number of log files (i.e) name1.log name2.log, etc to use before restarting the count.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CPM_LOG_FILE_ROTATIONS=100&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ASP_STDOUT_LOGFILE (deprecates ASP_CPM_LOGFILE)  [version 5.1+]&lt;br /&gt;
This variable overrides the log file name.  Use either an absolute path (beginning with /) or a path relative to the ASP log directory.&lt;br /&gt;
The special name &amp;quot;console&amp;quot; will output to the console instead of a file.&amp;lt;br/&amp;gt;&lt;br /&gt;
Note, setting this variable to &amp;quot;console&amp;quot; is equivalent starting with the command &amp;quot;etc/init.d/asp consolestart&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export ASP_STDOUT_LOGFILE=/tmp/stdoutlog.txt&lt;br /&gt;
export ASP_STDOUT_LOGFILE=stdoutlog.txt&lt;br /&gt;
export ASP_STDOUT_LOGFILE=console&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CL_LOG_CODE_LOCATION_ENABLE&lt;br /&gt;
&lt;br /&gt;
Adds file/line to each log message, so logs can be tracked in the source code&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CL_LOG_CODE_LOCATION_ENABLE=1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* CL_LOG_TIME_ENABLE&lt;br /&gt;
&lt;br /&gt;
Adds a timestamp to each log message (default is true)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export CL_LOG_TIME_ENABLE=0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Debugging ===&lt;br /&gt;
&lt;br /&gt;
* ASP_NODE_REBOOT_DISABLE &lt;br /&gt;
&lt;br /&gt;
Disable reboot of nodes, even if the AMF HA algorithm determines a reboot is necessary.&lt;br /&gt;
&lt;br /&gt;
 export ASP_NODE_REBOOT_DISABLE=1&lt;br /&gt;
&lt;br /&gt;
* ASP_NODE_RESTART&lt;br /&gt;
 &lt;br /&gt;
Restart the SAFplus on node recovery, rather then wait for operator intervention.&lt;br /&gt;
&lt;br /&gt;
 export ASP_NODE_RESTART=1&lt;br /&gt;
&lt;br /&gt;
* CL_LOG_TO_FILE&lt;br /&gt;
&lt;br /&gt;
Sends all logs to a file or stdout.  This environment variable is very helpful when debugging problems that occur before the SAFplus log server has started.  For example:&lt;br /&gt;
 export CL_LOG_TO_FILE=stdout&lt;br /&gt;
 export CL_LOG_TO_FILE=/var/log/mylog.txt&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Switch_your_model/image_from_TIPC_to_UDP</id>
		<title>Switch your model/image from TIPC to UDP</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Switch_your_model/image_from_TIPC_to_UDP"/>
				<updated>2016-05-09T13:08:45Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* FAQ / Troubleshooting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;UDP can be run in two modes -- local or cloud.  In local mode, the UDP system uses multicast to find members of the cluster and auto-assigns non-routable IP addresses onto an alias of your chosen backplane network interface.  The advantage of local mode is that no IP addresses need to be configured.&lt;br /&gt;
&lt;br /&gt;
In cloud mode, it is assumed that the cluster is potentially running across the entire internet (no multicast) on machines with specified IP addresses.  Since no initial discovery is possible, every node needs to be configured with the IP addresses of the two system controller nodes.&lt;br /&gt;
&lt;br /&gt;
== Changing Your Model from TIPC to UDP ==&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
- If you have a pre-60 model you will need to upgrade it.  Using the IDE open your model, every option will be grey except model-&amp;gt;update.  This update will generate a configuration file called &amp;lt;your model&amp;gt;/config/clTransport.xml that looks something like this:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
      &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;xports&amp;gt;&lt;br /&gt;
            &amp;lt;xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;TIPC&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClTIPC.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport&amp;gt;&lt;br /&gt;
            &amp;lt;!--xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport--&amp;gt;&lt;br /&gt;
          &amp;lt;/xports&amp;gt;&lt;br /&gt;
          &amp;lt;!--heartbeat&amp;gt;&lt;br /&gt;
              &amp;lt;interval&amp;gt;2000&amp;lt;/interval&amp;gt;&lt;br /&gt;
              &amp;lt;intervalLocal&amp;gt;1000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
              &amp;lt;retries&amp;gt;3&amp;lt;/retries&amp;gt;&lt;br /&gt;
          &amp;lt;/heartbeat--&amp;gt;&lt;br /&gt;
        &amp;lt;/multixport&amp;gt;&lt;br /&gt;
      &amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;/openClovisAsp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
Edit the content clTransport.xml with the UDP configuration details, and remove the TIPC details:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
      &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;xports&amp;gt;&lt;br /&gt;
            &amp;lt;xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport&amp;gt;&lt;br /&gt;
          &amp;lt;/xports&amp;gt;&lt;br /&gt;
          &amp;lt;protocol default=&amp;quot;UDP&amp;quot;/&amp;gt;&lt;br /&gt;
          &amp;lt;multicast address=&amp;quot;226.0.1.1&amp;quot; port=&amp;quot;9595&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;heartbeat&amp;gt;&lt;br /&gt;
              &amp;lt;interval&amp;gt;3000&amp;lt;/interval&amp;gt;&lt;br /&gt;
              &amp;lt;intervalLocal&amp;gt;3000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
              &amp;lt;retries&amp;gt;5&amp;lt;/retries&amp;gt;&lt;br /&gt;
          &amp;lt;/heartbeat&amp;gt;&lt;br /&gt;
        &amp;lt;/multixport&amp;gt;&lt;br /&gt;
      &amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 3 (Local mode) ===&lt;br /&gt;
Add 2 environment variables into &amp;lt;model_dir&amp;gt;/src/target.env, or make sure these variables are defined before starting SAFplus:&lt;br /&gt;
&lt;br /&gt;
 export ASP_UDP_SUBNET=&amp;lt;IP Range&amp;gt;/Length&lt;br /&gt;
 export ASP_UDP_LINK_NAME=&amp;lt;your interface&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*'''Example:'''&lt;br /&gt;
&lt;br /&gt;
 export ASP_UDP_SUBNET=192.168.57.0/24&lt;br /&gt;
 export ASP_UDP_LINK_NAME=eth0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 3 (Cloud mode) ===&lt;br /&gt;
To use the UDP transport without node discovery (multicast) or IP address assignment, you must:&lt;br /&gt;
&lt;br /&gt;
1. Add these 2 environment variables into &amp;lt;model_dir&amp;gt;/src/target.env, or make sure these variables are defined before starting SAFplus:&lt;br /&gt;
&lt;br /&gt;
ASP_UDP_USE_EXISTING_IP=true&lt;br /&gt;
&lt;br /&gt;
ASP_UDP_LINK_NAME=&amp;lt;link name, for example 'eth0'&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure UDP peer addresses like this:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
     &amp;lt;peerAddresses port=&amp;quot;6789&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.101&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.102&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/peerAddresses&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a this complete example of a cloud mode configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
  &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;xports&amp;gt;&lt;br /&gt;
       &amp;lt;xport&amp;gt;&lt;br /&gt;
         &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
         &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
       &amp;lt;/xport&amp;gt;&lt;br /&gt;
     &amp;lt;/xports&amp;gt;&lt;br /&gt;
     &amp;lt;protocol default=&amp;quot;UDP&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;heartbeat&amp;gt;&lt;br /&gt;
          &amp;lt;interval&amp;gt;1000&amp;lt;/interval&amp;gt;&lt;br /&gt;
          &amp;lt;intervalLocal&amp;gt;1000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
          &amp;lt;retries&amp;gt;4&amp;lt;/retries&amp;gt;&lt;br /&gt;
     &amp;lt;/heartbeat&amp;gt;&lt;br /&gt;
     &amp;lt;peerAddresses port=&amp;quot;6789&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.101&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.102&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/peerAddresses&amp;gt;&lt;br /&gt;
    &amp;lt;/multixport&amp;gt;&lt;br /&gt;
  &amp;lt;/version&amp;gt;&lt;br /&gt;
 &amp;lt;/openClovisAsp&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Before or After &amp;quot;make images&amp;quot;? ===&lt;br /&gt;
clTransport.xml and target.env can be changed before the &amp;quot;make images&amp;quot; step so all generated images are UDP by default OR these files can be changed on every node after deployment.&lt;br /&gt;
&lt;br /&gt;
== FAQ / Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Q: Is the SAFplus able to run in UDP local mode as a non-root user? ===&lt;br /&gt;
* A: Yes, but you must properly configure the interfaces since SAFplus cannot. &lt;br /&gt;
Configure interface name (ASP_UDP_LINK_NAME) with the IP address calculated from your subnet and node address (ASP_UDP_SUBNET.DEFAULT_NODEADDR).  The node address is the DEFAULT_NODEADDR settings from etc/asp.conf file.&lt;br /&gt;
&lt;br /&gt;
 Example:&lt;br /&gt;
  root:#ifconfig eth0 192.168.57.1&lt;br /&gt;
  user:#export ASP_UDP_SUBNET=192.168.57.0/24&lt;br /&gt;
  user:#export ASP_UDP_LINK_NAME=eth0&lt;br /&gt;
  user:#./etc/init.d/safplus start&lt;br /&gt;
&lt;br /&gt;
=== Q: In UDP LAN mode, nodes do not discover each other ===&lt;br /&gt;
&lt;br /&gt;
You can determine this by running bin/safplus_info command &amp;quot;nodes&amp;quot; to see what nodes are alive.&lt;br /&gt;
&lt;br /&gt;
* A: UDP broadcast packets are being dropped.  This could be a router configuration, but is more likely a configuration in your Linux distribution's firewall software.  Disable the firewall or add rules to allow UDP broadcast.  How do to this depends on your distro:&lt;br /&gt;
 Examples:&lt;br /&gt;
   Centos 7: systemctl stop firewalld&lt;br /&gt;
   Ubuntu:   service iptables stop&lt;br /&gt;
&lt;br /&gt;
=== Q: In UDP mode, the software still tries to load the TIPC kernel module ===&lt;br /&gt;
&lt;br /&gt;
* A: TIPC is still specified as a backup communications protocol.  Edit etc/clTransport.xml (on all nodes) and remove the &amp;lt;xport&amp;gt;&amp;lt;type&amp;gt;TIPC ... &amp;lt;/xport&amp;gt; block.  Also edit etc/asp.conf and set &amp;quot;export BUILD_TIPC=0&amp;quot; (rather than =1).&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Switch_your_model/image_from_TIPC_to_UDP</id>
		<title>Switch your model/image from TIPC to UDP</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Switch_your_model/image_from_TIPC_to_UDP"/>
				<updated>2016-05-09T13:02:50Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* FAQ */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;UDP can be run in two modes -- local or cloud.  In local mode, the UDP system uses multicast to find members of the cluster and auto-assigns non-routable IP addresses onto an alias of your chosen backplane network interface.  The advantage of local mode is that no IP addresses need to be configured.&lt;br /&gt;
&lt;br /&gt;
In cloud mode, it is assumed that the cluster is potentially running across the entire internet (no multicast) on machines with specified IP addresses.  Since no initial discovery is possible, every node needs to be configured with the IP addresses of the two system controller nodes.&lt;br /&gt;
&lt;br /&gt;
== Changing Your Model from TIPC to UDP ==&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
- If you have a pre-60 model you will need to upgrade it.  Using the IDE open your model, every option will be grey except model-&amp;gt;update.  This update will generate a configuration file called &amp;lt;your model&amp;gt;/config/clTransport.xml that looks something like this:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
      &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;xports&amp;gt;&lt;br /&gt;
            &amp;lt;xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;TIPC&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClTIPC.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport&amp;gt;&lt;br /&gt;
            &amp;lt;!--xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport--&amp;gt;&lt;br /&gt;
          &amp;lt;/xports&amp;gt;&lt;br /&gt;
          &amp;lt;!--heartbeat&amp;gt;&lt;br /&gt;
              &amp;lt;interval&amp;gt;2000&amp;lt;/interval&amp;gt;&lt;br /&gt;
              &amp;lt;intervalLocal&amp;gt;1000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
              &amp;lt;retries&amp;gt;3&amp;lt;/retries&amp;gt;&lt;br /&gt;
          &amp;lt;/heartbeat--&amp;gt;&lt;br /&gt;
        &amp;lt;/multixport&amp;gt;&lt;br /&gt;
      &amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;/openClovisAsp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
Edit the content clTransport.xml with the UDP configuration details, and remove the TIPC details:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
      &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;xports&amp;gt;&lt;br /&gt;
            &amp;lt;xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport&amp;gt;&lt;br /&gt;
          &amp;lt;/xports&amp;gt;&lt;br /&gt;
          &amp;lt;protocol default=&amp;quot;UDP&amp;quot;/&amp;gt;&lt;br /&gt;
          &amp;lt;multicast address=&amp;quot;226.0.1.1&amp;quot; port=&amp;quot;9595&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;heartbeat&amp;gt;&lt;br /&gt;
              &amp;lt;interval&amp;gt;3000&amp;lt;/interval&amp;gt;&lt;br /&gt;
              &amp;lt;intervalLocal&amp;gt;3000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
              &amp;lt;retries&amp;gt;5&amp;lt;/retries&amp;gt;&lt;br /&gt;
          &amp;lt;/heartbeat&amp;gt;&lt;br /&gt;
        &amp;lt;/multixport&amp;gt;&lt;br /&gt;
      &amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 3 (Local mode) ===&lt;br /&gt;
Add 2 environment variables into &amp;lt;model_dir&amp;gt;/src/target.env, or make sure these variables are defined before starting SAFplus:&lt;br /&gt;
&lt;br /&gt;
 export ASP_UDP_SUBNET=&amp;lt;IP Range&amp;gt;/Length&lt;br /&gt;
 export ASP_UDP_LINK_NAME=&amp;lt;your interface&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*'''Example:'''&lt;br /&gt;
&lt;br /&gt;
 export ASP_UDP_SUBNET=192.168.57.0/24&lt;br /&gt;
 export ASP_UDP_LINK_NAME=eth0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 3 (Cloud mode) ===&lt;br /&gt;
To use the UDP transport without node discovery (multicast) or IP address assignment, you must:&lt;br /&gt;
&lt;br /&gt;
1. Add these 2 environment variables into &amp;lt;model_dir&amp;gt;/src/target.env, or make sure these variables are defined before starting SAFplus:&lt;br /&gt;
&lt;br /&gt;
ASP_UDP_USE_EXISTING_IP=true&lt;br /&gt;
&lt;br /&gt;
ASP_UDP_LINK_NAME=&amp;lt;link name, for example 'eth0'&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure UDP peer addresses like this:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
     &amp;lt;peerAddresses port=&amp;quot;6789&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.101&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.102&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/peerAddresses&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a this complete example of a cloud mode configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
  &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;xports&amp;gt;&lt;br /&gt;
       &amp;lt;xport&amp;gt;&lt;br /&gt;
         &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
         &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
       &amp;lt;/xport&amp;gt;&lt;br /&gt;
     &amp;lt;/xports&amp;gt;&lt;br /&gt;
     &amp;lt;protocol default=&amp;quot;UDP&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;heartbeat&amp;gt;&lt;br /&gt;
          &amp;lt;interval&amp;gt;1000&amp;lt;/interval&amp;gt;&lt;br /&gt;
          &amp;lt;intervalLocal&amp;gt;1000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
          &amp;lt;retries&amp;gt;4&amp;lt;/retries&amp;gt;&lt;br /&gt;
     &amp;lt;/heartbeat&amp;gt;&lt;br /&gt;
     &amp;lt;peerAddresses port=&amp;quot;6789&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.101&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.102&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/peerAddresses&amp;gt;&lt;br /&gt;
    &amp;lt;/multixport&amp;gt;&lt;br /&gt;
  &amp;lt;/version&amp;gt;&lt;br /&gt;
 &amp;lt;/openClovisAsp&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Before or After &amp;quot;make images&amp;quot;? ===&lt;br /&gt;
clTransport.xml and target.env can be changed before the &amp;quot;make images&amp;quot; step so all generated images are UDP by default OR these files can be changed on every node after deployment.&lt;br /&gt;
&lt;br /&gt;
== FAQ / Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Q: Is the SAFplus able to run in UDP local mode as a non-root user? ===&lt;br /&gt;
* A: Yes, but you must properly configure the interfaces since SAFplus cannot. &lt;br /&gt;
Configure interface name (ASP_UDP_LINK_NAME) with the IP address calculated from your subnet and node address (ASP_UDP_SUBNET.DEFAULT_NODEADDR).  The node address is the DEFAULT_NODEADDR settings from etc/asp.conf file.&lt;br /&gt;
&lt;br /&gt;
 Example:&lt;br /&gt;
  root:#ifconfig eth0 192.168.57.1&lt;br /&gt;
  user:#export ASP_UDP_SUBNET=192.168.57.0/24&lt;br /&gt;
  user:#export ASP_UDP_LINK_NAME=eth0&lt;br /&gt;
  user:#./etc/init.d/safplus start&lt;br /&gt;
&lt;br /&gt;
=== Q: In UDP LAN mode, nodes do not discover each other ===&lt;br /&gt;
&lt;br /&gt;
You can determine this by running bin/safplus_info command &amp;quot;nodes&amp;quot; to see what nodes are alive.&lt;br /&gt;
&lt;br /&gt;
* A: UDP broadcast packets are being dropped.  This could be a router configuration, but is more likely a configuration in your Linux distribution's firewall software.  Disable the firewall or add rules to allow UDP broadcast.  How do to this depends on your distro:&lt;br /&gt;
 Examples:&lt;br /&gt;
   Centos 7: systemctl stop firewalld&lt;br /&gt;
   Ubuntu:   service iptables stop&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/sdkguide/commandref</id>
		<title>Doc:latest/sdkguide/commandref</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/sdkguide/commandref"/>
				<updated>2014-10-29T01:09:25Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: undo spam&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SAFplus Platform Command Line and Environment Variable Reference==&lt;br /&gt;
&lt;br /&gt;
===Environment Variables===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Variables controlling automatic restart or reboot of SAFplus Platform or Node====&lt;br /&gt;
* '''ASP_RESTART_SAFplus''' -- If set to 1 will restart SAFplus Platform in case AMF crashed or SAFplus Platform was not able to come up for some reason, if set to 0 will not restart SAFplus Platform. Default value is 1.&lt;br /&gt;
* '''ASP_NODE_REBOOT_DISABLE''' -- &lt;br /&gt;
* '''ASP_NODE_RESTART''' --&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
This table describes the interaction between the various SAFplus Platform restart and reboot variables:&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| ASP_NODE_REBOOT_DISABLE&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| ASP_RESTART_SAFplus Platform&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| ASP_NODE_RESTART&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Action taken&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
| undefined&lt;br /&gt;
| undefined&lt;br /&gt;
| undefined&lt;br /&gt;
| reboot&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
| 1 &lt;br /&gt;
| undefined &lt;br /&gt;
| undefined &lt;br /&gt;
| Restart SAFplus Platform&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| 0&lt;br /&gt;
| undefined&lt;br /&gt;
| SAFplus Platform stopped&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
| 1&lt;br /&gt;
| 0&lt;br /&gt;
| 1&lt;br /&gt;
| Restart SAFplus Platform&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====Cluster Membership Configuration (GMS)====&lt;br /&gt;
* '''CL_LEADER_NODE_ID''' --&lt;br /&gt;
* '''LINK_NAME''' -- This tells SAFplus Platform which Network Interface (ex. eth0, bind0, lo, etc.) to be used for communication with other SAFplus Platform's on same/other nodes.&lt;br /&gt;
* '''ASP_MULTINODE''' -- This environment variable must be used, when multiple SAFplus Platform's are to be run on single machine. Then user must export this environment variable before starting each of SAFplus Platform's.&lt;br /&gt;
&lt;br /&gt;
====ValGrind====&lt;br /&gt;
* '''ASP_VALGRIND_FILTER''' --&lt;br /&gt;
* '''ASP_VALGRIND_CMD''' --&lt;br /&gt;
&lt;br /&gt;
====Logging====&lt;br /&gt;
&lt;br /&gt;
* '''ASP_LOG_FILTER_DIR''' -- place where log filter file should be present. It should be named logfilter.txt. Default value /tmp&lt;br /&gt;
* '''CL_LOG_SEVERITY''' -- Environment variable used to set the log filter. You can export this env variable to any log severity like DEBUG, INFO, NOTICE, ERROR, etc. Note that setting of this env variable has higher priority than the log filter file explained above.&lt;br /&gt;
* '''CL_LOG_CODE_LOCATION_ENABLE''' -- Environment variable if set to 1, will show the file name, function name and line number when displaying logs. Default value is 0.&lt;br /&gt;
* '''CL_LOG_TO_FILE'''&lt;br /&gt;
* '''CL_LOG_STREAM_ENABLE'''&lt;br /&gt;
* '''CL_LOG_TIME_ENABLE'''&lt;br /&gt;
* '''CL_LOG_DEBUG_LEVEL''' (clLogDebug.c)&lt;br /&gt;
* '''ASP_SAVE_PREV_LOGS''' -- if set to 1 will save logs in the sandbox from the previous run of SAFplus Platform (if any) during SAFplus Platform startup into location specified by the environment variable ASP_PREV_LOG_DIR or to /tmp/asp_saved_logs, creating the directory if necessary. If set to 0, the logs will deleted. Default value is 1.&lt;br /&gt;
* '''ASP_PREV_LOG_DIR''' -- place where logs of previous SAFplus Platform run will be stored. Default value is /tmp/asp_saved_logs&lt;br /&gt;
* '''AMS_DEBUG''' -- Enable special availability management framework console logging.  This occurs outside of the normal log infrastructure since the AMF process manages the logging process. &lt;br /&gt;
* '''AMS_NOTIFICATION_DEBUG''' --&lt;br /&gt;
* '''CPM_LOG_FILE_SIZE''' --&lt;br /&gt;
* '''CPM_LOG_FILE_ROTATIONS''' --&lt;br /&gt;
* '''ASP_CPM_LOGFILE''' --&lt;br /&gt;
&lt;br /&gt;
====Miscellaneous====&lt;br /&gt;
* '''ASP_RMD_METRIC''' --&lt;br /&gt;
* '''CL_TXN_DSBLE_CKPT''' --&lt;br /&gt;
* '''CL_HEAP_DEBUG''' --&lt;br /&gt;
* '''CL_MEM_TIME''' --&lt;br /&gt;
* '''ASP_WITHOUT_CPM''' --&lt;br /&gt;
* '''CL_NODE_REPRESENTATIVE''' --&lt;br /&gt;
* '''ASP_DB_SYNC''' --&lt;br /&gt;
&lt;br /&gt;
====Debugging====&lt;br /&gt;
* '''CL_DEBUG_PAUSE''' --&lt;br /&gt;
* '''CL_DEBUG_PAUSE_CODE_ERROR''' --&lt;br /&gt;
* '''CL_DEBUG_COMP_NO_KILL''' --&lt;br /&gt;
* '''CL_DEBUG_COMP_TIMEOUT_OVERRIDE''' --&lt;br /&gt;
* '''CL_DEBUG_LOG_LEVEL''' --&lt;br /&gt;
* '''CL_DEBUG_RESOURCE_LOG_LEVEL''' --&lt;br /&gt;
* '''CL_DEBUG_REVERSE_TIMING''' --&lt;br /&gt;
&lt;br /&gt;
====Intra-Cluster Message Traffic Shaping====&lt;br /&gt;
OpenClovis SAFplus Platform optionally uses a well known traffic shaping algorithm to modulate intracluster traffic.  This is very useful if the internal communications between your applications can potentially overwhelm an application with requests.  But if your application's inter-communication is designed to ensure that this cannot happen then the traffic shaping is not needed.  By default (compile time) it is off.&lt;br /&gt;
&lt;br /&gt;
These environment variables can be used to override the default leaky bucket intra-cluster message shaping parameters.  &lt;br /&gt;
* '''CL_LEAKY_BUCKET_VOL''' -- Leaky bucket volume in bytes&lt;br /&gt;
* '''CL_LEAKY_BUCKET_LEAK_SIZE''' -- Leaky bucket removal in bytes&lt;br /&gt;
* '''CL_LEAKY_BUCKET_LEAK_INTERVAL''' -- How often the leak occurs in milliSeconds&lt;br /&gt;
&lt;br /&gt;
===Environment Variables Set by OpenClovis SAFplus Platform===&lt;br /&gt;
These variables are available for use in your application:&lt;br /&gt;
&lt;br /&gt;
====Locations====&lt;br /&gt;
Note these environment variables have equivalent &amp;quot;C&amp;quot; global variables (defined in clEoApi.h) which are recommended over using the environment variable directly.&lt;br /&gt;
&lt;br /&gt;
* '''ASP_NODENAME''' -- The name of the node (as defined in the SAF AMF model)&lt;br /&gt;
* '''ASP_COMPNAME''' -- The name of this component (as defined in the SAF AMF model)&lt;br /&gt;
* '''ASP_RUNDIR''' -- The &amp;quot;current working directory&amp;quot; SAFplus Platform runs from&lt;br /&gt;
* '''ASP_LOGDIR''' -- The SAFplus Platform log directory&lt;br /&gt;
* '''ASP_BINDIR''' -- The location of SAFplus Platform binaries &lt;br /&gt;
* '''ASP_APP_BINDIR''' -- The location of the program binary.  This is often, but not always the same as ASP_BINDIR.&lt;br /&gt;
* '''ASP_CONFIG''' -- Directory of the SAFplus Platform configuration files (normally &amp;lt;asp install dir&amp;gt;/etc)&lt;br /&gt;
* '''ASP_CPM_CWD''' -- The current working directory to use for SAFplus Platform and programs started by SAFplus Platform (defaults to var/run)&lt;br /&gt;
* '''ASP_DBDIR''' -- The location the SAFplus Platform stores its database files&lt;br /&gt;
&lt;br /&gt;
===Starting and Stopping SAFplus Platform: &amp;lt;aspDir&amp;gt;/etc/init.d/asp===&lt;br /&gt;
Usage : asp {start|stop|restart|console|status|zap|help} [options]&lt;br /&gt;
&lt;br /&gt;
options can be one of the following : (these options only work with start command, e.g. etc/init.d/asp start -v etc.)&lt;br /&gt;
&lt;br /&gt;
-v                            :  Be verbose&lt;br /&gt;
--enforce-tipc-settings       :  Use etc/asp.conf's TIPC settings overriding the system TIPC settings&lt;br /&gt;
--ignore-tipc-settings        :  Use systems TIPC settings ignoring the etc/asp.conf's settings&lt;br /&gt;
--remove-persistent-db        :  Delete all of the SAFplus Platform persistent database files&lt;br /&gt;
--asp-log-level &amp;lt;level&amp;gt;       :  Start SAFplus Platform with particular log level. &amp;lt;level&amp;gt; is [trace|debug|info|notice|warning|error|critical]&lt;br /&gt;
&lt;br /&gt;
===CLI===&lt;br /&gt;
&lt;br /&gt;
====bin/asp_console====&lt;br /&gt;
SAFplus Platform console is a comprehensive CLI for examination and debugging of the SAFplus Platform system.  SAFplus Platform console documentation is available as a separate document.&lt;br /&gt;
&lt;br /&gt;
Start:&lt;br /&gt;
&amp;lt;aspDir&amp;gt;/etc/init.d/asp console&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;aspDir&amp;gt;/bin/asp_console&lt;br /&gt;
&lt;br /&gt;
====bin/asp_info====&lt;br /&gt;
The SAFplus Platform info CLI is a simple interface for display of SAFplus Platform status and basic control&lt;br /&gt;
&lt;br /&gt;
&amp;lt;aspDir&amp;gt;/bin/asp_info&lt;br /&gt;
&lt;br /&gt;
===Directly running a component: bin/asp_run===&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/sdkguide/commandref</id>
		<title>Doc:latest/sdkguide/commandref</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/sdkguide/commandref"/>
				<updated>2014-10-29T01:07:37Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: Reverted edits by MediaWiki spam cleanup (talk) to last revision by 176.8.88.41&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;http://www.buyxanaxitem.com/ xanax to buy - xanax&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/relnotes</id>
		<title>Doc:latest/relnotes</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/relnotes"/>
				<updated>2014-02-17T22:43:39Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Porting Prior Models to 6.1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Preface'''==&lt;br /&gt;
&lt;br /&gt;
Welcome to ''OpenClovis Release Notes''. This document provides information about the details of the platforms on which OpenClovis SAFplus Availability/Scalability Platform (the SAFplus Platform for short) and Integrated Development Environment (IDE) have been tested and validated for SDK Release 6.0. It contains the additional features and enhancements of the product since the previous release. It also summarizes the known issues and limitations of the product and provides workaround wherever applicable.&lt;br /&gt;
&lt;br /&gt;
===Key Topics===&lt;br /&gt;
&lt;br /&gt;
''OpenClovis Release Notes'' covers the following topics in details:&lt;br /&gt;
*Tested Platforms&lt;br /&gt;
*What Is New&lt;br /&gt;
*Migration To Latest Version&lt;br /&gt;
*Known Issues&lt;br /&gt;
*Environment Related Observation&lt;br /&gt;
*Documentation Issues&lt;br /&gt;
&lt;br /&gt;
===Audience===&lt;br /&gt;
&lt;br /&gt;
''OpenClovis Release Notes'' addresses system integrators, designers, and system architects. To use SAFplus Platform, you must be aware of the fundamentals of operation, management, and configuration of telecom and networking domains. You must also be familiar with C programming, UML notations, and have basic knowledge of Linux.&lt;br /&gt;
&lt;br /&gt;
===Documentation Conventions===&lt;br /&gt;
&lt;br /&gt;
This guide uses different fonts and symbols to differentiate between document elements and types of information. These conventions are summarized in the following table.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;  width=&amp;quot;680&amp;quot;&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Notation &lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Description&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|style=&amp;quot;color:black&amp;quot; |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Code&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This font denotes the C code provided in various examples.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|Cross reference&lt;br /&gt;
|&lt;br /&gt;
This font denotes a hyperlink. You can click on the hyperlink text to access the reference location, which can be either a section within the User Guide or a URL link. A cross reference refers to a section name and accesses the first page of that section.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Bold Text''' &lt;br /&gt;
|&lt;br /&gt;
Menu items and button names.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''''Italic Text''''' &lt;br /&gt;
|&lt;br /&gt;
Variables for which you enter values.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]This indicates the presence of notes or annotations, related to the context of the document.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Caution.png]]This indicates that certain precautionary measures must be taken before performing a particular task.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Info.png]]This indicates that additional information is provided to you.&lt;br /&gt;
&lt;br /&gt;
===Related Documents===&lt;br /&gt;
&lt;br /&gt;
For additional information about OpenClovis products, refer to the following guides:&lt;br /&gt;
* '''SAFplus Platform SA Forum Compliance''' describes the level of compliance of OpenClovis SAFplus Platform and its Application Programming Interface (API) with the relevant Service Availability Forum Specifications.&lt;br /&gt;
* '''SAFplus Platform Installation Guide''' provides the system requirements, installation procedure for OpenClovis SAFplus Platform, IDE, and the Evaluation System.&lt;br /&gt;
* '''SAFplus Platform Sample Application Tutorial''' explains the steps to create and build a sample model using OpenClovis IDE and OpenClovis SAFplus Platform. It also provides troubleshooting information for this process. This provides the logical first step in understanding the SAFplus Platform offering.&lt;br /&gt;
* '''SAFplus Platform Evaluation System User Guide''' provides all the required information to configure and run the sample models packaged within the Evaluation System. This document also provides good understanding of OpenClovis SAFplus Platform's functionality. This is the natural follow on to the ''OpenClovis Sample Application Tutorial'' as it builds on the example created in that document. &lt;br /&gt;
* '''SAFplus Platform SDK User Guide''' provides information about SAFplus Availability/Scalability Platform architecture, various SAFplus Platform components, and their interactions. This guide helps you to configure the OpenClovis SAFplus Platform components, compile, and execute the SAFplus Platform code to build your custom application.&lt;br /&gt;
* '''SAFplus Platform IDE User Guide''' describes the usage of Integrated Development Environment (IDE), a graphical development environment that complements the SAFplus Platform. This guide helps you to understand how to use the various features of the IDE to build the application.&lt;br /&gt;
* '''SAFplus Platform Log Tool User Guide''' provides information about the usage of OpenClovis Log Tool. OpenClovis Log Tool is an interactive utility that allows you to view binary log files in a readable format and hence monitor system errors, warnings, and other log information. Log Tool allows you to format the &amp;lt;code&amp;gt;.log&amp;lt;/code&amp;gt; files and filter them to view the required entries.&lt;br /&gt;
* '''SAFplus Platform API Reference Guide''' is provided for each component. It describes the Application Programming Interface (API), Service Model, and Management Information Model of the various OpenClovis Application Service Platform (SAFplus Platform) services. It helps the developer to understand the capabilities of the SAFplus Platform services and the APIs provided by these services.&lt;br /&gt;
* '''SAFplus Platform Console Reference Guide''' provides details about managing applications built on SAFplus Platform using the SAFplus Platform runtime debug console commands. SAFplus Platform Console commands can be used to manage, monitor, and test your application.&lt;br /&gt;
&lt;br /&gt;
===OpenClovis Online Technical Support===&lt;br /&gt;
&lt;br /&gt;
OpenClovis customers and partners can register on our Web site and receive personalized services and information. If you need any support or assistance while working on OpenClovis products, you can access the following: URL: http://www.openclovis.com. Send your queries to: support@openclovis.com. Open source community support is available at: http://www.openclovis.org/forum.&lt;br /&gt;
&lt;br /&gt;
===Documentation Feedback===&lt;br /&gt;
&lt;br /&gt;
We are interested in hearing from our customers on the documentation provided with the product. Let us know your comments and suggestions on improving the documentation at OpenClovis Inc. Send your comments to: support@openclovis.com. Or even better, edit (or comment in) the page on our documentation wiki located at [http://help.openclovis.com http://help.openclovis.com].&lt;br /&gt;
&lt;br /&gt;
=='''Tested Platforms'''==&lt;br /&gt;
&lt;br /&gt;
This chapter provides the details of the platforms on which OpenClovis SAFplus Platform have been tested and validated.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot; width=&amp;quot;800&amp;quot;&lt;br /&gt;
|+ align=&amp;quot;bottom&amp;quot; | '''Tested Platform Configurations''' &lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot; width=&amp;quot;150&amp;quot;| Platform&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Configuration&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Hardware&lt;br /&gt;
|&lt;br /&gt;
* ATCA 5U Chassis - Schroff, ASIS&lt;br /&gt;
* ATCA 12U Chassis - Schroff, Sanmina, HP, Sun Netra, Radisys, Huawei Tecal Server&lt;br /&gt;
* Pigeon Point Systems ShMM300 and ShMM500 based Shelf Controllers&lt;br /&gt;
* Radisys Promentum 60x0 and its 2100 Switch/Shelf Controller blades&lt;br /&gt;
* CPU Blades:&lt;br /&gt;
** Intel Xeon based server cards&lt;br /&gt;
** Intel Pentium and Xeon based desktops and rack mount servers (RMS)&lt;br /&gt;
** Intel Itanium based RMS&lt;br /&gt;
** AMD Opteron based ATCA cards&lt;br /&gt;
** AMD Opteron and Athlon based desktops&lt;br /&gt;
** PowerPC based AMCs&lt;br /&gt;
** PowerPC based desktops&lt;br /&gt;
** Huawei Tecal BH23&lt;br /&gt;
** Sun 3020 and 3090&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Software&lt;br /&gt;
|&lt;br /&gt;
* Wind River PNE-LE 1.2 (2.6.10 kernel) on CPU blades&lt;br /&gt;
* Wind River PNE-LE 1.3 (2.6.14 kernel) on CPU blades&lt;br /&gt;
* Wind River PNE-LE 1.4 (2.6.14 kernel) on CPU blades&lt;br /&gt;
* Wind River PNE-LE 2.0 (2.6.21 kernel) on CPU blades&lt;br /&gt;
* MontaVista Linux Carrier Grade Edition 5.0 (2.6.21 kernel)on CPU Blades&lt;br /&gt;
* QNX Neutrino RTOS 6.3.2&lt;br /&gt;
* Pigeon Point Systems Shelf Manager version 2.2.1 on ShMM300, ShMM500&lt;br /&gt;
* SCM software version 1.7 on ATCA 2100 Shelf Manager&lt;br /&gt;
* OpenHPI 2.8.1 and 2.10.2&lt;br /&gt;
* Radisys HPI Client Library (HCL) version 1.1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For more details on the hardware and software requirements and the steps to install OpenClovis SAFplus Platform and IDE, refer to ''OpenClovis Installation Guide''.&lt;br /&gt;
&lt;br /&gt;
=='''What Is New'''==&lt;br /&gt;
&lt;br /&gt;
This chapter outlines the new features and enhancements provided by OpenClovis SAFplus Platform and IDE for all releases.&lt;br /&gt;
&lt;br /&gt;
===New In Release 6.1===&lt;br /&gt;
&lt;br /&gt;
* Management Transformation:  The SAFplus management is deprecated and replaced with an add-on product that supports NETCONF, SNMP, and CLI access.  &lt;br /&gt;
&lt;br /&gt;
* Multi-language code generation and support: Applications can generate C, C++, or Python code. Language-specific wrappers are provided for many SAFplus services.&lt;br /&gt;
&lt;br /&gt;
* Support for gcc 4.8: Compilation errors/warnings fixed&lt;br /&gt;
&lt;br /&gt;
* C++ compilation:  SAFplus can compiled with the C or C++ (gcc or g++) compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Porting Prior Models to 6.1 ====&lt;br /&gt;
&lt;br /&gt;
The changes in 6.1 mean that 6.0 models will not compile without modification.  However, the required changes are simple and so your model can be fixed in minutes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Problem: clCompCfg.c:39:1: error: too many initializers for ClEoConfigT&lt;br /&gt;
&lt;br /&gt;
 Remove the first initializer:&lt;br /&gt;
    COMP_EO_NAME,               /* EO Name                                  */&lt;br /&gt;
&lt;br /&gt;
* Problem: undefined symbol: ClNameT.  &lt;br /&gt;
&lt;br /&gt;
 Convert all your references to SaNameT -- it is the exact same structure&lt;br /&gt;
&lt;br /&gt;
* Problem: CL_DEBUG_XXXX was not declared in this scope.&lt;br /&gt;
&lt;br /&gt;
 Change the symbol to CL_LOG_SEV_XXXX.&lt;br /&gt;
&lt;br /&gt;
===New In Release 6.0===&lt;br /&gt;
&lt;br /&gt;
'''SAF Message Service'''&lt;br /&gt;
* Optimization: The SAF message service now operates using a peer-to-peer instead of client-server model, resulting in a 400% speedup and reduced network utilization.&lt;br /&gt;
* Additional features:  Persistent message queues are always stored off-node and will not lose messages during application or node failures.  The SAF standard allows node failures to lose messages in persistent queues.&lt;br /&gt;
&lt;br /&gt;
'''Availability Management Framework'''&lt;br /&gt;
* 1+N system controller redundancy:  More then 2 system controllers are now supported.  &lt;br /&gt;
* Custom redundancy model:  Our SAF-extension &amp;quot;Custom&amp;quot; redundancy model allows the application to chose Active/Standby pairing.&lt;br /&gt;
&lt;br /&gt;
'''Platform Support Package'''&lt;br /&gt;
* HPI event filter plugin:  A facility was created to intercept, analyze and modify or squelch HPI events before they are handled by the SAFplus Platform.  Since it is implemented as a plug-in to our chassis manager, this feature does not affect the latency of our fast-path event handling.&lt;br /&gt;
* OpenHPI 3.0 is now the default HPI package&lt;br /&gt;
* The HPI dynamic simulator is fully supported, with OpenClovis extensions that generate HPI events if a threshold is changed so that the simulated sensor value falls outside of the nominal range.&lt;br /&gt;
&lt;br /&gt;
'''Messaging Layer'''&lt;br /&gt;
* The messaging subsystem used by SAFplus Platform has been converted to a plug-in, allowing the user to implement different transport mechanisms.&lt;br /&gt;
* UDP and TIPC plugins are now supported with the default set to TIPC as before*.&lt;br /&gt;
&lt;br /&gt;
'''Leader Election'''&lt;br /&gt;
* Cluster leader election is now based on results from the messaging layer (i.e. from TIPC) rather then running an independent algorithm.&lt;br /&gt;
&lt;br /&gt;
'''*''' Note: This feature is not yet supported by the IDE, but can be enabled by changing configuration files.&lt;br /&gt;
&lt;br /&gt;
==== Release 6.0 Patch 201212102041 Dec 10,2012 ====&lt;br /&gt;
&lt;br /&gt;
* Changes to support Emerson HPI (along with the existing OpenHPI and Radisys) for users of the Platform Support Package&lt;br /&gt;
&lt;br /&gt;
* Removed accidental inclusion of OpenHPI header files, even when HPI is not selected.  Note: this will cause a compile error in the auto-generated file src/config/clCmResourceDeps.c.  The fix is to add the following #ifdef near the top of the file (and #endif at the end):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;clCmApi.h&amp;gt;&lt;br /&gt;
#ifdef CL_USE_CHASSIS_MANAGER&lt;br /&gt;
#include &amp;lt;SaHpi.h&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Additionally, add the following line to the top of src/config/Makefile:&lt;br /&gt;
include $(CLOVIS_ROOT)/SAFplus/mk/preface.mk&lt;br /&gt;
&lt;br /&gt;
This will ensure that CL_USE_CHASSIS_MANAGER is defined if required.&lt;br /&gt;
&lt;br /&gt;
Theses file will be automatically corrected if you regenerate the code from within the IDE.&lt;br /&gt;
&lt;br /&gt;
* Updated the &amp;quot;eval&amp;quot; (tutorial) model to work with the 6.0 release.  It is located in src/examples/eval.&lt;br /&gt;
&lt;br /&gt;
===New In Release 5.0===&lt;br /&gt;
&lt;br /&gt;
====General Features====&lt;br /&gt;
&lt;br /&gt;
* '''Support for Wind River PNELE 2.0''': OpenClovis SDK can seamlessly build SAFplus Platform and binaries for Wind River Platform for Network Equipment Linux Edition 2.0 on all supported SDK platforms, either using the build tool-chain of OpenClovis or of the development environment of Wind River.&lt;br /&gt;
&lt;br /&gt;
====High Availability (HA)====&lt;br /&gt;
&lt;br /&gt;
*'''ISSU - In Service Software Upgrade'''&lt;br /&gt;
Supports middleware upgrade in a rolling (in-service) or single-step mode.&lt;br /&gt;
&lt;br /&gt;
'''Single-Step'''&lt;br /&gt;
For deployment of non-backwards compatible software, or rapid deployment of software.  This method stops the relevant services on all nodes (causing an outage) and then upgrades that software and restarts.  Note that services are stopped at various granularity levels depending on what is being upgraded.  In other words, application A can be taken out-of-service and upgraded across the cluster without affecting application B running on the same nodes.&lt;br /&gt;
&lt;br /&gt;
'''Inservice Rolling'''&lt;br /&gt;
This is the most commonly known telecom quality upgrade method.  For deployment of backwards-compatible software across the cluster, this method stops service in one &amp;quot;upgrade unit&amp;quot; at a time, upgrades the software and restarts before stopping the next &amp;quot;upgrade unit&amp;quot;.  This process continues iteratively until the entire cluster is upgraded.  Since the available redundant capacity takes over for the unit being upgraded service will be unaffected.&lt;br /&gt;
&lt;br /&gt;
====Infrastructure and Communications====&lt;br /&gt;
&lt;br /&gt;
====Group Membership Service (GMS) over TIPC====&lt;br /&gt;
&lt;br /&gt;
By default GMS/openais is now compiled to run over TIPC.&lt;br /&gt;
&lt;br /&gt;
====SAF Message Service====&lt;br /&gt;
&lt;br /&gt;
SAF messaging data types and APIs supported by OpenClovis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''classes/types:'''&lt;br /&gt;
&lt;br /&gt;
*SaMsgMessageT&lt;br /&gt;
*SaMsgHandleT&lt;br /&gt;
*SaMsgQueueStatusT&lt;br /&gt;
*SaMsgQueueHandleT&lt;br /&gt;
*SaMsgSenderIdT&lt;br /&gt;
*SaMsgQueueCreationAttributesT&lt;br /&gt;
*SaMsgQueueOpenFlagsT&lt;br /&gt;
*SaMsgQueueGroupPolicyT&lt;br /&gt;
*SaMsgQueueGroupNotificationBufferT&lt;br /&gt;
*SaMsgQueueGroupNotificationT&lt;br /&gt;
*SaMsgQueueUsageT&lt;br /&gt;
*SaMsgCallbacksT&lt;br /&gt;
*SaMsgMessageReceivedCallbackT&lt;br /&gt;
&lt;br /&gt;
*'''APIs:'''&lt;br /&gt;
&lt;br /&gt;
*saMsgMessageSend&lt;br /&gt;
*saMsgMessageSendAsync&lt;br /&gt;
*saMsgQueueOpen&lt;br /&gt;
*saMsgQueueClose&lt;br /&gt;
*saMsgQueueStatusGet&lt;br /&gt;
*saMsgMessageGet&lt;br /&gt;
*saMsgMessageDataFree&lt;br /&gt;
*saMsgQueueGroupCreate&lt;br /&gt;
*saMsgQueueGroupInsert&lt;br /&gt;
*saMsgQueueGroupTrack&lt;br /&gt;
*saMsgQueueGroupNotificationFree&lt;br /&gt;
*saMsgInitialize&lt;br /&gt;
*saMsgFinalize&lt;br /&gt;
*saMsgDispatch&lt;br /&gt;
&lt;br /&gt;
====SAF Component cleanup script support====&lt;br /&gt;
&lt;br /&gt;
5.0 introduces support to configure cleanup commands for SA-AWARE components using the Openclovis IDE. The cleanup command is invoked by AMF on component cleanup or abrupt terminations.&lt;br /&gt;
&lt;br /&gt;
===System Management===&lt;br /&gt;
&lt;br /&gt;
*Support of net-snmp 5.4.2.&lt;br /&gt;
*SNMP Traps in 64 Bit architectures.&lt;br /&gt;
&lt;br /&gt;
===Platform Management===&lt;br /&gt;
&lt;br /&gt;
OpenClovis SAFplus Platform provides pre-integrated support for commonly used ATCA platforms. All service affecting events reported by the shelf manager via HPI are intercepted and service on affected hardware is migrated to standby equipment, ensuring continuity of service. &lt;br /&gt;
&lt;br /&gt;
This support is provided with the '''Platform Support Package (PSP)''' for Piegon Point Shelf manager 500ShMM via openHPI. &lt;br /&gt;
&lt;br /&gt;
PSP is available as a separate product, please contact OpenClovis Sales for further information.&lt;br /&gt;
&lt;br /&gt;
===Features of OpenClovis IDE===&lt;br /&gt;
&lt;br /&gt;
* '''Running SAFplus Platform without manageability components''': IDE is having the support for enable/disable SAFplus Platform components. For more information refer to ''OpenClovis IDE User Guide''.&lt;br /&gt;
* '''AMF Clean-up script''': IDE is having support to specify the cleanup command in SAF Component. For more information refer to ''OpenClovis IDE User Guide''.&lt;br /&gt;
* '''Versioning the Configuration Files''': IDE is having support for versioning the configuration files.&lt;br /&gt;
* '''SAF Messaging''': IDE is having support to enable the SAF messaging. For more information refer to ''OpenClovis IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===SAFplus Platform Run-Time Director===&lt;br /&gt;
&lt;br /&gt;
A new product, the SAFplus Platform Run-Time Director(ARD), provides cluster management of the SAFplus Platform via a web interface.  This new product is available separately, please contact OpenClovis for demonstration and evaluation.  The ARD has the following features:&lt;br /&gt;
&lt;br /&gt;
* Software Distribution:  Allows individual applications to be packaged in a &amp;quot;bundle&amp;quot; and be deployed to any set of nodes in the cluster.&lt;br /&gt;
* Inservice Software Upgrade: Supports application upgrade in a rolling (in-service) or single-step mode. &lt;br /&gt;
* WYSIWYG: Provides intuitive cluster management via an HTTP (web) interface.&lt;br /&gt;
* AJAX: Displays all SAF AMF entities and their current status -- uses asynchronous Javascript requests to dynamically update browser when changes occur.&lt;br /&gt;
* Dynamic AMF:  Allows modification of AMF entity state and supports creation/deletion of AMF entities.&lt;br /&gt;
* High Availability:  The ARD runs in unprotected or 2N redundancy mode.&lt;br /&gt;
* Python AMF API:  Provides an easy-to-use CLI/programmatic API for cluster management&lt;br /&gt;
* Easy installation:  The ARD can install itself into a running SAFplus Platform model, and therefore requires no changes to your existing model.&lt;br /&gt;
* Extensible: The ARD is built on top of TurboGears, a popular open source web mega-framework.  Thus it provides a basis and example for your custom SaaS or EMS project.&lt;br /&gt;
* Integration of Platform Support Package (PSP), provides chassis configuration through OpenHPI.&lt;br /&gt;
&lt;br /&gt;
===OpenClovis Documentation===&lt;br /&gt;
&lt;br /&gt;
* OpenClovis Documentation is provided in two formats now, PDF and HTML. They both contain the same information.&lt;br /&gt;
* A new ''OpenClovis SA Forum Compliance'' document has been added&lt;br /&gt;
* As a courtesy, all relevant SA Forum specifications are supplied as part of our OpenClovis documentation package (only in PDF format).&lt;br /&gt;
* A new ''OpenClovis Sample Application Tutorial'' has been added, replacing the former Modeling Tutorial. The new document provides explanation for the various steps involved in creating and running a new application.&lt;br /&gt;
* The ''OpenClovis SDK User Guide'' has been extended to cover many additional topics, including:&lt;br /&gt;
** Communication infrastructure&lt;br /&gt;
** Hardware platform support&lt;br /&gt;
** How to debug SAFplus Platform based applications&lt;br /&gt;
** Build and deployment&lt;br /&gt;
* The ''OpenClovis API Reference Guide'' has been significantly revised:&lt;br /&gt;
** Numerous coding examples&lt;br /&gt;
** New reference pages for API error codes for easy lookup&lt;br /&gt;
** HTML version of API Refernce Guide is heavily cross-referenced, allowing easy navigation between the various programming construcs&lt;br /&gt;
* New, complete ''OpenClovis SAFplus Platform Console Reference Guide'' as a separate document&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]]From this release, the ''Debug CLI'' has been renamed to ''SAFplus Platform Console''.&lt;br /&gt;
&lt;br /&gt;
=='''Migration To Latest Version'''==&lt;br /&gt;
&lt;br /&gt;
Migration of a project or model from an earlier version of the OpenClovis IDE to the most recent version is performed automatically when the model it opened for the first time in the newer vesion. The IDE auto-detects the project's version and changes the internal files so that the information is in valid format and can be read by the current version. It also provides an option to create a backup of the project while performing the migration. For more information, refer to ''OpenClovis IDE User Guide'', Section ''Migrating Project''. IDE supports migration from R2.3 and above.&lt;br /&gt;
&lt;br /&gt;
Any issues regarding migration from a previous version of the IDE are documented below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Change in Log File Locations===&lt;br /&gt;
&lt;br /&gt;
As of release 3.0 all SAFplus Platform runtime log files are created in the &amp;lt;code&amp;gt;var/log&amp;lt;/code&amp;gt; subdirectory of the SAFplus Platform install directory. It is recommended that you update existing models to also use this directory. To update an existing model edit the clLog.xml file in the model's src/config directory. Change all references of '''.:log''' in the &amp;lt;code&amp;gt;&amp;lt;fileLocation&amp;gt;&amp;lt;/code&amp;gt; elements&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;fileLocation&amp;gt;.:log&amp;lt;/fileLocation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to '''.:var/log'''&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;fileLocation&amp;gt;.:var/log&amp;lt;/fileLocation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the model is rebuilt and deployed these new settings will take effect.&lt;br /&gt;
&lt;br /&gt;
===gmsConfig.xml file===&lt;br /&gt;
&lt;br /&gt;
Models of R2.3 may not contain the gmsConfig.xml file if GMS configuration is not done. If you migrate this project you will get error message saying that Migration was unable to create this file. But this is not going to affect further use of model. Model will be OK and user can make changes to it from IDE, generate source, build it, etc without any problem.&lt;br /&gt;
&lt;br /&gt;
Although this error is not going to affect the functionality of the model, there is a work around for this. Before migrating your model, just open up the model in your old IDE setup. Launch &amp;quot;SAFplus Platform Component Configuration&amp;quot; dialog from the Clovis menu. Press OK. Now just migrate the model with new IDE setup, you will not get this error. Bug has been raised for this and it will be fixed in next release.&lt;br /&gt;
&lt;br /&gt;
=='''Known Issues'''==&lt;br /&gt;
&lt;br /&gt;
This chapter describes the known issues in the current release and provides the associated workarounds. These issues arise due to deviation from the normal functioning of the system or as a result of an unexpected behavior of a component or a service.&lt;br /&gt;
&lt;br /&gt;
===Known Issues of OpenClovis SAFplus Platform===&lt;br /&gt;
&lt;br /&gt;
Following are the known issues for OpenClovis SAFplus Platform:&lt;br /&gt;
&lt;br /&gt;
*'''Infrastructure and Communications'''&lt;br /&gt;
** '''TIPC address:''' TIPC with 1.5.12 versions was found to give problems (link unstable) when you have 2 different TIPC netids configured for the same TIPC address. This issue is not seen with the 1.7.x TIPC releases, but in general we recommend you to keep the TIPC addresses unique and not collide with the same addresses on nodes configured with different TIPC netids. One of the symptoms  of this is that the TIPC link between 2 machine starts going UP and DOWN continuously when there is another machine in the network, whose TIPC address is conflicting with address of one of those 2 machines. The behavior can be observed through continuous execution of command &amp;quot;tipc-config -l&amp;quot; or through &amp;quot;dmesg&amp;quot;.&lt;br /&gt;
** In general, TIPC 1.5.XX has been found to be unstable, especially under high multicast load, and should not be used in production environments.&lt;br /&gt;
&lt;br /&gt;
** '''Bug ID #7269'''  A cluster having a mixture of 32bit little endian, 32bit big endian and 64 bit little endian machines/nodes may find that the GMS service in inadvertently terminates.&lt;br /&gt;
*** '''Workaround''' - None&lt;br /&gt;
** '''aspinfo known issues:''' (1) On some systems, especially systems with Python version 2.3, aspinfo can be slow to respond. (2) Some corner cases may not be properly handled and aspinfo may prematurely exit, dumping its Python stack.&lt;br /&gt;
&lt;br /&gt;
* '''System Management'''&lt;br /&gt;
** '''Bug ID #7313''' If an Alarm Server is restarted after it published an alarm, it won't allow to clear/publish that alarm again.&lt;br /&gt;
*** '''Workaround''' - Currently there is no workaround.&lt;br /&gt;
&lt;br /&gt;
* '''SAF Compliance'''&lt;br /&gt;
** '''Deviation from SAF in Event Service:''' Event Service does not yet support Event Retention as specified in SAF specification. The retention time specified in the clEventPublish() API would have no effect.&lt;br /&gt;
** '''Bug in SAF specificaion B11:''' The clEventDataGet() API of Event Service is in compliance with the SAF specification B11. This allows the user to either allocate memory for the event payload or obtain it from the API by passing a pointer. The latter is not possible with this API as the argument needs to be a pointer to a pointer which is not the case. As per the new specification and the recommended way the user is always required to allocate and free the memory.&lt;br /&gt;
&lt;br /&gt;
===Known Issues of OpenClovis IDE===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Bug ID # 6543: X Error in Ubuntu Installation.''' Starting the IDE in '''Ubuntu''' installation may result some X errors in the console. This is not an IDE issue, this will not affect any of the IDE functionalities.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Workaround''' - See the ''Limitations'' section of the ''OpenClovis IDE User Guide''.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SNMP MIB Enumerated Integer Construct Limitations''': During SNMP code generation all enumerated integer labels are converted to &amp;lt;code&amp;gt;#define&amp;lt;/code&amp;gt; statements. The constant names used in these statements are the enumerated integer labels converted to upper case. Because of this the all labels used within an enumerated integer construct must be unique regardless of case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''SNMP MIB V1 TRAP-TYPE Construct Not Supported''': Due to an issue in the Net-SNMP mib2c compiler code generation for MIBs using the V1 TRAP-TYPE construct does not work properly.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Workaround''' - To generate trap code from an SNMP MIB use the SNMP V2 NOTIFICATION-TYPE construct.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Known Issues of Install Package===&lt;br /&gt;
&lt;br /&gt;
* '''Bug ID # 6749: Potential conflict with net-snmp package on local system''': In certain rare instances, building OpenHPI from the included third-party packages during SDK installation fails owing to a conflict with an already-installed version of NetSNMP on the system.  In these instances, it is recommended that NetSNMP be removed from the local system before installing OpenClovis SDK, and that it be reinstalled after completing the SDK installation.&lt;br /&gt;
&lt;br /&gt;
* '''Installation on Red Hat Enterprise 4''': On a Red Hat Enterprise Linux 4 system, the 'Development Tools' subset of packages must be installed to cover the requirements for installing OpenClovis SDK.  In general, an installation with the default package set contains all requirements for installation.&lt;br /&gt;
&lt;br /&gt;
* '''Installation on Fedora Core 6''': On a Fedora Core 6 system, installation of OpenClovis SAFplus Platform automatically builds and installs the TIPC opensource package.  To build TIPC, the kernel headers must be present and so these are automatically installed (by our ./preinstall-fedora-core.sh script) using the &amp;quot;yum install kernel-devel&amp;quot; command.  On rare configurations, this command does not work correctly.  It is supposed to install headers so that the symbolic link located at &amp;quot;/lib/modules/`uname -r`/build&amp;quot; points to a valid directory of Linux header files.  However, on some systems this symbolic link points to &amp;quot;/usr/src/kernels/2.6.22.14-72.fc6-i586&amp;quot; but the headers are actually installed in &amp;quot;/usr/src/kernels/2.6.22.14-72.fc6-i686&amp;quot;  (note 'i586' vs 'i686').  To resolve this problem, change the symbolic link to point to the correct directory name, and then restart the OpenClovis SAFplus Platform installation.&lt;br /&gt;
&lt;br /&gt;
* '''Configuring TIPC and assigning the SAFplus Platform node address''' to an OpenClovis SAFplus Platform is done by SAFplus Platform start up script. But if manual configuration of TIPC is allowed.  Misconfiguration (such as assigning 2 nodes the same TIPC address) will result in an unstable system. When this happens the whole system (all the SAFplus Platform nodes including the ones which are already up and running properly) have to be brought down, the TIPC kernel driver unloaded (to remove its configuration) and the system restarted.&lt;br /&gt;
&lt;br /&gt;
* '''Installation of SQLite using Preinstall script''': The Preinstall script installs SQLite by default as database engine. It locates SQLite - if it is already installed - without verifying version number. If its version is older than 3.3.13, then SAFplus Platform will fail to start.&lt;br /&gt;
** '''Workaround''' - Use SQLite 3.3.13 or newer. The source code can be downloaded from http://www.sqlite.org/download.html. The user can install the latest version of SQLite if its not present in the repository.&lt;br /&gt;
&lt;br /&gt;
* '''Installation on Solaris 10/SPARC (beta)''': Installation of OpenClovis SAFplus Platform requires the following third party packages installed via either installation media or using pkgadd with packages obtained from http://www.sunfreeware.com/.  Missing third-party packages may cause unpredictable behavior during installation and SDK use.&lt;br /&gt;
** db-4.2.52&lt;br /&gt;
** fileutils&lt;br /&gt;
** flex&lt;br /&gt;
** gcc-3.4.2&lt;br /&gt;
** gdbm-1.8.3&lt;br /&gt;
** glib-2.14.1&lt;br /&gt;
** gmake&lt;br /&gt;
** gtar&lt;br /&gt;
** libintl&lt;br /&gt;
** libiconv&lt;br /&gt;
** ncurses&lt;br /&gt;
** openssl&lt;br /&gt;
** pkgconfig&lt;br /&gt;
** python-2.5.1&lt;br /&gt;
** readline&lt;br /&gt;
** snprintf&lt;br /&gt;
** tipc-solaris-1.7.5 or SUNWtipc&lt;br /&gt;
** SUNWbtool&lt;br /&gt;
** SUNWsprot&lt;br /&gt;
** SUNWhea&lt;br /&gt;
** wget&lt;br /&gt;
&lt;br /&gt;
=='''Environment Related Observation'''==&lt;br /&gt;
&lt;br /&gt;
* '''Bug ID #7549''' When SAFplus Platform is running in non simulation mode, if SAFplus Platform is started from one sandbox, then it can be stopped/zapped from another sandbox.&lt;br /&gt;
&lt;br /&gt;
===Enabled Firewall Can Cause SAFplus Platform to Shutdown===&lt;br /&gt;
The enablement of a firewall on a system running a deployed SAFplus Platform image can cause the software to shutdown. An indication that you may be running into this problem is if you see an entry similar to the following in your log file (in the log file it is one line):&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Sep 26 15:06:54 2007   (SCNodeI0.10499 : GMS.---.---.00036 :  ERROR)&lt;br /&gt;
   [clGmsEngine.c:448] No nodes in the cluster view to run leader &lt;br /&gt;
   electionLeader Election Aborted&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
To resolve this problem disable all filtering in the Netfilter framework by issuing the following command.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
iptables -F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reusing A Project Area With New Version of OpenClovis SDK===&lt;br /&gt;
Every Project Area is associated with an installation of OpenClovis SDK at a given location.  If one elects to reinstall the SDK at a different location or install a newer version at a different location, the project area will stay associated with the original SDK location.  This allows one to work with multiple versions of the SDK simultaneously.&lt;br /&gt;
In order to use an existing project area with a different or moved installation of OpenClovis SDK, remove the &amp;lt;code&amp;gt;.config&amp;lt;/code&amp;gt; file from your project area directory and re-run &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; as you normally would to work with a model.&lt;br /&gt;
&lt;br /&gt;
===Running Multiple SAFplus Platform Clusters in the same Subnet===&lt;br /&gt;
If you are running multiple SAFplus Platform clusters within the same subnet, please ensure that the &amp;lt;code&amp;gt;TIPC network ID&amp;lt;/code&amp;gt; selected for each cluster is unique.&lt;br /&gt;
&lt;br /&gt;
=='''Documentation Issues'''==&lt;br /&gt;
&lt;br /&gt;
This chapter describes the known issues with the OpenClovis Documentation shipped along with the product.&lt;br /&gt;
&lt;br /&gt;
* Formatting issues&lt;br /&gt;
** Following cross-references pointing to a heading, the PDF viewer will jump to the end of the previous page if the heading is on the top of a page.&lt;br /&gt;
** Firefox web browsers sometimes do not correctly jump to intra-page anchors when the user clicks on a reference. This is a known issue with Firefox. The workaround is to click on Back button and then on the reference again. The browser jumps to the correct position for the 2nd time.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/relnotes</id>
		<title>Doc:latest/relnotes</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/relnotes"/>
				<updated>2014-02-17T22:43:23Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Porting Prior Models to 6.1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Preface'''==&lt;br /&gt;
&lt;br /&gt;
Welcome to ''OpenClovis Release Notes''. This document provides information about the details of the platforms on which OpenClovis SAFplus Availability/Scalability Platform (the SAFplus Platform for short) and Integrated Development Environment (IDE) have been tested and validated for SDK Release 6.0. It contains the additional features and enhancements of the product since the previous release. It also summarizes the known issues and limitations of the product and provides workaround wherever applicable.&lt;br /&gt;
&lt;br /&gt;
===Key Topics===&lt;br /&gt;
&lt;br /&gt;
''OpenClovis Release Notes'' covers the following topics in details:&lt;br /&gt;
*Tested Platforms&lt;br /&gt;
*What Is New&lt;br /&gt;
*Migration To Latest Version&lt;br /&gt;
*Known Issues&lt;br /&gt;
*Environment Related Observation&lt;br /&gt;
*Documentation Issues&lt;br /&gt;
&lt;br /&gt;
===Audience===&lt;br /&gt;
&lt;br /&gt;
''OpenClovis Release Notes'' addresses system integrators, designers, and system architects. To use SAFplus Platform, you must be aware of the fundamentals of operation, management, and configuration of telecom and networking domains. You must also be familiar with C programming, UML notations, and have basic knowledge of Linux.&lt;br /&gt;
&lt;br /&gt;
===Documentation Conventions===&lt;br /&gt;
&lt;br /&gt;
This guide uses different fonts and symbols to differentiate between document elements and types of information. These conventions are summarized in the following table.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;  width=&amp;quot;680&amp;quot;&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Notation &lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Description&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|style=&amp;quot;color:black&amp;quot; |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Code&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This font denotes the C code provided in various examples.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|Cross reference&lt;br /&gt;
|&lt;br /&gt;
This font denotes a hyperlink. You can click on the hyperlink text to access the reference location, which can be either a section within the User Guide or a URL link. A cross reference refers to a section name and accesses the first page of that section.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Bold Text''' &lt;br /&gt;
|&lt;br /&gt;
Menu items and button names.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''''Italic Text''''' &lt;br /&gt;
|&lt;br /&gt;
Variables for which you enter values.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]This indicates the presence of notes or annotations, related to the context of the document.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Caution.png]]This indicates that certain precautionary measures must be taken before performing a particular task.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Info.png]]This indicates that additional information is provided to you.&lt;br /&gt;
&lt;br /&gt;
===Related Documents===&lt;br /&gt;
&lt;br /&gt;
For additional information about OpenClovis products, refer to the following guides:&lt;br /&gt;
* '''SAFplus Platform SA Forum Compliance''' describes the level of compliance of OpenClovis SAFplus Platform and its Application Programming Interface (API) with the relevant Service Availability Forum Specifications.&lt;br /&gt;
* '''SAFplus Platform Installation Guide''' provides the system requirements, installation procedure for OpenClovis SAFplus Platform, IDE, and the Evaluation System.&lt;br /&gt;
* '''SAFplus Platform Sample Application Tutorial''' explains the steps to create and build a sample model using OpenClovis IDE and OpenClovis SAFplus Platform. It also provides troubleshooting information for this process. This provides the logical first step in understanding the SAFplus Platform offering.&lt;br /&gt;
* '''SAFplus Platform Evaluation System User Guide''' provides all the required information to configure and run the sample models packaged within the Evaluation System. This document also provides good understanding of OpenClovis SAFplus Platform's functionality. This is the natural follow on to the ''OpenClovis Sample Application Tutorial'' as it builds on the example created in that document. &lt;br /&gt;
* '''SAFplus Platform SDK User Guide''' provides information about SAFplus Availability/Scalability Platform architecture, various SAFplus Platform components, and their interactions. This guide helps you to configure the OpenClovis SAFplus Platform components, compile, and execute the SAFplus Platform code to build your custom application.&lt;br /&gt;
* '''SAFplus Platform IDE User Guide''' describes the usage of Integrated Development Environment (IDE), a graphical development environment that complements the SAFplus Platform. This guide helps you to understand how to use the various features of the IDE to build the application.&lt;br /&gt;
* '''SAFplus Platform Log Tool User Guide''' provides information about the usage of OpenClovis Log Tool. OpenClovis Log Tool is an interactive utility that allows you to view binary log files in a readable format and hence monitor system errors, warnings, and other log information. Log Tool allows you to format the &amp;lt;code&amp;gt;.log&amp;lt;/code&amp;gt; files and filter them to view the required entries.&lt;br /&gt;
* '''SAFplus Platform API Reference Guide''' is provided for each component. It describes the Application Programming Interface (API), Service Model, and Management Information Model of the various OpenClovis Application Service Platform (SAFplus Platform) services. It helps the developer to understand the capabilities of the SAFplus Platform services and the APIs provided by these services.&lt;br /&gt;
* '''SAFplus Platform Console Reference Guide''' provides details about managing applications built on SAFplus Platform using the SAFplus Platform runtime debug console commands. SAFplus Platform Console commands can be used to manage, monitor, and test your application.&lt;br /&gt;
&lt;br /&gt;
===OpenClovis Online Technical Support===&lt;br /&gt;
&lt;br /&gt;
OpenClovis customers and partners can register on our Web site and receive personalized services and information. If you need any support or assistance while working on OpenClovis products, you can access the following: URL: http://www.openclovis.com. Send your queries to: support@openclovis.com. Open source community support is available at: http://www.openclovis.org/forum.&lt;br /&gt;
&lt;br /&gt;
===Documentation Feedback===&lt;br /&gt;
&lt;br /&gt;
We are interested in hearing from our customers on the documentation provided with the product. Let us know your comments and suggestions on improving the documentation at OpenClovis Inc. Send your comments to: support@openclovis.com. Or even better, edit (or comment in) the page on our documentation wiki located at [http://help.openclovis.com http://help.openclovis.com].&lt;br /&gt;
&lt;br /&gt;
=='''Tested Platforms'''==&lt;br /&gt;
&lt;br /&gt;
This chapter provides the details of the platforms on which OpenClovis SAFplus Platform have been tested and validated.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot; width=&amp;quot;800&amp;quot;&lt;br /&gt;
|+ align=&amp;quot;bottom&amp;quot; | '''Tested Platform Configurations''' &lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot; width=&amp;quot;150&amp;quot;| Platform&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Configuration&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Hardware&lt;br /&gt;
|&lt;br /&gt;
* ATCA 5U Chassis - Schroff, ASIS&lt;br /&gt;
* ATCA 12U Chassis - Schroff, Sanmina, HP, Sun Netra, Radisys, Huawei Tecal Server&lt;br /&gt;
* Pigeon Point Systems ShMM300 and ShMM500 based Shelf Controllers&lt;br /&gt;
* Radisys Promentum 60x0 and its 2100 Switch/Shelf Controller blades&lt;br /&gt;
* CPU Blades:&lt;br /&gt;
** Intel Xeon based server cards&lt;br /&gt;
** Intel Pentium and Xeon based desktops and rack mount servers (RMS)&lt;br /&gt;
** Intel Itanium based RMS&lt;br /&gt;
** AMD Opteron based ATCA cards&lt;br /&gt;
** AMD Opteron and Athlon based desktops&lt;br /&gt;
** PowerPC based AMCs&lt;br /&gt;
** PowerPC based desktops&lt;br /&gt;
** Huawei Tecal BH23&lt;br /&gt;
** Sun 3020 and 3090&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Software&lt;br /&gt;
|&lt;br /&gt;
* Wind River PNE-LE 1.2 (2.6.10 kernel) on CPU blades&lt;br /&gt;
* Wind River PNE-LE 1.3 (2.6.14 kernel) on CPU blades&lt;br /&gt;
* Wind River PNE-LE 1.4 (2.6.14 kernel) on CPU blades&lt;br /&gt;
* Wind River PNE-LE 2.0 (2.6.21 kernel) on CPU blades&lt;br /&gt;
* MontaVista Linux Carrier Grade Edition 5.0 (2.6.21 kernel)on CPU Blades&lt;br /&gt;
* QNX Neutrino RTOS 6.3.2&lt;br /&gt;
* Pigeon Point Systems Shelf Manager version 2.2.1 on ShMM300, ShMM500&lt;br /&gt;
* SCM software version 1.7 on ATCA 2100 Shelf Manager&lt;br /&gt;
* OpenHPI 2.8.1 and 2.10.2&lt;br /&gt;
* Radisys HPI Client Library (HCL) version 1.1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For more details on the hardware and software requirements and the steps to install OpenClovis SAFplus Platform and IDE, refer to ''OpenClovis Installation Guide''.&lt;br /&gt;
&lt;br /&gt;
=='''What Is New'''==&lt;br /&gt;
&lt;br /&gt;
This chapter outlines the new features and enhancements provided by OpenClovis SAFplus Platform and IDE for all releases.&lt;br /&gt;
&lt;br /&gt;
===New In Release 6.1===&lt;br /&gt;
&lt;br /&gt;
* Management Transformation:  The SAFplus management is deprecated and replaced with an add-on product that supports NETCONF, SNMP, and CLI access.  &lt;br /&gt;
&lt;br /&gt;
* Multi-language code generation and support: Applications can generate C, C++, or Python code. Language-specific wrappers are provided for many SAFplus services.&lt;br /&gt;
&lt;br /&gt;
* Support for gcc 4.8: Compilation errors/warnings fixed&lt;br /&gt;
&lt;br /&gt;
* C++ compilation:  SAFplus can compiled with the C or C++ (gcc or g++) compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Porting Prior Models to 6.1 ====&lt;br /&gt;
&lt;br /&gt;
The changes in 6.1 mean that 6.0 models will not compile without modification.  However, the required changes are simple and so your model can be fixed in minutes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Problem: clCompCfg.c:39:1: error: too many initializers for ClEoConfigT&lt;br /&gt;
&lt;br /&gt;
 Remove the first initializer:&lt;br /&gt;
    COMP_EO_NAME,               /* EO Name                                  */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Problem: undefined symbol: ClNameT.  &lt;br /&gt;
&lt;br /&gt;
 Convert all your references to SaNameT -- it is the exact same structure&lt;br /&gt;
&lt;br /&gt;
* Problem: CL_DEBUG_XXXX was not declared in this scope.&lt;br /&gt;
&lt;br /&gt;
 Change the symbol to CL_LOG_SEV_XXXX.&lt;br /&gt;
&lt;br /&gt;
===New In Release 6.0===&lt;br /&gt;
&lt;br /&gt;
'''SAF Message Service'''&lt;br /&gt;
* Optimization: The SAF message service now operates using a peer-to-peer instead of client-server model, resulting in a 400% speedup and reduced network utilization.&lt;br /&gt;
* Additional features:  Persistent message queues are always stored off-node and will not lose messages during application or node failures.  The SAF standard allows node failures to lose messages in persistent queues.&lt;br /&gt;
&lt;br /&gt;
'''Availability Management Framework'''&lt;br /&gt;
* 1+N system controller redundancy:  More then 2 system controllers are now supported.  &lt;br /&gt;
* Custom redundancy model:  Our SAF-extension &amp;quot;Custom&amp;quot; redundancy model allows the application to chose Active/Standby pairing.&lt;br /&gt;
&lt;br /&gt;
'''Platform Support Package'''&lt;br /&gt;
* HPI event filter plugin:  A facility was created to intercept, analyze and modify or squelch HPI events before they are handled by the SAFplus Platform.  Since it is implemented as a plug-in to our chassis manager, this feature does not affect the latency of our fast-path event handling.&lt;br /&gt;
* OpenHPI 3.0 is now the default HPI package&lt;br /&gt;
* The HPI dynamic simulator is fully supported, with OpenClovis extensions that generate HPI events if a threshold is changed so that the simulated sensor value falls outside of the nominal range.&lt;br /&gt;
&lt;br /&gt;
'''Messaging Layer'''&lt;br /&gt;
* The messaging subsystem used by SAFplus Platform has been converted to a plug-in, allowing the user to implement different transport mechanisms.&lt;br /&gt;
* UDP and TIPC plugins are now supported with the default set to TIPC as before*.&lt;br /&gt;
&lt;br /&gt;
'''Leader Election'''&lt;br /&gt;
* Cluster leader election is now based on results from the messaging layer (i.e. from TIPC) rather then running an independent algorithm.&lt;br /&gt;
&lt;br /&gt;
'''*''' Note: This feature is not yet supported by the IDE, but can be enabled by changing configuration files.&lt;br /&gt;
&lt;br /&gt;
==== Release 6.0 Patch 201212102041 Dec 10,2012 ====&lt;br /&gt;
&lt;br /&gt;
* Changes to support Emerson HPI (along with the existing OpenHPI and Radisys) for users of the Platform Support Package&lt;br /&gt;
&lt;br /&gt;
* Removed accidental inclusion of OpenHPI header files, even when HPI is not selected.  Note: this will cause a compile error in the auto-generated file src/config/clCmResourceDeps.c.  The fix is to add the following #ifdef near the top of the file (and #endif at the end):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;clCmApi.h&amp;gt;&lt;br /&gt;
#ifdef CL_USE_CHASSIS_MANAGER&lt;br /&gt;
#include &amp;lt;SaHpi.h&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Additionally, add the following line to the top of src/config/Makefile:&lt;br /&gt;
include $(CLOVIS_ROOT)/SAFplus/mk/preface.mk&lt;br /&gt;
&lt;br /&gt;
This will ensure that CL_USE_CHASSIS_MANAGER is defined if required.&lt;br /&gt;
&lt;br /&gt;
Theses file will be automatically corrected if you regenerate the code from within the IDE.&lt;br /&gt;
&lt;br /&gt;
* Updated the &amp;quot;eval&amp;quot; (tutorial) model to work with the 6.0 release.  It is located in src/examples/eval.&lt;br /&gt;
&lt;br /&gt;
===New In Release 5.0===&lt;br /&gt;
&lt;br /&gt;
====General Features====&lt;br /&gt;
&lt;br /&gt;
* '''Support for Wind River PNELE 2.0''': OpenClovis SDK can seamlessly build SAFplus Platform and binaries for Wind River Platform for Network Equipment Linux Edition 2.0 on all supported SDK platforms, either using the build tool-chain of OpenClovis or of the development environment of Wind River.&lt;br /&gt;
&lt;br /&gt;
====High Availability (HA)====&lt;br /&gt;
&lt;br /&gt;
*'''ISSU - In Service Software Upgrade'''&lt;br /&gt;
Supports middleware upgrade in a rolling (in-service) or single-step mode.&lt;br /&gt;
&lt;br /&gt;
'''Single-Step'''&lt;br /&gt;
For deployment of non-backwards compatible software, or rapid deployment of software.  This method stops the relevant services on all nodes (causing an outage) and then upgrades that software and restarts.  Note that services are stopped at various granularity levels depending on what is being upgraded.  In other words, application A can be taken out-of-service and upgraded across the cluster without affecting application B running on the same nodes.&lt;br /&gt;
&lt;br /&gt;
'''Inservice Rolling'''&lt;br /&gt;
This is the most commonly known telecom quality upgrade method.  For deployment of backwards-compatible software across the cluster, this method stops service in one &amp;quot;upgrade unit&amp;quot; at a time, upgrades the software and restarts before stopping the next &amp;quot;upgrade unit&amp;quot;.  This process continues iteratively until the entire cluster is upgraded.  Since the available redundant capacity takes over for the unit being upgraded service will be unaffected.&lt;br /&gt;
&lt;br /&gt;
====Infrastructure and Communications====&lt;br /&gt;
&lt;br /&gt;
====Group Membership Service (GMS) over TIPC====&lt;br /&gt;
&lt;br /&gt;
By default GMS/openais is now compiled to run over TIPC.&lt;br /&gt;
&lt;br /&gt;
====SAF Message Service====&lt;br /&gt;
&lt;br /&gt;
SAF messaging data types and APIs supported by OpenClovis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''classes/types:'''&lt;br /&gt;
&lt;br /&gt;
*SaMsgMessageT&lt;br /&gt;
*SaMsgHandleT&lt;br /&gt;
*SaMsgQueueStatusT&lt;br /&gt;
*SaMsgQueueHandleT&lt;br /&gt;
*SaMsgSenderIdT&lt;br /&gt;
*SaMsgQueueCreationAttributesT&lt;br /&gt;
*SaMsgQueueOpenFlagsT&lt;br /&gt;
*SaMsgQueueGroupPolicyT&lt;br /&gt;
*SaMsgQueueGroupNotificationBufferT&lt;br /&gt;
*SaMsgQueueGroupNotificationT&lt;br /&gt;
*SaMsgQueueUsageT&lt;br /&gt;
*SaMsgCallbacksT&lt;br /&gt;
*SaMsgMessageReceivedCallbackT&lt;br /&gt;
&lt;br /&gt;
*'''APIs:'''&lt;br /&gt;
&lt;br /&gt;
*saMsgMessageSend&lt;br /&gt;
*saMsgMessageSendAsync&lt;br /&gt;
*saMsgQueueOpen&lt;br /&gt;
*saMsgQueueClose&lt;br /&gt;
*saMsgQueueStatusGet&lt;br /&gt;
*saMsgMessageGet&lt;br /&gt;
*saMsgMessageDataFree&lt;br /&gt;
*saMsgQueueGroupCreate&lt;br /&gt;
*saMsgQueueGroupInsert&lt;br /&gt;
*saMsgQueueGroupTrack&lt;br /&gt;
*saMsgQueueGroupNotificationFree&lt;br /&gt;
*saMsgInitialize&lt;br /&gt;
*saMsgFinalize&lt;br /&gt;
*saMsgDispatch&lt;br /&gt;
&lt;br /&gt;
====SAF Component cleanup script support====&lt;br /&gt;
&lt;br /&gt;
5.0 introduces support to configure cleanup commands for SA-AWARE components using the Openclovis IDE. The cleanup command is invoked by AMF on component cleanup or abrupt terminations.&lt;br /&gt;
&lt;br /&gt;
===System Management===&lt;br /&gt;
&lt;br /&gt;
*Support of net-snmp 5.4.2.&lt;br /&gt;
*SNMP Traps in 64 Bit architectures.&lt;br /&gt;
&lt;br /&gt;
===Platform Management===&lt;br /&gt;
&lt;br /&gt;
OpenClovis SAFplus Platform provides pre-integrated support for commonly used ATCA platforms. All service affecting events reported by the shelf manager via HPI are intercepted and service on affected hardware is migrated to standby equipment, ensuring continuity of service. &lt;br /&gt;
&lt;br /&gt;
This support is provided with the '''Platform Support Package (PSP)''' for Piegon Point Shelf manager 500ShMM via openHPI. &lt;br /&gt;
&lt;br /&gt;
PSP is available as a separate product, please contact OpenClovis Sales for further information.&lt;br /&gt;
&lt;br /&gt;
===Features of OpenClovis IDE===&lt;br /&gt;
&lt;br /&gt;
* '''Running SAFplus Platform without manageability components''': IDE is having the support for enable/disable SAFplus Platform components. For more information refer to ''OpenClovis IDE User Guide''.&lt;br /&gt;
* '''AMF Clean-up script''': IDE is having support to specify the cleanup command in SAF Component. For more information refer to ''OpenClovis IDE User Guide''.&lt;br /&gt;
* '''Versioning the Configuration Files''': IDE is having support for versioning the configuration files.&lt;br /&gt;
* '''SAF Messaging''': IDE is having support to enable the SAF messaging. For more information refer to ''OpenClovis IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===SAFplus Platform Run-Time Director===&lt;br /&gt;
&lt;br /&gt;
A new product, the SAFplus Platform Run-Time Director(ARD), provides cluster management of the SAFplus Platform via a web interface.  This new product is available separately, please contact OpenClovis for demonstration and evaluation.  The ARD has the following features:&lt;br /&gt;
&lt;br /&gt;
* Software Distribution:  Allows individual applications to be packaged in a &amp;quot;bundle&amp;quot; and be deployed to any set of nodes in the cluster.&lt;br /&gt;
* Inservice Software Upgrade: Supports application upgrade in a rolling (in-service) or single-step mode. &lt;br /&gt;
* WYSIWYG: Provides intuitive cluster management via an HTTP (web) interface.&lt;br /&gt;
* AJAX: Displays all SAF AMF entities and their current status -- uses asynchronous Javascript requests to dynamically update browser when changes occur.&lt;br /&gt;
* Dynamic AMF:  Allows modification of AMF entity state and supports creation/deletion of AMF entities.&lt;br /&gt;
* High Availability:  The ARD runs in unprotected or 2N redundancy mode.&lt;br /&gt;
* Python AMF API:  Provides an easy-to-use CLI/programmatic API for cluster management&lt;br /&gt;
* Easy installation:  The ARD can install itself into a running SAFplus Platform model, and therefore requires no changes to your existing model.&lt;br /&gt;
* Extensible: The ARD is built on top of TurboGears, a popular open source web mega-framework.  Thus it provides a basis and example for your custom SaaS or EMS project.&lt;br /&gt;
* Integration of Platform Support Package (PSP), provides chassis configuration through OpenHPI.&lt;br /&gt;
&lt;br /&gt;
===OpenClovis Documentation===&lt;br /&gt;
&lt;br /&gt;
* OpenClovis Documentation is provided in two formats now, PDF and HTML. They both contain the same information.&lt;br /&gt;
* A new ''OpenClovis SA Forum Compliance'' document has been added&lt;br /&gt;
* As a courtesy, all relevant SA Forum specifications are supplied as part of our OpenClovis documentation package (only in PDF format).&lt;br /&gt;
* A new ''OpenClovis Sample Application Tutorial'' has been added, replacing the former Modeling Tutorial. The new document provides explanation for the various steps involved in creating and running a new application.&lt;br /&gt;
* The ''OpenClovis SDK User Guide'' has been extended to cover many additional topics, including:&lt;br /&gt;
** Communication infrastructure&lt;br /&gt;
** Hardware platform support&lt;br /&gt;
** How to debug SAFplus Platform based applications&lt;br /&gt;
** Build and deployment&lt;br /&gt;
* The ''OpenClovis API Reference Guide'' has been significantly revised:&lt;br /&gt;
** Numerous coding examples&lt;br /&gt;
** New reference pages for API error codes for easy lookup&lt;br /&gt;
** HTML version of API Refernce Guide is heavily cross-referenced, allowing easy navigation between the various programming construcs&lt;br /&gt;
* New, complete ''OpenClovis SAFplus Platform Console Reference Guide'' as a separate document&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]]From this release, the ''Debug CLI'' has been renamed to ''SAFplus Platform Console''.&lt;br /&gt;
&lt;br /&gt;
=='''Migration To Latest Version'''==&lt;br /&gt;
&lt;br /&gt;
Migration of a project or model from an earlier version of the OpenClovis IDE to the most recent version is performed automatically when the model it opened for the first time in the newer vesion. The IDE auto-detects the project's version and changes the internal files so that the information is in valid format and can be read by the current version. It also provides an option to create a backup of the project while performing the migration. For more information, refer to ''OpenClovis IDE User Guide'', Section ''Migrating Project''. IDE supports migration from R2.3 and above.&lt;br /&gt;
&lt;br /&gt;
Any issues regarding migration from a previous version of the IDE are documented below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Change in Log File Locations===&lt;br /&gt;
&lt;br /&gt;
As of release 3.0 all SAFplus Platform runtime log files are created in the &amp;lt;code&amp;gt;var/log&amp;lt;/code&amp;gt; subdirectory of the SAFplus Platform install directory. It is recommended that you update existing models to also use this directory. To update an existing model edit the clLog.xml file in the model's src/config directory. Change all references of '''.:log''' in the &amp;lt;code&amp;gt;&amp;lt;fileLocation&amp;gt;&amp;lt;/code&amp;gt; elements&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;fileLocation&amp;gt;.:log&amp;lt;/fileLocation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to '''.:var/log'''&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;fileLocation&amp;gt;.:var/log&amp;lt;/fileLocation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the model is rebuilt and deployed these new settings will take effect.&lt;br /&gt;
&lt;br /&gt;
===gmsConfig.xml file===&lt;br /&gt;
&lt;br /&gt;
Models of R2.3 may not contain the gmsConfig.xml file if GMS configuration is not done. If you migrate this project you will get error message saying that Migration was unable to create this file. But this is not going to affect further use of model. Model will be OK and user can make changes to it from IDE, generate source, build it, etc without any problem.&lt;br /&gt;
&lt;br /&gt;
Although this error is not going to affect the functionality of the model, there is a work around for this. Before migrating your model, just open up the model in your old IDE setup. Launch &amp;quot;SAFplus Platform Component Configuration&amp;quot; dialog from the Clovis menu. Press OK. Now just migrate the model with new IDE setup, you will not get this error. Bug has been raised for this and it will be fixed in next release.&lt;br /&gt;
&lt;br /&gt;
=='''Known Issues'''==&lt;br /&gt;
&lt;br /&gt;
This chapter describes the known issues in the current release and provides the associated workarounds. These issues arise due to deviation from the normal functioning of the system or as a result of an unexpected behavior of a component or a service.&lt;br /&gt;
&lt;br /&gt;
===Known Issues of OpenClovis SAFplus Platform===&lt;br /&gt;
&lt;br /&gt;
Following are the known issues for OpenClovis SAFplus Platform:&lt;br /&gt;
&lt;br /&gt;
*'''Infrastructure and Communications'''&lt;br /&gt;
** '''TIPC address:''' TIPC with 1.5.12 versions was found to give problems (link unstable) when you have 2 different TIPC netids configured for the same TIPC address. This issue is not seen with the 1.7.x TIPC releases, but in general we recommend you to keep the TIPC addresses unique and not collide with the same addresses on nodes configured with different TIPC netids. One of the symptoms  of this is that the TIPC link between 2 machine starts going UP and DOWN continuously when there is another machine in the network, whose TIPC address is conflicting with address of one of those 2 machines. The behavior can be observed through continuous execution of command &amp;quot;tipc-config -l&amp;quot; or through &amp;quot;dmesg&amp;quot;.&lt;br /&gt;
** In general, TIPC 1.5.XX has been found to be unstable, especially under high multicast load, and should not be used in production environments.&lt;br /&gt;
&lt;br /&gt;
** '''Bug ID #7269'''  A cluster having a mixture of 32bit little endian, 32bit big endian and 64 bit little endian machines/nodes may find that the GMS service in inadvertently terminates.&lt;br /&gt;
*** '''Workaround''' - None&lt;br /&gt;
** '''aspinfo known issues:''' (1) On some systems, especially systems with Python version 2.3, aspinfo can be slow to respond. (2) Some corner cases may not be properly handled and aspinfo may prematurely exit, dumping its Python stack.&lt;br /&gt;
&lt;br /&gt;
* '''System Management'''&lt;br /&gt;
** '''Bug ID #7313''' If an Alarm Server is restarted after it published an alarm, it won't allow to clear/publish that alarm again.&lt;br /&gt;
*** '''Workaround''' - Currently there is no workaround.&lt;br /&gt;
&lt;br /&gt;
* '''SAF Compliance'''&lt;br /&gt;
** '''Deviation from SAF in Event Service:''' Event Service does not yet support Event Retention as specified in SAF specification. The retention time specified in the clEventPublish() API would have no effect.&lt;br /&gt;
** '''Bug in SAF specificaion B11:''' The clEventDataGet() API of Event Service is in compliance with the SAF specification B11. This allows the user to either allocate memory for the event payload or obtain it from the API by passing a pointer. The latter is not possible with this API as the argument needs to be a pointer to a pointer which is not the case. As per the new specification and the recommended way the user is always required to allocate and free the memory.&lt;br /&gt;
&lt;br /&gt;
===Known Issues of OpenClovis IDE===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Bug ID # 6543: X Error in Ubuntu Installation.''' Starting the IDE in '''Ubuntu''' installation may result some X errors in the console. This is not an IDE issue, this will not affect any of the IDE functionalities.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Workaround''' - See the ''Limitations'' section of the ''OpenClovis IDE User Guide''.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SNMP MIB Enumerated Integer Construct Limitations''': During SNMP code generation all enumerated integer labels are converted to &amp;lt;code&amp;gt;#define&amp;lt;/code&amp;gt; statements. The constant names used in these statements are the enumerated integer labels converted to upper case. Because of this the all labels used within an enumerated integer construct must be unique regardless of case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''SNMP MIB V1 TRAP-TYPE Construct Not Supported''': Due to an issue in the Net-SNMP mib2c compiler code generation for MIBs using the V1 TRAP-TYPE construct does not work properly.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Workaround''' - To generate trap code from an SNMP MIB use the SNMP V2 NOTIFICATION-TYPE construct.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Known Issues of Install Package===&lt;br /&gt;
&lt;br /&gt;
* '''Bug ID # 6749: Potential conflict with net-snmp package on local system''': In certain rare instances, building OpenHPI from the included third-party packages during SDK installation fails owing to a conflict with an already-installed version of NetSNMP on the system.  In these instances, it is recommended that NetSNMP be removed from the local system before installing OpenClovis SDK, and that it be reinstalled after completing the SDK installation.&lt;br /&gt;
&lt;br /&gt;
* '''Installation on Red Hat Enterprise 4''': On a Red Hat Enterprise Linux 4 system, the 'Development Tools' subset of packages must be installed to cover the requirements for installing OpenClovis SDK.  In general, an installation with the default package set contains all requirements for installation.&lt;br /&gt;
&lt;br /&gt;
* '''Installation on Fedora Core 6''': On a Fedora Core 6 system, installation of OpenClovis SAFplus Platform automatically builds and installs the TIPC opensource package.  To build TIPC, the kernel headers must be present and so these are automatically installed (by our ./preinstall-fedora-core.sh script) using the &amp;quot;yum install kernel-devel&amp;quot; command.  On rare configurations, this command does not work correctly.  It is supposed to install headers so that the symbolic link located at &amp;quot;/lib/modules/`uname -r`/build&amp;quot; points to a valid directory of Linux header files.  However, on some systems this symbolic link points to &amp;quot;/usr/src/kernels/2.6.22.14-72.fc6-i586&amp;quot; but the headers are actually installed in &amp;quot;/usr/src/kernels/2.6.22.14-72.fc6-i686&amp;quot;  (note 'i586' vs 'i686').  To resolve this problem, change the symbolic link to point to the correct directory name, and then restart the OpenClovis SAFplus Platform installation.&lt;br /&gt;
&lt;br /&gt;
* '''Configuring TIPC and assigning the SAFplus Platform node address''' to an OpenClovis SAFplus Platform is done by SAFplus Platform start up script. But if manual configuration of TIPC is allowed.  Misconfiguration (such as assigning 2 nodes the same TIPC address) will result in an unstable system. When this happens the whole system (all the SAFplus Platform nodes including the ones which are already up and running properly) have to be brought down, the TIPC kernel driver unloaded (to remove its configuration) and the system restarted.&lt;br /&gt;
&lt;br /&gt;
* '''Installation of SQLite using Preinstall script''': The Preinstall script installs SQLite by default as database engine. It locates SQLite - if it is already installed - without verifying version number. If its version is older than 3.3.13, then SAFplus Platform will fail to start.&lt;br /&gt;
** '''Workaround''' - Use SQLite 3.3.13 or newer. The source code can be downloaded from http://www.sqlite.org/download.html. The user can install the latest version of SQLite if its not present in the repository.&lt;br /&gt;
&lt;br /&gt;
* '''Installation on Solaris 10/SPARC (beta)''': Installation of OpenClovis SAFplus Platform requires the following third party packages installed via either installation media or using pkgadd with packages obtained from http://www.sunfreeware.com/.  Missing third-party packages may cause unpredictable behavior during installation and SDK use.&lt;br /&gt;
** db-4.2.52&lt;br /&gt;
** fileutils&lt;br /&gt;
** flex&lt;br /&gt;
** gcc-3.4.2&lt;br /&gt;
** gdbm-1.8.3&lt;br /&gt;
** glib-2.14.1&lt;br /&gt;
** gmake&lt;br /&gt;
** gtar&lt;br /&gt;
** libintl&lt;br /&gt;
** libiconv&lt;br /&gt;
** ncurses&lt;br /&gt;
** openssl&lt;br /&gt;
** pkgconfig&lt;br /&gt;
** python-2.5.1&lt;br /&gt;
** readline&lt;br /&gt;
** snprintf&lt;br /&gt;
** tipc-solaris-1.7.5 or SUNWtipc&lt;br /&gt;
** SUNWbtool&lt;br /&gt;
** SUNWsprot&lt;br /&gt;
** SUNWhea&lt;br /&gt;
** wget&lt;br /&gt;
&lt;br /&gt;
=='''Environment Related Observation'''==&lt;br /&gt;
&lt;br /&gt;
* '''Bug ID #7549''' When SAFplus Platform is running in non simulation mode, if SAFplus Platform is started from one sandbox, then it can be stopped/zapped from another sandbox.&lt;br /&gt;
&lt;br /&gt;
===Enabled Firewall Can Cause SAFplus Platform to Shutdown===&lt;br /&gt;
The enablement of a firewall on a system running a deployed SAFplus Platform image can cause the software to shutdown. An indication that you may be running into this problem is if you see an entry similar to the following in your log file (in the log file it is one line):&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Sep 26 15:06:54 2007   (SCNodeI0.10499 : GMS.---.---.00036 :  ERROR)&lt;br /&gt;
   [clGmsEngine.c:448] No nodes in the cluster view to run leader &lt;br /&gt;
   electionLeader Election Aborted&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
To resolve this problem disable all filtering in the Netfilter framework by issuing the following command.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
iptables -F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reusing A Project Area With New Version of OpenClovis SDK===&lt;br /&gt;
Every Project Area is associated with an installation of OpenClovis SDK at a given location.  If one elects to reinstall the SDK at a different location or install a newer version at a different location, the project area will stay associated with the original SDK location.  This allows one to work with multiple versions of the SDK simultaneously.&lt;br /&gt;
In order to use an existing project area with a different or moved installation of OpenClovis SDK, remove the &amp;lt;code&amp;gt;.config&amp;lt;/code&amp;gt; file from your project area directory and re-run &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; as you normally would to work with a model.&lt;br /&gt;
&lt;br /&gt;
===Running Multiple SAFplus Platform Clusters in the same Subnet===&lt;br /&gt;
If you are running multiple SAFplus Platform clusters within the same subnet, please ensure that the &amp;lt;code&amp;gt;TIPC network ID&amp;lt;/code&amp;gt; selected for each cluster is unique.&lt;br /&gt;
&lt;br /&gt;
=='''Documentation Issues'''==&lt;br /&gt;
&lt;br /&gt;
This chapter describes the known issues with the OpenClovis Documentation shipped along with the product.&lt;br /&gt;
&lt;br /&gt;
* Formatting issues&lt;br /&gt;
** Following cross-references pointing to a heading, the PDF viewer will jump to the end of the previous page if the heading is on the top of a page.&lt;br /&gt;
** Firefox web browsers sometimes do not correctly jump to intra-page anchors when the user clicks on a reference. This is a known issue with Firefox. The workaround is to click on Back button and then on the reference again. The browser jumps to the correct position for the 2nd time.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/relnotes</id>
		<title>Doc:latest/relnotes</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/relnotes"/>
				<updated>2014-02-17T22:05:20Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Porting Prior Models to 6.1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Preface'''==&lt;br /&gt;
&lt;br /&gt;
Welcome to ''OpenClovis Release Notes''. This document provides information about the details of the platforms on which OpenClovis SAFplus Availability/Scalability Platform (the SAFplus Platform for short) and Integrated Development Environment (IDE) have been tested and validated for SDK Release 6.0. It contains the additional features and enhancements of the product since the previous release. It also summarizes the known issues and limitations of the product and provides workaround wherever applicable.&lt;br /&gt;
&lt;br /&gt;
===Key Topics===&lt;br /&gt;
&lt;br /&gt;
''OpenClovis Release Notes'' covers the following topics in details:&lt;br /&gt;
*Tested Platforms&lt;br /&gt;
*What Is New&lt;br /&gt;
*Migration To Latest Version&lt;br /&gt;
*Known Issues&lt;br /&gt;
*Environment Related Observation&lt;br /&gt;
*Documentation Issues&lt;br /&gt;
&lt;br /&gt;
===Audience===&lt;br /&gt;
&lt;br /&gt;
''OpenClovis Release Notes'' addresses system integrators, designers, and system architects. To use SAFplus Platform, you must be aware of the fundamentals of operation, management, and configuration of telecom and networking domains. You must also be familiar with C programming, UML notations, and have basic knowledge of Linux.&lt;br /&gt;
&lt;br /&gt;
===Documentation Conventions===&lt;br /&gt;
&lt;br /&gt;
This guide uses different fonts and symbols to differentiate between document elements and types of information. These conventions are summarized in the following table.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;  width=&amp;quot;680&amp;quot;&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Notation &lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Description&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|style=&amp;quot;color:black&amp;quot; |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Code&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This font denotes the C code provided in various examples.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|Cross reference&lt;br /&gt;
|&lt;br /&gt;
This font denotes a hyperlink. You can click on the hyperlink text to access the reference location, which can be either a section within the User Guide or a URL link. A cross reference refers to a section name and accesses the first page of that section.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Bold Text''' &lt;br /&gt;
|&lt;br /&gt;
Menu items and button names.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''''Italic Text''''' &lt;br /&gt;
|&lt;br /&gt;
Variables for which you enter values.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]This indicates the presence of notes or annotations, related to the context of the document.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Caution.png]]This indicates that certain precautionary measures must be taken before performing a particular task.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Info.png]]This indicates that additional information is provided to you.&lt;br /&gt;
&lt;br /&gt;
===Related Documents===&lt;br /&gt;
&lt;br /&gt;
For additional information about OpenClovis products, refer to the following guides:&lt;br /&gt;
* '''SAFplus Platform SA Forum Compliance''' describes the level of compliance of OpenClovis SAFplus Platform and its Application Programming Interface (API) with the relevant Service Availability Forum Specifications.&lt;br /&gt;
* '''SAFplus Platform Installation Guide''' provides the system requirements, installation procedure for OpenClovis SAFplus Platform, IDE, and the Evaluation System.&lt;br /&gt;
* '''SAFplus Platform Sample Application Tutorial''' explains the steps to create and build a sample model using OpenClovis IDE and OpenClovis SAFplus Platform. It also provides troubleshooting information for this process. This provides the logical first step in understanding the SAFplus Platform offering.&lt;br /&gt;
* '''SAFplus Platform Evaluation System User Guide''' provides all the required information to configure and run the sample models packaged within the Evaluation System. This document also provides good understanding of OpenClovis SAFplus Platform's functionality. This is the natural follow on to the ''OpenClovis Sample Application Tutorial'' as it builds on the example created in that document. &lt;br /&gt;
* '''SAFplus Platform SDK User Guide''' provides information about SAFplus Availability/Scalability Platform architecture, various SAFplus Platform components, and their interactions. This guide helps you to configure the OpenClovis SAFplus Platform components, compile, and execute the SAFplus Platform code to build your custom application.&lt;br /&gt;
* '''SAFplus Platform IDE User Guide''' describes the usage of Integrated Development Environment (IDE), a graphical development environment that complements the SAFplus Platform. This guide helps you to understand how to use the various features of the IDE to build the application.&lt;br /&gt;
* '''SAFplus Platform Log Tool User Guide''' provides information about the usage of OpenClovis Log Tool. OpenClovis Log Tool is an interactive utility that allows you to view binary log files in a readable format and hence monitor system errors, warnings, and other log information. Log Tool allows you to format the &amp;lt;code&amp;gt;.log&amp;lt;/code&amp;gt; files and filter them to view the required entries.&lt;br /&gt;
* '''SAFplus Platform API Reference Guide''' is provided for each component. It describes the Application Programming Interface (API), Service Model, and Management Information Model of the various OpenClovis Application Service Platform (SAFplus Platform) services. It helps the developer to understand the capabilities of the SAFplus Platform services and the APIs provided by these services.&lt;br /&gt;
* '''SAFplus Platform Console Reference Guide''' provides details about managing applications built on SAFplus Platform using the SAFplus Platform runtime debug console commands. SAFplus Platform Console commands can be used to manage, monitor, and test your application.&lt;br /&gt;
&lt;br /&gt;
===OpenClovis Online Technical Support===&lt;br /&gt;
&lt;br /&gt;
OpenClovis customers and partners can register on our Web site and receive personalized services and information. If you need any support or assistance while working on OpenClovis products, you can access the following: URL: http://www.openclovis.com. Send your queries to: support@openclovis.com. Open source community support is available at: http://www.openclovis.org/forum.&lt;br /&gt;
&lt;br /&gt;
===Documentation Feedback===&lt;br /&gt;
&lt;br /&gt;
We are interested in hearing from our customers on the documentation provided with the product. Let us know your comments and suggestions on improving the documentation at OpenClovis Inc. Send your comments to: support@openclovis.com. Or even better, edit (or comment in) the page on our documentation wiki located at [http://help.openclovis.com http://help.openclovis.com].&lt;br /&gt;
&lt;br /&gt;
=='''Tested Platforms'''==&lt;br /&gt;
&lt;br /&gt;
This chapter provides the details of the platforms on which OpenClovis SAFplus Platform have been tested and validated.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot; width=&amp;quot;800&amp;quot;&lt;br /&gt;
|+ align=&amp;quot;bottom&amp;quot; | '''Tested Platform Configurations''' &lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot; width=&amp;quot;150&amp;quot;| Platform&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Configuration&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Hardware&lt;br /&gt;
|&lt;br /&gt;
* ATCA 5U Chassis - Schroff, ASIS&lt;br /&gt;
* ATCA 12U Chassis - Schroff, Sanmina, HP, Sun Netra, Radisys, Huawei Tecal Server&lt;br /&gt;
* Pigeon Point Systems ShMM300 and ShMM500 based Shelf Controllers&lt;br /&gt;
* Radisys Promentum 60x0 and its 2100 Switch/Shelf Controller blades&lt;br /&gt;
* CPU Blades:&lt;br /&gt;
** Intel Xeon based server cards&lt;br /&gt;
** Intel Pentium and Xeon based desktops and rack mount servers (RMS)&lt;br /&gt;
** Intel Itanium based RMS&lt;br /&gt;
** AMD Opteron based ATCA cards&lt;br /&gt;
** AMD Opteron and Athlon based desktops&lt;br /&gt;
** PowerPC based AMCs&lt;br /&gt;
** PowerPC based desktops&lt;br /&gt;
** Huawei Tecal BH23&lt;br /&gt;
** Sun 3020 and 3090&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Software&lt;br /&gt;
|&lt;br /&gt;
* Wind River PNE-LE 1.2 (2.6.10 kernel) on CPU blades&lt;br /&gt;
* Wind River PNE-LE 1.3 (2.6.14 kernel) on CPU blades&lt;br /&gt;
* Wind River PNE-LE 1.4 (2.6.14 kernel) on CPU blades&lt;br /&gt;
* Wind River PNE-LE 2.0 (2.6.21 kernel) on CPU blades&lt;br /&gt;
* MontaVista Linux Carrier Grade Edition 5.0 (2.6.21 kernel)on CPU Blades&lt;br /&gt;
* QNX Neutrino RTOS 6.3.2&lt;br /&gt;
* Pigeon Point Systems Shelf Manager version 2.2.1 on ShMM300, ShMM500&lt;br /&gt;
* SCM software version 1.7 on ATCA 2100 Shelf Manager&lt;br /&gt;
* OpenHPI 2.8.1 and 2.10.2&lt;br /&gt;
* Radisys HPI Client Library (HCL) version 1.1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For more details on the hardware and software requirements and the steps to install OpenClovis SAFplus Platform and IDE, refer to ''OpenClovis Installation Guide''.&lt;br /&gt;
&lt;br /&gt;
=='''What Is New'''==&lt;br /&gt;
&lt;br /&gt;
This chapter outlines the new features and enhancements provided by OpenClovis SAFplus Platform and IDE for all releases.&lt;br /&gt;
&lt;br /&gt;
===New In Release 6.1===&lt;br /&gt;
&lt;br /&gt;
* Management Transformation:  The SAFplus management is deprecated and replaced with an add-on product that supports NETCONF, SNMP, and CLI access.  &lt;br /&gt;
&lt;br /&gt;
* Multi-language code generation and support: Applications can generate C, C++, or Python code. Language-specific wrappers are provided for many SAFplus services.&lt;br /&gt;
&lt;br /&gt;
* Support for gcc 4.8: Compilation errors/warnings fixed&lt;br /&gt;
&lt;br /&gt;
* C++ compilation:  SAFplus can compiled with the C or C++ (gcc or g++) compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Porting Prior Models to 6.1 ====&lt;br /&gt;
&lt;br /&gt;
The changes in 6.1 mean that 6.0 models will not compile without modification.  However, the required changes are simple and so your model can be fixed in minutes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Problem: clCompCfg.c:39:1: error: too many initializers for ClEoConfigT&lt;br /&gt;
&lt;br /&gt;
 Remove the first initializer:&lt;br /&gt;
    COMP_EO_NAME,               /* EO Name                                  */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Problem: undefined symbol: ClNameT.  &lt;br /&gt;
&lt;br /&gt;
 Convert all your references to SaNameT -- it is the exact same structure&lt;br /&gt;
&lt;br /&gt;
===New In Release 6.0===&lt;br /&gt;
&lt;br /&gt;
'''SAF Message Service'''&lt;br /&gt;
* Optimization: The SAF message service now operates using a peer-to-peer instead of client-server model, resulting in a 400% speedup and reduced network utilization.&lt;br /&gt;
* Additional features:  Persistent message queues are always stored off-node and will not lose messages during application or node failures.  The SAF standard allows node failures to lose messages in persistent queues.&lt;br /&gt;
&lt;br /&gt;
'''Availability Management Framework'''&lt;br /&gt;
* 1+N system controller redundancy:  More then 2 system controllers are now supported.  &lt;br /&gt;
* Custom redundancy model:  Our SAF-extension &amp;quot;Custom&amp;quot; redundancy model allows the application to chose Active/Standby pairing.&lt;br /&gt;
&lt;br /&gt;
'''Platform Support Package'''&lt;br /&gt;
* HPI event filter plugin:  A facility was created to intercept, analyze and modify or squelch HPI events before they are handled by the SAFplus Platform.  Since it is implemented as a plug-in to our chassis manager, this feature does not affect the latency of our fast-path event handling.&lt;br /&gt;
* OpenHPI 3.0 is now the default HPI package&lt;br /&gt;
* The HPI dynamic simulator is fully supported, with OpenClovis extensions that generate HPI events if a threshold is changed so that the simulated sensor value falls outside of the nominal range.&lt;br /&gt;
&lt;br /&gt;
'''Messaging Layer'''&lt;br /&gt;
* The messaging subsystem used by SAFplus Platform has been converted to a plug-in, allowing the user to implement different transport mechanisms.&lt;br /&gt;
* UDP and TIPC plugins are now supported with the default set to TIPC as before*.&lt;br /&gt;
&lt;br /&gt;
'''Leader Election'''&lt;br /&gt;
* Cluster leader election is now based on results from the messaging layer (i.e. from TIPC) rather then running an independent algorithm.&lt;br /&gt;
&lt;br /&gt;
'''*''' Note: This feature is not yet supported by the IDE, but can be enabled by changing configuration files.&lt;br /&gt;
&lt;br /&gt;
==== Release 6.0 Patch 201212102041 Dec 10,2012 ====&lt;br /&gt;
&lt;br /&gt;
* Changes to support Emerson HPI (along with the existing OpenHPI and Radisys) for users of the Platform Support Package&lt;br /&gt;
&lt;br /&gt;
* Removed accidental inclusion of OpenHPI header files, even when HPI is not selected.  Note: this will cause a compile error in the auto-generated file src/config/clCmResourceDeps.c.  The fix is to add the following #ifdef near the top of the file (and #endif at the end):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;clCmApi.h&amp;gt;&lt;br /&gt;
#ifdef CL_USE_CHASSIS_MANAGER&lt;br /&gt;
#include &amp;lt;SaHpi.h&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Additionally, add the following line to the top of src/config/Makefile:&lt;br /&gt;
include $(CLOVIS_ROOT)/SAFplus/mk/preface.mk&lt;br /&gt;
&lt;br /&gt;
This will ensure that CL_USE_CHASSIS_MANAGER is defined if required.&lt;br /&gt;
&lt;br /&gt;
Theses file will be automatically corrected if you regenerate the code from within the IDE.&lt;br /&gt;
&lt;br /&gt;
* Updated the &amp;quot;eval&amp;quot; (tutorial) model to work with the 6.0 release.  It is located in src/examples/eval.&lt;br /&gt;
&lt;br /&gt;
===New In Release 5.0===&lt;br /&gt;
&lt;br /&gt;
====General Features====&lt;br /&gt;
&lt;br /&gt;
* '''Support for Wind River PNELE 2.0''': OpenClovis SDK can seamlessly build SAFplus Platform and binaries for Wind River Platform for Network Equipment Linux Edition 2.0 on all supported SDK platforms, either using the build tool-chain of OpenClovis or of the development environment of Wind River.&lt;br /&gt;
&lt;br /&gt;
====High Availability (HA)====&lt;br /&gt;
&lt;br /&gt;
*'''ISSU - In Service Software Upgrade'''&lt;br /&gt;
Supports middleware upgrade in a rolling (in-service) or single-step mode.&lt;br /&gt;
&lt;br /&gt;
'''Single-Step'''&lt;br /&gt;
For deployment of non-backwards compatible software, or rapid deployment of software.  This method stops the relevant services on all nodes (causing an outage) and then upgrades that software and restarts.  Note that services are stopped at various granularity levels depending on what is being upgraded.  In other words, application A can be taken out-of-service and upgraded across the cluster without affecting application B running on the same nodes.&lt;br /&gt;
&lt;br /&gt;
'''Inservice Rolling'''&lt;br /&gt;
This is the most commonly known telecom quality upgrade method.  For deployment of backwards-compatible software across the cluster, this method stops service in one &amp;quot;upgrade unit&amp;quot; at a time, upgrades the software and restarts before stopping the next &amp;quot;upgrade unit&amp;quot;.  This process continues iteratively until the entire cluster is upgraded.  Since the available redundant capacity takes over for the unit being upgraded service will be unaffected.&lt;br /&gt;
&lt;br /&gt;
====Infrastructure and Communications====&lt;br /&gt;
&lt;br /&gt;
====Group Membership Service (GMS) over TIPC====&lt;br /&gt;
&lt;br /&gt;
By default GMS/openais is now compiled to run over TIPC.&lt;br /&gt;
&lt;br /&gt;
====SAF Message Service====&lt;br /&gt;
&lt;br /&gt;
SAF messaging data types and APIs supported by OpenClovis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''classes/types:'''&lt;br /&gt;
&lt;br /&gt;
*SaMsgMessageT&lt;br /&gt;
*SaMsgHandleT&lt;br /&gt;
*SaMsgQueueStatusT&lt;br /&gt;
*SaMsgQueueHandleT&lt;br /&gt;
*SaMsgSenderIdT&lt;br /&gt;
*SaMsgQueueCreationAttributesT&lt;br /&gt;
*SaMsgQueueOpenFlagsT&lt;br /&gt;
*SaMsgQueueGroupPolicyT&lt;br /&gt;
*SaMsgQueueGroupNotificationBufferT&lt;br /&gt;
*SaMsgQueueGroupNotificationT&lt;br /&gt;
*SaMsgQueueUsageT&lt;br /&gt;
*SaMsgCallbacksT&lt;br /&gt;
*SaMsgMessageReceivedCallbackT&lt;br /&gt;
&lt;br /&gt;
*'''APIs:'''&lt;br /&gt;
&lt;br /&gt;
*saMsgMessageSend&lt;br /&gt;
*saMsgMessageSendAsync&lt;br /&gt;
*saMsgQueueOpen&lt;br /&gt;
*saMsgQueueClose&lt;br /&gt;
*saMsgQueueStatusGet&lt;br /&gt;
*saMsgMessageGet&lt;br /&gt;
*saMsgMessageDataFree&lt;br /&gt;
*saMsgQueueGroupCreate&lt;br /&gt;
*saMsgQueueGroupInsert&lt;br /&gt;
*saMsgQueueGroupTrack&lt;br /&gt;
*saMsgQueueGroupNotificationFree&lt;br /&gt;
*saMsgInitialize&lt;br /&gt;
*saMsgFinalize&lt;br /&gt;
*saMsgDispatch&lt;br /&gt;
&lt;br /&gt;
====SAF Component cleanup script support====&lt;br /&gt;
&lt;br /&gt;
5.0 introduces support to configure cleanup commands for SA-AWARE components using the Openclovis IDE. The cleanup command is invoked by AMF on component cleanup or abrupt terminations.&lt;br /&gt;
&lt;br /&gt;
===System Management===&lt;br /&gt;
&lt;br /&gt;
*Support of net-snmp 5.4.2.&lt;br /&gt;
*SNMP Traps in 64 Bit architectures.&lt;br /&gt;
&lt;br /&gt;
===Platform Management===&lt;br /&gt;
&lt;br /&gt;
OpenClovis SAFplus Platform provides pre-integrated support for commonly used ATCA platforms. All service affecting events reported by the shelf manager via HPI are intercepted and service on affected hardware is migrated to standby equipment, ensuring continuity of service. &lt;br /&gt;
&lt;br /&gt;
This support is provided with the '''Platform Support Package (PSP)''' for Piegon Point Shelf manager 500ShMM via openHPI. &lt;br /&gt;
&lt;br /&gt;
PSP is available as a separate product, please contact OpenClovis Sales for further information.&lt;br /&gt;
&lt;br /&gt;
===Features of OpenClovis IDE===&lt;br /&gt;
&lt;br /&gt;
* '''Running SAFplus Platform without manageability components''': IDE is having the support for enable/disable SAFplus Platform components. For more information refer to ''OpenClovis IDE User Guide''.&lt;br /&gt;
* '''AMF Clean-up script''': IDE is having support to specify the cleanup command in SAF Component. For more information refer to ''OpenClovis IDE User Guide''.&lt;br /&gt;
* '''Versioning the Configuration Files''': IDE is having support for versioning the configuration files.&lt;br /&gt;
* '''SAF Messaging''': IDE is having support to enable the SAF messaging. For more information refer to ''OpenClovis IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===SAFplus Platform Run-Time Director===&lt;br /&gt;
&lt;br /&gt;
A new product, the SAFplus Platform Run-Time Director(ARD), provides cluster management of the SAFplus Platform via a web interface.  This new product is available separately, please contact OpenClovis for demonstration and evaluation.  The ARD has the following features:&lt;br /&gt;
&lt;br /&gt;
* Software Distribution:  Allows individual applications to be packaged in a &amp;quot;bundle&amp;quot; and be deployed to any set of nodes in the cluster.&lt;br /&gt;
* Inservice Software Upgrade: Supports application upgrade in a rolling (in-service) or single-step mode. &lt;br /&gt;
* WYSIWYG: Provides intuitive cluster management via an HTTP (web) interface.&lt;br /&gt;
* AJAX: Displays all SAF AMF entities and their current status -- uses asynchronous Javascript requests to dynamically update browser when changes occur.&lt;br /&gt;
* Dynamic AMF:  Allows modification of AMF entity state and supports creation/deletion of AMF entities.&lt;br /&gt;
* High Availability:  The ARD runs in unprotected or 2N redundancy mode.&lt;br /&gt;
* Python AMF API:  Provides an easy-to-use CLI/programmatic API for cluster management&lt;br /&gt;
* Easy installation:  The ARD can install itself into a running SAFplus Platform model, and therefore requires no changes to your existing model.&lt;br /&gt;
* Extensible: The ARD is built on top of TurboGears, a popular open source web mega-framework.  Thus it provides a basis and example for your custom SaaS or EMS project.&lt;br /&gt;
* Integration of Platform Support Package (PSP), provides chassis configuration through OpenHPI.&lt;br /&gt;
&lt;br /&gt;
===OpenClovis Documentation===&lt;br /&gt;
&lt;br /&gt;
* OpenClovis Documentation is provided in two formats now, PDF and HTML. They both contain the same information.&lt;br /&gt;
* A new ''OpenClovis SA Forum Compliance'' document has been added&lt;br /&gt;
* As a courtesy, all relevant SA Forum specifications are supplied as part of our OpenClovis documentation package (only in PDF format).&lt;br /&gt;
* A new ''OpenClovis Sample Application Tutorial'' has been added, replacing the former Modeling Tutorial. The new document provides explanation for the various steps involved in creating and running a new application.&lt;br /&gt;
* The ''OpenClovis SDK User Guide'' has been extended to cover many additional topics, including:&lt;br /&gt;
** Communication infrastructure&lt;br /&gt;
** Hardware platform support&lt;br /&gt;
** How to debug SAFplus Platform based applications&lt;br /&gt;
** Build and deployment&lt;br /&gt;
* The ''OpenClovis API Reference Guide'' has been significantly revised:&lt;br /&gt;
** Numerous coding examples&lt;br /&gt;
** New reference pages for API error codes for easy lookup&lt;br /&gt;
** HTML version of API Refernce Guide is heavily cross-referenced, allowing easy navigation between the various programming construcs&lt;br /&gt;
* New, complete ''OpenClovis SAFplus Platform Console Reference Guide'' as a separate document&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]]From this release, the ''Debug CLI'' has been renamed to ''SAFplus Platform Console''.&lt;br /&gt;
&lt;br /&gt;
=='''Migration To Latest Version'''==&lt;br /&gt;
&lt;br /&gt;
Migration of a project or model from an earlier version of the OpenClovis IDE to the most recent version is performed automatically when the model it opened for the first time in the newer vesion. The IDE auto-detects the project's version and changes the internal files so that the information is in valid format and can be read by the current version. It also provides an option to create a backup of the project while performing the migration. For more information, refer to ''OpenClovis IDE User Guide'', Section ''Migrating Project''. IDE supports migration from R2.3 and above.&lt;br /&gt;
&lt;br /&gt;
Any issues regarding migration from a previous version of the IDE are documented below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Change in Log File Locations===&lt;br /&gt;
&lt;br /&gt;
As of release 3.0 all SAFplus Platform runtime log files are created in the &amp;lt;code&amp;gt;var/log&amp;lt;/code&amp;gt; subdirectory of the SAFplus Platform install directory. It is recommended that you update existing models to also use this directory. To update an existing model edit the clLog.xml file in the model's src/config directory. Change all references of '''.:log''' in the &amp;lt;code&amp;gt;&amp;lt;fileLocation&amp;gt;&amp;lt;/code&amp;gt; elements&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;fileLocation&amp;gt;.:log&amp;lt;/fileLocation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to '''.:var/log'''&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;fileLocation&amp;gt;.:var/log&amp;lt;/fileLocation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the model is rebuilt and deployed these new settings will take effect.&lt;br /&gt;
&lt;br /&gt;
===gmsConfig.xml file===&lt;br /&gt;
&lt;br /&gt;
Models of R2.3 may not contain the gmsConfig.xml file if GMS configuration is not done. If you migrate this project you will get error message saying that Migration was unable to create this file. But this is not going to affect further use of model. Model will be OK and user can make changes to it from IDE, generate source, build it, etc without any problem.&lt;br /&gt;
&lt;br /&gt;
Although this error is not going to affect the functionality of the model, there is a work around for this. Before migrating your model, just open up the model in your old IDE setup. Launch &amp;quot;SAFplus Platform Component Configuration&amp;quot; dialog from the Clovis menu. Press OK. Now just migrate the model with new IDE setup, you will not get this error. Bug has been raised for this and it will be fixed in next release.&lt;br /&gt;
&lt;br /&gt;
=='''Known Issues'''==&lt;br /&gt;
&lt;br /&gt;
This chapter describes the known issues in the current release and provides the associated workarounds. These issues arise due to deviation from the normal functioning of the system or as a result of an unexpected behavior of a component or a service.&lt;br /&gt;
&lt;br /&gt;
===Known Issues of OpenClovis SAFplus Platform===&lt;br /&gt;
&lt;br /&gt;
Following are the known issues for OpenClovis SAFplus Platform:&lt;br /&gt;
&lt;br /&gt;
*'''Infrastructure and Communications'''&lt;br /&gt;
** '''TIPC address:''' TIPC with 1.5.12 versions was found to give problems (link unstable) when you have 2 different TIPC netids configured for the same TIPC address. This issue is not seen with the 1.7.x TIPC releases, but in general we recommend you to keep the TIPC addresses unique and not collide with the same addresses on nodes configured with different TIPC netids. One of the symptoms  of this is that the TIPC link between 2 machine starts going UP and DOWN continuously when there is another machine in the network, whose TIPC address is conflicting with address of one of those 2 machines. The behavior can be observed through continuous execution of command &amp;quot;tipc-config -l&amp;quot; or through &amp;quot;dmesg&amp;quot;.&lt;br /&gt;
** In general, TIPC 1.5.XX has been found to be unstable, especially under high multicast load, and should not be used in production environments.&lt;br /&gt;
&lt;br /&gt;
** '''Bug ID #7269'''  A cluster having a mixture of 32bit little endian, 32bit big endian and 64 bit little endian machines/nodes may find that the GMS service in inadvertently terminates.&lt;br /&gt;
*** '''Workaround''' - None&lt;br /&gt;
** '''aspinfo known issues:''' (1) On some systems, especially systems with Python version 2.3, aspinfo can be slow to respond. (2) Some corner cases may not be properly handled and aspinfo may prematurely exit, dumping its Python stack.&lt;br /&gt;
&lt;br /&gt;
* '''System Management'''&lt;br /&gt;
** '''Bug ID #7313''' If an Alarm Server is restarted after it published an alarm, it won't allow to clear/publish that alarm again.&lt;br /&gt;
*** '''Workaround''' - Currently there is no workaround.&lt;br /&gt;
&lt;br /&gt;
* '''SAF Compliance'''&lt;br /&gt;
** '''Deviation from SAF in Event Service:''' Event Service does not yet support Event Retention as specified in SAF specification. The retention time specified in the clEventPublish() API would have no effect.&lt;br /&gt;
** '''Bug in SAF specificaion B11:''' The clEventDataGet() API of Event Service is in compliance with the SAF specification B11. This allows the user to either allocate memory for the event payload or obtain it from the API by passing a pointer. The latter is not possible with this API as the argument needs to be a pointer to a pointer which is not the case. As per the new specification and the recommended way the user is always required to allocate and free the memory.&lt;br /&gt;
&lt;br /&gt;
===Known Issues of OpenClovis IDE===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Bug ID # 6543: X Error in Ubuntu Installation.''' Starting the IDE in '''Ubuntu''' installation may result some X errors in the console. This is not an IDE issue, this will not affect any of the IDE functionalities.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Workaround''' - See the ''Limitations'' section of the ''OpenClovis IDE User Guide''.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SNMP MIB Enumerated Integer Construct Limitations''': During SNMP code generation all enumerated integer labels are converted to &amp;lt;code&amp;gt;#define&amp;lt;/code&amp;gt; statements. The constant names used in these statements are the enumerated integer labels converted to upper case. Because of this the all labels used within an enumerated integer construct must be unique regardless of case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''SNMP MIB V1 TRAP-TYPE Construct Not Supported''': Due to an issue in the Net-SNMP mib2c compiler code generation for MIBs using the V1 TRAP-TYPE construct does not work properly.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Workaround''' - To generate trap code from an SNMP MIB use the SNMP V2 NOTIFICATION-TYPE construct.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Known Issues of Install Package===&lt;br /&gt;
&lt;br /&gt;
* '''Bug ID # 6749: Potential conflict with net-snmp package on local system''': In certain rare instances, building OpenHPI from the included third-party packages during SDK installation fails owing to a conflict with an already-installed version of NetSNMP on the system.  In these instances, it is recommended that NetSNMP be removed from the local system before installing OpenClovis SDK, and that it be reinstalled after completing the SDK installation.&lt;br /&gt;
&lt;br /&gt;
* '''Installation on Red Hat Enterprise 4''': On a Red Hat Enterprise Linux 4 system, the 'Development Tools' subset of packages must be installed to cover the requirements for installing OpenClovis SDK.  In general, an installation with the default package set contains all requirements for installation.&lt;br /&gt;
&lt;br /&gt;
* '''Installation on Fedora Core 6''': On a Fedora Core 6 system, installation of OpenClovis SAFplus Platform automatically builds and installs the TIPC opensource package.  To build TIPC, the kernel headers must be present and so these are automatically installed (by our ./preinstall-fedora-core.sh script) using the &amp;quot;yum install kernel-devel&amp;quot; command.  On rare configurations, this command does not work correctly.  It is supposed to install headers so that the symbolic link located at &amp;quot;/lib/modules/`uname -r`/build&amp;quot; points to a valid directory of Linux header files.  However, on some systems this symbolic link points to &amp;quot;/usr/src/kernels/2.6.22.14-72.fc6-i586&amp;quot; but the headers are actually installed in &amp;quot;/usr/src/kernels/2.6.22.14-72.fc6-i686&amp;quot;  (note 'i586' vs 'i686').  To resolve this problem, change the symbolic link to point to the correct directory name, and then restart the OpenClovis SAFplus Platform installation.&lt;br /&gt;
&lt;br /&gt;
* '''Configuring TIPC and assigning the SAFplus Platform node address''' to an OpenClovis SAFplus Platform is done by SAFplus Platform start up script. But if manual configuration of TIPC is allowed.  Misconfiguration (such as assigning 2 nodes the same TIPC address) will result in an unstable system. When this happens the whole system (all the SAFplus Platform nodes including the ones which are already up and running properly) have to be brought down, the TIPC kernel driver unloaded (to remove its configuration) and the system restarted.&lt;br /&gt;
&lt;br /&gt;
* '''Installation of SQLite using Preinstall script''': The Preinstall script installs SQLite by default as database engine. It locates SQLite - if it is already installed - without verifying version number. If its version is older than 3.3.13, then SAFplus Platform will fail to start.&lt;br /&gt;
** '''Workaround''' - Use SQLite 3.3.13 or newer. The source code can be downloaded from http://www.sqlite.org/download.html. The user can install the latest version of SQLite if its not present in the repository.&lt;br /&gt;
&lt;br /&gt;
* '''Installation on Solaris 10/SPARC (beta)''': Installation of OpenClovis SAFplus Platform requires the following third party packages installed via either installation media or using pkgadd with packages obtained from http://www.sunfreeware.com/.  Missing third-party packages may cause unpredictable behavior during installation and SDK use.&lt;br /&gt;
** db-4.2.52&lt;br /&gt;
** fileutils&lt;br /&gt;
** flex&lt;br /&gt;
** gcc-3.4.2&lt;br /&gt;
** gdbm-1.8.3&lt;br /&gt;
** glib-2.14.1&lt;br /&gt;
** gmake&lt;br /&gt;
** gtar&lt;br /&gt;
** libintl&lt;br /&gt;
** libiconv&lt;br /&gt;
** ncurses&lt;br /&gt;
** openssl&lt;br /&gt;
** pkgconfig&lt;br /&gt;
** python-2.5.1&lt;br /&gt;
** readline&lt;br /&gt;
** snprintf&lt;br /&gt;
** tipc-solaris-1.7.5 or SUNWtipc&lt;br /&gt;
** SUNWbtool&lt;br /&gt;
** SUNWsprot&lt;br /&gt;
** SUNWhea&lt;br /&gt;
** wget&lt;br /&gt;
&lt;br /&gt;
=='''Environment Related Observation'''==&lt;br /&gt;
&lt;br /&gt;
* '''Bug ID #7549''' When SAFplus Platform is running in non simulation mode, if SAFplus Platform is started from one sandbox, then it can be stopped/zapped from another sandbox.&lt;br /&gt;
&lt;br /&gt;
===Enabled Firewall Can Cause SAFplus Platform to Shutdown===&lt;br /&gt;
The enablement of a firewall on a system running a deployed SAFplus Platform image can cause the software to shutdown. An indication that you may be running into this problem is if you see an entry similar to the following in your log file (in the log file it is one line):&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Sep 26 15:06:54 2007   (SCNodeI0.10499 : GMS.---.---.00036 :  ERROR)&lt;br /&gt;
   [clGmsEngine.c:448] No nodes in the cluster view to run leader &lt;br /&gt;
   electionLeader Election Aborted&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
To resolve this problem disable all filtering in the Netfilter framework by issuing the following command.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
iptables -F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reusing A Project Area With New Version of OpenClovis SDK===&lt;br /&gt;
Every Project Area is associated with an installation of OpenClovis SDK at a given location.  If one elects to reinstall the SDK at a different location or install a newer version at a different location, the project area will stay associated with the original SDK location.  This allows one to work with multiple versions of the SDK simultaneously.&lt;br /&gt;
In order to use an existing project area with a different or moved installation of OpenClovis SDK, remove the &amp;lt;code&amp;gt;.config&amp;lt;/code&amp;gt; file from your project area directory and re-run &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; as you normally would to work with a model.&lt;br /&gt;
&lt;br /&gt;
===Running Multiple SAFplus Platform Clusters in the same Subnet===&lt;br /&gt;
If you are running multiple SAFplus Platform clusters within the same subnet, please ensure that the &amp;lt;code&amp;gt;TIPC network ID&amp;lt;/code&amp;gt; selected for each cluster is unique.&lt;br /&gt;
&lt;br /&gt;
=='''Documentation Issues'''==&lt;br /&gt;
&lt;br /&gt;
This chapter describes the known issues with the OpenClovis Documentation shipped along with the product.&lt;br /&gt;
&lt;br /&gt;
* Formatting issues&lt;br /&gt;
** Following cross-references pointing to a heading, the PDF viewer will jump to the end of the previous page if the heading is on the top of a page.&lt;br /&gt;
** Firefox web browsers sometimes do not correctly jump to intra-page anchors when the user clicks on a reference. This is a known issue with Firefox. The workaround is to click on Back button and then on the reference again. The browser jumps to the correct position for the 2nd time.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/relnotes</id>
		<title>Doc:latest/relnotes</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/relnotes"/>
				<updated>2014-02-06T20:45:22Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* What Is New */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Preface'''==&lt;br /&gt;
&lt;br /&gt;
Welcome to ''OpenClovis Release Notes''. This document provides information about the details of the platforms on which OpenClovis SAFplus Availability/Scalability Platform (the SAFplus Platform for short) and Integrated Development Environment (IDE) have been tested and validated for SDK Release 6.0. It contains the additional features and enhancements of the product since the previous release. It also summarizes the known issues and limitations of the product and provides workaround wherever applicable.&lt;br /&gt;
&lt;br /&gt;
===Key Topics===&lt;br /&gt;
&lt;br /&gt;
''OpenClovis Release Notes'' covers the following topics in details:&lt;br /&gt;
*Tested Platforms&lt;br /&gt;
*What Is New&lt;br /&gt;
*Migration To Latest Version&lt;br /&gt;
*Known Issues&lt;br /&gt;
*Environment Related Observation&lt;br /&gt;
*Documentation Issues&lt;br /&gt;
&lt;br /&gt;
===Audience===&lt;br /&gt;
&lt;br /&gt;
''OpenClovis Release Notes'' addresses system integrators, designers, and system architects. To use SAFplus Platform, you must be aware of the fundamentals of operation, management, and configuration of telecom and networking domains. You must also be familiar with C programming, UML notations, and have basic knowledge of Linux.&lt;br /&gt;
&lt;br /&gt;
===Documentation Conventions===&lt;br /&gt;
&lt;br /&gt;
This guide uses different fonts and symbols to differentiate between document elements and types of information. These conventions are summarized in the following table.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot;  width=&amp;quot;680&amp;quot;&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Notation &lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Description&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|style=&amp;quot;color:black&amp;quot; |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Code&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This font denotes the C code provided in various examples.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|Cross reference&lt;br /&gt;
|&lt;br /&gt;
This font denotes a hyperlink. You can click on the hyperlink text to access the reference location, which can be either a section within the User Guide or a URL link. A cross reference refers to a section name and accesses the first page of that section.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Bold Text''' &lt;br /&gt;
|&lt;br /&gt;
Menu items and button names.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''''Italic Text''''' &lt;br /&gt;
|&lt;br /&gt;
Variables for which you enter values.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]This indicates the presence of notes or annotations, related to the context of the document.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Caution.png]]This indicates that certain precautionary measures must be taken before performing a particular task.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Info.png]]This indicates that additional information is provided to you.&lt;br /&gt;
&lt;br /&gt;
===Related Documents===&lt;br /&gt;
&lt;br /&gt;
For additional information about OpenClovis products, refer to the following guides:&lt;br /&gt;
* '''SAFplus Platform SA Forum Compliance''' describes the level of compliance of OpenClovis SAFplus Platform and its Application Programming Interface (API) with the relevant Service Availability Forum Specifications.&lt;br /&gt;
* '''SAFplus Platform Installation Guide''' provides the system requirements, installation procedure for OpenClovis SAFplus Platform, IDE, and the Evaluation System.&lt;br /&gt;
* '''SAFplus Platform Sample Application Tutorial''' explains the steps to create and build a sample model using OpenClovis IDE and OpenClovis SAFplus Platform. It also provides troubleshooting information for this process. This provides the logical first step in understanding the SAFplus Platform offering.&lt;br /&gt;
* '''SAFplus Platform Evaluation System User Guide''' provides all the required information to configure and run the sample models packaged within the Evaluation System. This document also provides good understanding of OpenClovis SAFplus Platform's functionality. This is the natural follow on to the ''OpenClovis Sample Application Tutorial'' as it builds on the example created in that document. &lt;br /&gt;
* '''SAFplus Platform SDK User Guide''' provides information about SAFplus Availability/Scalability Platform architecture, various SAFplus Platform components, and their interactions. This guide helps you to configure the OpenClovis SAFplus Platform components, compile, and execute the SAFplus Platform code to build your custom application.&lt;br /&gt;
* '''SAFplus Platform IDE User Guide''' describes the usage of Integrated Development Environment (IDE), a graphical development environment that complements the SAFplus Platform. This guide helps you to understand how to use the various features of the IDE to build the application.&lt;br /&gt;
* '''SAFplus Platform Log Tool User Guide''' provides information about the usage of OpenClovis Log Tool. OpenClovis Log Tool is an interactive utility that allows you to view binary log files in a readable format and hence monitor system errors, warnings, and other log information. Log Tool allows you to format the &amp;lt;code&amp;gt;.log&amp;lt;/code&amp;gt; files and filter them to view the required entries.&lt;br /&gt;
* '''SAFplus Platform API Reference Guide''' is provided for each component. It describes the Application Programming Interface (API), Service Model, and Management Information Model of the various OpenClovis Application Service Platform (SAFplus Platform) services. It helps the developer to understand the capabilities of the SAFplus Platform services and the APIs provided by these services.&lt;br /&gt;
* '''SAFplus Platform Console Reference Guide''' provides details about managing applications built on SAFplus Platform using the SAFplus Platform runtime debug console commands. SAFplus Platform Console commands can be used to manage, monitor, and test your application.&lt;br /&gt;
&lt;br /&gt;
===OpenClovis Online Technical Support===&lt;br /&gt;
&lt;br /&gt;
OpenClovis customers and partners can register on our Web site and receive personalized services and information. If you need any support or assistance while working on OpenClovis products, you can access the following: URL: http://www.openclovis.com. Send your queries to: support@openclovis.com. Open source community support is available at: http://www.openclovis.org/forum.&lt;br /&gt;
&lt;br /&gt;
===Documentation Feedback===&lt;br /&gt;
&lt;br /&gt;
We are interested in hearing from our customers on the documentation provided with the product. Let us know your comments and suggestions on improving the documentation at OpenClovis Inc. Send your comments to: support@openclovis.com. Or even better, edit (or comment in) the page on our documentation wiki located at [http://help.openclovis.com http://help.openclovis.com].&lt;br /&gt;
&lt;br /&gt;
=='''Tested Platforms'''==&lt;br /&gt;
&lt;br /&gt;
This chapter provides the details of the platforms on which OpenClovis SAFplus Platform have been tested and validated.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot; align=&amp;quot;center&amp;quot; width=&amp;quot;800&amp;quot;&lt;br /&gt;
|+ align=&amp;quot;bottom&amp;quot; | '''Tested Platform Configurations''' &lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot; width=&amp;quot;150&amp;quot;| Platform&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Configuration&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Hardware&lt;br /&gt;
|&lt;br /&gt;
* ATCA 5U Chassis - Schroff, ASIS&lt;br /&gt;
* ATCA 12U Chassis - Schroff, Sanmina, HP, Sun Netra, Radisys, Huawei Tecal Server&lt;br /&gt;
* Pigeon Point Systems ShMM300 and ShMM500 based Shelf Controllers&lt;br /&gt;
* Radisys Promentum 60x0 and its 2100 Switch/Shelf Controller blades&lt;br /&gt;
* CPU Blades:&lt;br /&gt;
** Intel Xeon based server cards&lt;br /&gt;
** Intel Pentium and Xeon based desktops and rack mount servers (RMS)&lt;br /&gt;
** Intel Itanium based RMS&lt;br /&gt;
** AMD Opteron based ATCA cards&lt;br /&gt;
** AMD Opteron and Athlon based desktops&lt;br /&gt;
** PowerPC based AMCs&lt;br /&gt;
** PowerPC based desktops&lt;br /&gt;
** Huawei Tecal BH23&lt;br /&gt;
** Sun 3020 and 3090&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Software&lt;br /&gt;
|&lt;br /&gt;
* Wind River PNE-LE 1.2 (2.6.10 kernel) on CPU blades&lt;br /&gt;
* Wind River PNE-LE 1.3 (2.6.14 kernel) on CPU blades&lt;br /&gt;
* Wind River PNE-LE 1.4 (2.6.14 kernel) on CPU blades&lt;br /&gt;
* Wind River PNE-LE 2.0 (2.6.21 kernel) on CPU blades&lt;br /&gt;
* MontaVista Linux Carrier Grade Edition 5.0 (2.6.21 kernel)on CPU Blades&lt;br /&gt;
* QNX Neutrino RTOS 6.3.2&lt;br /&gt;
* Pigeon Point Systems Shelf Manager version 2.2.1 on ShMM300, ShMM500&lt;br /&gt;
* SCM software version 1.7 on ATCA 2100 Shelf Manager&lt;br /&gt;
* OpenHPI 2.8.1 and 2.10.2&lt;br /&gt;
* Radisys HPI Client Library (HCL) version 1.1&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
For more details on the hardware and software requirements and the steps to install OpenClovis SAFplus Platform and IDE, refer to ''OpenClovis Installation Guide''.&lt;br /&gt;
&lt;br /&gt;
=='''What Is New'''==&lt;br /&gt;
&lt;br /&gt;
This chapter outlines the new features and enhancements provided by OpenClovis SAFplus Platform and IDE for all releases.&lt;br /&gt;
&lt;br /&gt;
===New In Release 6.1===&lt;br /&gt;
&lt;br /&gt;
* Management Transformation:  The SAFplus management is deprecated and replaced with an add-on product that supports NETCONF, SNMP, and CLI access.  &lt;br /&gt;
&lt;br /&gt;
* Multi-language code generation and support: Applications can generate C, C++, or Python code. Language-specific wrappers are provided for many SAFplus services.&lt;br /&gt;
&lt;br /&gt;
* Support for gcc 4.8: Compilation errors/warnings fixed&lt;br /&gt;
&lt;br /&gt;
* C++ compilation:  SAFplus can compiled with the C or C++ (gcc or g++) compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Porting Prior Models to 6.1 ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===New In Release 6.0===&lt;br /&gt;
&lt;br /&gt;
'''SAF Message Service'''&lt;br /&gt;
* Optimization: The SAF message service now operates using a peer-to-peer instead of client-server model, resulting in a 400% speedup and reduced network utilization.&lt;br /&gt;
* Additional features:  Persistent message queues are always stored off-node and will not lose messages during application or node failures.  The SAF standard allows node failures to lose messages in persistent queues.&lt;br /&gt;
&lt;br /&gt;
'''Availability Management Framework'''&lt;br /&gt;
* 1+N system controller redundancy:  More then 2 system controllers are now supported.  &lt;br /&gt;
* Custom redundancy model:  Our SAF-extension &amp;quot;Custom&amp;quot; redundancy model allows the application to chose Active/Standby pairing.&lt;br /&gt;
&lt;br /&gt;
'''Platform Support Package'''&lt;br /&gt;
* HPI event filter plugin:  A facility was created to intercept, analyze and modify or squelch HPI events before they are handled by the SAFplus Platform.  Since it is implemented as a plug-in to our chassis manager, this feature does not affect the latency of our fast-path event handling.&lt;br /&gt;
* OpenHPI 3.0 is now the default HPI package&lt;br /&gt;
* The HPI dynamic simulator is fully supported, with OpenClovis extensions that generate HPI events if a threshold is changed so that the simulated sensor value falls outside of the nominal range.&lt;br /&gt;
&lt;br /&gt;
'''Messaging Layer'''&lt;br /&gt;
* The messaging subsystem used by SAFplus Platform has been converted to a plug-in, allowing the user to implement different transport mechanisms.&lt;br /&gt;
* UDP and TIPC plugins are now supported with the default set to TIPC as before*.&lt;br /&gt;
&lt;br /&gt;
'''Leader Election'''&lt;br /&gt;
* Cluster leader election is now based on results from the messaging layer (i.e. from TIPC) rather then running an independent algorithm.&lt;br /&gt;
&lt;br /&gt;
'''*''' Note: This feature is not yet supported by the IDE, but can be enabled by changing configuration files.&lt;br /&gt;
&lt;br /&gt;
==== Release 6.0 Patch 201212102041 Dec 10,2012 ====&lt;br /&gt;
&lt;br /&gt;
* Changes to support Emerson HPI (along with the existing OpenHPI and Radisys) for users of the Platform Support Package&lt;br /&gt;
&lt;br /&gt;
* Removed accidental inclusion of OpenHPI header files, even when HPI is not selected.  Note: this will cause a compile error in the auto-generated file src/config/clCmResourceDeps.c.  The fix is to add the following #ifdef near the top of the file (and #endif at the end):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;clCmApi.h&amp;gt;&lt;br /&gt;
#ifdef CL_USE_CHASSIS_MANAGER&lt;br /&gt;
#include &amp;lt;SaHpi.h&amp;gt;&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Additionally, add the following line to the top of src/config/Makefile:&lt;br /&gt;
include $(CLOVIS_ROOT)/SAFplus/mk/preface.mk&lt;br /&gt;
&lt;br /&gt;
This will ensure that CL_USE_CHASSIS_MANAGER is defined if required.&lt;br /&gt;
&lt;br /&gt;
Theses file will be automatically corrected if you regenerate the code from within the IDE.&lt;br /&gt;
&lt;br /&gt;
* Updated the &amp;quot;eval&amp;quot; (tutorial) model to work with the 6.0 release.  It is located in src/examples/eval.&lt;br /&gt;
&lt;br /&gt;
===New In Release 5.0===&lt;br /&gt;
&lt;br /&gt;
====General Features====&lt;br /&gt;
&lt;br /&gt;
* '''Support for Wind River PNELE 2.0''': OpenClovis SDK can seamlessly build SAFplus Platform and binaries for Wind River Platform for Network Equipment Linux Edition 2.0 on all supported SDK platforms, either using the build tool-chain of OpenClovis or of the development environment of Wind River.&lt;br /&gt;
&lt;br /&gt;
====High Availability (HA)====&lt;br /&gt;
&lt;br /&gt;
*'''ISSU - In Service Software Upgrade'''&lt;br /&gt;
Supports middleware upgrade in a rolling (in-service) or single-step mode.&lt;br /&gt;
&lt;br /&gt;
'''Single-Step'''&lt;br /&gt;
For deployment of non-backwards compatible software, or rapid deployment of software.  This method stops the relevant services on all nodes (causing an outage) and then upgrades that software and restarts.  Note that services are stopped at various granularity levels depending on what is being upgraded.  In other words, application A can be taken out-of-service and upgraded across the cluster without affecting application B running on the same nodes.&lt;br /&gt;
&lt;br /&gt;
'''Inservice Rolling'''&lt;br /&gt;
This is the most commonly known telecom quality upgrade method.  For deployment of backwards-compatible software across the cluster, this method stops service in one &amp;quot;upgrade unit&amp;quot; at a time, upgrades the software and restarts before stopping the next &amp;quot;upgrade unit&amp;quot;.  This process continues iteratively until the entire cluster is upgraded.  Since the available redundant capacity takes over for the unit being upgraded service will be unaffected.&lt;br /&gt;
&lt;br /&gt;
====Infrastructure and Communications====&lt;br /&gt;
&lt;br /&gt;
====Group Membership Service (GMS) over TIPC====&lt;br /&gt;
&lt;br /&gt;
By default GMS/openais is now compiled to run over TIPC.&lt;br /&gt;
&lt;br /&gt;
====SAF Message Service====&lt;br /&gt;
&lt;br /&gt;
SAF messaging data types and APIs supported by OpenClovis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*'''classes/types:'''&lt;br /&gt;
&lt;br /&gt;
*SaMsgMessageT&lt;br /&gt;
*SaMsgHandleT&lt;br /&gt;
*SaMsgQueueStatusT&lt;br /&gt;
*SaMsgQueueHandleT&lt;br /&gt;
*SaMsgSenderIdT&lt;br /&gt;
*SaMsgQueueCreationAttributesT&lt;br /&gt;
*SaMsgQueueOpenFlagsT&lt;br /&gt;
*SaMsgQueueGroupPolicyT&lt;br /&gt;
*SaMsgQueueGroupNotificationBufferT&lt;br /&gt;
*SaMsgQueueGroupNotificationT&lt;br /&gt;
*SaMsgQueueUsageT&lt;br /&gt;
*SaMsgCallbacksT&lt;br /&gt;
*SaMsgMessageReceivedCallbackT&lt;br /&gt;
&lt;br /&gt;
*'''APIs:'''&lt;br /&gt;
&lt;br /&gt;
*saMsgMessageSend&lt;br /&gt;
*saMsgMessageSendAsync&lt;br /&gt;
*saMsgQueueOpen&lt;br /&gt;
*saMsgQueueClose&lt;br /&gt;
*saMsgQueueStatusGet&lt;br /&gt;
*saMsgMessageGet&lt;br /&gt;
*saMsgMessageDataFree&lt;br /&gt;
*saMsgQueueGroupCreate&lt;br /&gt;
*saMsgQueueGroupInsert&lt;br /&gt;
*saMsgQueueGroupTrack&lt;br /&gt;
*saMsgQueueGroupNotificationFree&lt;br /&gt;
*saMsgInitialize&lt;br /&gt;
*saMsgFinalize&lt;br /&gt;
*saMsgDispatch&lt;br /&gt;
&lt;br /&gt;
====SAF Component cleanup script support====&lt;br /&gt;
&lt;br /&gt;
5.0 introduces support to configure cleanup commands for SA-AWARE components using the Openclovis IDE. The cleanup command is invoked by AMF on component cleanup or abrupt terminations.&lt;br /&gt;
&lt;br /&gt;
===System Management===&lt;br /&gt;
&lt;br /&gt;
*Support of net-snmp 5.4.2.&lt;br /&gt;
*SNMP Traps in 64 Bit architectures.&lt;br /&gt;
&lt;br /&gt;
===Platform Management===&lt;br /&gt;
&lt;br /&gt;
OpenClovis SAFplus Platform provides pre-integrated support for commonly used ATCA platforms. All service affecting events reported by the shelf manager via HPI are intercepted and service on affected hardware is migrated to standby equipment, ensuring continuity of service. &lt;br /&gt;
&lt;br /&gt;
This support is provided with the '''Platform Support Package (PSP)''' for Piegon Point Shelf manager 500ShMM via openHPI. &lt;br /&gt;
&lt;br /&gt;
PSP is available as a separate product, please contact OpenClovis Sales for further information.&lt;br /&gt;
&lt;br /&gt;
===Features of OpenClovis IDE===&lt;br /&gt;
&lt;br /&gt;
* '''Running SAFplus Platform without manageability components''': IDE is having the support for enable/disable SAFplus Platform components. For more information refer to ''OpenClovis IDE User Guide''.&lt;br /&gt;
* '''AMF Clean-up script''': IDE is having support to specify the cleanup command in SAF Component. For more information refer to ''OpenClovis IDE User Guide''.&lt;br /&gt;
* '''Versioning the Configuration Files''': IDE is having support for versioning the configuration files.&lt;br /&gt;
* '''SAF Messaging''': IDE is having support to enable the SAF messaging. For more information refer to ''OpenClovis IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===SAFplus Platform Run-Time Director===&lt;br /&gt;
&lt;br /&gt;
A new product, the SAFplus Platform Run-Time Director(ARD), provides cluster management of the SAFplus Platform via a web interface.  This new product is available separately, please contact OpenClovis for demonstration and evaluation.  The ARD has the following features:&lt;br /&gt;
&lt;br /&gt;
* Software Distribution:  Allows individual applications to be packaged in a &amp;quot;bundle&amp;quot; and be deployed to any set of nodes in the cluster.&lt;br /&gt;
* Inservice Software Upgrade: Supports application upgrade in a rolling (in-service) or single-step mode. &lt;br /&gt;
* WYSIWYG: Provides intuitive cluster management via an HTTP (web) interface.&lt;br /&gt;
* AJAX: Displays all SAF AMF entities and their current status -- uses asynchronous Javascript requests to dynamically update browser when changes occur.&lt;br /&gt;
* Dynamic AMF:  Allows modification of AMF entity state and supports creation/deletion of AMF entities.&lt;br /&gt;
* High Availability:  The ARD runs in unprotected or 2N redundancy mode.&lt;br /&gt;
* Python AMF API:  Provides an easy-to-use CLI/programmatic API for cluster management&lt;br /&gt;
* Easy installation:  The ARD can install itself into a running SAFplus Platform model, and therefore requires no changes to your existing model.&lt;br /&gt;
* Extensible: The ARD is built on top of TurboGears, a popular open source web mega-framework.  Thus it provides a basis and example for your custom SaaS or EMS project.&lt;br /&gt;
* Integration of Platform Support Package (PSP), provides chassis configuration through OpenHPI.&lt;br /&gt;
&lt;br /&gt;
===OpenClovis Documentation===&lt;br /&gt;
&lt;br /&gt;
* OpenClovis Documentation is provided in two formats now, PDF and HTML. They both contain the same information.&lt;br /&gt;
* A new ''OpenClovis SA Forum Compliance'' document has been added&lt;br /&gt;
* As a courtesy, all relevant SA Forum specifications are supplied as part of our OpenClovis documentation package (only in PDF format).&lt;br /&gt;
* A new ''OpenClovis Sample Application Tutorial'' has been added, replacing the former Modeling Tutorial. The new document provides explanation for the various steps involved in creating and running a new application.&lt;br /&gt;
* The ''OpenClovis SDK User Guide'' has been extended to cover many additional topics, including:&lt;br /&gt;
** Communication infrastructure&lt;br /&gt;
** Hardware platform support&lt;br /&gt;
** How to debug SAFplus Platform based applications&lt;br /&gt;
** Build and deployment&lt;br /&gt;
* The ''OpenClovis API Reference Guide'' has been significantly revised:&lt;br /&gt;
** Numerous coding examples&lt;br /&gt;
** New reference pages for API error codes for easy lookup&lt;br /&gt;
** HTML version of API Refernce Guide is heavily cross-referenced, allowing easy navigation between the various programming construcs&lt;br /&gt;
* New, complete ''OpenClovis SAFplus Platform Console Reference Guide'' as a separate document&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]]From this release, the ''Debug CLI'' has been renamed to ''SAFplus Platform Console''.&lt;br /&gt;
&lt;br /&gt;
=='''Migration To Latest Version'''==&lt;br /&gt;
&lt;br /&gt;
Migration of a project or model from an earlier version of the OpenClovis IDE to the most recent version is performed automatically when the model it opened for the first time in the newer vesion. The IDE auto-detects the project's version and changes the internal files so that the information is in valid format and can be read by the current version. It also provides an option to create a backup of the project while performing the migration. For more information, refer to ''OpenClovis IDE User Guide'', Section ''Migrating Project''. IDE supports migration from R2.3 and above.&lt;br /&gt;
&lt;br /&gt;
Any issues regarding migration from a previous version of the IDE are documented below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Change in Log File Locations===&lt;br /&gt;
&lt;br /&gt;
As of release 3.0 all SAFplus Platform runtime log files are created in the &amp;lt;code&amp;gt;var/log&amp;lt;/code&amp;gt; subdirectory of the SAFplus Platform install directory. It is recommended that you update existing models to also use this directory. To update an existing model edit the clLog.xml file in the model's src/config directory. Change all references of '''.:log''' in the &amp;lt;code&amp;gt;&amp;lt;fileLocation&amp;gt;&amp;lt;/code&amp;gt; elements&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;fileLocation&amp;gt;.:log&amp;lt;/fileLocation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to '''.:var/log'''&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;fileLocation&amp;gt;.:var/log&amp;lt;/fileLocation&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the model is rebuilt and deployed these new settings will take effect.&lt;br /&gt;
&lt;br /&gt;
===gmsConfig.xml file===&lt;br /&gt;
&lt;br /&gt;
Models of R2.3 may not contain the gmsConfig.xml file if GMS configuration is not done. If you migrate this project you will get error message saying that Migration was unable to create this file. But this is not going to affect further use of model. Model will be OK and user can make changes to it from IDE, generate source, build it, etc without any problem.&lt;br /&gt;
&lt;br /&gt;
Although this error is not going to affect the functionality of the model, there is a work around for this. Before migrating your model, just open up the model in your old IDE setup. Launch &amp;quot;SAFplus Platform Component Configuration&amp;quot; dialog from the Clovis menu. Press OK. Now just migrate the model with new IDE setup, you will not get this error. Bug has been raised for this and it will be fixed in next release.&lt;br /&gt;
&lt;br /&gt;
=='''Known Issues'''==&lt;br /&gt;
&lt;br /&gt;
This chapter describes the known issues in the current release and provides the associated workarounds. These issues arise due to deviation from the normal functioning of the system or as a result of an unexpected behavior of a component or a service.&lt;br /&gt;
&lt;br /&gt;
===Known Issues of OpenClovis SAFplus Platform===&lt;br /&gt;
&lt;br /&gt;
Following are the known issues for OpenClovis SAFplus Platform:&lt;br /&gt;
&lt;br /&gt;
*'''Infrastructure and Communications'''&lt;br /&gt;
** '''TIPC address:''' TIPC with 1.5.12 versions was found to give problems (link unstable) when you have 2 different TIPC netids configured for the same TIPC address. This issue is not seen with the 1.7.x TIPC releases, but in general we recommend you to keep the TIPC addresses unique and not collide with the same addresses on nodes configured with different TIPC netids. One of the symptoms  of this is that the TIPC link between 2 machine starts going UP and DOWN continuously when there is another machine in the network, whose TIPC address is conflicting with address of one of those 2 machines. The behavior can be observed through continuous execution of command &amp;quot;tipc-config -l&amp;quot; or through &amp;quot;dmesg&amp;quot;.&lt;br /&gt;
** In general, TIPC 1.5.XX has been found to be unstable, especially under high multicast load, and should not be used in production environments.&lt;br /&gt;
&lt;br /&gt;
** '''Bug ID #7269'''  A cluster having a mixture of 32bit little endian, 32bit big endian and 64 bit little endian machines/nodes may find that the GMS service in inadvertently terminates.&lt;br /&gt;
*** '''Workaround''' - None&lt;br /&gt;
** '''aspinfo known issues:''' (1) On some systems, especially systems with Python version 2.3, aspinfo can be slow to respond. (2) Some corner cases may not be properly handled and aspinfo may prematurely exit, dumping its Python stack.&lt;br /&gt;
&lt;br /&gt;
* '''System Management'''&lt;br /&gt;
** '''Bug ID #7313''' If an Alarm Server is restarted after it published an alarm, it won't allow to clear/publish that alarm again.&lt;br /&gt;
*** '''Workaround''' - Currently there is no workaround.&lt;br /&gt;
&lt;br /&gt;
* '''SAF Compliance'''&lt;br /&gt;
** '''Deviation from SAF in Event Service:''' Event Service does not yet support Event Retention as specified in SAF specification. The retention time specified in the clEventPublish() API would have no effect.&lt;br /&gt;
** '''Bug in SAF specificaion B11:''' The clEventDataGet() API of Event Service is in compliance with the SAF specification B11. This allows the user to either allocate memory for the event payload or obtain it from the API by passing a pointer. The latter is not possible with this API as the argument needs to be a pointer to a pointer which is not the case. As per the new specification and the recommended way the user is always required to allocate and free the memory.&lt;br /&gt;
&lt;br /&gt;
===Known Issues of OpenClovis IDE===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Bug ID # 6543: X Error in Ubuntu Installation.''' Starting the IDE in '''Ubuntu''' installation may result some X errors in the console. This is not an IDE issue, this will not affect any of the IDE functionalities.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Workaround''' - See the ''Limitations'' section of the ''OpenClovis IDE User Guide''.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''SNMP MIB Enumerated Integer Construct Limitations''': During SNMP code generation all enumerated integer labels are converted to &amp;lt;code&amp;gt;#define&amp;lt;/code&amp;gt; statements. The constant names used in these statements are the enumerated integer labels converted to upper case. Because of this the all labels used within an enumerated integer construct must be unique regardless of case.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''SNMP MIB V1 TRAP-TYPE Construct Not Supported''': Due to an issue in the Net-SNMP mib2c compiler code generation for MIBs using the V1 TRAP-TYPE construct does not work properly.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Workaround''' - To generate trap code from an SNMP MIB use the SNMP V2 NOTIFICATION-TYPE construct.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Known Issues of Install Package===&lt;br /&gt;
&lt;br /&gt;
* '''Bug ID # 6749: Potential conflict with net-snmp package on local system''': In certain rare instances, building OpenHPI from the included third-party packages during SDK installation fails owing to a conflict with an already-installed version of NetSNMP on the system.  In these instances, it is recommended that NetSNMP be removed from the local system before installing OpenClovis SDK, and that it be reinstalled after completing the SDK installation.&lt;br /&gt;
&lt;br /&gt;
* '''Installation on Red Hat Enterprise 4''': On a Red Hat Enterprise Linux 4 system, the 'Development Tools' subset of packages must be installed to cover the requirements for installing OpenClovis SDK.  In general, an installation with the default package set contains all requirements for installation.&lt;br /&gt;
&lt;br /&gt;
* '''Installation on Fedora Core 6''': On a Fedora Core 6 system, installation of OpenClovis SAFplus Platform automatically builds and installs the TIPC opensource package.  To build TIPC, the kernel headers must be present and so these are automatically installed (by our ./preinstall-fedora-core.sh script) using the &amp;quot;yum install kernel-devel&amp;quot; command.  On rare configurations, this command does not work correctly.  It is supposed to install headers so that the symbolic link located at &amp;quot;/lib/modules/`uname -r`/build&amp;quot; points to a valid directory of Linux header files.  However, on some systems this symbolic link points to &amp;quot;/usr/src/kernels/2.6.22.14-72.fc6-i586&amp;quot; but the headers are actually installed in &amp;quot;/usr/src/kernels/2.6.22.14-72.fc6-i686&amp;quot;  (note 'i586' vs 'i686').  To resolve this problem, change the symbolic link to point to the correct directory name, and then restart the OpenClovis SAFplus Platform installation.&lt;br /&gt;
&lt;br /&gt;
* '''Configuring TIPC and assigning the SAFplus Platform node address''' to an OpenClovis SAFplus Platform is done by SAFplus Platform start up script. But if manual configuration of TIPC is allowed.  Misconfiguration (such as assigning 2 nodes the same TIPC address) will result in an unstable system. When this happens the whole system (all the SAFplus Platform nodes including the ones which are already up and running properly) have to be brought down, the TIPC kernel driver unloaded (to remove its configuration) and the system restarted.&lt;br /&gt;
&lt;br /&gt;
* '''Installation of SQLite using Preinstall script''': The Preinstall script installs SQLite by default as database engine. It locates SQLite - if it is already installed - without verifying version number. If its version is older than 3.3.13, then SAFplus Platform will fail to start.&lt;br /&gt;
** '''Workaround''' - Use SQLite 3.3.13 or newer. The source code can be downloaded from http://www.sqlite.org/download.html. The user can install the latest version of SQLite if its not present in the repository.&lt;br /&gt;
&lt;br /&gt;
* '''Installation on Solaris 10/SPARC (beta)''': Installation of OpenClovis SAFplus Platform requires the following third party packages installed via either installation media or using pkgadd with packages obtained from http://www.sunfreeware.com/.  Missing third-party packages may cause unpredictable behavior during installation and SDK use.&lt;br /&gt;
** db-4.2.52&lt;br /&gt;
** fileutils&lt;br /&gt;
** flex&lt;br /&gt;
** gcc-3.4.2&lt;br /&gt;
** gdbm-1.8.3&lt;br /&gt;
** glib-2.14.1&lt;br /&gt;
** gmake&lt;br /&gt;
** gtar&lt;br /&gt;
** libintl&lt;br /&gt;
** libiconv&lt;br /&gt;
** ncurses&lt;br /&gt;
** openssl&lt;br /&gt;
** pkgconfig&lt;br /&gt;
** python-2.5.1&lt;br /&gt;
** readline&lt;br /&gt;
** snprintf&lt;br /&gt;
** tipc-solaris-1.7.5 or SUNWtipc&lt;br /&gt;
** SUNWbtool&lt;br /&gt;
** SUNWsprot&lt;br /&gt;
** SUNWhea&lt;br /&gt;
** wget&lt;br /&gt;
&lt;br /&gt;
=='''Environment Related Observation'''==&lt;br /&gt;
&lt;br /&gt;
* '''Bug ID #7549''' When SAFplus Platform is running in non simulation mode, if SAFplus Platform is started from one sandbox, then it can be stopped/zapped from another sandbox.&lt;br /&gt;
&lt;br /&gt;
===Enabled Firewall Can Cause SAFplus Platform to Shutdown===&lt;br /&gt;
The enablement of a firewall on a system running a deployed SAFplus Platform image can cause the software to shutdown. An indication that you may be running into this problem is if you see an entry similar to the following in your log file (in the log file it is one line):&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Wed Sep 26 15:06:54 2007   (SCNodeI0.10499 : GMS.---.---.00036 :  ERROR)&lt;br /&gt;
   [clGmsEngine.c:448] No nodes in the cluster view to run leader &lt;br /&gt;
   electionLeader Election Aborted&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
To resolve this problem disable all filtering in the Netfilter framework by issuing the following command.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
iptables -F&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reusing A Project Area With New Version of OpenClovis SDK===&lt;br /&gt;
Every Project Area is associated with an installation of OpenClovis SDK at a given location.  If one elects to reinstall the SDK at a different location or install a newer version at a different location, the project area will stay associated with the original SDK location.  This allows one to work with multiple versions of the SDK simultaneously.&lt;br /&gt;
In order to use an existing project area with a different or moved installation of OpenClovis SDK, remove the &amp;lt;code&amp;gt;.config&amp;lt;/code&amp;gt; file from your project area directory and re-run &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; as you normally would to work with a model.&lt;br /&gt;
&lt;br /&gt;
===Running Multiple SAFplus Platform Clusters in the same Subnet===&lt;br /&gt;
If you are running multiple SAFplus Platform clusters within the same subnet, please ensure that the &amp;lt;code&amp;gt;TIPC network ID&amp;lt;/code&amp;gt; selected for each cluster is unique.&lt;br /&gt;
&lt;br /&gt;
=='''Documentation Issues'''==&lt;br /&gt;
&lt;br /&gt;
This chapter describes the known issues with the OpenClovis Documentation shipped along with the product.&lt;br /&gt;
&lt;br /&gt;
* Formatting issues&lt;br /&gt;
** Following cross-references pointing to a heading, the PDF viewer will jump to the end of the previous page if the heading is on the top of a page.&lt;br /&gt;
** Firefox web browsers sometimes do not correctly jump to intra-page anchors when the user clicks on a reference. This is a known issue with Firefox. The workaround is to click on Back button and then on the reference again. The browser jumps to the correct position for the 2nd time.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/ideguide</id>
		<title>Doc:latest/ideguide</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/ideguide"/>
				<updated>2013-10-18T13:35:14Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-08T14:01:02Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Building the CM-Plugin model and controlling Events in run-time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
CM-Plugin is an event controlling policy in Platform-Support-Package(PSP) to allow, restrict, or modify the events received from HPI and forwarded to the Application during run-time. The policy is defined by the Application programmer and is loaded into the Chassis Manager and called whenever a hardware event is received.&lt;br /&gt;
&lt;br /&gt;
The purpose of this plugin is to allow the application programmer to intercept events that may be miscategorized by the hardware and transform them.  For example, if a voltage loss event is reported as MAJOR in a dual power supply system, this even should not cause system shutdown so can be reduced to a MINOR level event. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
How to define a policy to control the events in the CM, so that only interested events are forwarded to the Application and unintended events are discarded.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/6.0/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
The policy to control the events is defined in cmPolicy.c and is available in the location: ...\CmPlugin\src\app\common\plugins\cmPolicy.c in specified example.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ( /* For Specific condition of Event Ex: event-&amp;gt;Severity==SAHPI_MAJOR */)&lt;br /&gt;
        {&lt;br /&gt;
             /* Change the event to required form */&lt;br /&gt;
             /* event-&amp;gt;Severity=SAHPI_MINOR;      */&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to required location (/root/asp/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
  The logs are available in var/log/sys.latest and application_name.latest&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-08T13:58:20Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* CM Plug-in Guide */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
CM-Plugin is an event controlling policy in Platform-Support-Package(PSP) to allow, restrict, or modify the events received from HPI and forwarded to the Application during run-time. The policy is defined by the Application programmer and is loaded into the Chassis Manager and called whenever a hardware event is received.&lt;br /&gt;
&lt;br /&gt;
The purpose of this plugin is to allow the application programmer to intercept events that may be miscategorized by the hardware and transform them.  For example, if a voltage loss event is reported as MAJOR in a dual power supply system, this even should not cause system shutdown so can be reduced to a MINOR level event. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
How to define a policy to control the events in the CM, so that only interested events are forwarded to the Application and unintended events are discarded.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/6.0/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
The policy to control the events are defined in cmPolicy.c and is available in location: \CmPlugin\src\app\common\plugins\cmPolicy.c in specified example.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ( /* For Specific condition of Event Ex: event-&amp;gt;Severity==SAHPI_MAJOR */)&lt;br /&gt;
        {&lt;br /&gt;
             /* Change the event to required form */&lt;br /&gt;
             /* event-&amp;gt;Severity=SAHPI_MINOR;      */&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to required location (/root/asp/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
  The logs are available in var/log/sys.latest and application_name.latest&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Switch_your_model/image_from_TIPC_to_UDP</id>
		<title>Switch your model/image from TIPC to UDP</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Switch_your_model/image_from_TIPC_to_UDP"/>
				<updated>2013-10-07T16:01:49Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;UDP can be run in two modes -- local or cloud.  In local mode, the UDP system uses multicast to find members of the cluster and auto-assigns non-routable IP addresses onto an alias of your chosen backplane network interface.  The advantage of local mode is that no IP addresses need to be configured.&lt;br /&gt;
&lt;br /&gt;
In cloud mode, it is assumed that the cluster is potentially running across the entire internet (no multicast) on machines with specified IP addresses.  Since no initial discovery is possible, every node needs to be configured with the IP addresses of the two system controller nodes.&lt;br /&gt;
&lt;br /&gt;
== Changing Your Model from TIPC to UDP ==&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
- If you have a pre-60 model you will need to upgrade it.  Using the IDE open your model, every option will be grey except model-&amp;gt;update.  This update will generate a configuration file called &amp;lt;your model&amp;gt;/config/clTransport.xml that looks something like this:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
      &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;xports&amp;gt;&lt;br /&gt;
            &amp;lt;xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;TIPC&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClTIPC.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport&amp;gt;&lt;br /&gt;
            &amp;lt;!--xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport--&amp;gt;&lt;br /&gt;
          &amp;lt;/xports&amp;gt;&lt;br /&gt;
          &amp;lt;!--heartbeat&amp;gt;&lt;br /&gt;
              &amp;lt;interval&amp;gt;2000&amp;lt;/interval&amp;gt;&lt;br /&gt;
              &amp;lt;intervalLocal&amp;gt;1000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
              &amp;lt;retries&amp;gt;3&amp;lt;/retries&amp;gt;&lt;br /&gt;
          &amp;lt;/heartbeat--&amp;gt;&lt;br /&gt;
        &amp;lt;/multixport&amp;gt;&lt;br /&gt;
      &amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;/openClovisAsp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
Edit the content clTransport.xml with the UDP configuration details, and remove the TIPC details:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
      &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;xports&amp;gt;&lt;br /&gt;
            &amp;lt;xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport&amp;gt;&lt;br /&gt;
          &amp;lt;/xports&amp;gt;&lt;br /&gt;
          &amp;lt;protocol default=&amp;quot;UDP&amp;quot;/&amp;gt;&lt;br /&gt;
          &amp;lt;multicast address=&amp;quot;226.0.1.1&amp;quot; port=&amp;quot;9595&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;heartbeat&amp;gt;&lt;br /&gt;
              &amp;lt;interval&amp;gt;3000&amp;lt;/interval&amp;gt;&lt;br /&gt;
              &amp;lt;intervalLocal&amp;gt;3000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
              &amp;lt;retries&amp;gt;5&amp;lt;/retries&amp;gt;&lt;br /&gt;
          &amp;lt;/heartbeat&amp;gt;&lt;br /&gt;
        &amp;lt;/multixport&amp;gt;&lt;br /&gt;
      &amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 3 (Local mode) ===&lt;br /&gt;
Add 2 environment variables into &amp;lt;model_dir&amp;gt;/src/target.env, or make sure these variables are defined before starting SAFplus:&lt;br /&gt;
&lt;br /&gt;
 export ASP_UDP_SUBNET=&amp;lt;IP Range&amp;gt;/Length&lt;br /&gt;
 export ASP_UDP_LINK_NAME=&amp;lt;your interface&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*'''Example:'''&lt;br /&gt;
&lt;br /&gt;
 export ASP_UDP_SUBNET=192.168.57.0/24&lt;br /&gt;
 export ASP_UDP_LINK_NAME=eth0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Step 3 (Cloud mode) ===&lt;br /&gt;
To use the UDP transport without node discovery (multicast) or IP address assignment, you must:&lt;br /&gt;
&lt;br /&gt;
1. Add these 2 environment variables into &amp;lt;model_dir&amp;gt;/src/target.env, or make sure these variables are defined before starting SAFplus:&lt;br /&gt;
&lt;br /&gt;
ASP_UDP_USE_EXISTING_IP=true&lt;br /&gt;
ASP_UDP_LINK_NAME=&amp;lt;link name, for example 'eth0'&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2. Configure UDP peer addresses like this:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
     &amp;lt;peerAddresses port=&amp;quot;6789&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.101&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.102&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/peerAddresses&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following is a this complete example of a cloud mode configuration file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
  &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;xports&amp;gt;&lt;br /&gt;
       &amp;lt;xport&amp;gt;&lt;br /&gt;
         &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
         &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
       &amp;lt;/xport&amp;gt;&lt;br /&gt;
     &amp;lt;/xports&amp;gt;&lt;br /&gt;
     &amp;lt;protocol default=&amp;quot;UDP&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;heartbeat&amp;gt;&lt;br /&gt;
          &amp;lt;interval&amp;gt;1000&amp;lt;/interval&amp;gt;&lt;br /&gt;
          &amp;lt;intervalLocal&amp;gt;1000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
          &amp;lt;retries&amp;gt;4&amp;lt;/retries&amp;gt;&lt;br /&gt;
     &amp;lt;/heartbeat&amp;gt;&lt;br /&gt;
     &amp;lt;peerAddresses port=&amp;quot;6789&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.101&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.102&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/peerAddresses&amp;gt;&lt;br /&gt;
    &amp;lt;/multixport&amp;gt;&lt;br /&gt;
  &amp;lt;/version&amp;gt;&lt;br /&gt;
 &amp;lt;/openClovisAsp&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Before or After &amp;quot;make images&amp;quot;? ===&lt;br /&gt;
clTransport.xml and target.env can be changed before the &amp;quot;make images&amp;quot; step so all generated images are UDP by default OR these files can be changed on every node after deployment.&lt;br /&gt;
&lt;br /&gt;
== FAQ ==&lt;br /&gt;
&lt;br /&gt;
* Q: Is the SAFplus able to run in UDP local mode as a non-root user?&lt;br /&gt;
* A: Yes, but you must properly configure the interfaces since SAFplus cannot. &lt;br /&gt;
Configure interface name (ASP_UDP_LINK_NAME) with the IP address calculated from your subnet and node address (ASP_UDP_SUBNET.DEFAULT_NODEADDR).  The node address is the DEFAULT_NODEADDR settings from etc/asp.conf file.&lt;br /&gt;
&lt;br /&gt;
 Example:&lt;br /&gt;
  root:#ifconfig eth0 192.168.57.1&lt;br /&gt;
  user:#export ASP_UDP_SUBNET=192.168.57.0/24&lt;br /&gt;
  user:#export ASP_UDP_LINK_NAME=eth0&lt;br /&gt;
  user:#./etc/init.d/safplus start&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Switch_your_model/image_from_TIPC_to_UDP</id>
		<title>Switch your model/image from TIPC to UDP</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Switch_your_model/image_from_TIPC_to_UDP"/>
				<updated>2013-10-07T15:40:22Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Step 2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== From Model ==&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
- If you have a pre-60 model you will need to upgrade it.  Using IDE open your model, it will require an upgrade before it can be used.  This will generate a  configuration file in &amp;lt;your model&amp;gt;/config/clTransport.xml.&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
      &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;xports&amp;gt;&lt;br /&gt;
            &amp;lt;xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;TIPC&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClTIPC.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport&amp;gt;&lt;br /&gt;
            &amp;lt;!--xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport--&amp;gt;&lt;br /&gt;
          &amp;lt;/xports&amp;gt;&lt;br /&gt;
          &amp;lt;!--heartbeat&amp;gt;&lt;br /&gt;
              &amp;lt;interval&amp;gt;2000&amp;lt;/interval&amp;gt;&lt;br /&gt;
              &amp;lt;intervalLocal&amp;gt;1000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
              &amp;lt;retries&amp;gt;3&amp;lt;/retries&amp;gt;&lt;br /&gt;
          &amp;lt;/heartbeat--&amp;gt;&lt;br /&gt;
        &amp;lt;/multixport&amp;gt;&lt;br /&gt;
      &amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;/openClovisAsp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
Edit the content clTransport.xml with some UDP configuration details:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
      &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;xports&amp;gt;&lt;br /&gt;
            &amp;lt;xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport&amp;gt;&lt;br /&gt;
          &amp;lt;/xports&amp;gt;&lt;br /&gt;
          &amp;lt;protocol default=&amp;quot;UDP&amp;quot;/&amp;gt;&lt;br /&gt;
          &amp;lt;multicast address=&amp;quot;226.0.1.1&amp;quot; port=&amp;quot;9595&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;heartbeat&amp;gt;&lt;br /&gt;
              &amp;lt;interval&amp;gt;3000&amp;lt;/interval&amp;gt;&lt;br /&gt;
              &amp;lt;intervalLocal&amp;gt;3000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
              &amp;lt;retries&amp;gt;5&amp;lt;/retries&amp;gt;&lt;br /&gt;
          &amp;lt;/heartbeat&amp;gt;&lt;br /&gt;
        &amp;lt;/multixport&amp;gt;&lt;br /&gt;
      &amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 3 ===&lt;br /&gt;
Add 2 env variables into &amp;lt;model_dir&amp;gt;/src/target.env:&lt;br /&gt;
&lt;br /&gt;
 export ASP_UDP_SUBNET=&amp;lt;IP Range&amp;gt;/Length&lt;br /&gt;
 export ASP_UDP_LINK_NAME=&amp;lt;your interface&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*'''Example:'''&lt;br /&gt;
&lt;br /&gt;
 export ASP_UDP_SUBNET=192.168.57.0/24&lt;br /&gt;
 export ASP_UDP_LINK_NAME=eth0&lt;br /&gt;
&lt;br /&gt;
=== Step 4 ===&lt;br /&gt;
Before running ASP, should export/setenv 2 below variables:&lt;br /&gt;
 export ASP_UDP_SUBNET=192.168.57.0/24 &lt;br /&gt;
 export ASP_UDP_LINK_NAME=eth0&lt;br /&gt;
&lt;br /&gt;
== UDP without Auto IP address assignment ==&lt;br /&gt;
&lt;br /&gt;
To use the UDP transport with the IP address, 'already configured' on a link, set these variables in your environment before starting SAFplus:&lt;br /&gt;
&lt;br /&gt;
 ASP_UDP_USE_EXISTING_IP=true&lt;br /&gt;
 ASP_UDP_LINK_NAME=&amp;lt;link name, for example 'eth0'&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 '''clTransport.xml''' should add static IP addresses for cluster:&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;peerAddresses port=&amp;quot;6789&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.101&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.102&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/peerAddresses&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== UDP without Node Discovery (Multicast) ==&lt;br /&gt;
&lt;br /&gt;
To use the UDP transport without node discovery, you must explicitly configure the static addresses and define variable environments ASP_UDP_USE_EXISTING_IP=true and ASP_UDP_LINK_NAME for getting ip addresses below.  &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
  &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;xports&amp;gt;&lt;br /&gt;
       &amp;lt;xport&amp;gt;&lt;br /&gt;
         &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
         &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
       &amp;lt;/xport&amp;gt;&lt;br /&gt;
     &amp;lt;/xports&amp;gt;&lt;br /&gt;
     &amp;lt;protocol default=&amp;quot;UDP&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;heartbeat&amp;gt;&lt;br /&gt;
          &amp;lt;interval&amp;gt;1000&amp;lt;/interval&amp;gt;&lt;br /&gt;
          &amp;lt;intervalLocal&amp;gt;1000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
          &amp;lt;retries&amp;gt;4&amp;lt;/retries&amp;gt;&lt;br /&gt;
     &amp;lt;/heartbeat&amp;gt;&lt;br /&gt;
     &amp;lt;peerAddresses port=&amp;quot;6789&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.101&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.102&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/peerAddresses&amp;gt;&lt;br /&gt;
    &amp;lt;/multixport&amp;gt;&lt;br /&gt;
  &amp;lt;/version&amp;gt;&lt;br /&gt;
 &amp;lt;/openClovisAsp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== From Image ==&lt;br /&gt;
Create a clTransport.xml like step 2 &amp;amp; 3 above and retarball your images.&lt;br /&gt;
&lt;br /&gt;
== Q&amp;amp;A ==&lt;br /&gt;
* Q: Is the SAFplus able to run as a user other than root?&lt;br /&gt;
* A: Only pre-requisites, configure interface name (ASP_UDP_LINK_NAME) with IP address (ASP_UDP_SUBNET.DEFAULT_NODEADDR) (Use DEFAULT_NODEADDR settings from asp.conf file)&lt;br /&gt;
&lt;br /&gt;
 Example:&lt;br /&gt;
  root:#ifconfig eth0 192.168.57.1&lt;br /&gt;
  user:#export ASP_UDP_SUBNET=192.168.57.0/24&lt;br /&gt;
  user:#export ASP_UDP_LINK_NAME=eth0&lt;br /&gt;
  user:#./etc/init.d/safplus start&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Switch_your_model/image_from_TIPC_to_UDP</id>
		<title>Switch your model/image from TIPC to UDP</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Switch_your_model/image_from_TIPC_to_UDP"/>
				<updated>2013-10-07T15:37:18Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Step 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== From Model ==&lt;br /&gt;
=== Step 1 ===&lt;br /&gt;
- If you have a pre-60 model you will need to upgrade it.  Using IDE open your model, it will require an upgrade before it can be used.  This will generate a  configuration file in &amp;lt;your model&amp;gt;/config/clTransport.xml.&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
      &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;xports&amp;gt;&lt;br /&gt;
            &amp;lt;xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;TIPC&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClTIPC.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport&amp;gt;&lt;br /&gt;
            &amp;lt;!--xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport--&amp;gt;&lt;br /&gt;
          &amp;lt;/xports&amp;gt;&lt;br /&gt;
          &amp;lt;!--heartbeat&amp;gt;&lt;br /&gt;
              &amp;lt;interval&amp;gt;2000&amp;lt;/interval&amp;gt;&lt;br /&gt;
              &amp;lt;intervalLocal&amp;gt;1000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
              &amp;lt;retries&amp;gt;3&amp;lt;/retries&amp;gt;&lt;br /&gt;
          &amp;lt;/heartbeat--&amp;gt;&lt;br /&gt;
        &amp;lt;/multixport&amp;gt;&lt;br /&gt;
      &amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;/openClovisAsp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Step 2 ===&lt;br /&gt;
Edit content clTransport.xml with UDP default:&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
      &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
          &amp;lt;xports&amp;gt;&lt;br /&gt;
            &amp;lt;xport&amp;gt;&lt;br /&gt;
              &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
              &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
            &amp;lt;/xport&amp;gt;&lt;br /&gt;
          &amp;lt;/xports&amp;gt;&lt;br /&gt;
          &amp;lt;protocol default=&amp;quot;UDP&amp;quot;/&amp;gt;&lt;br /&gt;
          &amp;lt;multicast address=&amp;quot;226.0.1.1&amp;quot; port=&amp;quot;9595&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;heartbeat&amp;gt;&lt;br /&gt;
              &amp;lt;interval&amp;gt;3000&amp;lt;/interval&amp;gt;&lt;br /&gt;
              &amp;lt;intervalLocal&amp;gt;3000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
              &amp;lt;retries&amp;gt;5&amp;lt;/retries&amp;gt;&lt;br /&gt;
          &amp;lt;/heartbeat&amp;gt;&lt;br /&gt;
        &amp;lt;/multixport&amp;gt;&lt;br /&gt;
      &amp;lt;/version&amp;gt;&lt;br /&gt;
    &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
UDP use multicast to notification component arrival and departure.&lt;br /&gt;
&lt;br /&gt;
=== Step 3 ===&lt;br /&gt;
Add 2 env variables into &amp;lt;model_dir&amp;gt;/src/target.env:&lt;br /&gt;
&lt;br /&gt;
 export ASP_UDP_SUBNET=&amp;lt;IP Range&amp;gt;/Length&lt;br /&gt;
 export ASP_UDP_LINK_NAME=&amp;lt;your interface&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*'''Example:'''&lt;br /&gt;
&lt;br /&gt;
 export ASP_UDP_SUBNET=192.168.57.0/24&lt;br /&gt;
 export ASP_UDP_LINK_NAME=eth0&lt;br /&gt;
&lt;br /&gt;
=== Step 4 ===&lt;br /&gt;
Before running ASP, should export/setenv 2 below variables:&lt;br /&gt;
 export ASP_UDP_SUBNET=192.168.57.0/24 &lt;br /&gt;
 export ASP_UDP_LINK_NAME=eth0&lt;br /&gt;
&lt;br /&gt;
== UDP without Auto IP address assignment ==&lt;br /&gt;
&lt;br /&gt;
To use the UDP transport with the IP address, 'already configured' on a link, set these variables in your environment before starting SAFplus:&lt;br /&gt;
&lt;br /&gt;
 ASP_UDP_USE_EXISTING_IP=true&lt;br /&gt;
 ASP_UDP_LINK_NAME=&amp;lt;link name, for example 'eth0'&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 '''clTransport.xml''' should add static IP addresses for cluster:&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;peerAddresses port=&amp;quot;6789&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.101&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.102&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/peerAddresses&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== UDP without Node Discovery (Multicast) ==&lt;br /&gt;
&lt;br /&gt;
To use the UDP transport without node discovery, you must explicitly configure the static addresses and define variable environments ASP_UDP_USE_EXISTING_IP=true and ASP_UDP_LINK_NAME for getting ip addresses below.  &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
 &amp;lt;openClovisAsp&amp;gt;&lt;br /&gt;
  &amp;lt;version v0=&amp;quot;4.0.0&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;multixport xmlns=&amp;quot;multixport.ecore&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;xports&amp;gt;&lt;br /&gt;
       &amp;lt;xport&amp;gt;&lt;br /&gt;
         &amp;lt;type&amp;gt;UDP&amp;lt;/type&amp;gt;&lt;br /&gt;
         &amp;lt;plugin&amp;gt;libClUDP.so&amp;lt;/plugin&amp;gt;&lt;br /&gt;
       &amp;lt;/xport&amp;gt;&lt;br /&gt;
     &amp;lt;/xports&amp;gt;&lt;br /&gt;
     &amp;lt;protocol default=&amp;quot;UDP&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;heartbeat&amp;gt;&lt;br /&gt;
          &amp;lt;interval&amp;gt;1000&amp;lt;/interval&amp;gt;&lt;br /&gt;
          &amp;lt;intervalLocal&amp;gt;1000&amp;lt;/intervalLocal&amp;gt;&lt;br /&gt;
          &amp;lt;retries&amp;gt;4&amp;lt;/retries&amp;gt;&lt;br /&gt;
     &amp;lt;/heartbeat&amp;gt;&lt;br /&gt;
     &amp;lt;peerAddresses port=&amp;quot;6789&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.101&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;peer addr=&amp;quot;192.168.56.102&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;/peerAddresses&amp;gt;&lt;br /&gt;
    &amp;lt;/multixport&amp;gt;&lt;br /&gt;
  &amp;lt;/version&amp;gt;&lt;br /&gt;
 &amp;lt;/openClovisAsp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== From Image ==&lt;br /&gt;
Create a clTransport.xml like step 2 &amp;amp; 3 above and retarball your images.&lt;br /&gt;
&lt;br /&gt;
== Q&amp;amp;A ==&lt;br /&gt;
* Q: Is the SAFplus able to run as a user other than root?&lt;br /&gt;
* A: Only pre-requisites, configure interface name (ASP_UDP_LINK_NAME) with IP address (ASP_UDP_SUBNET.DEFAULT_NODEADDR) (Use DEFAULT_NODEADDR settings from asp.conf file)&lt;br /&gt;
&lt;br /&gt;
 Example:&lt;br /&gt;
  root:#ifconfig eth0 192.168.57.1&lt;br /&gt;
  user:#export ASP_UDP_SUBNET=192.168.57.0/24&lt;br /&gt;
  user:#export ASP_UDP_LINK_NAME=eth0&lt;br /&gt;
  user:#./etc/init.d/safplus start&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:Latest/SAFplus_Availability/Scalability_Platform_Documentation</id>
		<title>Doc:Latest/SAFplus Availability/Scalability Platform Documentation</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:Latest/SAFplus_Availability/Scalability_Platform_Documentation"/>
				<updated>2013-09-30T15:25:22Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* SAFplus Platform Runtime Director Documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SAFplus Availability/Scalability Platform==&lt;br /&gt;
:[[Doc:latest/relnotes | Release Notes ]]&lt;br /&gt;
:[[Doc:latest/installguide | Installation Guide]]&lt;br /&gt;
:[[Doc:latest/tutorial | Sample Application Tutorial]]&lt;br /&gt;
:[[Doc:latest/evalguide | Evaluation System User's Guide]]&lt;br /&gt;
:[[Doc:latest/ideguide | IDE User Guide]]&lt;br /&gt;
:[[Doc:latest/sdkguide | SDK User Guide]]&lt;br /&gt;
:[[Doc:latest/safcompliance | SAF Compliance]]&lt;br /&gt;
:[[Doc:latest/logtoolguide | LogTool User's Guide]]&lt;br /&gt;
&amp;lt;!-- :[[Doc:latest/statsguide | SAFplus Performance And Test Guide]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===API Documentation===&lt;br /&gt;
&lt;br /&gt;
==== SA-Forum Compliant Services ====&lt;br /&gt;
:Many SAFplus Platform services are SAF (Service Availability Forum) compliant. The full SAF API documentation is available from [http://www.saforum.org  the Service Availability Forum].  Selected documents are available here:&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-AMF-B.04.01.AL Availability Management Framework]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-CKPT-B.02.02.AL Checkpoint Service]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-MSG-B.03.01.AL Message Service]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-EVT-B.03.01.AL Event Service]&lt;br /&gt;
&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-CPROG-B.05.02.AL C Programming Model]&lt;br /&gt;
&lt;br /&gt;
==== SAFplus Platform Additional APIs ====&lt;br /&gt;
: Documentation of SAFplus Platform APIs is located here [[http://help.openclovis.com/api/SAFplus/index.html  SAFplus API Documentation]].  This API documentation is also located within the SAFplus Platform header files.&lt;br /&gt;
&lt;br /&gt;
=== 3rdparty Services and Tools Documentation ===&lt;br /&gt;
&lt;br /&gt;
* [http://tipc.sourceforge.net/doc/tipc_2.0_users_guide.html TIPC] is a Linux kernel module that provides fast, low latency cluster based messaging and is a network transport option under SAFplus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SAFplus Platform Runtime Director Documentation==&lt;br /&gt;
&lt;br /&gt;
:[[Doc:latest/awdguide | Runtime Director User's Guide]]   &lt;br /&gt;
: SAFplus Runtime Director API Reference [[http://help.openclovis.com/api/srd/index.html  SRD API Documentation]].&lt;br /&gt;
&lt;br /&gt;
==[[Test Automation Environment]]==&lt;br /&gt;
:[[Doc:latest/taeguide | TAE Users Guide]] : Installation, configuration, discussion and examples&lt;br /&gt;
:[http://help.openclovis.com/static/taeApiDoc TAE Python APIs] : API documentation for the Python system test case layer&lt;br /&gt;
:[http://help.openclovis.com/static/apirefs/a00447.html TAE C APIs]: API documentation for the C unit test case layer&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SAFplus Platform Plugins==&lt;br /&gt;
&lt;br /&gt;
====[[SAFplus Management Framework]] EXPERIMENTAL====&lt;br /&gt;
:The [[SAFplus Management Framework]] provides a powerful element management framework.&lt;br /&gt;
====[[PostgreSQL Database Integration]] EXPERIMENTAL====&lt;br /&gt;
:The [[PostgreSQL Database Integration]] provides an easy way to deploy a highly available SQL database for use by applications in your cluster.&lt;br /&gt;
====[[CouchDB Integration]] EXPERIMENTAL ====&lt;br /&gt;
:The [[CouchDB Integration]] provides an integration between CouchDB and SAFplus, providing a highly available nosql database solution.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:Latest/SAFplus_Availability/Scalability_Platform_Documentation</id>
		<title>Doc:Latest/SAFplus Availability/Scalability Platform Documentation</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:Latest/SAFplus_Availability/Scalability_Platform_Documentation"/>
				<updated>2013-09-30T15:24:49Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* SAFplus Platform Runtime Director Documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SAFplus Availability/Scalability Platform==&lt;br /&gt;
:[[Doc:latest/relnotes | Release Notes ]]&lt;br /&gt;
:[[Doc:latest/installguide | Installation Guide]]&lt;br /&gt;
:[[Doc:latest/tutorial | Sample Application Tutorial]]&lt;br /&gt;
:[[Doc:latest/evalguide | Evaluation System User's Guide]]&lt;br /&gt;
:[[Doc:latest/ideguide | IDE User Guide]]&lt;br /&gt;
:[[Doc:latest/sdkguide | SDK User Guide]]&lt;br /&gt;
:[[Doc:latest/safcompliance | SAF Compliance]]&lt;br /&gt;
:[[Doc:latest/logtoolguide | LogTool User's Guide]]&lt;br /&gt;
&amp;lt;!-- :[[Doc:latest/statsguide | SAFplus Performance And Test Guide]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===API Documentation===&lt;br /&gt;
&lt;br /&gt;
==== SA-Forum Compliant Services ====&lt;br /&gt;
:Many SAFplus Platform services are SAF (Service Availability Forum) compliant. The full SAF API documentation is available from [http://www.saforum.org  the Service Availability Forum].  Selected documents are available here:&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-AMF-B.04.01.AL Availability Management Framework]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-CKPT-B.02.02.AL Checkpoint Service]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-MSG-B.03.01.AL Message Service]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-EVT-B.03.01.AL Event Service]&lt;br /&gt;
&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-CPROG-B.05.02.AL C Programming Model]&lt;br /&gt;
&lt;br /&gt;
==== SAFplus Platform Additional APIs ====&lt;br /&gt;
: Documentation of SAFplus Platform APIs is located here [[http://help.openclovis.com/api/SAFplus/index.html  SAFplus API Documentation]].  This API documentation is also located within the SAFplus Platform header files.&lt;br /&gt;
&lt;br /&gt;
=== 3rdparty Services and Tools Documentation ===&lt;br /&gt;
&lt;br /&gt;
* [http://tipc.sourceforge.net/doc/tipc_2.0_users_guide.html TIPC] is a Linux kernel module that provides fast, low latency cluster based messaging and is a network transport option under SAFplus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SAFplus Platform Runtime Director Documentation==&lt;br /&gt;
&lt;br /&gt;
:[[Doc:latest/awdguide | Runtime Director User's Guide]]   &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
: SAFplus Runtime Director API Reference [[http://help.openclovis.com/api/srd/index.html  SAFplus API Documentation]].&lt;br /&gt;
&lt;br /&gt;
==[[Test Automation Environment]]==&lt;br /&gt;
:[[Doc:latest/taeguide | TAE Users Guide]] : Installation, configuration, discussion and examples&lt;br /&gt;
:[http://help.openclovis.com/static/taeApiDoc TAE Python APIs] : API documentation for the Python system test case layer&lt;br /&gt;
:[http://help.openclovis.com/static/apirefs/a00447.html TAE C APIs]: API documentation for the C unit test case layer&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SAFplus Platform Plugins==&lt;br /&gt;
&lt;br /&gt;
====[[SAFplus Management Framework]] EXPERIMENTAL====&lt;br /&gt;
:The [[SAFplus Management Framework]] provides a powerful element management framework.&lt;br /&gt;
====[[PostgreSQL Database Integration]] EXPERIMENTAL====&lt;br /&gt;
:The [[PostgreSQL Database Integration]] provides an easy way to deploy a highly available SQL database for use by applications in your cluster.&lt;br /&gt;
====[[CouchDB Integration]] EXPERIMENTAL ====&lt;br /&gt;
:The [[CouchDB Integration]] provides an integration between CouchDB and SAFplus, providing a highly available nosql database solution.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:Latest/SAFplus_Availability/Scalability_Platform_Documentation</id>
		<title>Doc:Latest/SAFplus Availability/Scalability Platform Documentation</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:Latest/SAFplus_Availability/Scalability_Platform_Documentation"/>
				<updated>2013-09-30T15:23:48Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* SAFplus Platform Additional APIs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SAFplus Availability/Scalability Platform==&lt;br /&gt;
:[[Doc:latest/relnotes | Release Notes ]]&lt;br /&gt;
:[[Doc:latest/installguide | Installation Guide]]&lt;br /&gt;
:[[Doc:latest/tutorial | Sample Application Tutorial]]&lt;br /&gt;
:[[Doc:latest/evalguide | Evaluation System User's Guide]]&lt;br /&gt;
:[[Doc:latest/ideguide | IDE User Guide]]&lt;br /&gt;
:[[Doc:latest/sdkguide | SDK User Guide]]&lt;br /&gt;
:[[Doc:latest/safcompliance | SAF Compliance]]&lt;br /&gt;
:[[Doc:latest/logtoolguide | LogTool User's Guide]]&lt;br /&gt;
&amp;lt;!-- :[[Doc:latest/statsguide | SAFplus Performance And Test Guide]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===API Documentation===&lt;br /&gt;
&lt;br /&gt;
==== SA-Forum Compliant Services ====&lt;br /&gt;
:Many SAFplus Platform services are SAF (Service Availability Forum) compliant. The full SAF API documentation is available from [http://www.saforum.org  the Service Availability Forum].  Selected documents are available here:&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-AMF-B.04.01.AL Availability Management Framework]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-CKPT-B.02.02.AL Checkpoint Service]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-MSG-B.03.01.AL Message Service]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-EVT-B.03.01.AL Event Service]&lt;br /&gt;
&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-CPROG-B.05.02.AL C Programming Model]&lt;br /&gt;
&lt;br /&gt;
==== SAFplus Platform Additional APIs ====&lt;br /&gt;
: Documentation of SAFplus Platform APIs is located here [[http://help.openclovis.com/api/SAFplus/index.html  SAFplus API Documentation]].  This API documentation is also located within the SAFplus Platform header files.&lt;br /&gt;
&lt;br /&gt;
=== 3rdparty Services and Tools Documentation ===&lt;br /&gt;
&lt;br /&gt;
* [http://tipc.sourceforge.net/doc/tipc_2.0_users_guide.html TIPC] is a Linux kernel module that provides fast, low latency cluster based messaging and is a network transport option under SAFplus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SAFplus Platform Runtime Director Documentation==&lt;br /&gt;
&lt;br /&gt;
:[[Doc:latest/awdguide | Runtime Director User's Guide]]   &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
==[[Test Automation Environment]]==&lt;br /&gt;
:[[Doc:latest/taeguide | TAE Users Guide]] : Installation, configuration, discussion and examples&lt;br /&gt;
:[http://help.openclovis.com/static/taeApiDoc TAE Python APIs] : API documentation for the Python system test case layer&lt;br /&gt;
:[http://help.openclovis.com/static/apirefs/a00447.html TAE C APIs]: API documentation for the C unit test case layer&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SAFplus Platform Plugins==&lt;br /&gt;
&lt;br /&gt;
====[[SAFplus Management Framework]] EXPERIMENTAL====&lt;br /&gt;
:The [[SAFplus Management Framework]] provides a powerful element management framework.&lt;br /&gt;
====[[PostgreSQL Database Integration]] EXPERIMENTAL====&lt;br /&gt;
:The [[PostgreSQL Database Integration]] provides an easy way to deploy a highly available SQL database for use by applications in your cluster.&lt;br /&gt;
====[[CouchDB Integration]] EXPERIMENTAL ====&lt;br /&gt;
:The [[CouchDB Integration]] provides an integration between CouchDB and SAFplus, providing a highly available nosql database solution.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:Sdk_4.1/awdguide/upgradedirector</id>
		<title>Doc:Sdk 4.1/awdguide/upgradedirector</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:Sdk_4.1/awdguide/upgradedirector"/>
				<updated>2013-09-12T01:20:50Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Bundle Creation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{AwdDocHeader}}&lt;br /&gt;
=Upgrade Director=&lt;br /&gt;
&lt;br /&gt;
The Upgrade Director is a separate entity that controls the upgrade of the SAFplus Platform middleware and optionally the OS.  To upgrade applications, please see the &amp;quot;Software Management&amp;quot; subsection.&lt;br /&gt;
&lt;br /&gt;
The core of the Upgrade Director consists of a python program that is run on both system controllers that upgrades a cluster using an in-service (rolling) algorithm.  This is difficult because the node that the upgrade director's themselves are running on may need to be rebooted.  However, since the upgrade director is run redundantly (on both system controllers) there is always one live node to direct operations.&lt;br /&gt;
&lt;br /&gt;
Care was taken during the design of the Upgrade Director to ensure that it continues to operate in adverse conditions and does not leave the cluster in an untenable state.  In particular:&lt;br /&gt;
&lt;br /&gt;
* All required software is deployed on-cluster on both system controllers before the upgrade starts this ensures that a network outage will not affect the upgrade.&lt;br /&gt;
* Once started, the upgrade is driven by software running on the cluster rather then at the management station.  This ensures that an outage between the NOC and the cluster will not affect the upgrade.&lt;br /&gt;
* The Upgrade Director executable is delivered within the upgrade package, ensuring that it can be upgraded itself before executing an upgrade. &lt;br /&gt;
* The Upgrade Director uses the SAFplus Platform middleware as little as possible.  Essentially, it only uses it to query the state of the cluster, not to store its own state.  This reduces the possibility that a bug in the middleware will cause the upgrade director to fail.&lt;br /&gt;
&lt;br /&gt;
===Extensibility===&lt;br /&gt;
&lt;br /&gt;
The Upgrade Director is made to be operating system distribution-neutral.  To upgrade operating system packages or the operating system itself, you must overload certain virtual functions that actually install the packages on disk.  This allows you to control how the packages are organized on disk: &amp;quot;rpm&amp;quot;, &amp;quot;dpkg&amp;quot;, an A/B disk partitioning system, or something custom to your system.&lt;br /&gt;
&lt;br /&gt;
But the upgrade director simplifies the process dramatically by scheduling when your operations occur relative to the ongoing upgrade in the rest of the cluster.&lt;br /&gt;
&lt;br /&gt;
===Operational Walkthrough===&lt;br /&gt;
&lt;br /&gt;
This operational walkthrough is written based on the OpenClovis supplied bundle that uses tar files.  If you add another bundle file format, some steps may be different.&lt;br /&gt;
&lt;br /&gt;
====Development====&lt;br /&gt;
# The engineer first creates an SAFplus Platform model with the IDE, compiles it, makes images, tests it, etc as is normally done.&lt;br /&gt;
## The SAFplus Platform image should be made with the &amp;quot;INSTANTIATE_IMAGES=NO&amp;quot; flag in target.conf so a single SAFplus Platform tarball is created for all nodes.&lt;br /&gt;
# The engineer implements upgrade manager customization including optional callouts to upgrade the operating system and application data.&lt;br /&gt;
# The engineer must create a bundle definition xml file, as defined below.&lt;br /&gt;
# The &amp;quot;createUpgradeBundle.py&amp;quot; script is run to generate an &amp;quot;asp.bundle&amp;quot; file.&lt;br /&gt;
&lt;br /&gt;
This file is copied to a system controller node on the target chassis&lt;br /&gt;
&lt;br /&gt;
====Upgrade====&lt;br /&gt;
Prerequisites: The SAFplus Platform middleware bundle should be copied to one system controller node.&lt;br /&gt;
&lt;br /&gt;
# The user executes the bundle with a single argument that is the path to the running asp&lt;br /&gt;
## for example: chmod a+x asp.bundle; ./asp.bundle /root/asp&lt;br /&gt;
# The upgrade does its work (see &amp;quot;UpgradeDirector algorithm walkthrough&amp;quot; below).&lt;br /&gt;
# Now the user has the option to either commit the upgrade, or revert it.&lt;br /&gt;
## /root/asp.newver/bin /tmp/udtmp1/upgradeDirector/upgradeDirector/upgradeDirector.py --commit&lt;br /&gt;
## /root/asp.newver/bin /tmp/udtmp1/upgradeDirector/upgradeDirector/upgradeDirector.py --revert&lt;br /&gt;
&lt;br /&gt;
====UpgradeDirector &amp;quot;Upgrade&amp;quot; Algorithm Walkthrough====&lt;br /&gt;
Prerequisites: The SAFplus Platform middleware bundle is executed on one system controller node.&lt;br /&gt;
&lt;br /&gt;
# The bundle contains a shell script executes:&lt;br /&gt;
## It detars itself into /tmp/udtmp1&lt;br /&gt;
## It starts upgradeDirector.py running under &amp;quot;asp_run&amp;quot;&lt;br /&gt;
# upgradeDirector.py first verifies that the cluster is healthy&lt;br /&gt;
# Then it installs itself onto the second system controller, and starts up.&lt;br /&gt;
# It establishes communications with the second upgrade director and synchronizes state.&lt;br /&gt;
# It chooses a &amp;quot;master&amp;quot;.&lt;br /&gt;
# The master starts upgrading the secondary system controller:&lt;br /&gt;
## Installs the new SAFplus Platform&lt;br /&gt;
## Stops the secondary upgrade director&lt;br /&gt;
## Stops SAFplus Platform&lt;br /&gt;
## Copies and upgrades the runtime data from the old SAFplus Platform location to the new.&lt;br /&gt;
## Calls customer implemented callbacks to upgrade the OS, and reboot the system (if required for OS kernal upgrade -- otherwise a reboot is not required) at this time.&lt;br /&gt;
## Restarts SAFplus Platform&lt;br /&gt;
## Verify that SAFplus Platform came up successfully.&lt;br /&gt;
## Restarts the secondary upgrade director.&lt;br /&gt;
## Resynchronizes with the secondary&lt;br /&gt;
## Gives up &amp;quot;master&amp;quot; status&lt;br /&gt;
# The new master now upgrades the other controller node in the same manner described above&lt;br /&gt;
# At this point both controllers are upgraded, but no payload nodes are upgraded.  So software written for the payload nodes can rely on the fact that the controllers are running the latest software, but controllers cannot assume that for payload nodes or for other controller nodes.&lt;br /&gt;
# The master now upgrades each payload node one at a time following the following algorithm&lt;br /&gt;
## Copy the bundle to the node&lt;br /&gt;
## Installs the new SAFplus Platform&lt;br /&gt;
## Stops SAFplus Platform&lt;br /&gt;
## Copies and upgrades the runtime data from the old SAFplus Platform location to the new.&lt;br /&gt;
## Calls customer implemented callbacks to upgrade the OS, and reboot the system at this time.&lt;br /&gt;
## Restarts SAFplus Platform&lt;br /&gt;
## Verify that SAFplus Platform came up successfully.&lt;br /&gt;
&lt;br /&gt;
# Both upgrade director applications exit.&lt;br /&gt;
&lt;br /&gt;
At this point all nodes are upgraded, but the old SAFplus Platform still remains on disk.  The user may now operate in this mode for as long as desired (but may not run another upgrade).  When there is confidence in the successful operation of the system, the user may commit or revert the upgrade.&lt;br /&gt;
&lt;br /&gt;
Committing the upgrade is simply a matter of deleting the old SAFplus Platform files and deleting the upgrade bundle out of /tmp.  There is no effect on the running SAFplus Platform.  &lt;br /&gt;
&lt;br /&gt;
Reverting an upgrade is also made as simple as possible, since it occurs after user confidence in the system is lost.  The revert operation simply stops the currently running SAFplus Platform on all payload nodes and starts the old version.  Then it does the same for the controller nodes.  In fact in the worst case of upgrade software failure, the operator can do this revert manually on each node (essentially just &amp;quot;&amp;lt;newver&amp;gt;/etc/init.d/asp stop; &amp;lt;oldver&amp;gt;/etc/init.d/asp start&amp;quot;.  This makes the revert operation resilient even to failures in the upgrade software itself!&lt;br /&gt;
&lt;br /&gt;
The reversion order ensures that all payload nodes are downgraded before controller nodes.&lt;br /&gt;
&lt;br /&gt;
===Delivery===&lt;br /&gt;
&lt;br /&gt;
The Upgrade Director requires an &amp;quot;upgrade bundle&amp;quot; file to run.  This file contains the Upgrade Director itself and all files necessary to do an upgrade.  New upgrade bundle file formats can be used by deriving new classes from the &amp;quot;UpgradeBundle&amp;quot; and &amp;quot;UpgradeRemote&amp;quot; classes.  &lt;br /&gt;
&lt;br /&gt;
The Upgrade Director provides a default, self-executing, linux-distribution-neutral bundle file format based on gzipped tar files.  A script is also provided that will create this bundle given a compiled SAFplus Platform tree and an xml configuration file.&lt;br /&gt;
&lt;br /&gt;
===XML File Format===&lt;br /&gt;
&lt;br /&gt;
The following is an example XML file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;bundle_config ver=&amp;quot;1.0.0.0&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;asp&amp;gt;&lt;br /&gt;
        &amp;lt;image version=&amp;quot;4.1.0&amp;quot; arch=&amp;quot;i686&amp;quot; os=&amp;quot;ubuntu&amp;quot; osVersion=&amp;quot;9.04&amp;quot; files='i686-linux-2.6.22.tgz'/&amp;gt;&lt;br /&gt;
    &amp;lt;/asp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;app&amp;gt;&lt;br /&gt;
        &amp;lt;virtualIp version=&amp;quot;1.4.0.1&amp;quot; arch=&amp;quot;i686&amp;quot; os=&amp;quot;linux&amp;quot; files='vipapp1.4.0.1.tgz' /&amp;gt;&lt;br /&gt;
    &amp;lt;/app&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;upgradeDirector&amp;gt;&lt;br /&gt;
        &amp;lt;default fromAspVersion=&amp;quot;4.0&amp;quot; aspVersion=&amp;quot;4.1&amp;quot; files='/code/svn/clustermgt/clustermgt/root/ocms/src/app/asppybinding /code/svn/clustermgt/clustermgt/root/ocms/src/app/upgradeDirector /code/svn/clustermgt/clustermgt/root/ocms/target/i686/linux-2.6.22/lib/' /&amp;gt;&lt;br /&gt;
    &amp;lt;/upgradeDirector&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;os&amp;gt;&lt;br /&gt;
        &amp;lt;Ubuntu fromVersion=&amp;quot;8.04&amp;quot; version=&amp;quot;9.10&amp;quot; files='fakeubuntu9.10.tgz' /&amp;gt;&lt;br /&gt;
    &amp;lt;/os&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bundle_config&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This XML file is included in the upgrade bundle for use when upgrading the cluster.  Any unknown tag or attribute is simply ignored, so this file format may be extended to supply additional functionality.  If the entity is applicable to all possibilities (such as what operating system the code runs on, or what version must be running on the system before the upgrade) then the specifying attribute may be removed.&lt;br /&gt;
&lt;br /&gt;
In this release, only a single entry in each major section is allowed -- for example, the software does not determine which SAFplus Platform image or OS image should be used in the upgrade.  There should be only one image specified.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Description of tags ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;bundle_config&amp;gt; This tag defines the start and end of the config file.  It contains as single attribute which is the version of this XML config file format.  Currently &amp;quot;ver&amp;quot; which must be &amp;quot;1.0.0.0&amp;quot;.&lt;br /&gt;
* &amp;lt;asp&amp;gt; This tag contains the SAFplus Platform images available within this bundle.  Currently only a single SAFplus Platform image is supported per bundle.&lt;br /&gt;
* &amp;lt;image&amp;gt; This tag defines the SAFplus Platform image.  Its attributes are:&lt;br /&gt;
** version The SAFplus Platform version&lt;br /&gt;
** arch The architecture this SAFplus Platform is compiled for&lt;br /&gt;
** os The OS this image was compiled on&lt;br /&gt;
** osVersion The OS version this image was compiled on &lt;br /&gt;
** files The SAFplus Platform image file.  This is the output of &amp;quot;make images&amp;quot; executed in an SAFplus Platform model, with your target.conf set to generate a single binary image, and separate .conf files.&lt;br /&gt;
* &amp;lt;app&amp;gt; Simultaneous application upgrade is not supported in this release&lt;br /&gt;
* &amp;lt;upgradeDirector&amp;gt; This section specifies the upgrade director software available in this bundle&lt;br /&gt;
**  fromAspVersion Specifies what version of SAFplus Platform the upgrade director can upgrade from.&lt;br /&gt;
**  aspVersion Specifies what version of SAFplus Platform the upgrade director can upgrade to.&lt;br /&gt;
**  files A space-separated list of files and directories that must contain the upgrade director application and all required libraries.  These file will be copied into the bundle.&lt;br /&gt;
* &amp;lt;os&amp;gt; What operating system upgrades are contained in this bundle&lt;br /&gt;
** fromVersion The node must be running this version for this file to be applicable&lt;br /&gt;
** version The version of the os in this file&lt;br /&gt;
** files A space-separated list of files and directories that contain the operating system.  These files/directories will be copied into the bundle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Bundle Creation ===&lt;br /&gt;
&lt;br /&gt;
A bundle is created by running the &amp;quot;createUpgradeBundle.py&amp;quot; script located in the upgradeDirector directory.  But the first step is to &amp;quot;make images&amp;quot; your model with the &amp;quot;INSTANTIATE_IMAGES=NO&amp;quot; flag set in your model's target.conf file.  Setting this flag to NO will create a single archive containing the compiled model rather than individual archives for each node.&lt;br /&gt;
&lt;br /&gt;
createUpgradeBundle.py is run like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export UPGRADE_IMAGE_PATH=&amp;lt;colon separated list of directories&amp;gt;&lt;br /&gt;
python createUpgradeBundle.py &amp;lt;xmlConfigFile&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The UPGRADE_IMAGE_PATH directory allows you to specify the set of search directories when looking for files referenced in the xml config file.  The purpose of the UPGRADE_IMAGE_PATH variable twofold: First, to allow the script to handle changes in the directory hierarchy without requiring the config file to be changed.  This is useful   for multiple-developer source-controlled environments since different &amp;quot;checkouts&amp;quot; may use different root trees.  Second, to allow the config file to be copied into the bundle itself and still have applicable file names.&lt;br /&gt;
&lt;br /&gt;
=== Bundle Execution ===&lt;br /&gt;
The created bundle is a gzipped tar file which is wrapped in a simple self-extracting script (selfextractor.sh).  This script can either extract all files in the archive (i.e. detar them) or extract and start the runtime director.    This latter is the rolling upgrade operation.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
To extract all files in the archive:&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;bundle&amp;gt; extract&lt;br /&gt;
specifically:&lt;br /&gt;
./asp4.1.0.bdl extract&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To start the upgrade director:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;bundle&amp;gt; &amp;lt;current SAFplus Platform dir&amp;gt;&lt;br /&gt;
specifically:&lt;br /&gt;
./asp4.1.0.bdl /root/asp40&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this command should only be run on a single controller node in your cluster.  It will automatically identify the other controller node and run the upgrade director redundantly on it.&lt;br /&gt;
&lt;br /&gt;
Please see the &amp;quot;selfextractor.sh&amp;quot; script for more details and for customization.&lt;br /&gt;
&lt;br /&gt;
=== Upgrade Director Command Line ===&lt;br /&gt;
&lt;br /&gt;
Once the bundle has been extracted it automatically runs the upgrade director.  But you can also run it explicitly like this:&lt;br /&gt;
&lt;br /&gt;
* --resume&lt;br /&gt;
To continue an upgrade if it stopped for any reason, use the --resume option&lt;br /&gt;
&amp;lt;aspDir&amp;gt;/bin/asp_run python /tmp/udtmp/upgradeDirector/upgradeDirector.py --resume&lt;br /&gt;
&lt;br /&gt;
* --commit&lt;br /&gt;
To commit an upgrade, run the upgrade director under asp_run with the --commit option:&lt;br /&gt;
&amp;lt;aspDir&amp;gt;/bin/asp_run python /tmp/udtmp/upgradeDirector/upgradeDirector.py --commit&lt;br /&gt;
&lt;br /&gt;
* --revert&lt;br /&gt;
To revert an upgrade, run the upgrade director under asp_run with the --revert option:&lt;br /&gt;
&amp;lt;aspDir&amp;gt;/bin/asp_run python /tmp/udtmp/upgradeDirector/upgradeDirector.py --revert&lt;br /&gt;
&lt;br /&gt;
* --restart&lt;br /&gt;
To restart the upgrade (losing current state), run with the --restart option.&lt;br /&gt;
&amp;lt;aspDir&amp;gt;/bin/asp_run python /tmp/udtmp/upgradeDirector/upgradeDirector.py --restart &amp;lt;aspdir&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* --nocopy&lt;br /&gt;
To skip the step that pushes the upgrade director to the other controller and starts it, use &amp;quot;--nocopy&amp;quot; along with one of the other flags above.&lt;br /&gt;
&lt;br /&gt;
* --display=&amp;lt;ip&amp;gt;&lt;br /&gt;
If you would like it to open progress and debugging windows, use &amp;quot;--display=&amp;lt;ip address&amp;gt;&amp;quot;.  Note your X server on &amp;quot;display&amp;quot; machine must be configured to accept incoming x client requests (xhost +) on the default &amp;quot;X&amp;quot; port.&lt;br /&gt;
&lt;br /&gt;
===Software Overview===&lt;br /&gt;
&lt;br /&gt;
Please see the API documentation for details on the software.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/statsguide</id>
		<title>Doc:latest/statsguide</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/statsguide"/>
				<updated>2013-08-15T16:34:13Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* StressTest */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Preface'''==&lt;br /&gt;
&lt;br /&gt;
''SAFplus Performance and Test Guide''  guide provides information about how the SAFplus system performs under load and how we test the product.&lt;br /&gt;
&lt;br /&gt;
===Audience===&lt;br /&gt;
&lt;br /&gt;
This guide is designed for system integrators, designers, and system architects. To use the product, you must be aware of the fundamentals of design, development, operation, management and configuration of telecommunication and networking systems. You must also be familiar with C programming, UML notations, and have the basic knowledge of Linux.&lt;br /&gt;
&lt;br /&gt;
===Documentation Conventions===&lt;br /&gt;
&lt;br /&gt;
This guide uses different fonts and symbols to differentiate between document elements and types of information. These conventions are summarized in the following table.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Notation &lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Description&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|style=&amp;quot;color:black&amp;quot; |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Code&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This font denotes the C code provided in various examples.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|Cross reference&lt;br /&gt;
|&lt;br /&gt;
This font denotes a hyperlink. You can click on the hyperlink text to access the reference location, which can be either a section within the User Guide or a URL link.A cross reference refers to a section name and accesses the first page of that section.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Bold Text''' &lt;br /&gt;
|&lt;br /&gt;
Menu items and button names.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''''Italic Text''''' &lt;br /&gt;
|&lt;br /&gt;
Variables for which you enter values.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]This indicates the presence of notes or annotations, related to the context of the document.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Caution.png]]This indicates that certain precautionary measures must be taken before performing a particular task.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Info.png]]This indicates that additional information is provided to you.&lt;br /&gt;
&lt;br /&gt;
===Related Documents===&lt;br /&gt;
&lt;br /&gt;
For additional information about OpenClovis products, refer to the following guides:&lt;br /&gt;
* '''[[Doc:latest/relnotes | SAFplus Platform Release Notes]]''' provides information about the software and the hardware required to install OpenClovis Application Service Platform (SAFplus Platform) and Integrated Development Environment (IDE). It summarizes the additional features and enhancements of the product since the previous release. It also summarizes the issues and limitations of the product and provides workarounds wherever applicable.&lt;br /&gt;
* '''[[Doc:latest/safcompliance | SAFplus Platform SA-Forum Compliance]]''' describes the level of compliance of OpenClovis SAFplus Platform and its Application Programming Interface (API) with the relevant Service Availability Forum Specifications.&lt;br /&gt;
* '''[[Doc:latest/installguide | SAFplus Platform Installation Guide]]''' provides the system requirements, installation procedure for OpenClovis SAFplus Platform, IDE, and the Evaluation System.&lt;br /&gt;
* '''[[Doc:latest/tutorial | SAFplus Platform Sample Application Tutorial]]''' explains the steps to create and build a sample model using OpenClovis IDE and OpenClovis SAFplus Platform. It also provides troubleshooting information for this process. This provides the logical first step in understanding the SAFplus Platform offering.&lt;br /&gt;
* '''[[Doc:latest/evalguide | SAFplus Platform Evaluation System User Guide]]''' provides all the required information to configure and run the sample models packaged within the Evaluation System. This document also provides good understanding of OpenClovis SAFplus Platform's functionality. This is the natural follow on to the ''OpenClovis Sample Application Tutorial'' as it builds on the example created in that document. &lt;br /&gt;
* '''[[Doc:latest/sdkguide | SAFplus Platform SDK User Guide]]''' provides information about SAFplus Availability/Scalability Platform architecture, various SAFplus Platform components, and their interactions. This guide helps you to configure the OpenClovis SAFplus Platform components, compile, and execute the SAFplus Platform code to build your custom application.&lt;br /&gt;
* '''[[Doc:latest/ideguide | SAFplus Platform IDE User Guide]]''' describes the usage of Integrated Development Environment (IDE), a graphical development environment that complements the SAFplus Platform. This guide helps you to understand how to use the various features of the IDE to build the application.&lt;br /&gt;
* '''[[Doc:latest/logtoolguide | SAFplus Platform Log Tool User Guide]]''' provides information about the usage of OpenClovis Log Tool. OpenClovis Log Tool is an interactive utility that allows you to view binary log files in a readable format and hence monitor system errors, warnings, and other log information. Log Tool allows you to format the &amp;lt;code&amp;gt;.log&amp;lt;/code&amp;gt; files and filter them to view the required entries.&lt;br /&gt;
* '''SAFplus Platform API Reference Guide [http://www.openclovis.org/doc/latest/apirefs/index.html]''' is provided for each component. It describes the Application Programming Interface (API), Service Model, and Management Information Model of the various OpenClovis Application Service Platform (SAFplus Platform) services. It helps the developer to understand the capabilities of the SAFplus Platform services and the APIs provided by these services.&lt;br /&gt;
* '''[[SAFplus Platform Console Reference Guide]]''' provides details about managing applications built on SAFplus Platform using the SAFplus Platform runtime debug console commands. SAFplus Platform Console commands can be used to manage, monitor, and test your application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===OpenClovis Online Technical Support===&lt;br /&gt;
&lt;br /&gt;
OpenClovis customers and partners can register on our Web site and receive personalized services and information. If you need any support or assistance while working on OpenClovis products, you can access the following: URL: http://www.openclovis.com. Send your queries to: support@openclovis.com. Open source community support is available at: http://www.openclovis.org/forum.&lt;br /&gt;
&lt;br /&gt;
===Documentation Feedback===&lt;br /&gt;
&lt;br /&gt;
We are interested in hearing from our customers on the documentation provided with the product. Let us know your comments and suggestions on improving the documentation at OpenClovis Inc. Send your comments to: support@openclovis.com. Or even better, edit (or comment in) the page on our documentation wiki located at [http://help.openclovis.com http://help.openclovis.com].&lt;br /&gt;
&lt;br /&gt;
=='''Performance'''==&lt;br /&gt;
&lt;br /&gt;
=='''Test'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===StressTest===&lt;br /&gt;
[describe what the test tests]&lt;br /&gt;
====Required Cluster Configuration====&lt;br /&gt;
[what cluster configuration is required.  If there are multiple possible configurations, please describe the minimum configuration and the complete configuration.  Describe what additional tests you get by running the complete vs the minimum.]&lt;br /&gt;
&lt;br /&gt;
====Running====&lt;br /&gt;
[how can the test be run by hand? what configuration tweaks are there? What SGs need to be unlocked, etc?  Am I expected to do some kills, pull links or stop nodes for HA]&lt;br /&gt;
&lt;br /&gt;
====What to Observe====&lt;br /&gt;
[ How to prove that the test is testing?&lt;br /&gt;
Post interesting logs generated, if &amp;quot;top&amp;quot;, &amp;quot;tipc-config xxx&amp;quot;, etc are informative then talk about them]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Test Document Template===&lt;br /&gt;
[describe what this test tests]&lt;br /&gt;
====Required Cluster Configuration====&lt;br /&gt;
[what cluster configuration is required.  If there are multiple possible configurations, please describe the minimum configuration and the complete configuration.  Describe what additional tests you get by running the complete vs the minimum.]&lt;br /&gt;
&lt;br /&gt;
====Running====&lt;br /&gt;
[how can the test be run by hand? what configuration tweaks are there? What SGs need to be unlocked, etc?  Am I expected to do some kills, pull links or stop nodes for HA]&lt;br /&gt;
&lt;br /&gt;
====What to Observe====&lt;br /&gt;
[ How to prove that the test is testing?&lt;br /&gt;
Post interesting logs generated, if &amp;quot;top&amp;quot;, &amp;quot;tipc-config xxx&amp;quot;, etc are informative then talk about them]&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:Latest/SAFplus_Availability/Scalability_Platform_Documentation</id>
		<title>Doc:Latest/SAFplus Availability/Scalability Platform Documentation</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:Latest/SAFplus_Availability/Scalability_Platform_Documentation"/>
				<updated>2013-08-15T16:26:59Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* SAFplus Availability/Scalability Platform */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SAFplus Availability/Scalability Platform==&lt;br /&gt;
:[[Doc:latest/relnotes | Release Notes ]]&lt;br /&gt;
:[[Doc:latest/installguide | Installation Guide]]&lt;br /&gt;
:[[Doc:latest/tutorial | Sample Application Tutorial]]&lt;br /&gt;
:[[Doc:latest/evalguide | Evaluation System User's Guide]]&lt;br /&gt;
:[[Doc:latest/ideguide | IDE User Guide]]&lt;br /&gt;
:[[Doc:latest/sdkguide | SDK User Guide]]&lt;br /&gt;
:[[Doc:latest/safcompliance | SAF Compliance]]&lt;br /&gt;
:[[Doc:latest/logtoolguide | LogTool User's Guide]]&lt;br /&gt;
&amp;lt;!-- :[[Doc:latest/statsguide | SAFplus Performance And Test Guide]] --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===API Documentation===&lt;br /&gt;
&lt;br /&gt;
==== SA-Forum Compliant Services ====&lt;br /&gt;
:Many SAFplus Platform services are SAF (Service Availability Forum) compliant. The full SAF API documentation is available from [http://www.saforum.org  the Service Availability Forum].  Selected documents are available here:&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-AMF-B.04.01.AL Availability Management Framework]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-CKPT-B.02.02.AL Checkpoint Service]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-MSG-B.03.01.AL Message Service]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-EVT-B.03.01.AL Event Service]&lt;br /&gt;
&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-CPROG-B.05.02.AL C Programming Model]&lt;br /&gt;
&lt;br /&gt;
==== SAFplus Platform Additional APIs ====&lt;br /&gt;
: Documentation of SAFplus Platform APIs is located here [[http://help.openclovis.com/api/index.html  SAFplus API Documentation]].  This API documentation is also located within the SAFplus Platform header files.&lt;br /&gt;
&lt;br /&gt;
=== 3rdparty Services and Tools Documentation ===&lt;br /&gt;
&lt;br /&gt;
* [http://tipc.sourceforge.net/doc/tipc_2.0_users_guide.html TIPC] is a Linux kernel module that provides fast, low latency cluster based messaging and is a network transport option under SAFplus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SAFplus Platform Runtime Director Documentation==&lt;br /&gt;
&lt;br /&gt;
:[[Doc:latest/awdguide | Runtime Director User's Guide]]   &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
==[[Test Automation Environment]]==&lt;br /&gt;
:[[Doc:latest/taeguide | TAE Users Guide]] : Installation, configuration, discussion and examples&lt;br /&gt;
:[http://help.openclovis.com/static/taeApiDoc TAE Python APIs] : API documentation for the Python system test case layer&lt;br /&gt;
:[http://help.openclovis.com/static/apirefs/a00447.html TAE C APIs]: API documentation for the C unit test case layer&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SAFplus Platform Plugins==&lt;br /&gt;
&lt;br /&gt;
====[[SAFplus Management Framework]] EXPERIMENTAL====&lt;br /&gt;
:The [[SAFplus Management Framework]] provides a powerful element management framework.&lt;br /&gt;
====[[PostgreSQL Database Integration]] EXPERIMENTAL====&lt;br /&gt;
:The [[PostgreSQL Database Integration]] provides an easy way to deploy a highly available SQL database for use by applications in your cluster.&lt;br /&gt;
====[[CouchDB Integration]] EXPERIMENTAL ====&lt;br /&gt;
:The [[CouchDB Integration]] provides an integration between CouchDB and SAFplus, providing a highly available nosql database solution.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/statsguide</id>
		<title>Doc:latest/statsguide</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/statsguide"/>
				<updated>2013-08-15T16:23:13Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: Created page with &amp;quot;=='''Preface'''==  ''SAFplus Performance and Test Guide''  guide provides information about how the SAFplus system performs under load and how we test the product.  ===Audienc...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=='''Preface'''==&lt;br /&gt;
&lt;br /&gt;
''SAFplus Performance and Test Guide''  guide provides information about how the SAFplus system performs under load and how we test the product.&lt;br /&gt;
&lt;br /&gt;
===Audience===&lt;br /&gt;
&lt;br /&gt;
This guide is designed for system integrators, designers, and system architects. To use the product, you must be aware of the fundamentals of design, development, operation, management and configuration of telecommunication and networking systems. You must also be familiar with C programming, UML notations, and have the basic knowledge of Linux.&lt;br /&gt;
&lt;br /&gt;
===Documentation Conventions===&lt;br /&gt;
&lt;br /&gt;
This guide uses different fonts and symbols to differentiate between document elements and types of information. These conventions are summarized in the following table.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;3&amp;quot;&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Notation &lt;br /&gt;
!style=&amp;quot;color:#66b154; background:#09477c&amp;quot;| Description&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|style=&amp;quot;color:black&amp;quot; |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;Code&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
This font denotes the C code provided in various examples.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|Cross reference&lt;br /&gt;
|&lt;br /&gt;
This font denotes a hyperlink. You can click on the hyperlink text to access the reference location, which can be either a section within the User Guide or a URL link.A cross reference refers to a section name and accesses the first page of that section.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Bold Text''' &lt;br /&gt;
|&lt;br /&gt;
Menu items and button names.&lt;br /&gt;
|- style=&amp;quot;color:#ffffff; background:#549cc6&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''''Italic Text''''' &lt;br /&gt;
|&lt;br /&gt;
Variables for which you enter values.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]This indicates the presence of notes or annotations, related to the context of the document.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Caution.png]]This indicates that certain precautionary measures must be taken before performing a particular task.&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Info.png]]This indicates that additional information is provided to you.&lt;br /&gt;
&lt;br /&gt;
===Related Documents===&lt;br /&gt;
&lt;br /&gt;
For additional information about OpenClovis products, refer to the following guides:&lt;br /&gt;
* '''[[Doc:latest/relnotes | SAFplus Platform Release Notes]]''' provides information about the software and the hardware required to install OpenClovis Application Service Platform (SAFplus Platform) and Integrated Development Environment (IDE). It summarizes the additional features and enhancements of the product since the previous release. It also summarizes the issues and limitations of the product and provides workarounds wherever applicable.&lt;br /&gt;
* '''[[Doc:latest/safcompliance | SAFplus Platform SA-Forum Compliance]]''' describes the level of compliance of OpenClovis SAFplus Platform and its Application Programming Interface (API) with the relevant Service Availability Forum Specifications.&lt;br /&gt;
* '''[[Doc:latest/installguide | SAFplus Platform Installation Guide]]''' provides the system requirements, installation procedure for OpenClovis SAFplus Platform, IDE, and the Evaluation System.&lt;br /&gt;
* '''[[Doc:latest/tutorial | SAFplus Platform Sample Application Tutorial]]''' explains the steps to create and build a sample model using OpenClovis IDE and OpenClovis SAFplus Platform. It also provides troubleshooting information for this process. This provides the logical first step in understanding the SAFplus Platform offering.&lt;br /&gt;
* '''[[Doc:latest/evalguide | SAFplus Platform Evaluation System User Guide]]''' provides all the required information to configure and run the sample models packaged within the Evaluation System. This document also provides good understanding of OpenClovis SAFplus Platform's functionality. This is the natural follow on to the ''OpenClovis Sample Application Tutorial'' as it builds on the example created in that document. &lt;br /&gt;
* '''[[Doc:latest/sdkguide | SAFplus Platform SDK User Guide]]''' provides information about SAFplus Availability/Scalability Platform architecture, various SAFplus Platform components, and their interactions. This guide helps you to configure the OpenClovis SAFplus Platform components, compile, and execute the SAFplus Platform code to build your custom application.&lt;br /&gt;
* '''[[Doc:latest/ideguide | SAFplus Platform IDE User Guide]]''' describes the usage of Integrated Development Environment (IDE), a graphical development environment that complements the SAFplus Platform. This guide helps you to understand how to use the various features of the IDE to build the application.&lt;br /&gt;
* '''[[Doc:latest/logtoolguide | SAFplus Platform Log Tool User Guide]]''' provides information about the usage of OpenClovis Log Tool. OpenClovis Log Tool is an interactive utility that allows you to view binary log files in a readable format and hence monitor system errors, warnings, and other log information. Log Tool allows you to format the &amp;lt;code&amp;gt;.log&amp;lt;/code&amp;gt; files and filter them to view the required entries.&lt;br /&gt;
* '''SAFplus Platform API Reference Guide [http://www.openclovis.org/doc/latest/apirefs/index.html]''' is provided for each component. It describes the Application Programming Interface (API), Service Model, and Management Information Model of the various OpenClovis Application Service Platform (SAFplus Platform) services. It helps the developer to understand the capabilities of the SAFplus Platform services and the APIs provided by these services.&lt;br /&gt;
* '''[[SAFplus Platform Console Reference Guide]]''' provides details about managing applications built on SAFplus Platform using the SAFplus Platform runtime debug console commands. SAFplus Platform Console commands can be used to manage, monitor, and test your application.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===OpenClovis Online Technical Support===&lt;br /&gt;
&lt;br /&gt;
OpenClovis customers and partners can register on our Web site and receive personalized services and information. If you need any support or assistance while working on OpenClovis products, you can access the following: URL: http://www.openclovis.com. Send your queries to: support@openclovis.com. Open source community support is available at: http://www.openclovis.org/forum.&lt;br /&gt;
&lt;br /&gt;
===Documentation Feedback===&lt;br /&gt;
&lt;br /&gt;
We are interested in hearing from our customers on the documentation provided with the product. Let us know your comments and suggestions on improving the documentation at OpenClovis Inc. Send your comments to: support@openclovis.com. Or even better, edit (or comment in) the page on our documentation wiki located at [http://help.openclovis.com http://help.openclovis.com].&lt;br /&gt;
&lt;br /&gt;
=='''Performance'''==&lt;br /&gt;
&lt;br /&gt;
=='''Test'''==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===StressTest===&lt;br /&gt;
&lt;br /&gt;
====Required Cluster Configuration====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Running====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====What to Observe====&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latestsdkguide/debugging</id>
		<title>Doc:latestsdkguide/debugging</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latestsdkguide/debugging"/>
				<updated>2013-08-05T15:41:18Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Debugging Configuration Settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Debugging Applications and SAFplus Platform Components==&lt;br /&gt;
&lt;br /&gt;
The high availability features of the SAFplus Platform interfere with debugging applications because the act of debugging an application breaks the performance and availability &amp;quot;contract&amp;quot; between the SAFplus Platform and an application and therefore causes the SAFplus Platform to restart the application.&lt;br /&gt;
&lt;br /&gt;
This HOWTO describes strategies that can be used to debug within an high availability environment.  It is not a primer on gdb.  In fact, it assumes an in-depth knowledge of debugging using gdb (or gdb derivatives such as Wind River's IDE) and therefore focuses exclusively on the interactions between the debugger and the SAFplus Platform.&lt;br /&gt;
&lt;br /&gt;
It is useful to toggle the following debugging interventions on an as needed basis since many &amp;quot;defeat&amp;quot; the high availability features of the SAFplus Platform.  Therefore the examples below use a global variable (that you could define in your component's clCompAppMain.c) called debuggingOn to control some features.&lt;br /&gt;
&lt;br /&gt;
 int debuggingOn = 1; /* Set to 0 to turn debugging off, 1 to turn it on */&lt;br /&gt;
&lt;br /&gt;
=== Debugging Configuration Settings ===&lt;br /&gt;
&lt;br /&gt;
To aid in debugging, options exist to &amp;quot;defeat&amp;quot; the normal SAFplus monitoring of processes and threads.  The following settings are accessible either via global or environment variables.  The global variable can be used to initiate debugging behavior some time during the execution of your process.  The environment variable will cause debugging behavior across the entire SAFplus model.  These variables are all &amp;quot;FALSE&amp;quot; (not in debug mode) by default, setting to TRUE will enable their effects.  In the following list, the global variable is first and the environment variable is in parenthesis.&lt;br /&gt;
&lt;br /&gt;
*  '''clDbgPauseOn (CL_DEBUG_PAUSE)'''&lt;br /&gt;
&lt;br /&gt;
If a thread is going to abort or assert, SAFplus can cause the thread to block on a semaphore instead.  This allows the engineer to attach to the process via gdb and look at the thread's state.&lt;br /&gt;
&lt;br /&gt;
*  '''clDbgPauseOnCodeError (CL_DEBUG_PAUSE_CODE_ERROR)'''&lt;br /&gt;
&lt;br /&gt;
If clDbgPauseOn is TRUE, then this variable enables &amp;quot;pauses&amp;quot; on errors that are clearly application bugs -- such as passing a NULL pointer to a SAFplus API.  Normally, SAFplus API calls return an error in these cases.  But realistically, an application's error handling code can rarely solve bugs in itself -- other then via very granular solutions such as running with reduced functionality or by exiting gracefully.  By pausing at the moment the bug is detected, the stack remains available for analysis through gdb. &lt;br /&gt;
&lt;br /&gt;
*  '''clDbgNoKillComponents (CL_DEBUG_COMP_NO_KILL)'''&lt;br /&gt;
This global variable exists in the AMF server and your component.  If the AMF was going to kill a component for any reason, or a SAFplus library is going to assert for issues like thread pool timeouts, it will not do so with this variable set to TRUE.  This allows the developer to attach to it via gdb.  However, note that the AMF or application will continue as if it had actually killed the component and so proper AMF (application) operation after the event is not guaranteed.  For this reason, other ways to avoid common cases where the AMF kills a component are discussed in the next sections.&lt;br /&gt;
&lt;br /&gt;
*  '''clDbgCompTimeoutOverride (CL_DEBUG_COMP_TIMEOUT_OVERRIDE)'''&lt;br /&gt;
This global variable exists in the AMF server.  If the AMF was going to kill a component due to a timeout, it will not do so.  This allows the developer to attach to it via gdb.  However, note that the AMF will continue as if it had actually killed the component and so proper AMF operation after the event is not guaranteed.  For this reason, other ways to avoid component timeouts are discussed in the next few sections.&lt;br /&gt;
&lt;br /&gt;
=== Stopping Process Health Monitoring ===&lt;br /&gt;
&lt;br /&gt;
It is extremely irritating to attach to your process via a debugger only to have the SAFplus's high availability features intervene and kill the process you are trying to debug!  Certain techniques can be used to temporarily &amp;quot;defeat&amp;quot; this feature to allow debugging to occur.  Of course, while the feature is &amp;quot;off&amp;quot; the high availability features do not work.&lt;br /&gt;
&lt;br /&gt;
==== Turning off heartbeat  ====&lt;br /&gt;
&lt;br /&gt;
Use saAmfHealthcheckStop() to stop heartbeat, or do not call saAmfHealthcheckStart() to begin with.  AMF heartbeating is discussed in detail in [http://help.openclovis.com/saf/SAI-AIS-AMF-B.04.01.AL/#pe8 the SAF AMF Specification]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ACK&amp;quot;ing Messages Early  ====&lt;br /&gt;
&lt;br /&gt;
The SAFplus Platform also monitors the response of certain crucial messages to your component.  If your component does not respond in time, the SAFplus Platform kills your component.  This feature ensures that your application does not have a bug in the handling of these messages; however when debugging the message handling we must &amp;quot;defeat&amp;quot; this feature.  The most common messages are the CSI (work) assignment messages, which trigger the &amp;quot;clCompAppAMFCSISet&amp;quot; (clCompAppMain.c) function call.  When debugging your component, it is best to &amp;quot;ACK&amp;quot; the message right away so the SAFplus Platform will think that you have handled the message.  However, it is important to NOT do so when not in debugging mode, to ensure that the HA features work.  &lt;br /&gt;
&lt;br /&gt;
In the routine below, note that the &amp;quot;clCpmResponse(cpmHandle, invocation, CL_OK);&amp;quot; function has been moved above the switch statement when debugging is on (and moved to below it, for succinctness, when debugging is off).&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 ClRcT clCompAppAMFCSISet(&lt;br /&gt;
    ClInvocationT       invocation,&lt;br /&gt;
    const ClNameT       *compName,&lt;br /&gt;
    ClAmsHAStateT       haState,&lt;br /&gt;
    ClAmsCSIDescriptorT csiDescriptor)&lt;br /&gt;
 { &lt;br /&gt;
    /* If component hang detection is off, then reply with an OK first, &lt;br /&gt;
       so that this call won't time out causing the controller to kill me. &lt;br /&gt;
       &amp;quot;debuggingOn&amp;quot; is NOT part of SAFplus.  It is a global variable that &lt;br /&gt;
       you could define in your own application to control this behavior. &lt;br /&gt;
     */&lt;br /&gt;
    if (debuggingOn)&lt;br /&gt;
      {&lt;br /&gt;
        if (haState != CL_AMS_HA_STATE_QUIESCING)&lt;br /&gt;
          clCpmResponse(cpmHandle, invocation, CL_OK);&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
    /* DO NOT SET BREAKPOINTS ABOVE THIS LINE (IN THIS FUNCTION)&lt;br /&gt;
 &lt;br /&gt;
       (the controller will think that your process is dead)&lt;br /&gt;
 &lt;br /&gt;
       To set a breakpoint in this routine:&lt;br /&gt;
 &lt;br /&gt;
       1. First set &amp;quot;debuggingOn&amp;quot; to 1&lt;br /&gt;
       2. Set your breakpoint below this comment&lt;br /&gt;
       3. Continue&lt;br /&gt;
    */  &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    /* Print information about the CSI Set */&lt;br /&gt;
    clprintf (&amp;quot;Component [%s] : PID [%d]. CSI Set Received\n&amp;quot;, &lt;br /&gt;
               compName-&amp;gt;value, mypid);&lt;br /&gt;
    clCompAppAMFPrintCSI(csiDescriptor, haState);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    /* Take appropriate action based on state */&lt;br /&gt;
    switch ( haState )&lt;br /&gt;
    {&lt;br /&gt;
        case CL_AMS_HA_STATE_ACTIVE:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to take the active HA state &lt;br /&gt;
               for the CSI.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_STANDBY:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to take the standby HA state &lt;br /&gt;
               for this CSI.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_QUIESCED:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to quiesce the CSI currently&lt;br /&gt;
               assigned the active or quiescing HA state. The application &lt;br /&gt;
               must stop work associated with the CSI immediately.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_QUIESCING:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to quiesce the CSI currently&lt;br /&gt;
               assigned the active HA state. The application must stop work&lt;br /&gt;
               associated with the CSI gracefully and not accept any new&lt;br /&gt;
               workloads while the work is being terminated.&lt;br /&gt;
            */&lt;br /&gt;
            clCpmCSIQuiescingComplete(cpmHandle, invocation, CL_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               Should never happen. Ignore.&lt;br /&gt;
            */&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    /* If I'm am killing components, then reply with an OK after&lt;br /&gt;
       execution, to ensure that the handling did not hang */&lt;br /&gt;
    if (!debuggingOn)&lt;br /&gt;
      {&lt;br /&gt;
        if (haState != CL_AMS_HA_STATE_QUIESCING)&lt;br /&gt;
          clCpmResponse(cpmHandle, invocation, CL_OK);&lt;br /&gt;
      }&lt;br /&gt;
    return CL_OK;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Component State Transition Timeouts ====&lt;br /&gt;
&lt;br /&gt;
The SAFplus Platform also ensures that your component transitions through various states within reasonable a time.  To debug during these transitions (startup, shutdown, etc) it is necessary to increase these timeouts.  These timeouts are available in the IDE, or directly in the XML configuration files for temporary changes.&lt;br /&gt;
&lt;br /&gt;
Search for the following XML in your &amp;quot;etc/clAmfDefinitions.xml&amp;quot; file and change the numbers for every component you need to debug to large values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
          &amp;lt;timeouts&amp;gt;&lt;br /&gt;
            &amp;lt;instantiateTimeout&amp;gt;1000000&amp;lt;/instantiateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;terminateTimeout&amp;gt;1000000&amp;lt;/terminateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;cleanupTimeout&amp;gt;1000000&amp;lt;/cleanupTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;amStartTimeout&amp;gt;1000000&amp;lt;/amStartTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;amStopTimeout&amp;gt;1000000&amp;lt;/amStopTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;quiescingCompleteTimeout&amp;gt;1000000&amp;lt;/quiescingCompleteTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;csiSetTimeout&amp;gt;1000000&amp;lt;/csiSetTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;csiRemoveTimeout&amp;gt;1000000&amp;lt;/csiRemoveTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;proxiedCompInstantiateTimeout&amp;gt;1000000&amp;lt;/proxiedCompInstantiateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;proxiedCompCleanupTimeout&amp;gt;1000000&amp;lt;/proxiedCompCleanupTimeout&amp;gt;&lt;br /&gt;
          &amp;lt;/timeouts&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Creating core files on failure ===&lt;br /&gt;
&lt;br /&gt;
Core files are configured to be automatically created and will be found int the &amp;quot;var/run&amp;quot; directory.  If core files are not being created, your environment configuration may be overriding our changes.&lt;br /&gt;
&lt;br /&gt;
Make sure the core file size is &amp;quot;unlimited&amp;quot; by running &amp;quot;ulimit -c unlimited&amp;quot; before executing SAFplus.&lt;br /&gt;
&lt;br /&gt;
You can test core creation by jamming a SEGFAULT into a program by doing &amp;quot;kill -SEGV &amp;lt;process id&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Pausing and Resuming a Thread ===&lt;br /&gt;
&lt;br /&gt;
Sometimes a problem occurs during startup -- before you have the opportunity to attach to a process, set a breakpoint, and resume the process.    In a standard application this is easy to debug because &amp;quot;gdb&amp;quot; starts up with your program &amp;quot;stopped&amp;quot;.  But in a high availability framework, where the SAFplus Platform starts and stops programs, this is trickier.&lt;br /&gt;
 &lt;br /&gt;
To debug this, 2 functions are available from &amp;quot;clDebugApi.h&amp;quot;, one which &amp;quot;pauses&amp;quot; the calling thread, the other &amp;quot;resumes&amp;quot; it.  The programmer adds the &amp;quot;pause&amp;quot; function to the code and recompiles.  When the function is called and the global variable clDbgPauseOn (or CL_DEBUG_PAUSE environment variable) is true, the thread will output a log and block on a semaphore.  The programmer can then check the logs to see if a thread was paused.  If so, he goes into gdb, attaches to the process, finds the thread that is paused  -- &amp;quot;thread apply all backtrace&amp;quot; (&amp;quot;thr a a bt&amp;quot;) and look for a call to &amp;quot;pause&amp;quot; -- switches to that thread (&amp;quot;thread x&amp;quot;), and then debugs the thread.  The programmer can even &amp;quot;resume&amp;quot; the thread by calling the clDbgResume function from gdb's prompt:&lt;br /&gt;
&lt;br /&gt;
 gdb&amp;gt; call clDbgResume()&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;pause&amp;quot; function is actually a macro so that the file and line from which the function was called can be passed.  This information is very useful if a log is all that is provided for debugging.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Intercepting the Automatic Start of a Component ===&lt;br /&gt;
&lt;br /&gt;
It is possible to run your component within a wrapper application (such as gdb or purify).  When the SAFplus Platform is deployed on a target, all applications are placed in the &amp;quot;bin&amp;quot; subdirectory of the SAFplus Platform tree (for example &amp;quot;/root/asp/bin&amp;quot;).  To intercept the application start for debugging purposes:&lt;br /&gt;
# rename your application&lt;br /&gt;
# create a script and name it the same as the original application name&lt;br /&gt;
# edit the script to add your wrapper.&lt;br /&gt;
## Note that you will have to start a separate window for applications that need a console (like gdb)&lt;br /&gt;
&lt;br /&gt;
For example the following simple script can be used to make your application start within gdb (note though that it must be used in conjunction with the techniques described in the &amp;quot;Stopping Process Health Monitoring&amp;quot; section above unless you are a very fast typist, since your application's initialization will be monitored by the OpenClovis HA infrastructure to ensure that it succeeds). This script assumes that your application is called &amp;quot;myapp&amp;quot; and that you moved it to &amp;quot;/root/asp/bin/myapp.orig&amp;quot;.  It also assumes that your Linux installation has X-windows and the gnome desktop environment installed (however, a similar technique can be used for other window managers):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
/usr/bin/gnome-terminal --window --command &amp;quot;gdb /root/asp/bin/myapp.orig $1 $2 $3 $4 $5 $6 $7 $8 $9&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latestsdkguide/debugging</id>
		<title>Doc:latestsdkguide/debugging</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latestsdkguide/debugging"/>
				<updated>2013-08-05T15:35:59Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Debugging Configuration Settings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Debugging Applications and SAFplus Platform Components==&lt;br /&gt;
&lt;br /&gt;
The high availability features of the SAFplus Platform interfere with debugging applications because the act of debugging an application breaks the performance and availability &amp;quot;contract&amp;quot; between the SAFplus Platform and an application and therefore causes the SAFplus Platform to restart the application.&lt;br /&gt;
&lt;br /&gt;
This HOWTO describes strategies that can be used to debug within an high availability environment.  It is not a primer on gdb.  In fact, it assumes an in-depth knowledge of debugging using gdb (or gdb derivatives such as Wind River's IDE) and therefore focuses exclusively on the interactions between the debugger and the SAFplus Platform.&lt;br /&gt;
&lt;br /&gt;
It is useful to toggle the following debugging interventions on an as needed basis since many &amp;quot;defeat&amp;quot; the high availability features of the SAFplus Platform.  Therefore the examples below use a global variable (that you could define in your component's clCompAppMain.c) called debuggingOn to control some features.&lt;br /&gt;
&lt;br /&gt;
 int debuggingOn = 1; /* Set to 0 to turn debugging off, 1 to turn it on */&lt;br /&gt;
&lt;br /&gt;
=== Debugging Configuration Settings ===&lt;br /&gt;
&lt;br /&gt;
To aid in debugging, options exist to &amp;quot;defeat&amp;quot; the normal SAFplus monitoring of processes and threads.  The following settings are accessible either via global or environment variables.  The global variable can be used to initiate debugging behavior some time during the execution of your process.  The environment variable will cause debugging behavior across the entire SAFplus model.  These variables are all &amp;quot;FALSE&amp;quot; (not in debug mode) by default, setting to TRUE will enable their effects.  In the following list, the global variable is first and the environment variable is in parenthesis.&lt;br /&gt;
&lt;br /&gt;
*  '''clDbgPauseOn (CL_DEBUG_PAUSE)'''&lt;br /&gt;
&lt;br /&gt;
If a thread is going to abort or assert, SAFplus can cause the thread to block on a semaphore instead.  This allows the engineer to attach to the process via gdb and look at the thread's state.&lt;br /&gt;
&lt;br /&gt;
*  '''clDbgPauseOnCodeError (CL_DEBUG_PAUSE_CODE_ERROR)'''&lt;br /&gt;
&lt;br /&gt;
If clDbgPauseOn is TRUE, then this variable enables &amp;quot;pauses&amp;quot; on errors that are clearly application bugs -- such as passing a NULL pointer to a SAFplus API.  Normally, SAFplus API calls return an error in these cases.  But realistically, an application's error handling code can rarely solve bugs in itself -- other then via very granular solutions such as running with reduced functionality or by exiting gracefully.  By pausing at the moment the bug is detected, the stack remains available for analysis through gdb. &lt;br /&gt;
&lt;br /&gt;
*  '''clDbgNoKillComponents (CL_DEBUG_COMP_NO_KILL)'''&lt;br /&gt;
This global variable exists in the AMF server.  If the AMF was going to kill a component for any reason, it will not do so.  This allows the developer to attach to it via gdb.  However, note that the AMF will continue as if it had actually killed the component and so proper AMF operation after then event is not guaranteed.  For this reason, other ways to avoid common cases where the AMF kills a component are discussed in the next sections.&lt;br /&gt;
&lt;br /&gt;
*  '''clDbgCompTimeoutOverride (CL_DEBUG_COMP_TIMEOUT_OVERRIDE)'''&lt;br /&gt;
This global variable exists in the AMF server.  If the AMF was going to kill a component due to a timeout, it will not do so.  This allows the developer to attach to it via gdb.  However, note that the AMF will continue as if it had actually killed the component and so proper AMF operation after then event is not guaranteed.  For this reason, other ways to avoid component timeouts are discussed in the next few sections.&lt;br /&gt;
&lt;br /&gt;
=== Stopping Process Health Monitoring ===&lt;br /&gt;
&lt;br /&gt;
It is extremely irritating to attach to your process via a debugger only to have the SAFplus's high availability features intervene and kill the process you are trying to debug!  Certain techniques can be used to temporarily &amp;quot;defeat&amp;quot; this feature to allow debugging to occur.  Of course, while the feature is &amp;quot;off&amp;quot; the high availability features do not work.&lt;br /&gt;
&lt;br /&gt;
==== Turning off heartbeat  ====&lt;br /&gt;
&lt;br /&gt;
Use saAmfHealthcheckStop() to stop heartbeat, or do not call saAmfHealthcheckStart() to begin with.  AMF heartbeating is discussed in detail in [http://help.openclovis.com/saf/SAI-AIS-AMF-B.04.01.AL/#pe8 the SAF AMF Specification]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ACK&amp;quot;ing Messages Early  ====&lt;br /&gt;
&lt;br /&gt;
The SAFplus Platform also monitors the response of certain crucial messages to your component.  If your component does not respond in time, the SAFplus Platform kills your component.  This feature ensures that your application does not have a bug in the handling of these messages; however when debugging the message handling we must &amp;quot;defeat&amp;quot; this feature.  The most common messages are the CSI (work) assignment messages, which trigger the &amp;quot;clCompAppAMFCSISet&amp;quot; (clCompAppMain.c) function call.  When debugging your component, it is best to &amp;quot;ACK&amp;quot; the message right away so the SAFplus Platform will think that you have handled the message.  However, it is important to NOT do so when not in debugging mode, to ensure that the HA features work.  &lt;br /&gt;
&lt;br /&gt;
In the routine below, note that the &amp;quot;clCpmResponse(cpmHandle, invocation, CL_OK);&amp;quot; function has been moved above the switch statement when debugging is on (and moved to below it, for succinctness, when debugging is off).&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 ClRcT clCompAppAMFCSISet(&lt;br /&gt;
    ClInvocationT       invocation,&lt;br /&gt;
    const ClNameT       *compName,&lt;br /&gt;
    ClAmsHAStateT       haState,&lt;br /&gt;
    ClAmsCSIDescriptorT csiDescriptor)&lt;br /&gt;
 { &lt;br /&gt;
    /* If component hang detection is off, then reply with an OK first, &lt;br /&gt;
       so that this call won't time out causing the controller to kill me. &lt;br /&gt;
       &amp;quot;debuggingOn&amp;quot; is NOT part of SAFplus.  It is a global variable that &lt;br /&gt;
       you could define in your own application to control this behavior. &lt;br /&gt;
     */&lt;br /&gt;
    if (debuggingOn)&lt;br /&gt;
      {&lt;br /&gt;
        if (haState != CL_AMS_HA_STATE_QUIESCING)&lt;br /&gt;
          clCpmResponse(cpmHandle, invocation, CL_OK);&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
    /* DO NOT SET BREAKPOINTS ABOVE THIS LINE (IN THIS FUNCTION)&lt;br /&gt;
 &lt;br /&gt;
       (the controller will think that your process is dead)&lt;br /&gt;
 &lt;br /&gt;
       To set a breakpoint in this routine:&lt;br /&gt;
 &lt;br /&gt;
       1. First set &amp;quot;debuggingOn&amp;quot; to 1&lt;br /&gt;
       2. Set your breakpoint below this comment&lt;br /&gt;
       3. Continue&lt;br /&gt;
    */  &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    /* Print information about the CSI Set */&lt;br /&gt;
    clprintf (&amp;quot;Component [%s] : PID [%d]. CSI Set Received\n&amp;quot;, &lt;br /&gt;
               compName-&amp;gt;value, mypid);&lt;br /&gt;
    clCompAppAMFPrintCSI(csiDescriptor, haState);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    /* Take appropriate action based on state */&lt;br /&gt;
    switch ( haState )&lt;br /&gt;
    {&lt;br /&gt;
        case CL_AMS_HA_STATE_ACTIVE:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to take the active HA state &lt;br /&gt;
               for the CSI.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_STANDBY:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to take the standby HA state &lt;br /&gt;
               for this CSI.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_QUIESCED:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to quiesce the CSI currently&lt;br /&gt;
               assigned the active or quiescing HA state. The application &lt;br /&gt;
               must stop work associated with the CSI immediately.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_QUIESCING:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to quiesce the CSI currently&lt;br /&gt;
               assigned the active HA state. The application must stop work&lt;br /&gt;
               associated with the CSI gracefully and not accept any new&lt;br /&gt;
               workloads while the work is being terminated.&lt;br /&gt;
            */&lt;br /&gt;
            clCpmCSIQuiescingComplete(cpmHandle, invocation, CL_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               Should never happen. Ignore.&lt;br /&gt;
            */&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    /* If I'm am killing components, then reply with an OK after&lt;br /&gt;
       execution, to ensure that the handling did not hang */&lt;br /&gt;
    if (!debuggingOn)&lt;br /&gt;
      {&lt;br /&gt;
        if (haState != CL_AMS_HA_STATE_QUIESCING)&lt;br /&gt;
          clCpmResponse(cpmHandle, invocation, CL_OK);&lt;br /&gt;
      }&lt;br /&gt;
    return CL_OK;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Component State Transition Timeouts ====&lt;br /&gt;
&lt;br /&gt;
The SAFplus Platform also ensures that your component transitions through various states within reasonable a time.  To debug during these transitions (startup, shutdown, etc) it is necessary to increase these timeouts.  These timeouts are available in the IDE, or directly in the XML configuration files for temporary changes.&lt;br /&gt;
&lt;br /&gt;
Search for the following XML in your &amp;quot;etc/clAmfDefinitions.xml&amp;quot; file and change the numbers for every component you need to debug to large values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
          &amp;lt;timeouts&amp;gt;&lt;br /&gt;
            &amp;lt;instantiateTimeout&amp;gt;1000000&amp;lt;/instantiateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;terminateTimeout&amp;gt;1000000&amp;lt;/terminateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;cleanupTimeout&amp;gt;1000000&amp;lt;/cleanupTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;amStartTimeout&amp;gt;1000000&amp;lt;/amStartTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;amStopTimeout&amp;gt;1000000&amp;lt;/amStopTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;quiescingCompleteTimeout&amp;gt;1000000&amp;lt;/quiescingCompleteTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;csiSetTimeout&amp;gt;1000000&amp;lt;/csiSetTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;csiRemoveTimeout&amp;gt;1000000&amp;lt;/csiRemoveTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;proxiedCompInstantiateTimeout&amp;gt;1000000&amp;lt;/proxiedCompInstantiateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;proxiedCompCleanupTimeout&amp;gt;1000000&amp;lt;/proxiedCompCleanupTimeout&amp;gt;&lt;br /&gt;
          &amp;lt;/timeouts&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Creating core files on failure ===&lt;br /&gt;
&lt;br /&gt;
Core files are configured to be automatically created and will be found int the &amp;quot;var/run&amp;quot; directory.  If core files are not being created, your environment configuration may be overriding our changes.&lt;br /&gt;
&lt;br /&gt;
Make sure the core file size is &amp;quot;unlimited&amp;quot; by running &amp;quot;ulimit -c unlimited&amp;quot; before executing SAFplus.&lt;br /&gt;
&lt;br /&gt;
You can test core creation by jamming a SEGFAULT into a program by doing &amp;quot;kill -SEGV &amp;lt;process id&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Pausing and Resuming a Thread ===&lt;br /&gt;
&lt;br /&gt;
Sometimes a problem occurs during startup -- before you have the opportunity to attach to a process, set a breakpoint, and resume the process.    In a standard application this is easy to debug because &amp;quot;gdb&amp;quot; starts up with your program &amp;quot;stopped&amp;quot;.  But in a high availability framework, where the SAFplus Platform starts and stops programs, this is trickier.&lt;br /&gt;
 &lt;br /&gt;
To debug this, 2 functions are available from &amp;quot;clDebugApi.h&amp;quot;, one which &amp;quot;pauses&amp;quot; the calling thread, the other &amp;quot;resumes&amp;quot; it.  The programmer adds the &amp;quot;pause&amp;quot; function to the code and recompiles.  When the function is called and the global variable clDbgPauseOn (or CL_DEBUG_PAUSE environment variable) is true, the thread will output a log and block on a semaphore.  The programmer can then check the logs to see if a thread was paused.  If so, he goes into gdb, attaches to the process, finds the thread that is paused  -- &amp;quot;thread apply all backtrace&amp;quot; (&amp;quot;thr a a bt&amp;quot;) and look for a call to &amp;quot;pause&amp;quot; -- switches to that thread (&amp;quot;thread x&amp;quot;), and then debugs the thread.  The programmer can even &amp;quot;resume&amp;quot; the thread by calling the clDbgResume function from gdb's prompt:&lt;br /&gt;
&lt;br /&gt;
 gdb&amp;gt; call clDbgResume()&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;pause&amp;quot; function is actually a macro so that the file and line from which the function was called can be passed.  This information is very useful if a log is all that is provided for debugging.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Intercepting the Automatic Start of a Component ===&lt;br /&gt;
&lt;br /&gt;
It is possible to run your component within a wrapper application (such as gdb or purify).  When the SAFplus Platform is deployed on a target, all applications are placed in the &amp;quot;bin&amp;quot; subdirectory of the SAFplus Platform tree (for example &amp;quot;/root/asp/bin&amp;quot;).  To intercept the application start for debugging purposes:&lt;br /&gt;
# rename your application&lt;br /&gt;
# create a script and name it the same as the original application name&lt;br /&gt;
# edit the script to add your wrapper.&lt;br /&gt;
## Note that you will have to start a separate window for applications that need a console (like gdb)&lt;br /&gt;
&lt;br /&gt;
For example the following simple script can be used to make your application start within gdb (note though that it must be used in conjunction with the techniques described in the &amp;quot;Stopping Process Health Monitoring&amp;quot; section above unless you are a very fast typist, since your application's initialization will be monitored by the OpenClovis HA infrastructure to ensure that it succeeds). This script assumes that your application is called &amp;quot;myapp&amp;quot; and that you moved it to &amp;quot;/root/asp/bin/myapp.orig&amp;quot;.  It also assumes that your Linux installation has X-windows and the gnome desktop environment installed (however, a similar technique can be used for other window managers):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
/usr/bin/gnome-terminal --window --command &amp;quot;gdb /root/asp/bin/myapp.orig $1 $2 $3 $4 $5 $6 $7 $8 $9&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latestsdkguide/debugging</id>
		<title>Doc:latestsdkguide/debugging</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latestsdkguide/debugging"/>
				<updated>2013-08-05T15:34:47Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Debugging Applications and SAFplus Platform Components */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Debugging Applications and SAFplus Platform Components==&lt;br /&gt;
&lt;br /&gt;
The high availability features of the SAFplus Platform interfere with debugging applications because the act of debugging an application breaks the performance and availability &amp;quot;contract&amp;quot; between the SAFplus Platform and an application and therefore causes the SAFplus Platform to restart the application.&lt;br /&gt;
&lt;br /&gt;
This HOWTO describes strategies that can be used to debug within an high availability environment.  It is not a primer on gdb.  In fact, it assumes an in-depth knowledge of debugging using gdb (or gdb derivatives such as Wind River's IDE) and therefore focuses exclusively on the interactions between the debugger and the SAFplus Platform.&lt;br /&gt;
&lt;br /&gt;
It is useful to toggle the following debugging interventions on an as needed basis since many &amp;quot;defeat&amp;quot; the high availability features of the SAFplus Platform.  Therefore the examples below use a global variable (that you could define in your component's clCompAppMain.c) called debuggingOn to control some features.&lt;br /&gt;
&lt;br /&gt;
 int debuggingOn = 1; /* Set to 0 to turn debugging off, 1 to turn it on */&lt;br /&gt;
&lt;br /&gt;
=== Debugging Configuration Settings ===&lt;br /&gt;
&lt;br /&gt;
To aid in debugging, options exist to &amp;quot;defeat&amp;quot; the normal SAFplus monitoring of processes and threads.  The following settings are accessible either via global or environment variables.  In the list below, the environment variable is in parenthesis.  The global variable can be used to initiate debugging behavior some time during the execution of your process.  The environment variable will cause debugging behavior across the entire SAFplus model.  These variables are all &amp;quot;FALSE&amp;quot; (not in debug mode) by default, setting to TRUE will enable their effects.&lt;br /&gt;
&lt;br /&gt;
*  '''clDbgPauseOn (CL_DEBUG_PAUSE)'''&lt;br /&gt;
&lt;br /&gt;
If a thread is going to abort or assert, SAFplus can cause the thread to block on a semaphore instead.  This allows the engineer to attach to the process via gdb and look at the thread's state.&lt;br /&gt;
&lt;br /&gt;
*  '''clDbgPauseOnCodeError (CL_DEBUG_PAUSE_CODE_ERROR)'''&lt;br /&gt;
&lt;br /&gt;
If clDbgPauseOn is TRUE, then this variable enables &amp;quot;pauses&amp;quot; on errors that are clearly application bugs -- such as passing a NULL pointer to a SAFplus API.  Normally, SAFplus API calls return an error in these cases.  But realistically, an application's error handling code can rarely solve bugs in itself -- other then via very granular solutions such as running with reduced functionality or by exiting gracefully.  By pausing at the moment the bug is detected, the stack remains available for analysis through gdb. &lt;br /&gt;
&lt;br /&gt;
*  '''clDbgNoKillComponents (CL_DEBUG_COMP_NO_KILL)'''&lt;br /&gt;
This global variable exists in the AMF server.  If the AMF was going to kill a component for any reason, it will not do so.  This allows the developer to attach to it via gdb.  However, note that the AMF will continue as if it had actually killed the component and so proper AMF operation after then event is not guaranteed.  For this reason, other ways to avoid common cases where the AMF kills a component are discussed in the next sections.&lt;br /&gt;
&lt;br /&gt;
*  '''clDbgCompTimeoutOverride (CL_DEBUG_COMP_TIMEOUT_OVERRIDE)'''&lt;br /&gt;
This global variable exists in the AMF server.  If the AMF was going to kill a component due to a timeout, it will not do so.  This allows the developer to attach to it via gdb.  However, note that the AMF will continue as if it had actually killed the component and so proper AMF operation after then event is not guaranteed.  For this reason, other ways to avoid component timeouts are discussed in the next few sections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Stopping Process Health Monitoring ===&lt;br /&gt;
&lt;br /&gt;
It is extremely irritating to attach to your process via a debugger only to have the SAFplus's high availability features intervene and kill the process you are trying to debug!  Certain techniques can be used to temporarily &amp;quot;defeat&amp;quot; this feature to allow debugging to occur.  Of course, while the feature is &amp;quot;off&amp;quot; the high availability features do not work.&lt;br /&gt;
&lt;br /&gt;
==== Turning off heartbeat  ====&lt;br /&gt;
&lt;br /&gt;
Use saAmfHealthcheckStop() to stop heartbeat, or do not call saAmfHealthcheckStart() to begin with.  AMF heartbeating is discussed in detail in [http://help.openclovis.com/saf/SAI-AIS-AMF-B.04.01.AL/#pe8 the SAF AMF Specification]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ACK&amp;quot;ing Messages Early  ====&lt;br /&gt;
&lt;br /&gt;
The SAFplus Platform also monitors the response of certain crucial messages to your component.  If your component does not respond in time, the SAFplus Platform kills your component.  This feature ensures that your application does not have a bug in the handling of these messages; however when debugging the message handling we must &amp;quot;defeat&amp;quot; this feature.  The most common messages are the CSI (work) assignment messages, which trigger the &amp;quot;clCompAppAMFCSISet&amp;quot; (clCompAppMain.c) function call.  When debugging your component, it is best to &amp;quot;ACK&amp;quot; the message right away so the SAFplus Platform will think that you have handled the message.  However, it is important to NOT do so when not in debugging mode, to ensure that the HA features work.  &lt;br /&gt;
&lt;br /&gt;
In the routine below, note that the &amp;quot;clCpmResponse(cpmHandle, invocation, CL_OK);&amp;quot; function has been moved above the switch statement when debugging is on (and moved to below it, for succinctness, when debugging is off).&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 ClRcT clCompAppAMFCSISet(&lt;br /&gt;
    ClInvocationT       invocation,&lt;br /&gt;
    const ClNameT       *compName,&lt;br /&gt;
    ClAmsHAStateT       haState,&lt;br /&gt;
    ClAmsCSIDescriptorT csiDescriptor)&lt;br /&gt;
 { &lt;br /&gt;
    /* If component hang detection is off, then reply with an OK first, &lt;br /&gt;
       so that this call won't time out causing the controller to kill me. &lt;br /&gt;
       &amp;quot;debuggingOn&amp;quot; is NOT part of SAFplus.  It is a global variable that &lt;br /&gt;
       you could define in your own application to control this behavior. &lt;br /&gt;
     */&lt;br /&gt;
    if (debuggingOn)&lt;br /&gt;
      {&lt;br /&gt;
        if (haState != CL_AMS_HA_STATE_QUIESCING)&lt;br /&gt;
          clCpmResponse(cpmHandle, invocation, CL_OK);&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
    /* DO NOT SET BREAKPOINTS ABOVE THIS LINE (IN THIS FUNCTION)&lt;br /&gt;
 &lt;br /&gt;
       (the controller will think that your process is dead)&lt;br /&gt;
 &lt;br /&gt;
       To set a breakpoint in this routine:&lt;br /&gt;
 &lt;br /&gt;
       1. First set &amp;quot;debuggingOn&amp;quot; to 1&lt;br /&gt;
       2. Set your breakpoint below this comment&lt;br /&gt;
       3. Continue&lt;br /&gt;
    */  &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    /* Print information about the CSI Set */&lt;br /&gt;
    clprintf (&amp;quot;Component [%s] : PID [%d]. CSI Set Received\n&amp;quot;, &lt;br /&gt;
               compName-&amp;gt;value, mypid);&lt;br /&gt;
    clCompAppAMFPrintCSI(csiDescriptor, haState);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    /* Take appropriate action based on state */&lt;br /&gt;
    switch ( haState )&lt;br /&gt;
    {&lt;br /&gt;
        case CL_AMS_HA_STATE_ACTIVE:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to take the active HA state &lt;br /&gt;
               for the CSI.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_STANDBY:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to take the standby HA state &lt;br /&gt;
               for this CSI.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_QUIESCED:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to quiesce the CSI currently&lt;br /&gt;
               assigned the active or quiescing HA state. The application &lt;br /&gt;
               must stop work associated with the CSI immediately.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_QUIESCING:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to quiesce the CSI currently&lt;br /&gt;
               assigned the active HA state. The application must stop work&lt;br /&gt;
               associated with the CSI gracefully and not accept any new&lt;br /&gt;
               workloads while the work is being terminated.&lt;br /&gt;
            */&lt;br /&gt;
            clCpmCSIQuiescingComplete(cpmHandle, invocation, CL_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               Should never happen. Ignore.&lt;br /&gt;
            */&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    /* If I'm am killing components, then reply with an OK after&lt;br /&gt;
       execution, to ensure that the handling did not hang */&lt;br /&gt;
    if (!debuggingOn)&lt;br /&gt;
      {&lt;br /&gt;
        if (haState != CL_AMS_HA_STATE_QUIESCING)&lt;br /&gt;
          clCpmResponse(cpmHandle, invocation, CL_OK);&lt;br /&gt;
      }&lt;br /&gt;
    return CL_OK;&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Component State Transition Timeouts ====&lt;br /&gt;
&lt;br /&gt;
The SAFplus Platform also ensures that your component transitions through various states within reasonable a time.  To debug during these transitions (startup, shutdown, etc) it is necessary to increase these timeouts.  These timeouts are available in the IDE, or directly in the XML configuration files for temporary changes.&lt;br /&gt;
&lt;br /&gt;
Search for the following XML in your &amp;quot;etc/clAmfDefinitions.xml&amp;quot; file and change the numbers for every component you need to debug to large values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
          &amp;lt;timeouts&amp;gt;&lt;br /&gt;
            &amp;lt;instantiateTimeout&amp;gt;1000000&amp;lt;/instantiateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;terminateTimeout&amp;gt;1000000&amp;lt;/terminateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;cleanupTimeout&amp;gt;1000000&amp;lt;/cleanupTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;amStartTimeout&amp;gt;1000000&amp;lt;/amStartTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;amStopTimeout&amp;gt;1000000&amp;lt;/amStopTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;quiescingCompleteTimeout&amp;gt;1000000&amp;lt;/quiescingCompleteTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;csiSetTimeout&amp;gt;1000000&amp;lt;/csiSetTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;csiRemoveTimeout&amp;gt;1000000&amp;lt;/csiRemoveTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;proxiedCompInstantiateTimeout&amp;gt;1000000&amp;lt;/proxiedCompInstantiateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;proxiedCompCleanupTimeout&amp;gt;1000000&amp;lt;/proxiedCompCleanupTimeout&amp;gt;&lt;br /&gt;
          &amp;lt;/timeouts&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Creating core files on failure ===&lt;br /&gt;
&lt;br /&gt;
Core files are configured to be automatically created and will be found int the &amp;quot;var/run&amp;quot; directory.  If core files are not being created, your environment configuration may be overriding our changes.&lt;br /&gt;
&lt;br /&gt;
Make sure the core file size is &amp;quot;unlimited&amp;quot; by running &amp;quot;ulimit -c unlimited&amp;quot; before executing SAFplus.&lt;br /&gt;
&lt;br /&gt;
You can test core creation by jamming a SEGFAULT into a program by doing &amp;quot;kill -SEGV &amp;lt;process id&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Pausing and Resuming a Thread ===&lt;br /&gt;
&lt;br /&gt;
Sometimes a problem occurs during startup -- before you have the opportunity to attach to a process, set a breakpoint, and resume the process.    In a standard application this is easy to debug because &amp;quot;gdb&amp;quot; starts up with your program &amp;quot;stopped&amp;quot;.  But in a high availability framework, where the SAFplus Platform starts and stops programs, this is trickier.&lt;br /&gt;
 &lt;br /&gt;
To debug this, 2 functions are available from &amp;quot;clDebugApi.h&amp;quot;, one which &amp;quot;pauses&amp;quot; the calling thread, the other &amp;quot;resumes&amp;quot; it.  The programmer adds the &amp;quot;pause&amp;quot; function to the code and recompiles.  When the function is called and the global variable clDbgPauseOn (or CL_DEBUG_PAUSE environment variable) is true, the thread will output a log and block on a semaphore.  The programmer can then check the logs to see if a thread was paused.  If so, he goes into gdb, attaches to the process, finds the thread that is paused  -- &amp;quot;thread apply all backtrace&amp;quot; (&amp;quot;thr a a bt&amp;quot;) and look for a call to &amp;quot;pause&amp;quot; -- switches to that thread (&amp;quot;thread x&amp;quot;), and then debugs the thread.  The programmer can even &amp;quot;resume&amp;quot; the thread by calling the clDbgResume function from gdb's prompt:&lt;br /&gt;
&lt;br /&gt;
 gdb&amp;gt; call clDbgResume()&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;pause&amp;quot; function is actually a macro so that the file and line from which the function was called can be passed.  This information is very useful if a log is all that is provided for debugging.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Intercepting the Automatic Start of a Component ===&lt;br /&gt;
&lt;br /&gt;
It is possible to run your component within a wrapper application (such as gdb or purify).  When the SAFplus Platform is deployed on a target, all applications are placed in the &amp;quot;bin&amp;quot; subdirectory of the SAFplus Platform tree (for example &amp;quot;/root/asp/bin&amp;quot;).  To intercept the application start for debugging purposes:&lt;br /&gt;
# rename your application&lt;br /&gt;
# create a script and name it the same as the original application name&lt;br /&gt;
# edit the script to add your wrapper.&lt;br /&gt;
## Note that you will have to start a separate window for applications that need a console (like gdb)&lt;br /&gt;
&lt;br /&gt;
For example the following simple script can be used to make your application start within gdb (note though that it must be used in conjunction with the techniques described in the &amp;quot;Stopping Process Health Monitoring&amp;quot; section above unless you are a very fast typist, since your application's initialization will be monitored by the OpenClovis HA infrastructure to ensure that it succeeds). This script assumes that your application is called &amp;quot;myapp&amp;quot; and that you moved it to &amp;quot;/root/asp/bin/myapp.orig&amp;quot;.  It also assumes that your Linux installation has X-windows and the gnome desktop environment installed (however, a similar technique can be used for other window managers):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
/usr/bin/gnome-terminal --window --command &amp;quot;gdb /root/asp/bin/myapp.orig $1 $2 $3 $4 $5 $6 $7 $8 $9&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latestsdkguide/debugging</id>
		<title>Doc:latestsdkguide/debugging</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latestsdkguide/debugging"/>
				<updated>2013-08-05T13:25:34Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Debugging Applications and SAFplus Platform Components */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Debugging Applications and SAFplus Platform Components==&lt;br /&gt;
&lt;br /&gt;
The high availability features of the SAFplus Platform interfere with debugging applications because the act of debugging an application breaks the performance and availability &amp;quot;contract&amp;quot; between the SAFplus Platform and an application and therefore causes the SAFplus Platform to restart the application.&lt;br /&gt;
&lt;br /&gt;
This HOWTO describes strategies that can be used to debug within an high availability environment.  It is not a primer on gdb.  In fact, it assumes an in-depth knowledge of debugging using gdb (or gdb derivatives such as Wind River's IDE) and therefore focuses exclusively on the interactions between the debugger and the SAFplus Platform.&lt;br /&gt;
&lt;br /&gt;
It is useful to toggle the following debugging interventions on an as needed basis since many &amp;quot;defeat&amp;quot; the high availability features of the SAFplus Platform.  Therefore the examples below use a global variable (defined in your component's clCompAppMain.c) called debuggingOn to control these features.&lt;br /&gt;
&lt;br /&gt;
 int debuggingOn = 1; /* Set to 0 to turn debugging off, 1 to turn it on */&lt;br /&gt;
&lt;br /&gt;
=== Stopping Process Health Monitoring ===&lt;br /&gt;
&lt;br /&gt;
It is extremely irritating to attach to your process via a debugger only to have the SAFplus's high availability features intervene and kill the process you are trying to debug!  Certain techniques can be used to temporarily &amp;quot;defeat&amp;quot; this feature to allow debugging to occur.  Of course, while the feature is &amp;quot;off&amp;quot; the high availability features will not work.&lt;br /&gt;
&lt;br /&gt;
==== Turning off heartbeat  ====&lt;br /&gt;
&lt;br /&gt;
SAFplus platform running over the TIPC communications infrastructure will automatically detect process death via TIPC notifications and dropping into a debugger breakpoint will not cause keepalive failure.  &lt;br /&gt;
&lt;br /&gt;
However, if you have enabled SA-Forum compliant application level health checking then you will run into this issue.  In that case, the SAFplus Platform expects your process to periodically state that it is &amp;quot;OK&amp;quot;; if it does not (for example, if stopped in a debugger) the SAFplus Platform will kill your process.&lt;br /&gt;
&lt;br /&gt;
Replace the function in clCompAppMain.c (in every one of your components) with this function, and create a &amp;quot;debuggingOn&amp;quot; global variable.  This will turn off the polling of your component and so the SAFplus Platform will not kill your component if it is being debugged.  This will allow you to load up gdb and then &amp;quot;attach&amp;quot; to your component.&lt;br /&gt;
&lt;br /&gt;
 int debuggingOn = 1;&lt;br /&gt;
&lt;br /&gt;
 ClRcT clCompAppHealthCheck(ClEoSchedFeedBackT* schFeedback)&lt;br /&gt;
 {&lt;br /&gt;
    /*&lt;br /&gt;
       Add code for application specific health check below. The defaults&lt;br /&gt;
       indicate EO is healthy and polling interval is unaltered.&lt;br /&gt;
    */&lt;br /&gt;
 &lt;br /&gt;
    ClRcT rc = CL_OK;&lt;br /&gt;
 &lt;br /&gt;
    /* If you want to attach to gdb */&lt;br /&gt;
    if (debuggingOn) schFeedback-&amp;gt;freq   = CL_EO_DONT_POLL;  &lt;br /&gt;
    else &lt;br /&gt;
      {&lt;br /&gt;
        schFeedback-&amp;gt;freq   = CL_EO_DEFAULT_POLL; &lt;br /&gt;
        schFeedback-&amp;gt;status = CL_CPM_EO_ALIVE;&lt;br /&gt;
        rc = eoapp-&amp;gt;HealthCheck();&lt;br /&gt;
      }&lt;br /&gt;
 &lt;br /&gt;
    return rc;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;quot;ACK&amp;quot;ing Messages Early  ====&lt;br /&gt;
&lt;br /&gt;
The SAFplus Platform also monitors the response of certain crucial messages to your component.  If your component does not respond in time, the SAFplus Platform kills your component.  This feature ensures that your application does not have a bug in the handling of these messages; however when debugging the message handling we must &amp;quot;defeat&amp;quot; this feature.  The most common messages are the CSI (work) assignment messages, which trigger the &amp;quot;clCompAppAMFCSISet&amp;quot; (clCompAppMain.c) function call.  When debugging your component, it is best to &amp;quot;ACK&amp;quot; the message right away so the SAFplus Platform will think that you have handled the message.  However, it is important to NOT do so when not in debugging mode, to ensure that the HA features work.  &lt;br /&gt;
&lt;br /&gt;
In the routine below, note that the &amp;quot;clCpmResponse(cpmHandle, invocation, CL_OK);&amp;quot; function has been moved above the switch statement when debugging is on (and moved to below it, for succinctness, when debugging is off).&lt;br /&gt;
&lt;br /&gt;
 ClRcT clCompAppAMFCSISet(&lt;br /&gt;
    ClInvocationT       invocation,&lt;br /&gt;
    const ClNameT       *compName,&lt;br /&gt;
    ClAmsHAStateT       haState,&lt;br /&gt;
    ClAmsCSIDescriptorT csiDescriptor)&lt;br /&gt;
 { &lt;br /&gt;
    /* If component hang detection is off, then reply with an OK first, &lt;br /&gt;
       so that this call won't time out causing the controller to kill me. */&lt;br /&gt;
    if (debuggingOn)&lt;br /&gt;
      {&lt;br /&gt;
        if (haState != CL_AMS_HA_STATE_QUIESCING)&lt;br /&gt;
          clCpmResponse(cpmHandle, invocation, CL_OK);&lt;br /&gt;
      }&lt;br /&gt;
  &lt;br /&gt;
    /* DO NOT SET BREAKPOINTS ABOVE THIS LINE (IN THIS FUNCTION)&lt;br /&gt;
 &lt;br /&gt;
       (the controller will think that your process is dead)&lt;br /&gt;
 &lt;br /&gt;
       To set a breakpoint in this routine:&lt;br /&gt;
 &lt;br /&gt;
       1. First set &amp;quot;debuggingOn&amp;quot; to 1&lt;br /&gt;
       2. Set your breakpoint below this comment&lt;br /&gt;
       3. Continue&lt;br /&gt;
    */  &lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    /* Print information about the CSI Set */&lt;br /&gt;
    clprintf (&amp;quot;Component [%s] : PID [%d]. CSI Set Received\n&amp;quot;, &lt;br /&gt;
               compName-&amp;gt;value, mypid);&lt;br /&gt;
    clCompAppAMFPrintCSI(csiDescriptor, haState);&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
    /* Take appropriate action based on state */&lt;br /&gt;
    switch ( haState )&lt;br /&gt;
    {&lt;br /&gt;
        case CL_AMS_HA_STATE_ACTIVE:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to take the active HA state &lt;br /&gt;
               for the CSI.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_STANDBY:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to take the standby HA state &lt;br /&gt;
               for this CSI.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_QUIESCED:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to quiesce the CSI currently&lt;br /&gt;
               assigned the active or quiescing HA state. The application &lt;br /&gt;
               must stop work associated with the CSI immediately.&lt;br /&gt;
            */&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        case CL_AMS_HA_STATE_QUIESCING:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               AMF has requested application to quiesce the CSI currently&lt;br /&gt;
               assigned the active HA state. The application must stop work&lt;br /&gt;
               associated with the CSI gracefully and not accept any new&lt;br /&gt;
               workloads while the work is being terminated.&lt;br /&gt;
            */&lt;br /&gt;
            clCpmCSIQuiescingComplete(cpmHandle, invocation, CL_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        default:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
               Should never happen. Ignore.&lt;br /&gt;
            */&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    /* If I'm am killing components, then reply with an OK after&lt;br /&gt;
       execution, to ensure that the handling did not hang */&lt;br /&gt;
    if (!debuggingOn)&lt;br /&gt;
      {&lt;br /&gt;
        if (haState != CL_AMS_HA_STATE_QUIESCING)&lt;br /&gt;
          clCpmResponse(cpmHandle, invocation, CL_OK);&lt;br /&gt;
      }&lt;br /&gt;
    return CL_OK;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== Component State Transition Timeouts ====&lt;br /&gt;
&lt;br /&gt;
The SAFplus Platform also ensures that your component transitions through various states within reasonable a time.  To debug during these transitions (startup, shutdown, etc) it is necessary to increase these timeouts.  These timeouts are available in the IDE, or directly in the XML configuration files for temporary changes.&lt;br /&gt;
&lt;br /&gt;
Search for the following XML in your &amp;quot;etc/clAmfDefinitions.xml&amp;quot; file and change the numbers for every component you need to debug to large values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
          &amp;lt;timeouts&amp;gt;&lt;br /&gt;
            &amp;lt;instantiateTimeout&amp;gt;10000&amp;lt;/instantiateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;terminateTimeout&amp;gt;10000&amp;lt;/terminateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;cleanupTimeout&amp;gt;10000&amp;lt;/cleanupTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;amStartTimeout&amp;gt;10000&amp;lt;/amStartTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;amStopTimeout&amp;gt;10000&amp;lt;/amStopTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;quiescingCompleteTimeout&amp;gt;10000&amp;lt;/quiescingCompleteTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;csiSetTimeout&amp;gt;10000&amp;lt;/csiSetTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;csiRemoveTimeout&amp;gt;10000&amp;lt;/csiRemoveTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;proxiedCompInstantiateTimeout&amp;gt;10000&amp;lt;/proxiedCompInstantiateTimeout&amp;gt;&lt;br /&gt;
            &amp;lt;proxiedCompCleanupTimeout&amp;gt;10000&amp;lt;/proxiedCompCleanupTimeout&amp;gt;&lt;br /&gt;
          &amp;lt;/timeouts&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Creating core files on failure ===&lt;br /&gt;
&lt;br /&gt;
Core files are configured to be automatically created and will be found int the &amp;quot;var/run&amp;quot; directory.  If core files are not being created, your environment configuration may be overriding our changes.&lt;br /&gt;
&lt;br /&gt;
Make sure the core file size is &amp;quot;unlimited&amp;quot; by running &amp;quot;ulimit -c unlimited&amp;quot; before executing SAFplus.&lt;br /&gt;
&lt;br /&gt;
You can test core creation by jamming a SEGFAULT into a program by doing &amp;quot;kill -SEGV &amp;lt;process id&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Pausing and Resuming a Thread ===&lt;br /&gt;
&lt;br /&gt;
Sometimes a problem occurs during startup -- before you have the opportunity to attach to a process, set a breakpoint, and resume the process.    In a standard application this is easy to debug because &amp;quot;gdb&amp;quot; starts up with your program &amp;quot;stopped&amp;quot;.  But in a high availability framework, where the SAFplus Platform starts and stops programs, this is trickier.&lt;br /&gt;
 &lt;br /&gt;
To debug this, 2 functions are available from &amp;quot;clDebugApi.h&amp;quot;, one which &amp;quot;pauses&amp;quot; the calling thread, the other &amp;quot;resumes&amp;quot; it.  The programmer adds the &amp;quot;pause&amp;quot; function to the code and recompiles.  When &amp;quot;debuggingOn&amp;quot; is true and the function is called, the thread will output a log and block on a semaphore.  The programmer can then check the logs to see if a thread was paused.  If so, he goes into gdb, attaches to the process, finds the thread that is paused  -- &amp;quot;thread apply all backtrace&amp;quot; (&amp;quot;thr a a bt&amp;quot;) and look for a call to &amp;quot;pause&amp;quot; -- switches to that thread (&amp;quot;thread x&amp;quot;), and then &amp;quot;resumes&amp;quot; the thread by calling the &amp;quot;resume&amp;quot; function from gdb's prompt:&lt;br /&gt;
&lt;br /&gt;
 gdb&amp;gt; call clDbgResume()&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;pause&amp;quot; function is actually a macro so that I can also pass the file and line from which the function was called.  This information is very useful if you accidentally forget to remove a call to clDbgPause...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Intercepting the Automatic Start of a Component ===&lt;br /&gt;
&lt;br /&gt;
It is possible to run your component within a wrapper application (such as gdb or purify).  When the SAFplus Platform is deployed on a target, all applications are placed in the &amp;quot;bin&amp;quot; subdirectory of the SAFplus Platform tree (for example &amp;quot;/root/asp/bin&amp;quot;).  To intercept the application start for debugging purposes:&lt;br /&gt;
# rename your application&lt;br /&gt;
# create a script and name it the same as the original application name&lt;br /&gt;
# edit the script to add your wrapper.&lt;br /&gt;
## Note that you will have to start a separate window for applications that need a console (like gdb)&lt;br /&gt;
&lt;br /&gt;
For example the following simple script can be used to make your application start within gdb (note though that it must be used in conjunction with the techniques described in the &amp;quot;Stopping Process Health Monitoring&amp;quot; section above unless you are a very fast typist, since your application's initialization will be monitored by the OpenClovis HA infrastructure to ensure that it succeeds). This script assumes that your application is called &amp;quot;myapp&amp;quot; and that you moved it to &amp;quot;/root/asp/bin/myapp.orig&amp;quot;.  It also assumes that your Linux installation has X-windows and the gnome desktop environment installed (however, a similar technique can be used for other window managers):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
/usr/bin/gnome-terminal --window --command &amp;quot;gdb /root/asp/bin/myapp.orig $1 $2 $3 $4 $5 $6 $7 $8 $9&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:Latest/SAFplus_Availability/Scalability_Platform_Documentation</id>
		<title>Doc:Latest/SAFplus Availability/Scalability Platform Documentation</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:Latest/SAFplus_Availability/Scalability_Platform_Documentation"/>
				<updated>2013-07-31T16:57:28Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* 3rdparty Services and Tools Documentation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SAFplus Availability/Scalability Platform==&lt;br /&gt;
:[[Doc:latest/relnotes | Release Notes ]]&lt;br /&gt;
:[[Doc:latest/installguide | Installation Guide]]&lt;br /&gt;
:[[Doc:latest/tutorial | Sample Application Tutorial]]&lt;br /&gt;
:[[Doc:latest/evalguide | Evaluation System User's Guide]]&lt;br /&gt;
:[[Doc:latest/ideguide | IDE User Guide]]&lt;br /&gt;
:[[Doc:latest/sdkguide | SDK User Guide]]&lt;br /&gt;
:[[Doc:latest/safcompliance | SAF Compliance]]&lt;br /&gt;
:[[Doc:latest/logtoolguide | LogTool User's Guide]]&lt;br /&gt;
&lt;br /&gt;
===API Documentation===&lt;br /&gt;
&lt;br /&gt;
==== SA-Forum Compliant Services ====&lt;br /&gt;
:Many SAFplus Platform services are SAF (Service Availability Forum) compliant. The full SAF API documentation is available from [http://www.saforum.org  the Service Availability Forum].  Selected documents are available here:&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-AMF-B.04.01.AL Availability Management Framework]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-CKPT-B.02.02.AL Checkpoint Service]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-MSG-B.03.01.AL Message Service]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-EVT-B.03.01.AL Event Service]&lt;br /&gt;
&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-CPROG-B.05.02.AL C Programming Model]&lt;br /&gt;
&lt;br /&gt;
==== SAFplus Platform Additional APIs ====&lt;br /&gt;
: Documentation of SAFplus Platform APIs is located here [[http://help.openclovis.com/api/index.html  SAFplus API Documentation]].  This API documentation is also located within the SAFplus Platform header files.&lt;br /&gt;
&lt;br /&gt;
=== 3rdparty Services and Tools Documentation ===&lt;br /&gt;
&lt;br /&gt;
* [http://tipc.sourceforge.net/doc/tipc_2.0_users_guide.html TIPC] is a Linux kernel module that provides fast, low latency cluster based messaging and is a network transport option under SAFplus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SAFplus Platform Runtime Director Documentation==&lt;br /&gt;
&lt;br /&gt;
:[[Doc:latest/awdguide | Runtime Director User's Guide]]   &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
==[[Test Automation Environment]]==&lt;br /&gt;
:[[Doc:latest/taeguide | TAE Users Guide]] : Installation, configuration, discussion and examples&lt;br /&gt;
:[http://help.openclovis.com/static/taeApiDoc TAE Python APIs] : API documentation for the Python system test case layer&lt;br /&gt;
:[http://help.openclovis.com/static/apirefs/a00447.html TAE C APIs]: API documentation for the C unit test case layer&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SAFplus Platform Plugins==&lt;br /&gt;
&lt;br /&gt;
====[[SAFplus Management Framework]] EXPERIMENTAL====&lt;br /&gt;
:The [[SAFplus Management Framework]] provides a powerful element management framework.&lt;br /&gt;
====[[PostgreSQL Database Integration]] EXPERIMENTAL====&lt;br /&gt;
:The [[PostgreSQL Database Integration]] provides an easy way to deploy a highly available SQL database for use by applications in your cluster.&lt;br /&gt;
====[[CouchDB Integration]] EXPERIMENTAL ====&lt;br /&gt;
:The [[CouchDB Integration]] provides an integration between CouchDB and SAFplus, providing a highly available nosql database solution.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:Latest/SAFplus_Availability/Scalability_Platform_Documentation</id>
		<title>Doc:Latest/SAFplus Availability/Scalability Platform Documentation</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:Latest/SAFplus_Availability/Scalability_Platform_Documentation"/>
				<updated>2013-07-31T16:57:03Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==SAFplus Availability/Scalability Platform==&lt;br /&gt;
:[[Doc:latest/relnotes | Release Notes ]]&lt;br /&gt;
:[[Doc:latest/installguide | Installation Guide]]&lt;br /&gt;
:[[Doc:latest/tutorial | Sample Application Tutorial]]&lt;br /&gt;
:[[Doc:latest/evalguide | Evaluation System User's Guide]]&lt;br /&gt;
:[[Doc:latest/ideguide | IDE User Guide]]&lt;br /&gt;
:[[Doc:latest/sdkguide | SDK User Guide]]&lt;br /&gt;
:[[Doc:latest/safcompliance | SAF Compliance]]&lt;br /&gt;
:[[Doc:latest/logtoolguide | LogTool User's Guide]]&lt;br /&gt;
&lt;br /&gt;
===API Documentation===&lt;br /&gt;
&lt;br /&gt;
==== SA-Forum Compliant Services ====&lt;br /&gt;
:Many SAFplus Platform services are SAF (Service Availability Forum) compliant. The full SAF API documentation is available from [http://www.saforum.org  the Service Availability Forum].  Selected documents are available here:&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-AMF-B.04.01.AL Availability Management Framework]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-CKPT-B.02.02.AL Checkpoint Service]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-MSG-B.03.01.AL Message Service]&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-EVT-B.03.01.AL Event Service]&lt;br /&gt;
&lt;br /&gt;
*[http://help.openclovis.com/saf/SAI-AIS-CPROG-B.05.02.AL C Programming Model]&lt;br /&gt;
&lt;br /&gt;
==== SAFplus Platform Additional APIs ====&lt;br /&gt;
: Documentation of SAFplus Platform APIs is located here [[http://help.openclovis.com/api/index.html  SAFplus API Documentation]].  This API documentation is also located within the SAFplus Platform header files.&lt;br /&gt;
&lt;br /&gt;
=== 3rdparty Services and Tools Documentation ===&lt;br /&gt;
&lt;br /&gt;
* [http://tipc.sourceforge.net/doc/tipc_2.0_users_guide.html TIPC] TIPC is a Linux kernel module that provides fast, low latency cluster based messaging and is a network transport option under SAFplus.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
==SAFplus Platform Runtime Director Documentation==&lt;br /&gt;
&lt;br /&gt;
:[[Doc:latest/awdguide | Runtime Director User's Guide]]   &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
==[[Test Automation Environment]]==&lt;br /&gt;
:[[Doc:latest/taeguide | TAE Users Guide]] : Installation, configuration, discussion and examples&lt;br /&gt;
:[http://help.openclovis.com/static/taeApiDoc TAE Python APIs] : API documentation for the Python system test case layer&lt;br /&gt;
:[http://help.openclovis.com/static/apirefs/a00447.html TAE C APIs]: API documentation for the C unit test case layer&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SAFplus Platform Plugins==&lt;br /&gt;
&lt;br /&gt;
====[[SAFplus Management Framework]] EXPERIMENTAL====&lt;br /&gt;
:The [[SAFplus Management Framework]] provides a powerful element management framework.&lt;br /&gt;
====[[PostgreSQL Database Integration]] EXPERIMENTAL====&lt;br /&gt;
:The [[PostgreSQL Database Integration]] provides an easy way to deploy a highly available SQL database for use by applications in your cluster.&lt;br /&gt;
====[[CouchDB Integration]] EXPERIMENTAL ====&lt;br /&gt;
:The [[CouchDB Integration]] provides an integration between CouchDB and SAFplus, providing a highly available nosql database solution.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/sdkguide/shelfManagement</id>
		<title>Doc:latest/sdkguide/shelfManagement</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/sdkguide/shelfManagement"/>
				<updated>2013-06-28T19:24:20Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* AMF Hardware Manager API Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SAFplus Hardware Management ==&lt;br /&gt;
&lt;br /&gt;
SAFplus can be integrated with an ATCA chassis manager via an additional product called the SAFplus Platform Support Package.&lt;br /&gt;
&lt;br /&gt;
However, for non-ATCA systems, SAFplus provides some simple APIs to allow your custom hardware manager to report errors to the AMF.  If your hardware manager can report a sensor error such as a severe overtemperature event to the AMF, this will allow the AMF to transition AIS (software) services onto a redundant blade before a failure actually occurs.&lt;br /&gt;
&lt;br /&gt;
=== AMF Hardware Manager API ===&lt;br /&gt;
&lt;br /&gt;
The AMF API is located in the header file &amp;quot;clCmIpi.h&amp;quot;, and implementation in the libmw.a library.  This API is only available to SAF-aware applications that have successfully initialized AMF services (via the saAmfInitialize API).  The following events can be communicated to the AMF:&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_SURPRISE_EXTRACTION'''&lt;br /&gt;
  The node was abruptly removed&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_REQ_EXTRACTION'''&lt;br /&gt;
  The node's power button was pushed or latch was opened -- extraction is imminent.&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_REQ_INSERTION'''&lt;br /&gt;
  The node's latch was closed&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_NODE_ERROR_REPORT'''&lt;br /&gt;
  Your software has determined (via a sensor read) that failure is imminent.  Software applications should be transitioned away from this node.&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_NODE_ERROR_CLEAR'''&lt;br /&gt;
  The node has returned to nominal behavior, software applications may be returned to this node.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This event type is combined with information identifying the FRU (node) that has the problem:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
typedef struct &lt;br /&gt;
{&lt;br /&gt;
    /** The event (described above) */&lt;br /&gt;
    ClCmCpmMsgTypeT cmCpmMsgType;&lt;br /&gt;
    /** The slot number (node identifier) with the problem */&lt;br /&gt;
    ClUint32T physicalSlot;&lt;br /&gt;
    /** For future use */&lt;br /&gt;
    ClUint32T subSlot ;&lt;br /&gt;
    /** Not to be used by AMF, can be used by the hardware manager to identify the problem */ &lt;br /&gt;
    ClUint32T resourceId;&lt;br /&gt;
} ClCmCpmMsgT;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And passed to the AMF via a simple API:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
extern ClRcT clCpmHotSwapEventHandle(ClCmCpmMsgT *pCmCpmMsg);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The AMF will use this information to move software applications on nodes with no issues to standby nodes, or to transition applications back to nodes that have returned to a nominal state.&lt;br /&gt;
&lt;br /&gt;
=== AMF Hardware Manager API Example ===&lt;br /&gt;
&lt;br /&gt;
The following routine generates a node error report or error clear based on the passed &amp;quot;asserted&amp;quot; variable.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
void clCmInformAMFBySlot(ClUint32T slotId, ClBoolT asserted)&lt;br /&gt;
{&lt;br /&gt;
    ClRcT rc = CL_OK;&lt;br /&gt;
    ClCmCpmMsgT cmCpmMsg;&lt;br /&gt;
    const ClCharT *msg;&lt;br /&gt;
    &lt;br /&gt;
    memset(&amp;amp;cmCpmMsg, 0, sizeof(ClCmCpmMsgT));&lt;br /&gt;
&lt;br /&gt;
    cmCpmMsg.physicalSlot = slotId;&lt;br /&gt;
    &lt;br /&gt;
    if (asserted)&lt;br /&gt;
    {&lt;br /&gt;
        cmCpmMsg.cmCpmMsgType = CL_CM_BLADE_NODE_ERROR_REPORT;&lt;br /&gt;
        msg = &amp;quot;(imminent) failure&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        cmCpmMsg.cmCpmMsgType = CL_CM_BLADE_NODE_ERROR_CLEAR;&lt;br /&gt;
        msg = &amp;quot;recovery&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    rc = clCpmHotSwapEventHandle(&amp;amp;cmCpmMsg);&lt;br /&gt;
    if (CL_OK != rc)&lt;br /&gt;
    {&lt;br /&gt;
        clLog(CL_LOG_ERROR, AREA_HPI, CTX_EVT,&lt;br /&gt;
               &amp;quot;Failed to notify AMF about [%s] of slot [%d]&amp;quot;, msg, slotId);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
    clLog(CL_LOG_INFO, AREA_HPI, CTX_EVT, &amp;quot;Notified AMF about [%s] of slot [%d]&amp;quot;, msg, slotId);&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/sdkguide/shelfManagement</id>
		<title>Doc:latest/sdkguide/shelfManagement</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/sdkguide/shelfManagement"/>
				<updated>2013-06-28T19:23:48Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* SAFplus Hardware Management */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SAFplus Hardware Management ==&lt;br /&gt;
&lt;br /&gt;
SAFplus can be integrated with an ATCA chassis manager via an additional product called the SAFplus Platform Support Package.&lt;br /&gt;
&lt;br /&gt;
However, for non-ATCA systems, SAFplus provides some simple APIs to allow your custom hardware manager to report errors to the AMF.  If your hardware manager can report a sensor error such as a severe overtemperature event to the AMF, this will allow the AMF to transition AIS (software) services onto a redundant blade before a failure actually occurs.&lt;br /&gt;
&lt;br /&gt;
=== AMF Hardware Manager API ===&lt;br /&gt;
&lt;br /&gt;
The AMF API is located in the header file &amp;quot;clCmIpi.h&amp;quot;, and implementation in the libmw.a library.  This API is only available to SAF-aware applications that have successfully initialized AMF services (via the saAmfInitialize API).  The following events can be communicated to the AMF:&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_SURPRISE_EXTRACTION'''&lt;br /&gt;
  The node was abruptly removed&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_REQ_EXTRACTION'''&lt;br /&gt;
  The node's power button was pushed or latch was opened -- extraction is imminent.&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_REQ_INSERTION'''&lt;br /&gt;
  The node's latch was closed&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_NODE_ERROR_REPORT'''&lt;br /&gt;
  Your software has determined (via a sensor read) that failure is imminent.  Software applications should be transitioned away from this node.&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_NODE_ERROR_CLEAR'''&lt;br /&gt;
  The node has returned to nominal behavior, software applications may be returned to this node.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This event type is combined with information identifying the FRU (node) that has the problem:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
typedef struct &lt;br /&gt;
{&lt;br /&gt;
    /** The event (described above) */&lt;br /&gt;
    ClCmCpmMsgTypeT cmCpmMsgType;&lt;br /&gt;
    /** The slot number (node identifier) with the problem */&lt;br /&gt;
    ClUint32T physicalSlot;&lt;br /&gt;
    /** For future use */&lt;br /&gt;
    ClUint32T subSlot ;&lt;br /&gt;
    /** Not to be used by AMF, can be used by the hardware manager to identify the problem */ &lt;br /&gt;
    ClUint32T resourceId;&lt;br /&gt;
} ClCmCpmMsgT;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And passed to the AMF via a simple API:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
extern ClRcT clCpmHotSwapEventHandle(ClCmCpmMsgT *pCmCpmMsg);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The AMF will use this information to move software applications on nodes with no issues to standby nodes, or to transition applications back to nodes that have returned to a nominal state.&lt;br /&gt;
&lt;br /&gt;
=== AMF Hardware Manager API Example ===&lt;br /&gt;
&lt;br /&gt;
The following routine generates a node error report or error clear based on the passed &amp;quot;asserted&amp;quot; variable.&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
void clCmInformAMFBySlot(ClUint32T slotId, ClBoolT asserted)&lt;br /&gt;
{&lt;br /&gt;
    ClRcT rc = CL_OK;&lt;br /&gt;
    ClCmCpmMsgT cmCpmMsg;&lt;br /&gt;
    const ClCharT *msg;&lt;br /&gt;
    &lt;br /&gt;
    memset(&amp;amp;cmCpmMsg, 0, sizeof(ClCmCpmMsgT));&lt;br /&gt;
&lt;br /&gt;
    cmCpmMsg.physicalSlot = slotId;&lt;br /&gt;
    &lt;br /&gt;
    if (asserted)&lt;br /&gt;
    {&lt;br /&gt;
        cmCpmMsg.cmCpmMsgType = CL_CM_BLADE_NODE_ERROR_REPORT;&lt;br /&gt;
        msg = &amp;quot;(imminent) failure&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    else&lt;br /&gt;
    {&lt;br /&gt;
        cmCpmMsg.cmCpmMsgType = CL_CM_BLADE_NODE_ERROR_CLEAR;&lt;br /&gt;
        msg = &amp;quot;recovery&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
    rc = clCpmHotSwapEventHandle(&amp;amp;cmCpmMsg);&lt;br /&gt;
    if (CL_OK != rc)&lt;br /&gt;
    {&lt;br /&gt;
        clLog(CL_LOG_ERROR, AREA_HPI, CTX_EVT,&lt;br /&gt;
               &amp;quot;Failed to notify AMF about [%s] of slot [%d]&amp;quot;, msg, slotId);&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
    clLog(CL_LOG_INFO, AREA_HPI, CTX_EVT, &amp;quot;Notified AMF about [%s] of slot [%d]&amp;quot;, msg, slotId);&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/sdkguide/shelfManagement</id>
		<title>Doc:latest/sdkguide/shelfManagement</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/sdkguide/shelfManagement"/>
				<updated>2013-06-28T19:17:45Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SAFplus Hardware Management ==&lt;br /&gt;
&lt;br /&gt;
SAFplus can be integrated with an ATCA chassis manager via an additional product called the SAFplus Platform Support Package.&lt;br /&gt;
&lt;br /&gt;
However, for non-ATCA systems, SAFplus provides some simple APIs to allow your custom hardware manager to report errors to the AMF.  If your hardware manager can report a sensor error such as a severe overtemperature event to the AMF, this will allow the AMF to transition AIS (software) services onto a redundant blade before a failure actually occurs.&lt;br /&gt;
&lt;br /&gt;
=== AMF Hardware Manager API ===&lt;br /&gt;
&lt;br /&gt;
The AMF API is located in the header file &amp;quot;clCmIpi.h&amp;quot;, and implementation in the libmw.a library.  This API is only available to SAF-aware applications that have successfully initialized AMF services (via the saAmfInitialize API).  The following events can be communicated to the AMF:&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_SURPRISE_EXTRACTION'''&lt;br /&gt;
  The node was abruptly removed&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_REQ_EXTRACTION'''&lt;br /&gt;
  The node's power button was pushed or latch was opened -- extraction is imminent.&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_REQ_INSERTION'''&lt;br /&gt;
  The node's latch was closed&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_NODE_ERROR_REPORT'''&lt;br /&gt;
  Your software has determined (via a sensor read) that failure is imminent.  Software applications should be transitioned away from this node.&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_NODE_ERROR_CLEAR'''&lt;br /&gt;
  The node has returned to nominal behavior, software applications may be returned to this node.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This event type is combined with information identifying the FRU (node) that has the problem:&lt;br /&gt;
&lt;br /&gt;
typedef struct &lt;br /&gt;
{&lt;br /&gt;
    /** The event (described above) */&lt;br /&gt;
    ClCmCpmMsgTypeT cmCpmMsgType;&lt;br /&gt;
    /** The slot number (node identifier) with the problem */&lt;br /&gt;
    ClUint32T physicalSlot;&lt;br /&gt;
    /** For future use */&lt;br /&gt;
    ClUint32T subSlot ;&lt;br /&gt;
    /** Not to be used by AMF, can be used by the hardware manager to identify the problem */ &lt;br /&gt;
    ClUint32T resourceId;&lt;br /&gt;
} ClCmCpmMsgT;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And passed to the AMF via a simple API:&lt;br /&gt;
&lt;br /&gt;
extern ClRcT clCpmHotSwapEventHandle(ClCmCpmMsgT *pCmCpmMsg);&lt;br /&gt;
&lt;br /&gt;
The AMF will use this information to move software applications on nodes with no issues to standby nodes, or to transition applications back to nodes that have returned to a nominal state.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/sdkguide/shelfManagement</id>
		<title>Doc:latest/sdkguide/shelfManagement</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/sdkguide/shelfManagement"/>
				<updated>2013-06-28T19:16:37Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: Created page with &amp;quot;== SAFplus Hardware Management ==  SAFplus can be integrated with an ATCA chassis manager via an additional product called the SAFplus Platform Support Package.  However, for ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== SAFplus Hardware Management ==&lt;br /&gt;
&lt;br /&gt;
SAFplus can be integrated with an ATCA chassis manager via an additional product called the SAFplus Platform Support Package.&lt;br /&gt;
&lt;br /&gt;
However, for non-ATCA systems, SAFplus provides some simple APIs to allow your custom hardware manager to report errors to the AMF.  If your hardware manager can report a sensor error such as a severe overtemperature event to the AMF, this will allow the AMF to transition AIS (software) services onto a redundant blade before a failure actually occurs.&lt;br /&gt;
&lt;br /&gt;
=== AMF Hardware Manager API ===&lt;br /&gt;
&lt;br /&gt;
The AMF API is located in the header file &amp;quot;clCmIpi.h&amp;quot;, and implementation in the libmw.a library.  This API is only available to SAF-aware applications that have successfully initialized AMF services (saAmfInitialize API).  The following events can be communicated to the AMF:&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_SURPRISE_EXTRACTION'''&lt;br /&gt;
  The node was abruptly removed&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_REQ_EXTRACTION'''&lt;br /&gt;
  The node's power button was pushed or latch was opened -- extraction is imminent.&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_REQ_INSERTION'''&lt;br /&gt;
  The node's latch was closed&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_NODE_ERROR_REPORT'''&lt;br /&gt;
  Your software has determined (via a sensor read) that failure is imminent.  Software applications should be transitioned away from this node.&lt;br /&gt;
&lt;br /&gt;
*'''CL_CM_BLADE_NODE_ERROR_CLEAR'''&lt;br /&gt;
  The node has returned to nominal behavior, software applications may be returned to this node.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This event type is combined with information identifying the FRU (node) that has the problem:&lt;br /&gt;
&lt;br /&gt;
typedef struct &lt;br /&gt;
{&lt;br /&gt;
    /** The event (described above) */&lt;br /&gt;
    ClCmCpmMsgTypeT cmCpmMsgType;&lt;br /&gt;
    /** The slot number (node identifier) with the problem */&lt;br /&gt;
    ClUint32T physicalSlot;&lt;br /&gt;
    /** For future use */&lt;br /&gt;
    ClUint32T subSlot ;&lt;br /&gt;
    /** Not to be used by AMF, can be used by the hardware manager to identify the problem */ &lt;br /&gt;
    ClUint32T resourceId;&lt;br /&gt;
} ClCmCpmMsgT;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And passed to the AMF via a simple API:&lt;br /&gt;
&lt;br /&gt;
extern ClRcT clCpmHotSwapEventHandle(ClCmCpmMsgT *pCmCpmMsg);&lt;br /&gt;
&lt;br /&gt;
The AMF will use this information to move software applications on nodes with no issues to standby nodes, or to transition applications back to nodes that have returned to a nominal state.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/sdkguide</id>
		<title>Doc:latest/sdkguide</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/sdkguide"/>
				<updated>2013-06-28T18:51:42Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Table of contents:&lt;br /&gt;
&lt;br /&gt;
* [[Doc:latest/sdkguide/preface | Preface ]]&lt;br /&gt;
* [[Doc:latest/sdkguide/overview | Overview ]]&lt;br /&gt;
* [[Doc:latest/sdkguide/highavailability | High Availability]]&lt;br /&gt;
* [[Doc:latest/sdkguide/manageability | System Management]]&lt;br /&gt;
* [[Doc:latest/sdkguide/shelfManagement | Hardware Management (Chassis, sensors etc)]]&lt;br /&gt;
* [[Doc:latest/sdkguide/cominfrastructure| Communication Infrastructure]]&lt;br /&gt;
* [[Doc:latest/sdkguide/basicinfrastructure| Basic Infrastructure]]&lt;br /&gt;
* [[Doc:latest/sdkguide/platform | Hardware Platform Support]]&lt;br /&gt;
* [[Doc:latest/sdkguide/lifecycle | Development Lifecycle with OpenClovis SDK]]&lt;br /&gt;
** [[Doc:latest/sdkguide/compconfig | OpenClovis SAFplus Platform Component Configuration]]&lt;br /&gt;
** [[Doc:latest/sdkguide/compdev | Developing Application Components in OpenClovis SAFplus Platform Environment]]&lt;br /&gt;
** [[Doc:latestsdkguide/debugging | Debugging EO Applications and SAFplus Platform Components]]&lt;br /&gt;
** [[Doc:latest/sdkguide/build | Building SAFplus Platform and SAFplus-based Systems]]&lt;br /&gt;
** [[Doc:latest/sdkguide/deploy | Deploying SAFplus Platform onto the Target]]&lt;br /&gt;
** [[Doc:latest/sdkguide/envvars | Runtime environmental variables exported by the OpenClovis SAFplus Platform environment]]&lt;br /&gt;
* [[Doc:latest/sdkguide/startermodels | &amp;quot;Starter&amp;quot; Models]]&lt;br /&gt;
* [[Doc:latest/sdkguide/commandref | Command Line and Environment Variable Reference ]]&lt;br /&gt;
* [[Doc:latest/sdkguide/knowledgebase | Knowledge Base (FAQ, Questions and Answers) ]]&lt;br /&gt;
* [[Doc:latest/sdkguide/troubleshooting | Troubleshooting ]]&lt;br /&gt;
&amp;lt;!--* [[Doc:latest/sdkguide/snmp | Managing OpenClovis SAFplus Platform Applications Using SNMP]]--&amp;gt;&lt;br /&gt;
&amp;lt;!--* [[Doc:latest/sdkguide/snmpsubagent | Creating a SNMP Subagent]]--&amp;gt;&lt;br /&gt;
&amp;lt;!--* [[Doc:latest/sdkguide/transportobject | App A: Writing Transport Objects]]--&amp;gt;&lt;br /&gt;
&amp;lt;!--* [[Doc:latest/sdkguide/hal | App A: Extending HAL and Writing Custom DO]]--&amp;gt;&lt;br /&gt;
&amp;lt;!--* [[Doc:latest/sdkguide/samplecode | App B: Sample Code Templates]]--&amp;gt;&lt;br /&gt;
* [[Doc:latest/sdkguide/glossary | Glossary of Terms]]&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/sdkguide/build</id>
		<title>Doc:latest/sdkguide/build</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/sdkguide/build"/>
				<updated>2013-06-28T18:27:02Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Pre-building SAFplus Platform Libraries for a Given Target Platform */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Building SAFplus Platform and SAFplus-based Systems==&lt;br /&gt;
&lt;br /&gt;
This chapter covers features that are related to building SAFplus Platform and SAFplus-based systems.&lt;br /&gt;
&lt;br /&gt;
Note: In the context of this chapter, a target platform is any blade type or architecture that OpenClovis SAFplus Platform can be built for (e.g. WindRiver PNE-LE 1.4 on dual Xeon-based Intel MPCBL0001 blades, or Yellow Dog Linux on PowerPC based blades).  OpenClovis provides a variety of cross build toolchains that can optionally be used with the SDK to build SAFplus Platform for these targets.&lt;br /&gt;
&lt;br /&gt;
Working with the OpenClovis SDK involves the following steps:&lt;br /&gt;
&lt;br /&gt;
#Installing the SDK, which is covered in ''OpenClovis Installation Guide''&lt;br /&gt;
#Optionally preparing the SDK for use with the WindRiver Workbench development tools&lt;br /&gt;
#Optionally pre-building SAFplus Platform libraries for a given target platform.&lt;br /&gt;
#Creating a project area (optionally populated with one or more existing SAFplus Platform models)&lt;br /&gt;
#Using the OpenClovis IDE to create a new SAFplus Platform model, generate its code, and modify this code to create desired functionality. This part is covered in ''OpenClovis IDE User Guide''&lt;br /&gt;
#Configuring and building the desired model for one or more target platform&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Pre-building SAFplus Platform Libraries for a Given Target Platform===&lt;br /&gt;
&lt;br /&gt;
This step builds SAFplus Platform libraries for use with a given platform (i.e. using a specific toolchain).  With these in place, it is no longer necessary to rebuild SAFplus Platform every time your application is built.  When new software is downloaded from github or a patch is received from OpenClovis, it is generally not necessary to re-install -- it is only necessary to run this prebuild.&lt;br /&gt;
&lt;br /&gt;
For the purpose of this document, we assume that the SDK is installed at &amp;lt;code&amp;gt;/opt/clovis&amp;lt;/code&amp;gt;, by root.  Consequently, example steps will be run as root.  If the SDK is installed as a normal user, that user can run these steps.&lt;br /&gt;
&lt;br /&gt;
By default SAFplus will look in /opt/clovis/&amp;lt;sdk version&amp;gt;/prebuild for prebuilt libraries, and by default it will have run the prebuild in the above directory during installation.&lt;br /&gt;
&lt;br /&gt;
But if you want a separate prebuild, you may create a special project area for the new SAFplus Platform library build, and &amp;quot;cd&amp;quot; to it:&lt;br /&gt;
&lt;br /&gt;
 # mkdir asp_build&lt;br /&gt;
 # cd asp_build&lt;br /&gt;
&lt;br /&gt;
Next, this prebuild project area should be initialized with the configure script as:&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/&amp;lt;SAFplus version&amp;gt;/src/SAFplus/configure --with-asp-build \&lt;br /&gt;
   [--with-sdk-dir=&amp;lt;/opt/clovis&amp;gt;] [--with-cross-build=&amp;lt;toolchain&amp;gt;] \ &lt;br /&gt;
   [--prefix=&amp;lt;alternate SAFplus Platform libs installation dir&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;.../configure --help&amp;quot; to see extensive help describing all the available options.&lt;br /&gt;
&lt;br /&gt;
By default, the libraries will ultimately be installed to the SDK installation directory, in this case: &amp;lt;code&amp;gt;/opt/clovis/&amp;lt;SAFplus version&amp;gt;/target/&amp;lt;arch&amp;gt;/&amp;lt;kernel&amp;gt;/lib&amp;lt;/code&amp;gt;, and header files will be available at &amp;lt;code&amp;gt;/opt/clovis/&amp;lt;SAFplus version&amp;gt;/include&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If --with-cross-build=&amp;lt;toolchain&amp;gt; is unspecified, libraries will be built for the local system.&lt;br /&gt;
&lt;br /&gt;
If --prefix=&amp;lt;prefix&amp;gt; is specified, libraries will be installed to &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;/&amp;lt;arch&amp;gt;/&amp;lt;kernel&amp;gt;/lib&amp;lt;/code&amp;gt;, and header files to &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;/include&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--with-sdk-dir is only necessary if the SAFplus source code is not located in the installation directory.  In this case --with-sdk-dir is necessary to tell SAFplus where it was installed.  This generally only happens if you have placed SAFplus under source code control.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/sdk-6.0/src/SAFplus/configure --with-asp-build --with-cross-build=i586-wrl-pnele1.4-2.6.14_mpcbl0001&lt;br /&gt;
&lt;br /&gt;
will cause libraries to be built from the i586-wrl-pnele1.4-2.6.14_mpcbl0001 toolchain and installed to &amp;lt;code&amp;gt;/opt/clovis/sdk-6.0/target/i386/linux-2.6.14/lib&amp;lt;/code&amp;gt;, with header files populated at &amp;lt;code&amp;gt;/opt/clovis/sdk-6.0/include&amp;lt;/code&amp;gt;, and&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/sdk-3.0/src/SAFplus/configure --with-asp-build --prefix=/opt/asplib&lt;br /&gt;
&lt;br /&gt;
on an Ubuntu 7.04 (feisty fawn) system will cause libraries to be installed to &amp;lt;code&amp;gt;/opt/asplib/i686/linux-2.6.20/lib&amp;lt;/code&amp;gt;, and header files to be populated at &amp;lt;code&amp;gt;/opt/asplib/include&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following steps build and install the libraries as configured above:&lt;br /&gt;
&lt;br /&gt;
 # make asp-libs&lt;br /&gt;
 # make asp-install&lt;br /&gt;
&lt;br /&gt;
===Configuring and Building the Model===&lt;br /&gt;
&lt;br /&gt;
In this section, we will configure and build the &amp;lt;model&amp;gt; model.  To begin, &amp;quot;cd&amp;quot; to the directory just above the model's directory.  This directory is called your &amp;quot;project area&amp;quot;, and is often named &amp;quot;workspace&amp;quot; or &amp;quot;ide_workspace&amp;quot; by the OpenClovis IDE.&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;model&amp;gt; model for building by running the following:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-6.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will configure the &amp;lt;model&amp;gt; model for deployment on the local machine, linking with the &amp;quot;prebuilt&amp;quot; SAFplus libraries (built during installation).&lt;br /&gt;
&lt;br /&gt;
To build SAFplus alongside your model use: &lt;br /&gt;
&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-6.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build&lt;br /&gt;
&lt;br /&gt;
You may also &amp;quot;crossbuild&amp;quot; for other CPU Architectures, assuming that you have the compilers, libraries, etc required for that CPU (collectively called a &amp;quot;crossbuild toolchain&amp;quot;.  SAFplus expects the crossbuild toolchain to be located in &amp;lt;install_dir&amp;gt;/buildtools/&amp;lt;toolchain name&amp;gt;.  Please install your toolchain there (or create a symbolic link), and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-6.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build \&lt;br /&gt;
                                          --with-cross-build=&amp;lt;toolchain name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is possible to configure the model to be built for multiple targets by issuing as many &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; commands as necessary.  Each run sets up a target-specific build location at &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If this model is to be deployed on an ATCA-based system with OpenHPI-based shelf management, enable Chassis Manager with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-6.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build \&lt;br /&gt;
                                          --with-cross-build=&amp;lt;crossbuild&amp;gt; \&lt;br /&gt;
                                          --with-cm-build=openhpi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
[[File:OpenClovis_Note.png]] '''Using Chassis Manager requires OpenClovis Platform Support Package, distributed separately from OpenClovis SDK.'''&lt;br /&gt;
&lt;br /&gt;
For a complete list of options to &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, including a list of available crossbuild toolchains, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-6.0/src/SAFplus/configure --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The configure step prepares the project area to build the &amp;lt;model&amp;gt; model, with the following directory structure:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;project_area&amp;gt;&lt;br /&gt;
   |ide_workspace&lt;br /&gt;
   |+&amp;lt;model&amp;gt;&lt;br /&gt;
       |+build&lt;br /&gt;
       |   |+local&lt;br /&gt;
       |   |   |-Makefile&lt;br /&gt;
       |   |+&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
       |   |   |-Makefile&lt;br /&gt;
       |+src&lt;br /&gt;
       |   |+app&lt;br /&gt;
       |   |+config&lt;br /&gt;
       |   |+doc&lt;br /&gt;
       |   |-target.conf&lt;br /&gt;
       |+target &lt;br /&gt;
       |-Makefile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build the configured model by issuing &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will build the &amp;lt;model&amp;gt; model for all the targets it has been configured to build.  In order to do a target-specific build, issue &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; from the target-specific build location. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt; for a local build:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build/local&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
For a target supported by the &amp;lt;crossbuild&amp;gt; toolchain:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build/&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a complete list of options to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The model source is located at &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/src&amp;lt;/code&amp;gt;.  If any changes are made to this, rebuild the model by issuing another &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; from either the target-specific build location or the model directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] Model building can also be accomplished in IDE. For more information, see ''OpenClovis IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Generating tarball archives suitable for deployment on targets===&lt;br /&gt;
&lt;br /&gt;
As a development convenience, SAFplus also includes a make target that will create a set of tarballs that can be copied to target machines, detared and run.  These are created by running&lt;br /&gt;
&lt;br /&gt;
# make images&lt;br /&gt;
&lt;br /&gt;
You may need to edit the src/target.conf file to describe the tarballs you want produced.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] The IDE contains a GUI dialog box that will properly create the target.conf file based on your input.&lt;br /&gt;
&lt;br /&gt;
===Using OpenClovis SDK with the WindRiver Workbench===&lt;br /&gt;
&lt;br /&gt;
It is possible to use OpenClovis SDK with the WindRiver Workbench development tools.  This section describes an optional step that creates a 'virtual' toolchain that allows SAFplus Platform to be built using the WindRiver Workbench development tools for a given WindRiver board support package.  This also builds the 3rd party prerequisites using the Workbench tools so that they may be deployed on the specific platform.  It requires both WindRiver Workbench (for the development tools) as well as a WindRiver board support package for a specific target platform.  Platform specific HPI libraries from Pigeon Point Systems and RadiSys can optionally be built into the virtual toolchains using packages supplied by either vendor.  It is possible to create as many virtual toolchains as necessary for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
This is done by using the cl-create-wrs-toolchain utility (as root, if OpenClovis SDK was installed as root, or as a normal user if not):&lt;br /&gt;
&lt;br /&gt;
 # cl-create-wrs-toolchain -w &amp;lt;WindRiver Workbench install dir&amp;gt; \&lt;br /&gt;
                           -b &amp;lt;bsp name&amp;gt; \&lt;br /&gt;
                         [ -l &amp;lt;libhcl_tarball&amp;gt; ] \&lt;br /&gt;
                         [ -p &amp;lt;pps_openhpi_tarball&amp;gt; ] \&lt;br /&gt;
                           &amp;lt;toolchain_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-l&amp;lt;/code&amp;gt; option accepts the full path to a RadiSys-provided libhcl package tarball.  If specified, it will be built in to the virtual toolchain.&lt;br /&gt;
The &amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; option accepts the full path to a Pigeon Point Systems-provided OpenHPI package tarball.  If specified, it will be built into the virtual toolchain instead of the stock OpenHPI package from the OpenClovis-provided 3rd party package tarball.&lt;br /&gt;
&lt;br /&gt;
e.g.:&lt;br /&gt;
&lt;br /&gt;
 # cl-create-wrs-toolchain -w /opt/WindRiver \&lt;br /&gt;
                           -b intel_mpcbl0001 wrs_mpcbl0001&lt;br /&gt;
&lt;br /&gt;
This will create a toolchain called &amp;lt;code&amp;gt;wrs_mpcbl0001&amp;lt;/code&amp;gt; in your existing SDK buildtools directory that is built using the WindRiver installation at &amp;lt;code&amp;gt;/opt/WindRiver&amp;lt;/code&amp;gt; for the &amp;lt;code&amp;gt;intel_mpcbl0001&amp;lt;/code&amp;gt; board support package.  This toolchain will be visible when using &amp;lt;code&amp;gt;configure --help&amp;lt;/code&amp;gt;, as will be noted in a following section.&lt;br /&gt;
&lt;br /&gt;
Note: The virtual toolchain requires the WindRiver Workbench installation to be available when it is used, as it merely provides references to the development tools in the Workbench installation.  Should the installation be moved or replaced, the virtual toolchain would need to be built again.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/sdkguide/build</id>
		<title>Doc:latest/sdkguide/build</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/sdkguide/build"/>
				<updated>2013-06-28T18:26:29Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Configuring and Building the Model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Building SAFplus Platform and SAFplus-based Systems==&lt;br /&gt;
&lt;br /&gt;
This chapter covers features that are related to building SAFplus Platform and SAFplus-based systems.&lt;br /&gt;
&lt;br /&gt;
Note: In the context of this chapter, a target platform is any blade type or architecture that OpenClovis SAFplus Platform can be built for (e.g. WindRiver PNE-LE 1.4 on dual Xeon-based Intel MPCBL0001 blades, or Yellow Dog Linux on PowerPC based blades).  OpenClovis provides a variety of cross build toolchains that can optionally be used with the SDK to build SAFplus Platform for these targets.&lt;br /&gt;
&lt;br /&gt;
Working with the OpenClovis SDK involves the following steps:&lt;br /&gt;
&lt;br /&gt;
#Installing the SDK, which is covered in ''OpenClovis Installation Guide''&lt;br /&gt;
#Optionally preparing the SDK for use with the WindRiver Workbench development tools&lt;br /&gt;
#Optionally pre-building SAFplus Platform libraries for a given target platform.&lt;br /&gt;
#Creating a project area (optionally populated with one or more existing SAFplus Platform models)&lt;br /&gt;
#Using the OpenClovis IDE to create a new SAFplus Platform model, generate its code, and modify this code to create desired functionality. This part is covered in ''OpenClovis IDE User Guide''&lt;br /&gt;
#Configuring and building the desired model for one or more target platform&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Pre-building SAFplus Platform Libraries for a Given Target Platform===&lt;br /&gt;
&lt;br /&gt;
This step builds SAFplus Platform libraries for use with a given platform (i.e. using a specific toolchain).  With these in place, it is no longer necessary to rebuild SAFplus Platform every time your application is built.  When new software is downloaded from github or a patch is received from OpenClovis, it is generally not necessary to re-install -- it is only necessary to run this prebuild.&lt;br /&gt;
&lt;br /&gt;
For the purpose of this document, we assume that the SDK is installed at &amp;lt;code&amp;gt;/opt/clovis&amp;lt;/code&amp;gt;, by root.  Consequently, example steps will be run as root.  If the SDK is installed as a normal user, that user can run these steps.&lt;br /&gt;
&lt;br /&gt;
By default SAFplus will look in /opt/clovis/&amp;lt;sdk version&amp;gt;/prebuild for prebuilt libraries, and by default it will have run the prebuild in the above directory during installation.&lt;br /&gt;
&lt;br /&gt;
But if you want a separate prebuild, you may create a special project area for the new SAFplus Platform library build, and &amp;quot;cd&amp;quot; to it:&lt;br /&gt;
&lt;br /&gt;
 # mkdir asp_build&lt;br /&gt;
 # cd asp_build&lt;br /&gt;
&lt;br /&gt;
Next, this prebuild project area should be initialized with the configure script as:&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/&amp;lt;SAFplus version&amp;gt;/src/SAFplus/configure --with-asp-build [--with-sdk-dir=&amp;lt;/opt/clovis&amp;gt;] [--with-cross-build=&amp;lt;toolchain&amp;gt;] [--prefix=&amp;lt;alternate SAFplus Platform libs installation dir&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;.../configure --help&amp;quot; to see extensive help describing all the available options.&lt;br /&gt;
&lt;br /&gt;
By default, the libraries will ultimately be installed to the SDK installation directory, in this case: &amp;lt;code&amp;gt;/opt/clovis/&amp;lt;SAFplus version&amp;gt;/target/&amp;lt;arch&amp;gt;/&amp;lt;kernel&amp;gt;/lib&amp;lt;/code&amp;gt;, and header files will be available at &amp;lt;code&amp;gt;/opt/clovis/&amp;lt;SAFplus version&amp;gt;/include&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If --with-cross-build=&amp;lt;toolchain&amp;gt; is unspecified, libraries will be built for the local system.&lt;br /&gt;
&lt;br /&gt;
If --prefix=&amp;lt;prefix&amp;gt; is specified, libraries will be installed to &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;/&amp;lt;arch&amp;gt;/&amp;lt;kernel&amp;gt;/lib&amp;lt;/code&amp;gt;, and header files to &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;/include&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--with-sdk-dir is only necessary if the SAFplus source code is not located in the installation directory.  In this case --with-sdk-dir is necessary to tell SAFplus where it was installed.  This generally only happens if you have placed SAFplus under source code control.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/sdk-6.0/src/SAFplus/configure --with-asp-build --with-cross-build=i586-wrl-pnele1.4-2.6.14_mpcbl0001&lt;br /&gt;
&lt;br /&gt;
will cause libraries to be built from the i586-wrl-pnele1.4-2.6.14_mpcbl0001 toolchain and installed to &amp;lt;code&amp;gt;/opt/clovis/sdk-6.0/target/i386/linux-2.6.14/lib&amp;lt;/code&amp;gt;, with header files populated at &amp;lt;code&amp;gt;/opt/clovis/sdk-6.0/include&amp;lt;/code&amp;gt;, and&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/sdk-3.0/src/SAFplus/configure --with-asp-build --prefix=/opt/asplib&lt;br /&gt;
&lt;br /&gt;
on an Ubuntu 7.04 (feisty fawn) system will cause libraries to be installed to &amp;lt;code&amp;gt;/opt/asplib/i686/linux-2.6.20/lib&amp;lt;/code&amp;gt;, and header files to be populated at &amp;lt;code&amp;gt;/opt/asplib/include&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following steps build and install the libraries as configured above:&lt;br /&gt;
&lt;br /&gt;
 # make asp-libs&lt;br /&gt;
 # make asp-install&lt;br /&gt;
&lt;br /&gt;
===Configuring and Building the Model===&lt;br /&gt;
&lt;br /&gt;
In this section, we will configure and build the &amp;lt;model&amp;gt; model.  To begin, &amp;quot;cd&amp;quot; to the directory just above the model's directory.  This directory is called your &amp;quot;project area&amp;quot;, and is often named &amp;quot;workspace&amp;quot; or &amp;quot;ide_workspace&amp;quot; by the OpenClovis IDE.&lt;br /&gt;
&lt;br /&gt;
Configure the &amp;lt;model&amp;gt; model for building by running the following:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-6.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will configure the &amp;lt;model&amp;gt; model for deployment on the local machine, linking with the &amp;quot;prebuilt&amp;quot; SAFplus libraries (built during installation).&lt;br /&gt;
&lt;br /&gt;
To build SAFplus alongside your model use: &lt;br /&gt;
&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-6.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build&lt;br /&gt;
&lt;br /&gt;
You may also &amp;quot;crossbuild&amp;quot; for other CPU Architectures, assuming that you have the compilers, libraries, etc required for that CPU (collectively called a &amp;quot;crossbuild toolchain&amp;quot;.  SAFplus expects the crossbuild toolchain to be located in &amp;lt;install_dir&amp;gt;/buildtools/&amp;lt;toolchain name&amp;gt;.  Please install your toolchain there (or create a symbolic link), and then run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-6.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build \&lt;br /&gt;
                                          --with-cross-build=&amp;lt;toolchain name&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is possible to configure the model to be built for multiple targets by issuing as many &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; commands as necessary.  Each run sets up a target-specific build location at &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If this model is to be deployed on an ATCA-based system with OpenHPI-based shelf management, enable Chassis Manager with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-6.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build \&lt;br /&gt;
                                          --with-cross-build=&amp;lt;crossbuild&amp;gt; \&lt;br /&gt;
                                          --with-cm-build=openhpi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
[[File:OpenClovis_Note.png]] '''Using Chassis Manager requires OpenClovis Platform Support Package, distributed separately from OpenClovis SDK.'''&lt;br /&gt;
&lt;br /&gt;
For a complete list of options to &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, including a list of available crossbuild toolchains, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-6.0/src/SAFplus/configure --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The configure step prepares the project area to build the &amp;lt;model&amp;gt; model, with the following directory structure:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;project_area&amp;gt;&lt;br /&gt;
   |ide_workspace&lt;br /&gt;
   |+&amp;lt;model&amp;gt;&lt;br /&gt;
       |+build&lt;br /&gt;
       |   |+local&lt;br /&gt;
       |   |   |-Makefile&lt;br /&gt;
       |   |+&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
       |   |   |-Makefile&lt;br /&gt;
       |+src&lt;br /&gt;
       |   |+app&lt;br /&gt;
       |   |+config&lt;br /&gt;
       |   |+doc&lt;br /&gt;
       |   |-target.conf&lt;br /&gt;
       |+target &lt;br /&gt;
       |-Makefile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build the configured model by issuing &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will build the &amp;lt;model&amp;gt; model for all the targets it has been configured to build.  In order to do a target-specific build, issue &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; from the target-specific build location. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt; for a local build:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build/local&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
For a target supported by the &amp;lt;crossbuild&amp;gt; toolchain:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build/&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a complete list of options to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The model source is located at &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/src&amp;lt;/code&amp;gt;.  If any changes are made to this, rebuild the model by issuing another &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; from either the target-specific build location or the model directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] Model building can also be accomplished in IDE. For more information, see ''OpenClovis IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Generating tarball archives suitable for deployment on targets===&lt;br /&gt;
&lt;br /&gt;
As a development convenience, SAFplus also includes a make target that will create a set of tarballs that can be copied to target machines, detared and run.  These are created by running&lt;br /&gt;
&lt;br /&gt;
# make images&lt;br /&gt;
&lt;br /&gt;
You may need to edit the src/target.conf file to describe the tarballs you want produced.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] The IDE contains a GUI dialog box that will properly create the target.conf file based on your input.&lt;br /&gt;
&lt;br /&gt;
===Using OpenClovis SDK with the WindRiver Workbench===&lt;br /&gt;
&lt;br /&gt;
It is possible to use OpenClovis SDK with the WindRiver Workbench development tools.  This section describes an optional step that creates a 'virtual' toolchain that allows SAFplus Platform to be built using the WindRiver Workbench development tools for a given WindRiver board support package.  This also builds the 3rd party prerequisites using the Workbench tools so that they may be deployed on the specific platform.  It requires both WindRiver Workbench (for the development tools) as well as a WindRiver board support package for a specific target platform.  Platform specific HPI libraries from Pigeon Point Systems and RadiSys can optionally be built into the virtual toolchains using packages supplied by either vendor.  It is possible to create as many virtual toolchains as necessary for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
This is done by using the cl-create-wrs-toolchain utility (as root, if OpenClovis SDK was installed as root, or as a normal user if not):&lt;br /&gt;
&lt;br /&gt;
 # cl-create-wrs-toolchain -w &amp;lt;WindRiver Workbench install dir&amp;gt; \&lt;br /&gt;
                           -b &amp;lt;bsp name&amp;gt; \&lt;br /&gt;
                         [ -l &amp;lt;libhcl_tarball&amp;gt; ] \&lt;br /&gt;
                         [ -p &amp;lt;pps_openhpi_tarball&amp;gt; ] \&lt;br /&gt;
                           &amp;lt;toolchain_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-l&amp;lt;/code&amp;gt; option accepts the full path to a RadiSys-provided libhcl package tarball.  If specified, it will be built in to the virtual toolchain.&lt;br /&gt;
The &amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; option accepts the full path to a Pigeon Point Systems-provided OpenHPI package tarball.  If specified, it will be built into the virtual toolchain instead of the stock OpenHPI package from the OpenClovis-provided 3rd party package tarball.&lt;br /&gt;
&lt;br /&gt;
e.g.:&lt;br /&gt;
&lt;br /&gt;
 # cl-create-wrs-toolchain -w /opt/WindRiver \&lt;br /&gt;
                           -b intel_mpcbl0001 wrs_mpcbl0001&lt;br /&gt;
&lt;br /&gt;
This will create a toolchain called &amp;lt;code&amp;gt;wrs_mpcbl0001&amp;lt;/code&amp;gt; in your existing SDK buildtools directory that is built using the WindRiver installation at &amp;lt;code&amp;gt;/opt/WindRiver&amp;lt;/code&amp;gt; for the &amp;lt;code&amp;gt;intel_mpcbl0001&amp;lt;/code&amp;gt; board support package.  This toolchain will be visible when using &amp;lt;code&amp;gt;configure --help&amp;lt;/code&amp;gt;, as will be noted in a following section.&lt;br /&gt;
&lt;br /&gt;
Note: The virtual toolchain requires the WindRiver Workbench installation to be available when it is used, as it merely provides references to the development tools in the Workbench installation.  Should the installation be moved or replaced, the virtual toolchain would need to be built again.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/sdkguide/build</id>
		<title>Doc:latest/sdkguide/build</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/sdkguide/build"/>
				<updated>2013-06-28T18:13:07Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Creating a Project Area */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Building SAFplus Platform and SAFplus-based Systems==&lt;br /&gt;
&lt;br /&gt;
This chapter covers features that are related to building SAFplus Platform and SAFplus-based systems.&lt;br /&gt;
&lt;br /&gt;
Note: In the context of this chapter, a target platform is any blade type or architecture that OpenClovis SAFplus Platform can be built for (e.g. WindRiver PNE-LE 1.4 on dual Xeon-based Intel MPCBL0001 blades, or Yellow Dog Linux on PowerPC based blades).  OpenClovis provides a variety of cross build toolchains that can optionally be used with the SDK to build SAFplus Platform for these targets.&lt;br /&gt;
&lt;br /&gt;
Working with the OpenClovis SDK involves the following steps:&lt;br /&gt;
&lt;br /&gt;
#Installing the SDK, which is covered in ''OpenClovis Installation Guide''&lt;br /&gt;
#Optionally preparing the SDK for use with the WindRiver Workbench development tools&lt;br /&gt;
#Optionally pre-building SAFplus Platform libraries for a given target platform.&lt;br /&gt;
#Creating a project area (optionally populated with one or more existing SAFplus Platform models)&lt;br /&gt;
#Using the OpenClovis IDE to create a new SAFplus Platform model, generate its code, and modify this code to create desired functionality. This part is covered in ''OpenClovis IDE User Guide''&lt;br /&gt;
#Configuring and building the desired model for one or more target platform&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Pre-building SAFplus Platform Libraries for a Given Target Platform===&lt;br /&gt;
&lt;br /&gt;
This step builds SAFplus Platform libraries for use with a given platform (i.e. using a specific toolchain).  With these in place, it is no longer necessary to rebuild SAFplus Platform every time your application is built.  When new software is downloaded from github or a patch is received from OpenClovis, it is generally not necessary to re-install -- it is only necessary to run this prebuild.&lt;br /&gt;
&lt;br /&gt;
For the purpose of this document, we assume that the SDK is installed at &amp;lt;code&amp;gt;/opt/clovis&amp;lt;/code&amp;gt;, by root.  Consequently, example steps will be run as root.  If the SDK is installed as a normal user, that user can run these steps.&lt;br /&gt;
&lt;br /&gt;
By default SAFplus will look in /opt/clovis/&amp;lt;sdk version&amp;gt;/prebuild for prebuilt libraries, and by default it will have run the prebuild in the above directory during installation.&lt;br /&gt;
&lt;br /&gt;
But if you want a separate prebuild, you may create a special project area for the new SAFplus Platform library build, and &amp;quot;cd&amp;quot; to it:&lt;br /&gt;
&lt;br /&gt;
 # mkdir asp_build&lt;br /&gt;
 # cd asp_build&lt;br /&gt;
&lt;br /&gt;
Next, this prebuild project area should be initialized with the configure script as:&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/&amp;lt;SAFplus version&amp;gt;/src/SAFplus/configure --with-asp-build [--with-sdk-dir=&amp;lt;/opt/clovis&amp;gt;] [--with-cross-build=&amp;lt;toolchain&amp;gt;] [--prefix=&amp;lt;alternate SAFplus Platform libs installation dir&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;.../configure --help&amp;quot; to see extensive help describing all the available options.&lt;br /&gt;
&lt;br /&gt;
By default, the libraries will ultimately be installed to the SDK installation directory, in this case: &amp;lt;code&amp;gt;/opt/clovis/&amp;lt;SAFplus version&amp;gt;/target/&amp;lt;arch&amp;gt;/&amp;lt;kernel&amp;gt;/lib&amp;lt;/code&amp;gt;, and header files will be available at &amp;lt;code&amp;gt;/opt/clovis/&amp;lt;SAFplus version&amp;gt;/include&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If --with-cross-build=&amp;lt;toolchain&amp;gt; is unspecified, libraries will be built for the local system.&lt;br /&gt;
&lt;br /&gt;
If --prefix=&amp;lt;prefix&amp;gt; is specified, libraries will be installed to &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;/&amp;lt;arch&amp;gt;/&amp;lt;kernel&amp;gt;/lib&amp;lt;/code&amp;gt;, and header files to &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;/include&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--with-sdk-dir is only necessary if the SAFplus source code is not located in the installation directory.  In this case --with-sdk-dir is necessary to tell SAFplus where it was installed.  This generally only happens if you have placed SAFplus under source code control.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/sdk-6.0/src/SAFplus/configure --with-asp-build --with-cross-build=i586-wrl-pnele1.4-2.6.14_mpcbl0001&lt;br /&gt;
&lt;br /&gt;
will cause libraries to be built from the i586-wrl-pnele1.4-2.6.14_mpcbl0001 toolchain and installed to &amp;lt;code&amp;gt;/opt/clovis/sdk-6.0/target/i386/linux-2.6.14/lib&amp;lt;/code&amp;gt;, with header files populated at &amp;lt;code&amp;gt;/opt/clovis/sdk-6.0/include&amp;lt;/code&amp;gt;, and&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/sdk-3.0/src/SAFplus/configure --with-asp-build --prefix=/opt/asplib&lt;br /&gt;
&lt;br /&gt;
on an Ubuntu 7.04 (feisty fawn) system will cause libraries to be installed to &amp;lt;code&amp;gt;/opt/asplib/i686/linux-2.6.20/lib&amp;lt;/code&amp;gt;, and header files to be populated at &amp;lt;code&amp;gt;/opt/asplib/include&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following steps build and install the libraries as configured above:&lt;br /&gt;
&lt;br /&gt;
 # make asp-libs&lt;br /&gt;
 # make asp-install&lt;br /&gt;
&lt;br /&gt;
===Configuring and Building the Model===&lt;br /&gt;
&lt;br /&gt;
In this section, we will configure and build the &amp;lt;model&amp;gt; model in an existing project area.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Configure the &amp;lt;model&amp;gt; model for building by running the following:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will configure the &amp;lt;model&amp;gt; model for deployment on the local machine.  In order to crossbuild this model for deployment on a non-native target supported by the &amp;lt;crossbuild&amp;gt; toolchain, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build \&lt;br /&gt;
                                          --with-cross-build=&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is possible to configure the model to be built for multiple targets by issuing as many &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; commands as necessary.  Each run sets up a target-specific build location at &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If this model is to be deployed on an ATCA-based system with OpenHPI-based shelf management, enable Chassis Manager with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build \&lt;br /&gt;
                                          --with-cross-build=&amp;lt;crossbuild&amp;gt; \&lt;br /&gt;
                                          --with-cm-build=openhpi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
[[File:OpenClovis_Note.png]] '''Using Chassis Manager requires OpenClovis Platform Support Package, distributed separately from OpenClovis SDK.'''&lt;br /&gt;
&lt;br /&gt;
For a complete list of options to &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, including a list of available crossbuild toolchains, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the necessary crossbuild toolchain does not exist, then you must install it by downloading it adjacent to the OpenClovis SDK installer and re-running &amp;lt;i&amp;gt;install.sh&amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The configure step prepares the project area to build the &amp;lt;model&amp;gt; model, with the following directory structure:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;project_area&amp;gt;&lt;br /&gt;
   |ide_workspace&lt;br /&gt;
   |+&amp;lt;model&amp;gt;&lt;br /&gt;
       |+build&lt;br /&gt;
       |   |+local&lt;br /&gt;
       |   |   |-Makefile&lt;br /&gt;
       |   |+&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
       |   |   |-Makefile&lt;br /&gt;
       |+src&lt;br /&gt;
       |   |+app&lt;br /&gt;
       |   |+config&lt;br /&gt;
       |   |+doc&lt;br /&gt;
       |   |-target.conf&lt;br /&gt;
       |+target &lt;br /&gt;
       |-Makefile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Build the configured model by issuing &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will build the &amp;lt;model&amp;gt; model for all the targets it has been configured to build.  In order to do a target-specific build, issue &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; from the target-specific build location. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt; for a local build:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build/local&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
For a target supported by the &amp;lt;crossbuild&amp;gt; toolchain:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build/&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a complete list of options to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The model source is located at &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/src&amp;lt;/code&amp;gt;.  If any changes are made to this, rebuild the model by issuing another &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; from either the target-specific build location or the model directory.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] Model building can also be accomplished in IDE. For more information, see ''OpenClovis IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Using OpenClovis SDK with the WindRiver Workbench===&lt;br /&gt;
&lt;br /&gt;
It is possible to use OpenClovis SDK with the WindRiver Workbench development tools.  This section describes an optional step that creates a 'virtual' toolchain that allows SAFplus Platform to be built using the WindRiver Workbench development tools for a given WindRiver board support package.  This also builds the 3rd party prerequisites using the Workbench tools so that they may be deployed on the specific platform.  It requires both WindRiver Workbench (for the development tools) as well as a WindRiver board support package for a specific target platform.  Platform specific HPI libraries from Pigeon Point Systems and RadiSys can optionally be built into the virtual toolchains using packages supplied by either vendor.  It is possible to create as many virtual toolchains as necessary for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
This is done by using the cl-create-wrs-toolchain utility (as root, if OpenClovis SDK was installed as root, or as a normal user if not):&lt;br /&gt;
&lt;br /&gt;
 # cl-create-wrs-toolchain -w &amp;lt;WindRiver Workbench install dir&amp;gt; \&lt;br /&gt;
                           -b &amp;lt;bsp name&amp;gt; \&lt;br /&gt;
                         [ -l &amp;lt;libhcl_tarball&amp;gt; ] \&lt;br /&gt;
                         [ -p &amp;lt;pps_openhpi_tarball&amp;gt; ] \&lt;br /&gt;
                           &amp;lt;toolchain_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-l&amp;lt;/code&amp;gt; option accepts the full path to a RadiSys-provided libhcl package tarball.  If specified, it will be built in to the virtual toolchain.&lt;br /&gt;
The &amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; option accepts the full path to a Pigeon Point Systems-provided OpenHPI package tarball.  If specified, it will be built into the virtual toolchain instead of the stock OpenHPI package from the OpenClovis-provided 3rd party package tarball.&lt;br /&gt;
&lt;br /&gt;
e.g.:&lt;br /&gt;
&lt;br /&gt;
 # cl-create-wrs-toolchain -w /opt/WindRiver \&lt;br /&gt;
                           -b intel_mpcbl0001 wrs_mpcbl0001&lt;br /&gt;
&lt;br /&gt;
This will create a toolchain called &amp;lt;code&amp;gt;wrs_mpcbl0001&amp;lt;/code&amp;gt; in your existing SDK buildtools directory that is built using the WindRiver installation at &amp;lt;code&amp;gt;/opt/WindRiver&amp;lt;/code&amp;gt; for the &amp;lt;code&amp;gt;intel_mpcbl0001&amp;lt;/code&amp;gt; board support package.  This toolchain will be visible when using &amp;lt;code&amp;gt;configure --help&amp;lt;/code&amp;gt;, as will be noted in a following section.&lt;br /&gt;
&lt;br /&gt;
Note: The virtual toolchain requires the WindRiver Workbench installation to be available when it is used, as it merely provides references to the development tools in the Workbench installation.  Should the installation be moved or replaced, the virtual toolchain would need to be built again.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/sdkguide/build</id>
		<title>Doc:latest/sdkguide/build</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/sdkguide/build"/>
				<updated>2013-06-28T18:12:28Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Building SAFplus Platform and SAFplus-based Systems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Building SAFplus Platform and SAFplus-based Systems==&lt;br /&gt;
&lt;br /&gt;
This chapter covers features that are related to building SAFplus Platform and SAFplus-based systems.&lt;br /&gt;
&lt;br /&gt;
Note: In the context of this chapter, a target platform is any blade type or architecture that OpenClovis SAFplus Platform can be built for (e.g. WindRiver PNE-LE 1.4 on dual Xeon-based Intel MPCBL0001 blades, or Yellow Dog Linux on PowerPC based blades).  OpenClovis provides a variety of cross build toolchains that can optionally be used with the SDK to build SAFplus Platform for these targets.&lt;br /&gt;
&lt;br /&gt;
Working with the OpenClovis SDK involves the following steps:&lt;br /&gt;
&lt;br /&gt;
#Installing the SDK, which is covered in ''OpenClovis Installation Guide''&lt;br /&gt;
#Optionally preparing the SDK for use with the WindRiver Workbench development tools&lt;br /&gt;
#Optionally pre-building SAFplus Platform libraries for a given target platform.&lt;br /&gt;
#Creating a project area (optionally populated with one or more existing SAFplus Platform models)&lt;br /&gt;
#Using the OpenClovis IDE to create a new SAFplus Platform model, generate its code, and modify this code to create desired functionality. This part is covered in ''OpenClovis IDE User Guide''&lt;br /&gt;
#Configuring and building the desired model for one or more target platform&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Pre-building SAFplus Platform Libraries for a Given Target Platform===&lt;br /&gt;
&lt;br /&gt;
This step builds SAFplus Platform libraries for use with a given platform (i.e. using a specific toolchain).  With these in place, it is no longer necessary to rebuild SAFplus Platform every time your application is built.  When new software is downloaded from github or a patch is received from OpenClovis, it is generally not necessary to re-install -- it is only necessary to run this prebuild.&lt;br /&gt;
&lt;br /&gt;
For the purpose of this document, we assume that the SDK is installed at &amp;lt;code&amp;gt;/opt/clovis&amp;lt;/code&amp;gt;, by root.  Consequently, example steps will be run as root.  If the SDK is installed as a normal user, that user can run these steps.&lt;br /&gt;
&lt;br /&gt;
By default SAFplus will look in /opt/clovis/&amp;lt;sdk version&amp;gt;/prebuild for prebuilt libraries, and by default it will have run the prebuild in the above directory during installation.&lt;br /&gt;
&lt;br /&gt;
But if you want a separate prebuild, you may create a special project area for the new SAFplus Platform library build, and &amp;quot;cd&amp;quot; to it:&lt;br /&gt;
&lt;br /&gt;
 # mkdir asp_build&lt;br /&gt;
 # cd asp_build&lt;br /&gt;
&lt;br /&gt;
Next, this prebuild project area should be initialized with the configure script as:&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/&amp;lt;SAFplus version&amp;gt;/src/SAFplus/configure --with-asp-build [--with-sdk-dir=&amp;lt;/opt/clovis&amp;gt;] [--with-cross-build=&amp;lt;toolchain&amp;gt;] [--prefix=&amp;lt;alternate SAFplus Platform libs installation dir&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;.../configure --help&amp;quot; to see extensive help describing all the available options.&lt;br /&gt;
&lt;br /&gt;
By default, the libraries will ultimately be installed to the SDK installation directory, in this case: &amp;lt;code&amp;gt;/opt/clovis/&amp;lt;SAFplus version&amp;gt;/target/&amp;lt;arch&amp;gt;/&amp;lt;kernel&amp;gt;/lib&amp;lt;/code&amp;gt;, and header files will be available at &amp;lt;code&amp;gt;/opt/clovis/&amp;lt;SAFplus version&amp;gt;/include&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If --with-cross-build=&amp;lt;toolchain&amp;gt; is unspecified, libraries will be built for the local system.&lt;br /&gt;
&lt;br /&gt;
If --prefix=&amp;lt;prefix&amp;gt; is specified, libraries will be installed to &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;/&amp;lt;arch&amp;gt;/&amp;lt;kernel&amp;gt;/lib&amp;lt;/code&amp;gt;, and header files to &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;/include&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--with-sdk-dir is only necessary if the SAFplus source code is not located in the installation directory.  In this case --with-sdk-dir is necessary to tell SAFplus where it was installed.  This generally only happens if you have placed SAFplus under source code control.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/sdk-6.0/src/SAFplus/configure --with-asp-build --with-cross-build=i586-wrl-pnele1.4-2.6.14_mpcbl0001&lt;br /&gt;
&lt;br /&gt;
will cause libraries to be built from the i586-wrl-pnele1.4-2.6.14_mpcbl0001 toolchain and installed to &amp;lt;code&amp;gt;/opt/clovis/sdk-6.0/target/i386/linux-2.6.14/lib&amp;lt;/code&amp;gt;, with header files populated at &amp;lt;code&amp;gt;/opt/clovis/sdk-6.0/include&amp;lt;/code&amp;gt;, and&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/sdk-3.0/src/SAFplus/configure --with-asp-build --prefix=/opt/asplib&lt;br /&gt;
&lt;br /&gt;
on an Ubuntu 7.04 (feisty fawn) system will cause libraries to be installed to &amp;lt;code&amp;gt;/opt/asplib/i686/linux-2.6.20/lib&amp;lt;/code&amp;gt;, and header files to be populated at &amp;lt;code&amp;gt;/opt/asplib/include&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following steps build and install the libraries as configured above:&lt;br /&gt;
&lt;br /&gt;
 # make asp-libs&lt;br /&gt;
 # make asp-install&lt;br /&gt;
&lt;br /&gt;
===Creating a Project Area===&lt;br /&gt;
&lt;br /&gt;
A new project area with no model code is created by running the &amp;lt;code&amp;gt;cl-create-project-area&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/bin/cl-create-project-area project_area&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project area is ready for use with OpenClovis IDE to generate model code that will be built in a following step.&lt;br /&gt;
&lt;br /&gt;
Existing models (from model-specific branches) can be copied over into a project area, and re-running &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--with-model-name&amp;lt;/code&amp;gt; with any copied models will configure them for building.&lt;br /&gt;
&lt;br /&gt;
A typical project area is laid out as:&lt;br /&gt;
&lt;br /&gt;
 project_area&lt;br /&gt;
     +- ide_workspace&lt;br /&gt;
          +- model_1&lt;br /&gt;
          +- model_2&lt;br /&gt;
     +- model_1&lt;br /&gt;
          +- src/&lt;br /&gt;
              +- target.conf&lt;br /&gt;
          +- build/&lt;br /&gt;
          +- target/&lt;br /&gt;
     +- model_2&lt;br /&gt;
          +- src/&lt;br /&gt;
              +- target.conf&lt;br /&gt;
          +- build/&lt;br /&gt;
          +- target/&lt;br /&gt;
&lt;br /&gt;
Note:  The &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; script does not copy models into the project area.  The old behavior of copying models out from SAFplus/models is no longer required.  The sample evaluation model that was at &amp;lt;code&amp;gt;&amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/models&amp;lt;/code&amp;gt; has been moved to its own &amp;lt;code&amp;gt;examples&amp;lt;/code&amp;gt; project area adjacent to the SAFplus Platform tree, at &amp;lt;code&amp;gt;&amp;lt;install_dir&amp;gt;/sdk-3.0/src/examples&amp;lt;/code&amp;gt;. To use it, one would change to the &amp;lt;code&amp;gt;examples&amp;lt;/code&amp;gt; directory and issue a &amp;lt;code&amp;gt;&amp;lt;path-to&amp;gt;/configure --with-model-name=eval&amp;lt;/code&amp;gt;.  Alternately, if the &amp;lt;code&amp;gt;examples&amp;lt;/code&amp;gt; project area is in a non-user-writeable location (e.g. in the case of a root-installed SDK), it can be copied out to a user-writeable location and used there instead in the same manner.&lt;br /&gt;
&lt;br /&gt;
===Configuring and Building the Model===&lt;br /&gt;
&lt;br /&gt;
In this section, we will configure and build the &amp;lt;model&amp;gt; model in an existing project area.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Configure the &amp;lt;model&amp;gt; model for building by running the following:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will configure the &amp;lt;model&amp;gt; model for deployment on the local machine.  In order to crossbuild this model for deployment on a non-native target supported by the &amp;lt;crossbuild&amp;gt; toolchain, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build \&lt;br /&gt;
                                          --with-cross-build=&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is possible to configure the model to be built for multiple targets by issuing as many &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; commands as necessary.  Each run sets up a target-specific build location at &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If this model is to be deployed on an ATCA-based system with OpenHPI-based shelf management, enable Chassis Manager with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build \&lt;br /&gt;
                                          --with-cross-build=&amp;lt;crossbuild&amp;gt; \&lt;br /&gt;
                                          --with-cm-build=openhpi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
[[File:OpenClovis_Note.png]] '''Using Chassis Manager requires OpenClovis Platform Support Package, distributed separately from OpenClovis SDK.'''&lt;br /&gt;
&lt;br /&gt;
For a complete list of options to &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, including a list of available crossbuild toolchains, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the necessary crossbuild toolchain does not exist, then you must install it by downloading it adjacent to the OpenClovis SDK installer and re-running &amp;lt;i&amp;gt;install.sh&amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The configure step prepares the project area to build the &amp;lt;model&amp;gt; model, with the following directory structure:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;project_area&amp;gt;&lt;br /&gt;
   |ide_workspace&lt;br /&gt;
   |+&amp;lt;model&amp;gt;&lt;br /&gt;
       |+build&lt;br /&gt;
       |   |+local&lt;br /&gt;
       |   |   |-Makefile&lt;br /&gt;
       |   |+&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
       |   |   |-Makefile&lt;br /&gt;
       |+src&lt;br /&gt;
       |   |+app&lt;br /&gt;
       |   |+config&lt;br /&gt;
       |   |+doc&lt;br /&gt;
       |   |-target.conf&lt;br /&gt;
       |+target &lt;br /&gt;
       |-Makefile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Build the configured model by issuing &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will build the &amp;lt;model&amp;gt; model for all the targets it has been configured to build.  In order to do a target-specific build, issue &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; from the target-specific build location. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt; for a local build:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build/local&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
For a target supported by the &amp;lt;crossbuild&amp;gt; toolchain:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build/&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a complete list of options to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The model source is located at &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/src&amp;lt;/code&amp;gt;.  If any changes are made to this, rebuild the model by issuing another &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; from either the target-specific build location or the model directory.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] Model building can also be accomplished in IDE. For more information, see ''OpenClovis IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Using OpenClovis SDK with the WindRiver Workbench===&lt;br /&gt;
&lt;br /&gt;
It is possible to use OpenClovis SDK with the WindRiver Workbench development tools.  This section describes an optional step that creates a 'virtual' toolchain that allows SAFplus Platform to be built using the WindRiver Workbench development tools for a given WindRiver board support package.  This also builds the 3rd party prerequisites using the Workbench tools so that they may be deployed on the specific platform.  It requires both WindRiver Workbench (for the development tools) as well as a WindRiver board support package for a specific target platform.  Platform specific HPI libraries from Pigeon Point Systems and RadiSys can optionally be built into the virtual toolchains using packages supplied by either vendor.  It is possible to create as many virtual toolchains as necessary for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
This is done by using the cl-create-wrs-toolchain utility (as root, if OpenClovis SDK was installed as root, or as a normal user if not):&lt;br /&gt;
&lt;br /&gt;
 # cl-create-wrs-toolchain -w &amp;lt;WindRiver Workbench install dir&amp;gt; \&lt;br /&gt;
                           -b &amp;lt;bsp name&amp;gt; \&lt;br /&gt;
                         [ -l &amp;lt;libhcl_tarball&amp;gt; ] \&lt;br /&gt;
                         [ -p &amp;lt;pps_openhpi_tarball&amp;gt; ] \&lt;br /&gt;
                           &amp;lt;toolchain_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-l&amp;lt;/code&amp;gt; option accepts the full path to a RadiSys-provided libhcl package tarball.  If specified, it will be built in to the virtual toolchain.&lt;br /&gt;
The &amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; option accepts the full path to a Pigeon Point Systems-provided OpenHPI package tarball.  If specified, it will be built into the virtual toolchain instead of the stock OpenHPI package from the OpenClovis-provided 3rd party package tarball.&lt;br /&gt;
&lt;br /&gt;
e.g.:&lt;br /&gt;
&lt;br /&gt;
 # cl-create-wrs-toolchain -w /opt/WindRiver \&lt;br /&gt;
                           -b intel_mpcbl0001 wrs_mpcbl0001&lt;br /&gt;
&lt;br /&gt;
This will create a toolchain called &amp;lt;code&amp;gt;wrs_mpcbl0001&amp;lt;/code&amp;gt; in your existing SDK buildtools directory that is built using the WindRiver installation at &amp;lt;code&amp;gt;/opt/WindRiver&amp;lt;/code&amp;gt; for the &amp;lt;code&amp;gt;intel_mpcbl0001&amp;lt;/code&amp;gt; board support package.  This toolchain will be visible when using &amp;lt;code&amp;gt;configure --help&amp;lt;/code&amp;gt;, as will be noted in a following section.&lt;br /&gt;
&lt;br /&gt;
Note: The virtual toolchain requires the WindRiver Workbench installation to be available when it is used, as it merely provides references to the development tools in the Workbench installation.  Should the installation be moved or replaced, the virtual toolchain would need to be built again.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/sdkguide/build</id>
		<title>Doc:latest/sdkguide/build</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/sdkguide/build"/>
				<updated>2013-06-28T18:11:02Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Pre-building SAFplus Platform Libraries for a Given Target Platform */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Building SAFplus Platform and SAFplus-based Systems==&lt;br /&gt;
&lt;br /&gt;
This chapter covers features that are related to building SAFplus Platform and SAFplus-based systems.&lt;br /&gt;
&lt;br /&gt;
Note: In the context of this chapter, a target platform is any blade type or architecture that OpenClovis SAFplus Platform can be built for (e.g. WindRiver PNE-LE 1.4 on dual Xeon-based Intel MPCBL0001 blades, or Yellow Dog Linux on PowerPC based blades).  OpenClovis provides a variety of cross build toolchains that can optionally be used with the SDK to build SAFplus Platform for these targets.&lt;br /&gt;
&lt;br /&gt;
Working with the OpenClovis SDK involves the following steps:&lt;br /&gt;
&lt;br /&gt;
#Installing the SDK, which is covered in ''OpenClovis Installation Guide''&lt;br /&gt;
#Optionally preparing the SDK for use with the WindRiver Workbench development tools&lt;br /&gt;
#Optionally pre-building SAFplus Platform libraries for a given target platform.&lt;br /&gt;
#Creating a project area (optionally populated with one or more existing SAFplus Platform models)&lt;br /&gt;
#Using the OpenClovis IDE to create a new SAFplus Platform model, generate its code, and modify this code to create desired functionality. This part is covered in ''OpenClovis IDE User Guide''&lt;br /&gt;
#Configuring and building the desired model for one or more target platform&lt;br /&gt;
&lt;br /&gt;
===Using OpenClovis SDK with the WindRiver Workbench===&lt;br /&gt;
&lt;br /&gt;
It is possible to use OpenClovis SDK with the WindRiver Workbench development tools.  This section describes an optional step that creates a 'virtual' toolchain that allows SAFplus Platform to be built using the WindRiver Workbench development tools for a given WindRiver board support package.  This also builds the 3rd party prerequisites using the Workbench tools so that they may be deployed on the specific platform.  It requires both WindRiver Workbench (for the development tools) as well as a WindRiver board support package for a specific target platform.  Platform specific HPI libraries from Pigeon Point Systems and RadiSys can optionally be built into the virtual toolchains using packages supplied by either vendor.  It is possible to create as many virtual toolchains as necessary for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
This is done by using the cl-create-wrs-toolchain utility (as root, if OpenClovis SDK was installed as root, or as a normal user if not):&lt;br /&gt;
&lt;br /&gt;
 # cl-create-wrs-toolchain -w &amp;lt;WindRiver Workbench install dir&amp;gt; \&lt;br /&gt;
                           -b &amp;lt;bsp name&amp;gt; \&lt;br /&gt;
                         [ -l &amp;lt;libhcl_tarball&amp;gt; ] \&lt;br /&gt;
                         [ -p &amp;lt;pps_openhpi_tarball&amp;gt; ] \&lt;br /&gt;
                           &amp;lt;toolchain_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-l&amp;lt;/code&amp;gt; option accepts the full path to a RadiSys-provided libhcl package tarball.  If specified, it will be built in to the virtual toolchain.&lt;br /&gt;
The &amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; option accepts the full path to a Pigeon Point Systems-provided OpenHPI package tarball.  If specified, it will be built into the virtual toolchain instead of the stock OpenHPI package from the OpenClovis-provided 3rd party package tarball.&lt;br /&gt;
&lt;br /&gt;
e.g.:&lt;br /&gt;
&lt;br /&gt;
 # cl-create-wrs-toolchain -w /opt/WindRiver \&lt;br /&gt;
                           -b intel_mpcbl0001 wrs_mpcbl0001&lt;br /&gt;
&lt;br /&gt;
This will create a toolchain called &amp;lt;code&amp;gt;wrs_mpcbl0001&amp;lt;/code&amp;gt; in your existing SDK buildtools directory that is built using the WindRiver installation at &amp;lt;code&amp;gt;/opt/WindRiver&amp;lt;/code&amp;gt; for the &amp;lt;code&amp;gt;intel_mpcbl0001&amp;lt;/code&amp;gt; board support package.  This toolchain will be visible when using &amp;lt;code&amp;gt;configure --help&amp;lt;/code&amp;gt;, as will be noted in a following section.&lt;br /&gt;
&lt;br /&gt;
Note: The virtual toolchain requires the WindRiver Workbench installation to be available when it is used, as it merely provides references to the development tools in the Workbench installation.  Should the installation be moved or replaced, the virtual toolchain would need to be built again.&lt;br /&gt;
&lt;br /&gt;
===Pre-building SAFplus Platform Libraries for a Given Target Platform===&lt;br /&gt;
&lt;br /&gt;
This step builds SAFplus Platform libraries for use with a given platform (i.e. using a specific toolchain).  With these in place, it is no longer necessary to rebuild SAFplus Platform every time your application is built.  When new software is downloaded from github or a patch is received from OpenClovis, it is generally not necessary to re-install -- it is only necessary to run this prebuild.&lt;br /&gt;
&lt;br /&gt;
For the purpose of this document, we assume that the SDK is installed at &amp;lt;code&amp;gt;/opt/clovis&amp;lt;/code&amp;gt;, by root.  Consequently, example steps will be run as root.  If the SDK is installed as a normal user, that user can run these steps.&lt;br /&gt;
&lt;br /&gt;
By default SAFplus will look in /opt/clovis/&amp;lt;sdk version&amp;gt;/prebuild for prebuilt libraries, and by default it will have run the prebuild in the above directory during installation.&lt;br /&gt;
&lt;br /&gt;
But if you want a separate prebuild, you may create a special project area for the new SAFplus Platform library build, and &amp;quot;cd&amp;quot; to it:&lt;br /&gt;
&lt;br /&gt;
 # mkdir asp_build&lt;br /&gt;
 # cd asp_build&lt;br /&gt;
&lt;br /&gt;
Next, this prebuild project area should be initialized with the configure script as:&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/&amp;lt;SAFplus version&amp;gt;/src/SAFplus/configure --with-asp-build [--with-sdk-dir=&amp;lt;/opt/clovis&amp;gt;] [--with-cross-build=&amp;lt;toolchain&amp;gt;] [--prefix=&amp;lt;alternate SAFplus Platform libs installation dir&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Run &amp;quot;.../configure --help&amp;quot; to see extensive help describing all the available options.&lt;br /&gt;
&lt;br /&gt;
By default, the libraries will ultimately be installed to the SDK installation directory, in this case: &amp;lt;code&amp;gt;/opt/clovis/&amp;lt;SAFplus version&amp;gt;/target/&amp;lt;arch&amp;gt;/&amp;lt;kernel&amp;gt;/lib&amp;lt;/code&amp;gt;, and header files will be available at &amp;lt;code&amp;gt;/opt/clovis/&amp;lt;SAFplus version&amp;gt;/include&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If --with-cross-build=&amp;lt;toolchain&amp;gt; is unspecified, libraries will be built for the local system.&lt;br /&gt;
&lt;br /&gt;
If --prefix=&amp;lt;prefix&amp;gt; is specified, libraries will be installed to &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;/&amp;lt;arch&amp;gt;/&amp;lt;kernel&amp;gt;/lib&amp;lt;/code&amp;gt;, and header files to &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;/include&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--with-sdk-dir is only necessary if the SAFplus source code is not located in the installation directory.  In this case --with-sdk-dir is necessary to tell SAFplus where it was installed.  This generally only happens if you have placed SAFplus under source code control.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/sdk-6.0/src/SAFplus/configure --with-asp-build --with-cross-build=i586-wrl-pnele1.4-2.6.14_mpcbl0001&lt;br /&gt;
&lt;br /&gt;
will cause libraries to be built from the i586-wrl-pnele1.4-2.6.14_mpcbl0001 toolchain and installed to &amp;lt;code&amp;gt;/opt/clovis/sdk-6.0/target/i386/linux-2.6.14/lib&amp;lt;/code&amp;gt;, with header files populated at &amp;lt;code&amp;gt;/opt/clovis/sdk-6.0/include&amp;lt;/code&amp;gt;, and&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/sdk-3.0/src/SAFplus/configure --with-asp-build --prefix=/opt/asplib&lt;br /&gt;
&lt;br /&gt;
on an Ubuntu 7.04 (feisty fawn) system will cause libraries to be installed to &amp;lt;code&amp;gt;/opt/asplib/i686/linux-2.6.20/lib&amp;lt;/code&amp;gt;, and header files to be populated at &amp;lt;code&amp;gt;/opt/asplib/include&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following steps build and install the libraries as configured above:&lt;br /&gt;
&lt;br /&gt;
 # make asp-libs&lt;br /&gt;
 # make asp-install&lt;br /&gt;
&lt;br /&gt;
===Creating a Project Area===&lt;br /&gt;
&lt;br /&gt;
A new project area with no model code is created by running the &amp;lt;code&amp;gt;cl-create-project-area&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/bin/cl-create-project-area project_area&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project area is ready for use with OpenClovis IDE to generate model code that will be built in a following step.&lt;br /&gt;
&lt;br /&gt;
Existing models (from model-specific branches) can be copied over into a project area, and re-running &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--with-model-name&amp;lt;/code&amp;gt; with any copied models will configure them for building.&lt;br /&gt;
&lt;br /&gt;
A typical project area is laid out as:&lt;br /&gt;
&lt;br /&gt;
 project_area&lt;br /&gt;
     +- ide_workspace&lt;br /&gt;
          +- model_1&lt;br /&gt;
          +- model_2&lt;br /&gt;
     +- model_1&lt;br /&gt;
          +- src/&lt;br /&gt;
              +- target.conf&lt;br /&gt;
          +- build/&lt;br /&gt;
          +- target/&lt;br /&gt;
     +- model_2&lt;br /&gt;
          +- src/&lt;br /&gt;
              +- target.conf&lt;br /&gt;
          +- build/&lt;br /&gt;
          +- target/&lt;br /&gt;
&lt;br /&gt;
Note:  The &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; script does not copy models into the project area.  The old behavior of copying models out from SAFplus/models is no longer required.  The sample evaluation model that was at &amp;lt;code&amp;gt;&amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/models&amp;lt;/code&amp;gt; has been moved to its own &amp;lt;code&amp;gt;examples&amp;lt;/code&amp;gt; project area adjacent to the SAFplus Platform tree, at &amp;lt;code&amp;gt;&amp;lt;install_dir&amp;gt;/sdk-3.0/src/examples&amp;lt;/code&amp;gt;. To use it, one would change to the &amp;lt;code&amp;gt;examples&amp;lt;/code&amp;gt; directory and issue a &amp;lt;code&amp;gt;&amp;lt;path-to&amp;gt;/configure --with-model-name=eval&amp;lt;/code&amp;gt;.  Alternately, if the &amp;lt;code&amp;gt;examples&amp;lt;/code&amp;gt; project area is in a non-user-writeable location (e.g. in the case of a root-installed SDK), it can be copied out to a user-writeable location and used there instead in the same manner.&lt;br /&gt;
&lt;br /&gt;
===Configuring and Building the Model===&lt;br /&gt;
&lt;br /&gt;
In this section, we will configure and build the &amp;lt;model&amp;gt; model in an existing project area.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Configure the &amp;lt;model&amp;gt; model for building by running the following:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will configure the &amp;lt;model&amp;gt; model for deployment on the local machine.  In order to crossbuild this model for deployment on a non-native target supported by the &amp;lt;crossbuild&amp;gt; toolchain, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build \&lt;br /&gt;
                                          --with-cross-build=&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is possible to configure the model to be built for multiple targets by issuing as many &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; commands as necessary.  Each run sets up a target-specific build location at &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If this model is to be deployed on an ATCA-based system with OpenHPI-based shelf management, enable Chassis Manager with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build \&lt;br /&gt;
                                          --with-cross-build=&amp;lt;crossbuild&amp;gt; \&lt;br /&gt;
                                          --with-cm-build=openhpi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
[[File:OpenClovis_Note.png]] '''Using Chassis Manager requires OpenClovis Platform Support Package, distributed separately from OpenClovis SDK.'''&lt;br /&gt;
&lt;br /&gt;
For a complete list of options to &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, including a list of available crossbuild toolchains, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the necessary crossbuild toolchain does not exist, then you must install it by downloading it adjacent to the OpenClovis SDK installer and re-running &amp;lt;i&amp;gt;install.sh&amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The configure step prepares the project area to build the &amp;lt;model&amp;gt; model, with the following directory structure:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;project_area&amp;gt;&lt;br /&gt;
   |ide_workspace&lt;br /&gt;
   |+&amp;lt;model&amp;gt;&lt;br /&gt;
       |+build&lt;br /&gt;
       |   |+local&lt;br /&gt;
       |   |   |-Makefile&lt;br /&gt;
       |   |+&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
       |   |   |-Makefile&lt;br /&gt;
       |+src&lt;br /&gt;
       |   |+app&lt;br /&gt;
       |   |+config&lt;br /&gt;
       |   |+doc&lt;br /&gt;
       |   |-target.conf&lt;br /&gt;
       |+target &lt;br /&gt;
       |-Makefile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Build the configured model by issuing &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will build the &amp;lt;model&amp;gt; model for all the targets it has been configured to build.  In order to do a target-specific build, issue &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; from the target-specific build location. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt; for a local build:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build/local&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
For a target supported by the &amp;lt;crossbuild&amp;gt; toolchain:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build/&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a complete list of options to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The model source is located at &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/src&amp;lt;/code&amp;gt;.  If any changes are made to this, rebuild the model by issuing another &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; from either the target-specific build location or the model directory.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] Model building can also be accomplished in IDE. For more information, see ''OpenClovis IDE User Guide''.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/sdkguide/build</id>
		<title>Doc:latest/sdkguide/build</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/sdkguide/build"/>
				<updated>2013-06-28T17:56:42Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Building SAFplus Platform and SAFplus-based Systems==&lt;br /&gt;
&lt;br /&gt;
This chapter covers features that are related to building SAFplus Platform and SAFplus-based systems.&lt;br /&gt;
&lt;br /&gt;
Note: In the context of this chapter, a target platform is any blade type or architecture that OpenClovis SAFplus Platform can be built for (e.g. WindRiver PNE-LE 1.4 on dual Xeon-based Intel MPCBL0001 blades, or Yellow Dog Linux on PowerPC based blades).  OpenClovis provides a variety of cross build toolchains that can optionally be used with the SDK to build SAFplus Platform for these targets.&lt;br /&gt;
&lt;br /&gt;
Working with the OpenClovis SDK involves the following steps:&lt;br /&gt;
&lt;br /&gt;
#Installing the SDK, which is covered in ''OpenClovis Installation Guide''&lt;br /&gt;
#Optionally preparing the SDK for use with the WindRiver Workbench development tools&lt;br /&gt;
#Optionally pre-building SAFplus Platform libraries for a given target platform.&lt;br /&gt;
#Creating a project area (optionally populated with one or more existing SAFplus Platform models)&lt;br /&gt;
#Using the OpenClovis IDE to create a new SAFplus Platform model, generate its code, and modify this code to create desired functionality. This part is covered in ''OpenClovis IDE User Guide''&lt;br /&gt;
#Configuring and building the desired model for one or more target platform&lt;br /&gt;
&lt;br /&gt;
===Using OpenClovis SDK with the WindRiver Workbench===&lt;br /&gt;
&lt;br /&gt;
It is possible to use OpenClovis SDK with the WindRiver Workbench development tools.  This section describes an optional step that creates a 'virtual' toolchain that allows SAFplus Platform to be built using the WindRiver Workbench development tools for a given WindRiver board support package.  This also builds the 3rd party prerequisites using the Workbench tools so that they may be deployed on the specific platform.  It requires both WindRiver Workbench (for the development tools) as well as a WindRiver board support package for a specific target platform.  Platform specific HPI libraries from Pigeon Point Systems and RadiSys can optionally be built into the virtual toolchains using packages supplied by either vendor.  It is possible to create as many virtual toolchains as necessary for a variety of platforms.&lt;br /&gt;
&lt;br /&gt;
This is done by using the cl-create-wrs-toolchain utility (as root, if OpenClovis SDK was installed as root, or as a normal user if not):&lt;br /&gt;
&lt;br /&gt;
 # cl-create-wrs-toolchain -w &amp;lt;WindRiver Workbench install dir&amp;gt; \&lt;br /&gt;
                           -b &amp;lt;bsp name&amp;gt; \&lt;br /&gt;
                         [ -l &amp;lt;libhcl_tarball&amp;gt; ] \&lt;br /&gt;
                         [ -p &amp;lt;pps_openhpi_tarball&amp;gt; ] \&lt;br /&gt;
                           &amp;lt;toolchain_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;-l&amp;lt;/code&amp;gt; option accepts the full path to a RadiSys-provided libhcl package tarball.  If specified, it will be built in to the virtual toolchain.&lt;br /&gt;
The &amp;lt;code&amp;gt;-p&amp;lt;/code&amp;gt; option accepts the full path to a Pigeon Point Systems-provided OpenHPI package tarball.  If specified, it will be built into the virtual toolchain instead of the stock OpenHPI package from the OpenClovis-provided 3rd party package tarball.&lt;br /&gt;
&lt;br /&gt;
e.g.:&lt;br /&gt;
&lt;br /&gt;
 # cl-create-wrs-toolchain -w /opt/WindRiver \&lt;br /&gt;
                           -b intel_mpcbl0001 wrs_mpcbl0001&lt;br /&gt;
&lt;br /&gt;
This will create a toolchain called &amp;lt;code&amp;gt;wrs_mpcbl0001&amp;lt;/code&amp;gt; in your existing SDK buildtools directory that is built using the WindRiver installation at &amp;lt;code&amp;gt;/opt/WindRiver&amp;lt;/code&amp;gt; for the &amp;lt;code&amp;gt;intel_mpcbl0001&amp;lt;/code&amp;gt; board support package.  This toolchain will be visible when using &amp;lt;code&amp;gt;configure --help&amp;lt;/code&amp;gt;, as will be noted in a following section.&lt;br /&gt;
&lt;br /&gt;
Note: The virtual toolchain requires the WindRiver Workbench installation to be available when it is used, as it merely provides references to the development tools in the Workbench installation.  Should the installation be moved or replaced, the virtual toolchain would need to be built again.&lt;br /&gt;
&lt;br /&gt;
===Pre-building SAFplus Platform Libraries for a Given Target Platform===&lt;br /&gt;
&lt;br /&gt;
This is an optional step that pre-builds SAFplus Platform libraries for use with a given platform (i.e. using a specific toolchain).  With these in place, it is no longer necessary to rebuild SAFplus Platform every time in order to build an SAFplus Platform model.  (For the purpose of this document, we assume that the SDK is installed at &amp;lt;code&amp;gt;/opt/clovis&amp;lt;/code&amp;gt;, by root.  Consequently, example steps will be run as root.  If the SDK is installed as a normal user at a location available to him, these steps can be run as the normal user itself.)&lt;br /&gt;
&lt;br /&gt;
We first create a special project area for the SAFplus Platform library build, and change to it:&lt;br /&gt;
&lt;br /&gt;
 # mkdir asp_build&lt;br /&gt;
 # cd asp_build&lt;br /&gt;
&lt;br /&gt;
This project area is then initialized with the configure script as:&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/sdk-3.0/src/SAFplus/configure --with-asp-build \&lt;br /&gt;
                         [--with-cross-build=&amp;lt;toolchain&amp;gt;] \&lt;br /&gt;
         [--prefix=&amp;lt;alternate SAFplus Platform libs installation dir&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
By default, the libraries will ultimately be installed to the SDK installation directory, in this case: &amp;lt;code&amp;gt;/opt/clovis/sdk-3.0/target/&amp;lt;arch&amp;gt;/&amp;lt;kernel&amp;gt;/lib&amp;lt;/code&amp;gt;, and header files will be available at &amp;lt;code&amp;gt;/opt/clovis/sdk-3.0/include&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If --with-cross-build=&amp;lt;toolchain&amp;gt; is unspecified, libraries will be built for the local system.&lt;br /&gt;
&lt;br /&gt;
If --prefix=&amp;lt;prefix&amp;gt; is specified, libraries will be installed to &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;/&amp;lt;arch&amp;gt;/&amp;lt;kernel&amp;gt;/lib&amp;lt;/code&amp;gt;, and header files to &amp;lt;code&amp;gt;&amp;lt;prefix&amp;gt;/include&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/sdk-3.0/src/SAFplus/configure --with-asp-build \&lt;br /&gt;
   --with-cross-build=i586-wrl-pnele1.4-2.6.14_mpcbl0001&lt;br /&gt;
&lt;br /&gt;
will cause libraries to be built from the i586-wrl-pnele1.4-2.6.14_mpcbl0001 toolchain and installed to &amp;lt;code&amp;gt;/opt/clovis/sdk-3.0/target/i386/linux-2.6.14/lib&amp;lt;/code&amp;gt;, with header files populated at &amp;lt;code&amp;gt;/opt/clovis/sdk-3.0/include&amp;lt;/code&amp;gt;, and&lt;br /&gt;
&lt;br /&gt;
 # /opt/clovis/sdk-3.0/src/SAFplus/configure --with-asp-build \&lt;br /&gt;
                                         --prefix=/opt/asplib&lt;br /&gt;
&lt;br /&gt;
on an Ubuntu 7.04 (feisty fawn) system will cause libraries to be installed to &amp;lt;code&amp;gt;/opt/asplib/i686/linux-2.6.20/lib&amp;lt;/code&amp;gt;, and header files to be populated at &amp;lt;code&amp;gt;/opt/asplib/include&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following steps build and install the libraries as configured above:&lt;br /&gt;
&lt;br /&gt;
 # make asp-libs&lt;br /&gt;
 # make asp-install&lt;br /&gt;
&lt;br /&gt;
===Creating a Project Area===&lt;br /&gt;
&lt;br /&gt;
A new project area with no model code is created by running the &amp;lt;code&amp;gt;cl-create-project-area&amp;lt;/code&amp;gt; command:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/bin/cl-create-project-area project_area&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project area is ready for use with OpenClovis IDE to generate model code that will be built in a following step.&lt;br /&gt;
&lt;br /&gt;
Existing models (from model-specific branches) can be copied over into a project area, and re-running &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; using &amp;lt;code&amp;gt;--with-model-name&amp;lt;/code&amp;gt; with any copied models will configure them for building.&lt;br /&gt;
&lt;br /&gt;
A typical project area is laid out as:&lt;br /&gt;
&lt;br /&gt;
 project_area&lt;br /&gt;
     +- ide_workspace&lt;br /&gt;
          +- model_1&lt;br /&gt;
          +- model_2&lt;br /&gt;
     +- model_1&lt;br /&gt;
          +- src/&lt;br /&gt;
              +- target.conf&lt;br /&gt;
          +- build/&lt;br /&gt;
          +- target/&lt;br /&gt;
     +- model_2&lt;br /&gt;
          +- src/&lt;br /&gt;
              +- target.conf&lt;br /&gt;
          +- build/&lt;br /&gt;
          +- target/&lt;br /&gt;
&lt;br /&gt;
Note:  The &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; script does not copy models into the project area.  The old behavior of copying models out from SAFplus/models is no longer required.  The sample evaluation model that was at &amp;lt;code&amp;gt;&amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/models&amp;lt;/code&amp;gt; has been moved to its own &amp;lt;code&amp;gt;examples&amp;lt;/code&amp;gt; project area adjacent to the SAFplus Platform tree, at &amp;lt;code&amp;gt;&amp;lt;install_dir&amp;gt;/sdk-3.0/src/examples&amp;lt;/code&amp;gt;. To use it, one would change to the &amp;lt;code&amp;gt;examples&amp;lt;/code&amp;gt; directory and issue a &amp;lt;code&amp;gt;&amp;lt;path-to&amp;gt;/configure --with-model-name=eval&amp;lt;/code&amp;gt;.  Alternately, if the &amp;lt;code&amp;gt;examples&amp;lt;/code&amp;gt; project area is in a non-user-writeable location (e.g. in the case of a root-installed SDK), it can be copied out to a user-writeable location and used there instead in the same manner.&lt;br /&gt;
&lt;br /&gt;
===Configuring and Building the Model===&lt;br /&gt;
&lt;br /&gt;
In this section, we will configure and build the &amp;lt;model&amp;gt; model in an existing project area.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Configure the &amp;lt;model&amp;gt; model for building by running the following:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will configure the &amp;lt;model&amp;gt; model for deployment on the local machine.  In order to crossbuild this model for deployment on a non-native target supported by the &amp;lt;crossbuild&amp;gt; toolchain, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build \&lt;br /&gt;
                                          --with-cross-build=&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is possible to configure the model to be built for multiple targets by issuing as many &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt; commands as necessary.  Each run sets up a target-specific build location at &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If this model is to be deployed on an ATCA-based system with OpenHPI-based shelf management, enable Chassis Manager with:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --with-model-name=&amp;lt;model&amp;gt; \&lt;br /&gt;
                                          --with-asp-build \&lt;br /&gt;
                                          --with-cross-build=&amp;lt;crossbuild&amp;gt; \&lt;br /&gt;
                                          --with-cm-build=openhpi&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
[[File:OpenClovis_Note.png]] '''Using Chassis Manager requires OpenClovis Platform Support Package, distributed separately from OpenClovis SDK.'''&lt;br /&gt;
&lt;br /&gt;
For a complete list of options to &amp;lt;code&amp;gt;configure&amp;lt;/code&amp;gt;, including a list of available crossbuild toolchains, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ &amp;lt;install_dir&amp;gt;/sdk-3.0/src/SAFplus/configure --help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the necessary crossbuild toolchain does not exist, then you must install it by downloading it adjacent to the OpenClovis SDK installer and re-running &amp;lt;i&amp;gt;install.sh&amp;lt;/i&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The configure step prepares the project area to build the &amp;lt;model&amp;gt; model, with the following directory structure:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;project_area&amp;gt;&lt;br /&gt;
   |ide_workspace&lt;br /&gt;
   |+&amp;lt;model&amp;gt;&lt;br /&gt;
       |+build&lt;br /&gt;
       |   |+local&lt;br /&gt;
       |   |   |-Makefile&lt;br /&gt;
       |   |+&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
       |   |   |-Makefile&lt;br /&gt;
       |+src&lt;br /&gt;
       |   |+app&lt;br /&gt;
       |   |+config&lt;br /&gt;
       |   |+doc&lt;br /&gt;
       |   |-target.conf&lt;br /&gt;
       |+target &lt;br /&gt;
       |-Makefile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Build the configured model by issuing &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will build the &amp;lt;model&amp;gt; model for all the targets it has been configured to build.  In order to do a target-specific build, issue &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; from the target-specific build location. &amp;lt;i&amp;gt;e.g.&amp;lt;/i&amp;gt; for a local build:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build/local&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
For a target supported by the &amp;lt;crossbuild&amp;gt; toolchain:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd &amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/build/&amp;lt;crossbuild&amp;gt;&lt;br /&gt;
$ make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a complete list of options to &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;, run:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
$ make help&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The model source is located at &amp;lt;code&amp;gt;&amp;lt;project_area&amp;gt;/&amp;lt;model&amp;gt;/src&amp;lt;/code&amp;gt;.  If any changes are made to this, rebuild the model by issuing another &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt; from either the target-specific build location or the model directory.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]] Model building can also be accomplished in IDE. For more information, see ''OpenClovis IDE User Guide''.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Orphaned_wiki_pages</id>
		<title>Orphaned wiki pages</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Orphaned_wiki_pages"/>
				<updated>2013-06-10T13:59:32Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
*[[Doc:latest/evalguide/csa104 | csa104 Management Object Model/Provisioning]]&lt;br /&gt;
&lt;br /&gt;
[[File:underconstruction.png|150px|under construction]]&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/File:Underconstruction.png</id>
		<title>File:Underconstruction.png</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/File:Underconstruction.png"/>
				<updated>2013-06-10T13:58:25Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/csa102</id>
		<title>Doc:latest/evalguide/csa102</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/csa102"/>
				<updated>2013-06-07T15:22:08Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Launching the SAFplus Platform IDE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==csa102 Redundancy and Failover==&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
This sample demonstrates basic HA (High Availability) and SU (Service Unit) fail-over functionality.  The application has two components, both processing the same workload as csa101, that is, repeatedly printing &amp;quot;Hello World&amp;quot;.  The difference, however, is that in this case there is now an active component and a standby component, with only the active component performing the printing function.&lt;br /&gt;
&lt;br /&gt;
csa102 is quite similar to csa101, and this section will discuss the areas in which they deviate.&lt;br /&gt;
&lt;br /&gt;
===What you will learn===&lt;br /&gt;
&lt;br /&gt;
*Keeping track of HA states and how to respond to callbacks requesting HA state changes.&lt;br /&gt;
&lt;br /&gt;
===How to create new Project Model csa102===&lt;br /&gt;
The first step in setting up our example is to create a model which represents the system that we will eventually deploy. This is done through the '''SAFplus Platform IDE'''. In this chapter we will step through the following tasks:&lt;br /&gt;
* Create a project area&lt;br /&gt;
* Launch the '''SAFplus Platform IDE'''&lt;br /&gt;
* Create the IDE project&lt;br /&gt;
* Specify the Resource model (the types of physical hardware in our system)&lt;br /&gt;
* Specify the Component model (the types of components or applications in our system)&lt;br /&gt;
* Specify which Components run on which Resources&lt;br /&gt;
* Specify important build and boot parameters&lt;br /&gt;
&lt;br /&gt;
===Creating a New Project Area===&lt;br /&gt;
A project area is a directory on your system where you can develop SAFplus Platform models and generate the code corresponding to those models. This is same as created for ''csa101''.&lt;br /&gt;
&lt;br /&gt;
Create a project area using a script from the command line. To create a project area named '''projectarea1''' in the '''/home/clovis''' directory you should execute the following command:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cl-create-project-area /home/clovis/projectarea1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Launching the SAFplus Platform IDE===&lt;br /&gt;
You can launch the '''SAFplus Platform IDE''' from the command line. If you chose to create symbolic links during installation you can simply enter &amp;lt;code&amp;gt;'''cl-ide'''&amp;lt;/code&amp;gt; from any directory. If you did not create symbolic links during installation you can either:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the installation directory to the shells search path and then launch the IDE as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cl-ide&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start cl-ide by specifying the full path&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The splash screen for SAFplus Platform IDE is displayed as illustrated in Figure [[#SAFplus Platform IDE Opening Screen | SAFplus Platform IDE Opening Screen]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Opening Screen'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_GettingStartedIDE_OpeningScreen.png|frame|center| '''SAFplus Platform IDE Opening Screen''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will then be prompted to select a workspace in which to do your work as illustrated in Figure [[#SAFplus Platform IDE Workspace Launcher | SAFplus Platform IDE Workspace Launcher]].&lt;br /&gt;
&lt;br /&gt;
The workspace you select should correspond to the project area that you created in the previous section (in this case &amp;quot;/home/clovis/projectarea1&amp;quot;). Note that the workspace includes a subdirectory of &amp;quot;/ide_workspace&amp;quot;. This is done strictly for organizational purposes. It keeps the IDE models separate from the generated SAFplus Platform models and code. Select the workspace and click  '''OK'''  to launch SAFplus Platform IDE.&lt;br /&gt;
&lt;br /&gt;
The '''SAFplus Platform''' IDE is launched and you are now looking at the main work area. For more information about the components of this main work area including the SAFplus Platform IDE menu and toolbar, see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Creating the Sample Project===&lt;br /&gt;
We will now create a project within the '''SAFplus Platform IDE'''. This project will hold both the resource model and the component model '''csa102''' for our example system. The resource model is a physical view of the resources (the chassis, the blade types, etc.) in our system. The component model is a logical view of the components (applications, etc.) in our system.&lt;br /&gt;
&lt;br /&gt;
We will be using the '''New Project Wizard''' to create our project. The wizard captures some high-level information about the system that we are building and performs a lot of the basic setup for us.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]]The same model that we are building through the wizard could also be created manually through the Resource and Component Editors. For more information on the Resource and Component Editors see ''SAFplus Platform IDE User Guide''.This step is similar compared to ''csa101''.&lt;br /&gt;
&lt;br /&gt;
To launch the '''New Project Wizard''' select  '''File'''  &amp;gt;  '''New''' &amp;gt;  '''Project''' from the IDE menu bar.&lt;br /&gt;
&lt;br /&gt;
The  '''New Project Wizard''' is displayed and  '''Clovis System Project'''  is selected by default as illustrated in Figure [[#New Project Wizard | New Project Wizard]].&lt;br /&gt;
&lt;br /&gt;
Click  '''Next'''. The  '''Clovis System Project''' window is displayed as illustrated in Figure [[#Clovis System Project | Clovis System Project]].&lt;br /&gt;
 &lt;br /&gt;
Enter the following information (These steps are similar compared to ''csa101''):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Project Name''' : Enter the name of your new project as  '''SampleModel'''. &lt;br /&gt;
&amp;lt;br&amp;gt;Do not use spaces or special characters for the project name. The project name can be alphanumeric, but cannot start with a number or have only numbers.&lt;br /&gt;
&amp;lt;br&amp;gt;Select  '''Use default'''  to use the same directory mentioned in the  '''Directory'''  field. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''SDK Location''': Enter the location where the SAFplus Platform SDK was installed. For e.g. if the SDK was installed at location /opt/clovis, then the SDK location is /opt/clovis/sdk-&amp;lt;version&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Project Area Location''': Enter the location where the generated source code for the model should be stored.&lt;br /&gt;
&amp;lt;br&amp;gt;This can be any existing directory but is usually the project area that was created in the previous section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Python Location''': Enter the location where Python 2.5.0 is installed on your system. If Python 2.5.0 was installed by SAFplus Platform SDK, the directory is  &amp;lt;code&amp;gt;'''&amp;lt;installation_directory&amp;gt;/buildtools/local/bin'''&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Add New Blade Type''' window is displayed. This dialog is used to define the blade types that are in our system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Add New Blade Type'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_AddBlade.png|frame|center| '''Add New Blade Type''' ]]&lt;br /&gt;
&lt;br /&gt;
Remember that the system we are modelling has only one blade type...a System Controller.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a new blade type to the list. Name this blade type 'SysBlade' (for System Controller blade).&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Add New SAF Node Type''' window is displayed. This dialog is used to define the type of logical node that will be run on the corresponding blade type defined in the previous dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Add New SAF Node Type'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_AddNode.png|frame|center| '''Add New SAF Node Type''' ]]&lt;br /&gt;
&lt;br /&gt;
Node types represent groups of software. They are classified as either a System Controller class or a Payload class. This distinction gives the node type certain characteristics which cause it to behave in a well-defined manner. Since we have only a System Controller in our system we will add a node type of class System Controller.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a new node type to the list. Name the node type 'SCNode' and ensure that its node class is 'System Controller (SAF Class B)'.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Specify Program Names''' window is displayed. This dialog is used to create programs or SAF Service Types and associate them with the SAF Node Types specified in the previous dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Specify Program Names'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_DefineProgramNames.png|frame|center| '''Specify Program Names''' ]]&lt;br /&gt;
&lt;br /&gt;
In our system we need one SAF Service Type which represents our high availability software (csa102 continuously prints &amp;quot;Hello World!&amp;quot; '''redundantly''').&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a program name to the list. Change the program name to 'csa102' and associate the program with the 'SCNode' node type.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Finish'''. This will create the sample model using the blade type, node type, and program name information collected through the 'New Project Wizard' dialogs.&lt;br /&gt;
&lt;br /&gt;
====Configuring the Service Group====&lt;br /&gt;
To make changes to the Service Group double-click on the box titled '''csa101SG'''. The '''Service Group Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_ServiceGroupDetails.png|frame|center| '''Service Group Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first change we want to make is to the '''Redundancy Model'''. The '''Redundancy Model''' is the strategy that is used by the SAFplus Platform system to recover from a node failure. For our redundant model (which only has one node with one Active component and another standby component used for redundancy) change the '''Redundancy Model''' to '2N Redundancy' as shown.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]You will notice that when you change the redundancy model some of the other fields are modified automatically and become read-only. This is to ensure integrity of the redundancy models.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The second change that we want to make is to the '''Admin State'''. The '''Admin State''' defines the state of the component when the system is first brought up. In our case we want to change the '''Admin State''' to be 'Locked Initialized'. This means that when the system first starts up this '''Service Group''' (and its subcomponents) will be initialized but not yet put into a running state. So our csa102 application will not yet start printing &amp;quot;Hello World!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The third change that we want to make is to the '''Auto repair'''. The '''Auto repair''' defines the state of the component to be achieved after failure of the component. So our csa102 application will not yet start printing &amp;quot;Hello World!&amp;quot;.&lt;br /&gt;
&amp;lt;li&amp;gt;When you are finished making the changes click the '''OK''' button to commit the changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Configuring the SAF Component====&lt;br /&gt;
To make changes to the SAF Component double-click on the box titled '''csa102'''. The '''SAF Component Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAF Component Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_SAFComponentDetails.png|frame|center| '''SAF Component Details''' ]]&lt;br /&gt;
&lt;br /&gt;
To make the model to recover from failure by Stand-by component, the field '''Recovery action on error''' needs to be changed to ''Component fail over''.&lt;br /&gt;
&lt;br /&gt;
The SAF Component represents our high availabilty program or executable. We need to pass a command line argument to this executable. The reason for this argument is to force the program to print the 'Hello World!' output to a special log file for our viewing. We will look at this more closely when we customize our code.&lt;br /&gt;
&lt;br /&gt;
===Configuring Physical Instances===&lt;br /&gt;
The configuration of our logical models is complete. During this process we have defined all of the 'types' of objects in our system. Now it is time to configure actual instances of those objects so that they can be built and deployed.&lt;br /&gt;
&lt;br /&gt;
Object instance configuration is done through the Availability Management Framework (AMF) via the '''AMF Configuration''' dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To launch this dialog go to the the '''Clovis''' menu and select '''AMF Configuration...'''&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''AMF Configuration''' window will be displayed. If you now completely expand the AMF Configuration branch of the tree in the left-hand pane you will see the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='AMF Configuration Dialog'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_AMFConfig.png|frame|center| '''AMF Configuration Dialog''' ]]&lt;br /&gt;
&lt;br /&gt;
===Code===&lt;br /&gt;
&lt;br /&gt;
The code can be geneteted using the same steps as mentioned for csa101. The genetated code can be found within the following directory&lt;br /&gt;
 &amp;lt;project-area_dir&amp;gt;/eval/src/app/csa102Comp&lt;br /&gt;
&lt;br /&gt;
This sample component is implemented in a few C modules that are quite similar to the csa101 module.  We will discuss the additions in detail.&lt;br /&gt;
&lt;br /&gt;
We change the logging from the default &amp;quot;application&amp;quot; stream to a custom stream.  To do this, we include the header that defines our config routines, change the default &amp;quot;clLogApp&amp;quot; macro to use a different stream, and define that stream as a global variable:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;    &lt;br /&gt;
#include &amp;quot;../ev/ev.h&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
#define clprintf(severity, ...)   clAppLog(gEvalLogStream, severity, 10, CL_LOG_AREA_UNSPECIFIED, CL_LOG_CONTEXT_UNSPECIFIED, __VA_ARGS__)&lt;br /&gt;
...&lt;br /&gt;
ClLogStreamHandleT  gEvalLogStream = CL_HANDLE_INVALID_VALUE;&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
Next, the log stream is initialized in the application's &amp;quot;main&amp;quot; function:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;   &lt;br /&gt;
    /*&lt;br /&gt;
     * Initialize the log stream&lt;br /&gt;
     */&lt;br /&gt;
    clEvalAppLogStreamOpen((ClCharT*)appName.value, &amp;amp;gEvalLogStream);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
This function is implemented in the src/app/ev.c file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As with csa101, the &amp;lt;code&amp;gt;clCompAppAMFCSISet()&amp;lt;/code&amp;gt; function is called to set the component's HA state, and the following block of code assigns this requested state to the component, while verbosely detailing this process:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
void clCompAppAMFCSISet(SaInvocationT       invocation,&lt;br /&gt;
                        const SaNameT       *compName,&lt;br /&gt;
                        SaAmfHAStateT       haState,&lt;br /&gt;
                        SaAmfCSIDescriptorT csiDescriptor)&lt;br /&gt;
{&lt;br /&gt;
    /*&lt;br /&gt;
     * Print information about the CSI Set&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    clprintf (CL_LOG_SEV_INFO, &amp;quot;Component [%.*s] : PID [%d]. CSI Set Received\n&amp;quot;, &lt;br /&gt;
              compName-&amp;gt;length, compName-&amp;gt;value, mypid);&lt;br /&gt;
&lt;br /&gt;
    clCompAppAMFPrintCSI(csiDescriptor, haState);&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Take appropriate action based on state&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    switch ( haState )&lt;br /&gt;
    {&lt;br /&gt;
        case SA_AMF_HA_ACTIVE:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to take the active HA state &lt;br /&gt;
             * for the CSI.&lt;br /&gt;
             */&lt;br /&gt;
            pthread_t thr;&lt;br /&gt;
            &lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: ACTIVE state requested; activating service&amp;quot;);&lt;br /&gt;
            running = 1;&lt;br /&gt;
            pthread_create(&amp;amp;thr,NULL,activeLoop,NULL);&lt;br /&gt;
            &lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_STANDBY:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to take the standby HA state &lt;br /&gt;
             * for this CSI.&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Standby state requested&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_QUIESCED:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to quiesce the CSI currently&lt;br /&gt;
             * assigned the active or quiescing HA state. The application &lt;br /&gt;
             * must stop work associated with the CSI immediately.&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Acknowledging new state quiesced&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_QUIESCING:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to quiesce the CSI currently&lt;br /&gt;
             * assigned the active HA state. The application must stop work&lt;br /&gt;
             * associated with the CSI gracefully and not accept any new&lt;br /&gt;
             * workloads while the work is being terminated.&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Signaling completion of QUIESCING&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
&lt;br /&gt;
            saAmfCSIQuiescingComplete(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
...&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
In this case the application spawns a thread when it is assigned active which is a very common strategy for threaded applications.  It also sets a global variable &amp;quot;running&amp;quot; to true.  When the application is &amp;quot;quesced&amp;quot; -- that is when the active work assignment is taken away -- the application sets this global variable back to 0 to trigger the active thread to quit itself.  The thread is simply defined as:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
void* activeLoop(void* p)&lt;br /&gt;
{&lt;br /&gt;
    while (running)&lt;br /&gt;
    {&lt;br /&gt;
        clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Threaded Hello World! %s&amp;quot;, show_progress());&lt;br /&gt;
        sleep(2);&lt;br /&gt;
    }&lt;br /&gt;
    return NULL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
static char* show_progress(void)&lt;br /&gt;
{&lt;br /&gt;
    static char bar[] = &amp;quot;          .&amp;quot;;&lt;br /&gt;
    static int progress = 0;&lt;br /&gt;
&lt;br /&gt;
    /* Show a little progress bar */&lt;br /&gt;
    return &amp;amp;bar[sizeof(bar)-2-(progress++)%(sizeof(bar)-2)];&lt;br /&gt;
}&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The example also demonstrates a non-threaded approach.  But first, some background: for both threaded and non-threaded applications, the main must have a &amp;quot;dispatch&amp;quot; loop that handles incoming AMF notifications and calls the relevant callback.  So to implement a single threaded SAF aware application, the programmer must modify this dispatch loop adding active (and potentially standby) functionality:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
main(...)&lt;br /&gt;
&lt;br /&gt;
    do&lt;br /&gt;
    {&lt;br /&gt;
        struct timeval timeout;&lt;br /&gt;
        timeout.tv_sec = 2; timeout.tv_usec = 0;&lt;br /&gt;
&lt;br /&gt;
        FD_ZERO(&amp;amp;read_fds);&lt;br /&gt;
        FD_SET(dispatch_fd, &amp;amp;read_fds);&lt;br /&gt;
&lt;br /&gt;
        if( select(dispatch_fd + 1, &amp;amp;read_fds, NULL, NULL, &amp;amp;timeout) &amp;lt; 0)&lt;br /&gt;
        {&lt;br /&gt;
            if (EINTR == errno)&lt;br /&gt;
            {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
		    clprintf (CL_LOG_SEV_ERROR, &amp;quot;Error in select()&amp;quot;);&lt;br /&gt;
			perror(&amp;quot;&amp;quot;);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        if (FD_ISSET(dispatch_fd,&amp;amp;read_fds)) saAmfDispatch(amfHandle, SA_DISPATCH_ALL);&lt;br /&gt;
        &lt;br /&gt;
        if (running) clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Unthreaded Hello World! %s&amp;quot;, show_progress());  // Run the &amp;quot;active&amp;quot; code&lt;br /&gt;
        else clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: idle&amp;quot;);&lt;br /&gt;
    }while(!unblockNow);      &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
This code should be very familiar to anyone who has written single threaded &amp;quot;event loop&amp;quot; style code. As can be seen in the code snippet above, the select is given an idle timeout (in a real application the timeout would be much smaller) and the application only calls &amp;lt;code&amp;gt;saAmfDispatch&amp;lt;/code&amp;gt; if the select actually indicates that the there is data in the FD.  Then it falls down into an &amp;quot;if&amp;quot; statement that checks if we are active &amp;quot;if (running)...&amp;quot; and outputs a log if that is the case.&lt;br /&gt;
&lt;br /&gt;
===How to Run csa102 and What to Observe===&lt;br /&gt;
&lt;br /&gt;
As with the csa101 example we will use the SAFplus Platform Console to manipulate the administrative state of the csa102 service group.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform Console&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./asp_console&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Then put the csa102SGI0 service group into lock assignment state using the following commands.&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 cli[Test]-&amp;gt; setc 1&lt;br /&gt;
 cli[Test:SCNodeI0]-&amp;gt; setc cpm&lt;br /&gt;
 cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockAssignment sg csa102SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because example 102 has two components there will be two application log files to view.  These are &amp;lt;code&amp;gt;/root/asp/var/log/csa102CompI0Log.latest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/root/asp/var/log/csa102CompI1Log.latest&amp;lt;/code&amp;gt;.  Viewing these application logs using the &amp;lt;code&amp;gt;tail -f&amp;lt;/code&amp;gt;, you should see the following.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI0Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00029 :   INFO) &lt;br /&gt;
 Component [csa102CompI0] : PID [13418]. Initializing&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00030 :   INFO) &lt;br /&gt;
    IOC Address             : 0x1&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00031 :   INFO)&lt;br /&gt;
    IOC Port                : 0x80&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00032 :   INFO)&lt;br /&gt;
 csa102: Instantiated as component instance csa102CompI0.&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00033 :   INFO)&lt;br /&gt;
 csa102CompI0: Waiting for CSI assignment...&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| //root/asp/var/log/csa102CompI1Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00028 :   INFO)&lt;br /&gt;
 Component [csa102CompI1] : PID [13422]. Initializing&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00029 :   INFO)&lt;br /&gt;
    IOC Address             : 0x1&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00030 :   INFO)&lt;br /&gt;
    IOC Port                : 0x81&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00031 :   INFO)&lt;br /&gt;
 csa102: Instantiated as component instance csa102CompI1.&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00032 :   INFO)&lt;br /&gt;
 csa102CompI1: Waiting for CSI assignment...&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Next, unlock the service group using the following SAFplus Platform Console command.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cli[Test:SCNodeI0:CPM]-&amp;gt; amsUnlock sg csa102SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
and in the /var/log/csa102CompI*.log files we should see:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI0Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 23:00:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00487 :   INFO)&lt;br /&gt;
 csa102: Hello World!       .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:19 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00488 :   INFO)&lt;br /&gt;
 csa102: Hello World!        .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:20 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00489 :   INFO)&lt;br /&gt;
 csa102: Hello World!         .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:21 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00490 :   INFO)&lt;br /&gt;
 csa102: Hello World!          .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:22 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00491 :   INFO)&lt;br /&gt;
 csa102: Hello World! .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:23 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00492 :   INFO)&lt;br /&gt;
 csa102: Hello World!  .&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI1Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 22:43:00 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00043 :   INFO)&lt;br /&gt;
 csa102: New state is not the ACTIVE; deactivating service&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
These can be watched in a separate terminal window using &amp;lt;code&amp;gt;tail -f&amp;lt;/code&amp;gt;.  csa102CompI0 is the active component in this case, and csa102CompI1 is the standby.  Consequently, the &amp;quot;Hello world!&amp;quot; lines appear in csa102CompI0.log and not in csa102CompI1.log.  They will continue to be logged to that file until the HA state of that component changes, for example, when the process logging those lines is killed.  In the mean time the standby component: csa102CompI1 just waits until it is told that it should take over the workload.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Changing the HA state of the Client/Server'''&lt;br /&gt;
&lt;br /&gt;
The easiest way to test component fail-over is to kill the process associated with the active component using the &amp;lt;code&amp;gt;kill&amp;lt;/code&amp;gt; command.  For this you need to know the process ID of the active component. To find the process ID issue the following command from a bash shell.&lt;br /&gt;
 # ps -eaf | grep csa102&lt;br /&gt;
This should produce an output that looks similar to the following.&lt;br /&gt;
 root     15872 15663  0 13:49 ?        00:00:01 csa102Comp -p&lt;br /&gt;
 root     16328 15663  0 13:56 ?        00:00:00 csa102Comp -p&lt;br /&gt;
 root     17304 16145  0 14:11 pts/4    00:00:00 grep csa102&lt;br /&gt;
Notice the two entries that end with &amp;lt;code&amp;gt;csa102Comp -p&amp;lt;/code&amp;gt;. These are our two component processes. The first one is usually the active process. This is the one that we will kill. In this case the process ID is 15872. So to kill the active component you issue the command:&lt;br /&gt;
 # kill -9 15872&lt;br /&gt;
[[File:OpenClovis_Note.png]]If this step does not result in the active component being killed then it is likely that the standby component was killed. In this case simply try killing the other process.&lt;br /&gt;
&lt;br /&gt;
After executing the &amp;lt;code&amp;gt;kill&amp;lt;/code&amp;gt; command you can see in the csa102CompI1 application that the standby component is now active.&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI1Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 23:00:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00487 :   INFO)&lt;br /&gt;
 csa102: Hello World!       .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:19 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00488 :   INFO)&lt;br /&gt;
 csa102: Hello World!        .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:20 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00489 :   INFO)&lt;br /&gt;
 csa102: Hello World!         .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:21 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00490 :   INFO)&lt;br /&gt;
 csa102: Hello World!          .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:22 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00491 :   INFO)&lt;br /&gt;
 csa102: Hello World! .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:23 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00492 :   INFO)&lt;br /&gt;
 csa102: Hello World!  .     .&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
This indicates that the standby component has taken over for the failed active component.&lt;br /&gt;
&lt;br /&gt;
Looking in the csa102CompI0 application log you can see that this component was killed and has been restarted. Since csa102CompI1 took over as the active component this component now goes into the standby state.&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI0Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00040 :   INFO)&lt;br /&gt;
 Component [csa102CompI0] : PID [13712]. Initializing&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00041 :   INFO)&lt;br /&gt;
    IOC Address             : 0x1&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00042 :   INFO)&lt;br /&gt;
    IOC Port                : 0x80&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00043 :   INFO)&lt;br /&gt;
 csa102: Instantiated as component instance csa102CompI0.&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00044 :   INFO)&lt;br /&gt;
 csa102CompI0: Waiting for CSI assignment...&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can continue to observe this failover by alternately killing the active component.&lt;br /&gt;
&lt;br /&gt;
To stop csa102 using the SAFplus Platform Console.&lt;br /&gt;
 cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockAssignment sg csa102SGI0&lt;br /&gt;
Successfully changed state of csa102SGI0 to LockAssignment&lt;br /&gt;
 cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockInstantiation sg csa102SGI0&lt;br /&gt;
 cli[Test:SCNodeI0:CPM] -&amp;gt; end&lt;br /&gt;
 cli[Test:SCNodeI0] -&amp;gt; end&lt;br /&gt;
 cli[Test] -&amp;gt; bye&lt;br /&gt;
Successfully changed state of csa102SGI0 to LockInstantiation and exit.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
&lt;br /&gt;
This Sample Application has covered basic HA and failover, with changing the state of a component to active and standby.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/csa102</id>
		<title>Doc:latest/evalguide/csa102</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/csa102"/>
				<updated>2013-06-07T15:21:42Z</updated>
		
		<summary type="html">&lt;p&gt;Stone: /* Launching the SAFplus Platform IDE */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==csa102 Redundancy and Failover==&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
This sample demonstrates basic HA (High Availability) and SU (Service Unit) fail-over functionality.  The application has two components, both processing the same workload as csa101, that is, repeatedly printing &amp;quot;Hello World&amp;quot;.  The difference, however, is that in this case there is now an active component and a standby component, with only the active component performing the printing function.&lt;br /&gt;
&lt;br /&gt;
csa102 is quite similar to csa101, and this section will discuss the areas in which they deviate.&lt;br /&gt;
&lt;br /&gt;
===What you will learn===&lt;br /&gt;
&lt;br /&gt;
*Keeping track of HA states and how to respond to callbacks requesting HA state changes.&lt;br /&gt;
&lt;br /&gt;
===How to create new Project Model csa102===&lt;br /&gt;
The first step in setting up our example is to create a model which represents the system that we will eventually deploy. This is done through the '''SAFplus Platform IDE'''. In this chapter we will step through the following tasks:&lt;br /&gt;
* Create a project area&lt;br /&gt;
* Launch the '''SAFplus Platform IDE'''&lt;br /&gt;
* Create the IDE project&lt;br /&gt;
* Specify the Resource model (the types of physical hardware in our system)&lt;br /&gt;
* Specify the Component model (the types of components or applications in our system)&lt;br /&gt;
* Specify which Components run on which Resources&lt;br /&gt;
* Specify important build and boot parameters&lt;br /&gt;
&lt;br /&gt;
===Creating a New Project Area===&lt;br /&gt;
A project area is a directory on your system where you can develop SAFplus Platform models and generate the code corresponding to those models. This is same as created for ''csa101''.&lt;br /&gt;
&lt;br /&gt;
Create a project area using a script from the command line. To create a project area named '''projectarea1''' in the '''/home/clovis''' directory you should execute the following command:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cl-create-project-area /home/clovis/projectarea1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Launching the SAFplus Platform IDE===&lt;br /&gt;
You can launch the '''SAFplus Platform IDE''' from the command line. If you chose to create symbolic links during installation you can simply enter &amp;lt;code&amp;gt;'''cl-ide'''&amp;lt;/code&amp;gt; from any directory. If you did not create symbolic links during installation you can either:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the installation directory to the shells search path and then launch the IDE.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cl-ide&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start cl-ide by specifying the full path&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The splash screen for SAFplus Platform IDE is displayed as illustrated in Figure [[#SAFplus Platform IDE Opening Screen | SAFplus Platform IDE Opening Screen]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Opening Screen'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_GettingStartedIDE_OpeningScreen.png|frame|center| '''SAFplus Platform IDE Opening Screen''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will then be prompted to select a workspace in which to do your work as illustrated in Figure [[#SAFplus Platform IDE Workspace Launcher | SAFplus Platform IDE Workspace Launcher]].&lt;br /&gt;
&lt;br /&gt;
The workspace you select should correspond to the project area that you created in the previous section (in this case &amp;quot;/home/clovis/projectarea1&amp;quot;). Note that the workspace includes a subdirectory of &amp;quot;/ide_workspace&amp;quot;. This is done strictly for organizational purposes. It keeps the IDE models separate from the generated SAFplus Platform models and code. Select the workspace and click  '''OK'''  to launch SAFplus Platform IDE.&lt;br /&gt;
&lt;br /&gt;
The '''SAFplus Platform''' IDE is launched and you are now looking at the main work area. For more information about the components of this main work area including the SAFplus Platform IDE menu and toolbar, see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Creating the Sample Project===&lt;br /&gt;
We will now create a project within the '''SAFplus Platform IDE'''. This project will hold both the resource model and the component model '''csa102''' for our example system. The resource model is a physical view of the resources (the chassis, the blade types, etc.) in our system. The component model is a logical view of the components (applications, etc.) in our system.&lt;br /&gt;
&lt;br /&gt;
We will be using the '''New Project Wizard''' to create our project. The wizard captures some high-level information about the system that we are building and performs a lot of the basic setup for us.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]]The same model that we are building through the wizard could also be created manually through the Resource and Component Editors. For more information on the Resource and Component Editors see ''SAFplus Platform IDE User Guide''.This step is similar compared to ''csa101''.&lt;br /&gt;
&lt;br /&gt;
To launch the '''New Project Wizard''' select  '''File'''  &amp;gt;  '''New''' &amp;gt;  '''Project''' from the IDE menu bar.&lt;br /&gt;
&lt;br /&gt;
The  '''New Project Wizard''' is displayed and  '''Clovis System Project'''  is selected by default as illustrated in Figure [[#New Project Wizard | New Project Wizard]].&lt;br /&gt;
&lt;br /&gt;
Click  '''Next'''. The  '''Clovis System Project''' window is displayed as illustrated in Figure [[#Clovis System Project | Clovis System Project]].&lt;br /&gt;
 &lt;br /&gt;
Enter the following information (These steps are similar compared to ''csa101''):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Project Name''' : Enter the name of your new project as  '''SampleModel'''. &lt;br /&gt;
&amp;lt;br&amp;gt;Do not use spaces or special characters for the project name. The project name can be alphanumeric, but cannot start with a number or have only numbers.&lt;br /&gt;
&amp;lt;br&amp;gt;Select  '''Use default'''  to use the same directory mentioned in the  '''Directory'''  field. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''SDK Location''': Enter the location where the SAFplus Platform SDK was installed. For e.g. if the SDK was installed at location /opt/clovis, then the SDK location is /opt/clovis/sdk-&amp;lt;version&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Project Area Location''': Enter the location where the generated source code for the model should be stored.&lt;br /&gt;
&amp;lt;br&amp;gt;This can be any existing directory but is usually the project area that was created in the previous section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Python Location''': Enter the location where Python 2.5.0 is installed on your system. If Python 2.5.0 was installed by SAFplus Platform SDK, the directory is  &amp;lt;code&amp;gt;'''&amp;lt;installation_directory&amp;gt;/buildtools/local/bin'''&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Add New Blade Type''' window is displayed. This dialog is used to define the blade types that are in our system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Add New Blade Type'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_AddBlade.png|frame|center| '''Add New Blade Type''' ]]&lt;br /&gt;
&lt;br /&gt;
Remember that the system we are modelling has only one blade type...a System Controller.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a new blade type to the list. Name this blade type 'SysBlade' (for System Controller blade).&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Add New SAF Node Type''' window is displayed. This dialog is used to define the type of logical node that will be run on the corresponding blade type defined in the previous dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Add New SAF Node Type'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_AddNode.png|frame|center| '''Add New SAF Node Type''' ]]&lt;br /&gt;
&lt;br /&gt;
Node types represent groups of software. They are classified as either a System Controller class or a Payload class. This distinction gives the node type certain characteristics which cause it to behave in a well-defined manner. Since we have only a System Controller in our system we will add a node type of class System Controller.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a new node type to the list. Name the node type 'SCNode' and ensure that its node class is 'System Controller (SAF Class B)'.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Specify Program Names''' window is displayed. This dialog is used to create programs or SAF Service Types and associate them with the SAF Node Types specified in the previous dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Specify Program Names'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_DefineProgramNames.png|frame|center| '''Specify Program Names''' ]]&lt;br /&gt;
&lt;br /&gt;
In our system we need one SAF Service Type which represents our high availability software (csa102 continuously prints &amp;quot;Hello World!&amp;quot; '''redundantly''').&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a program name to the list. Change the program name to 'csa102' and associate the program with the 'SCNode' node type.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Finish'''. This will create the sample model using the blade type, node type, and program name information collected through the 'New Project Wizard' dialogs.&lt;br /&gt;
&lt;br /&gt;
====Configuring the Service Group====&lt;br /&gt;
To make changes to the Service Group double-click on the box titled '''csa101SG'''. The '''Service Group Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_ServiceGroupDetails.png|frame|center| '''Service Group Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first change we want to make is to the '''Redundancy Model'''. The '''Redundancy Model''' is the strategy that is used by the SAFplus Platform system to recover from a node failure. For our redundant model (which only has one node with one Active component and another standby component used for redundancy) change the '''Redundancy Model''' to '2N Redundancy' as shown.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]You will notice that when you change the redundancy model some of the other fields are modified automatically and become read-only. This is to ensure integrity of the redundancy models.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The second change that we want to make is to the '''Admin State'''. The '''Admin State''' defines the state of the component when the system is first brought up. In our case we want to change the '''Admin State''' to be 'Locked Initialized'. This means that when the system first starts up this '''Service Group''' (and its subcomponents) will be initialized but not yet put into a running state. So our csa102 application will not yet start printing &amp;quot;Hello World!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The third change that we want to make is to the '''Auto repair'''. The '''Auto repair''' defines the state of the component to be achieved after failure of the component. So our csa102 application will not yet start printing &amp;quot;Hello World!&amp;quot;.&lt;br /&gt;
&amp;lt;li&amp;gt;When you are finished making the changes click the '''OK''' button to commit the changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Configuring the SAF Component====&lt;br /&gt;
To make changes to the SAF Component double-click on the box titled '''csa102'''. The '''SAF Component Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAF Component Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_SAFComponentDetails.png|frame|center| '''SAF Component Details''' ]]&lt;br /&gt;
&lt;br /&gt;
To make the model to recover from failure by Stand-by component, the field '''Recovery action on error''' needs to be changed to ''Component fail over''.&lt;br /&gt;
&lt;br /&gt;
The SAF Component represents our high availabilty program or executable. We need to pass a command line argument to this executable. The reason for this argument is to force the program to print the 'Hello World!' output to a special log file for our viewing. We will look at this more closely when we customize our code.&lt;br /&gt;
&lt;br /&gt;
===Configuring Physical Instances===&lt;br /&gt;
The configuration of our logical models is complete. During this process we have defined all of the 'types' of objects in our system. Now it is time to configure actual instances of those objects so that they can be built and deployed.&lt;br /&gt;
&lt;br /&gt;
Object instance configuration is done through the Availability Management Framework (AMF) via the '''AMF Configuration''' dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To launch this dialog go to the the '''Clovis''' menu and select '''AMF Configuration...'''&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''AMF Configuration''' window will be displayed. If you now completely expand the AMF Configuration branch of the tree in the left-hand pane you will see the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='AMF Configuration Dialog'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_AMFConfig.png|frame|center| '''AMF Configuration Dialog''' ]]&lt;br /&gt;
&lt;br /&gt;
===Code===&lt;br /&gt;
&lt;br /&gt;
The code can be geneteted using the same steps as mentioned for csa101. The genetated code can be found within the following directory&lt;br /&gt;
 &amp;lt;project-area_dir&amp;gt;/eval/src/app/csa102Comp&lt;br /&gt;
&lt;br /&gt;
This sample component is implemented in a few C modules that are quite similar to the csa101 module.  We will discuss the additions in detail.&lt;br /&gt;
&lt;br /&gt;
We change the logging from the default &amp;quot;application&amp;quot; stream to a custom stream.  To do this, we include the header that defines our config routines, change the default &amp;quot;clLogApp&amp;quot; macro to use a different stream, and define that stream as a global variable:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;    &lt;br /&gt;
#include &amp;quot;../ev/ev.h&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
#define clprintf(severity, ...)   clAppLog(gEvalLogStream, severity, 10, CL_LOG_AREA_UNSPECIFIED, CL_LOG_CONTEXT_UNSPECIFIED, __VA_ARGS__)&lt;br /&gt;
...&lt;br /&gt;
ClLogStreamHandleT  gEvalLogStream = CL_HANDLE_INVALID_VALUE;&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
Next, the log stream is initialized in the application's &amp;quot;main&amp;quot; function:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;   &lt;br /&gt;
    /*&lt;br /&gt;
     * Initialize the log stream&lt;br /&gt;
     */&lt;br /&gt;
    clEvalAppLogStreamOpen((ClCharT*)appName.value, &amp;amp;gEvalLogStream);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
This function is implemented in the src/app/ev.c file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As with csa101, the &amp;lt;code&amp;gt;clCompAppAMFCSISet()&amp;lt;/code&amp;gt; function is called to set the component's HA state, and the following block of code assigns this requested state to the component, while verbosely detailing this process:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
void clCompAppAMFCSISet(SaInvocationT       invocation,&lt;br /&gt;
                        const SaNameT       *compName,&lt;br /&gt;
                        SaAmfHAStateT       haState,&lt;br /&gt;
                        SaAmfCSIDescriptorT csiDescriptor)&lt;br /&gt;
{&lt;br /&gt;
    /*&lt;br /&gt;
     * Print information about the CSI Set&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    clprintf (CL_LOG_SEV_INFO, &amp;quot;Component [%.*s] : PID [%d]. CSI Set Received\n&amp;quot;, &lt;br /&gt;
              compName-&amp;gt;length, compName-&amp;gt;value, mypid);&lt;br /&gt;
&lt;br /&gt;
    clCompAppAMFPrintCSI(csiDescriptor, haState);&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Take appropriate action based on state&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    switch ( haState )&lt;br /&gt;
    {&lt;br /&gt;
        case SA_AMF_HA_ACTIVE:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to take the active HA state &lt;br /&gt;
             * for the CSI.&lt;br /&gt;
             */&lt;br /&gt;
            pthread_t thr;&lt;br /&gt;
            &lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: ACTIVE state requested; activating service&amp;quot;);&lt;br /&gt;
            running = 1;&lt;br /&gt;
            pthread_create(&amp;amp;thr,NULL,activeLoop,NULL);&lt;br /&gt;
            &lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_STANDBY:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to take the standby HA state &lt;br /&gt;
             * for this CSI.&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Standby state requested&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_QUIESCED:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to quiesce the CSI currently&lt;br /&gt;
             * assigned the active or quiescing HA state. The application &lt;br /&gt;
             * must stop work associated with the CSI immediately.&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Acknowledging new state quiesced&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_QUIESCING:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to quiesce the CSI currently&lt;br /&gt;
             * assigned the active HA state. The application must stop work&lt;br /&gt;
             * associated with the CSI gracefully and not accept any new&lt;br /&gt;
             * workloads while the work is being terminated.&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Signaling completion of QUIESCING&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
&lt;br /&gt;
            saAmfCSIQuiescingComplete(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
...&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
In this case the application spawns a thread when it is assigned active which is a very common strategy for threaded applications.  It also sets a global variable &amp;quot;running&amp;quot; to true.  When the application is &amp;quot;quesced&amp;quot; -- that is when the active work assignment is taken away -- the application sets this global variable back to 0 to trigger the active thread to quit itself.  The thread is simply defined as:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
void* activeLoop(void* p)&lt;br /&gt;
{&lt;br /&gt;
    while (running)&lt;br /&gt;
    {&lt;br /&gt;
        clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Threaded Hello World! %s&amp;quot;, show_progress());&lt;br /&gt;
        sleep(2);&lt;br /&gt;
    }&lt;br /&gt;
    return NULL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
static char* show_progress(void)&lt;br /&gt;
{&lt;br /&gt;
    static char bar[] = &amp;quot;          .&amp;quot;;&lt;br /&gt;
    static int progress = 0;&lt;br /&gt;
&lt;br /&gt;
    /* Show a little progress bar */&lt;br /&gt;
    return &amp;amp;bar[sizeof(bar)-2-(progress++)%(sizeof(bar)-2)];&lt;br /&gt;
}&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The example also demonstrates a non-threaded approach.  But first, some background: for both threaded and non-threaded applications, the main must have a &amp;quot;dispatch&amp;quot; loop that handles incoming AMF notifications and calls the relevant callback.  So to implement a single threaded SAF aware application, the programmer must modify this dispatch loop adding active (and potentially standby) functionality:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
main(...)&lt;br /&gt;
&lt;br /&gt;
    do&lt;br /&gt;
    {&lt;br /&gt;
        struct timeval timeout;&lt;br /&gt;
        timeout.tv_sec = 2; timeout.tv_usec = 0;&lt;br /&gt;
&lt;br /&gt;
        FD_ZERO(&amp;amp;read_fds);&lt;br /&gt;
        FD_SET(dispatch_fd, &amp;amp;read_fds);&lt;br /&gt;
&lt;br /&gt;
        if( select(dispatch_fd + 1, &amp;amp;read_fds, NULL, NULL, &amp;amp;timeout) &amp;lt; 0)&lt;br /&gt;
        {&lt;br /&gt;
            if (EINTR == errno)&lt;br /&gt;
            {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
		    clprintf (CL_LOG_SEV_ERROR, &amp;quot;Error in select()&amp;quot;);&lt;br /&gt;
			perror(&amp;quot;&amp;quot;);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        if (FD_ISSET(dispatch_fd,&amp;amp;read_fds)) saAmfDispatch(amfHandle, SA_DISPATCH_ALL);&lt;br /&gt;
        &lt;br /&gt;
        if (running) clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Unthreaded Hello World! %s&amp;quot;, show_progress());  // Run the &amp;quot;active&amp;quot; code&lt;br /&gt;
        else clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: idle&amp;quot;);&lt;br /&gt;
    }while(!unblockNow);      &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
This code should be very familiar to anyone who has written single threaded &amp;quot;event loop&amp;quot; style code. As can be seen in the code snippet above, the select is given an idle timeout (in a real application the timeout would be much smaller) and the application only calls &amp;lt;code&amp;gt;saAmfDispatch&amp;lt;/code&amp;gt; if the select actually indicates that the there is data in the FD.  Then it falls down into an &amp;quot;if&amp;quot; statement that checks if we are active &amp;quot;if (running)...&amp;quot; and outputs a log if that is the case.&lt;br /&gt;
&lt;br /&gt;
===How to Run csa102 and What to Observe===&lt;br /&gt;
&lt;br /&gt;
As with the csa101 example we will use the SAFplus Platform Console to manipulate the administrative state of the csa102 service group.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform Console&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./asp_console&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Then put the csa102SGI0 service group into lock assignment state using the following commands.&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 cli[Test]-&amp;gt; setc 1&lt;br /&gt;
 cli[Test:SCNodeI0]-&amp;gt; setc cpm&lt;br /&gt;
 cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockAssignment sg csa102SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because example 102 has two components there will be two application log files to view.  These are &amp;lt;code&amp;gt;/root/asp/var/log/csa102CompI0Log.latest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/root/asp/var/log/csa102CompI1Log.latest&amp;lt;/code&amp;gt;.  Viewing these application logs using the &amp;lt;code&amp;gt;tail -f&amp;lt;/code&amp;gt;, you should see the following.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI0Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00029 :   INFO) &lt;br /&gt;
 Component [csa102CompI0] : PID [13418]. Initializing&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00030 :   INFO) &lt;br /&gt;
    IOC Address             : 0x1&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00031 :   INFO)&lt;br /&gt;
    IOC Port                : 0x80&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00032 :   INFO)&lt;br /&gt;
 csa102: Instantiated as component instance csa102CompI0.&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00033 :   INFO)&lt;br /&gt;
 csa102CompI0: Waiting for CSI assignment...&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| //root/asp/var/log/csa102CompI1Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00028 :   INFO)&lt;br /&gt;
 Component [csa102CompI1] : PID [13422]. Initializing&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00029 :   INFO)&lt;br /&gt;
    IOC Address             : 0x1&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00030 :   INFO)&lt;br /&gt;
    IOC Port                : 0x81&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00031 :   INFO)&lt;br /&gt;
 csa102: Instantiated as component instance csa102CompI1.&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00032 :   INFO)&lt;br /&gt;
 csa102CompI1: Waiting for CSI assignment...&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Next, unlock the service group using the following SAFplus Platform Console command.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cli[Test:SCNodeI0:CPM]-&amp;gt; amsUnlock sg csa102SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
and in the /var/log/csa102CompI*.log files we should see:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI0Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 23:00:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00487 :   INFO)&lt;br /&gt;
 csa102: Hello World!       .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:19 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00488 :   INFO)&lt;br /&gt;
 csa102: Hello World!        .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:20 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00489 :   INFO)&lt;br /&gt;
 csa102: Hello World!         .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:21 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00490 :   INFO)&lt;br /&gt;
 csa102: Hello World!          .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:22 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00491 :   INFO)&lt;br /&gt;
 csa102: Hello World! .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:23 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00492 :   INFO)&lt;br /&gt;
 csa102: Hello World!  .&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI1Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 22:43:00 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00043 :   INFO)&lt;br /&gt;
 csa102: New state is not the ACTIVE; deactivating service&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
These can be watched in a separate terminal window using &amp;lt;code&amp;gt;tail -f&amp;lt;/code&amp;gt;.  csa102CompI0 is the active component in this case, and csa102CompI1 is the standby.  Consequently, the &amp;quot;Hello world!&amp;quot; lines appear in csa102CompI0.log and not in csa102CompI1.log.  They will continue to be logged to that file until the HA state of that component changes, for example, when the process logging those lines is killed.  In the mean time the standby component: csa102CompI1 just waits until it is told that it should take over the workload.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Changing the HA state of the Client/Server'''&lt;br /&gt;
&lt;br /&gt;
The easiest way to test component fail-over is to kill the process associated with the active component using the &amp;lt;code&amp;gt;kill&amp;lt;/code&amp;gt; command.  For this you need to know the process ID of the active component. To find the process ID issue the following command from a bash shell.&lt;br /&gt;
 # ps -eaf | grep csa102&lt;br /&gt;
This should produce an output that looks similar to the following.&lt;br /&gt;
 root     15872 15663  0 13:49 ?        00:00:01 csa102Comp -p&lt;br /&gt;
 root     16328 15663  0 13:56 ?        00:00:00 csa102Comp -p&lt;br /&gt;
 root     17304 16145  0 14:11 pts/4    00:00:00 grep csa102&lt;br /&gt;
Notice the two entries that end with &amp;lt;code&amp;gt;csa102Comp -p&amp;lt;/code&amp;gt;. These are our two component processes. The first one is usually the active process. This is the one that we will kill. In this case the process ID is 15872. So to kill the active component you issue the command:&lt;br /&gt;
 # kill -9 15872&lt;br /&gt;
[[File:OpenClovis_Note.png]]If this step does not result in the active component being killed then it is likely that the standby component was killed. In this case simply try killing the other process.&lt;br /&gt;
&lt;br /&gt;
After executing the &amp;lt;code&amp;gt;kill&amp;lt;/code&amp;gt; command you can see in the csa102CompI1 application that the standby component is now active.&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI1Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 23:00:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00487 :   INFO)&lt;br /&gt;
 csa102: Hello World!       .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:19 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00488 :   INFO)&lt;br /&gt;
 csa102: Hello World!        .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:20 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00489 :   INFO)&lt;br /&gt;
 csa102: Hello World!         .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:21 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00490 :   INFO)&lt;br /&gt;
 csa102: Hello World!          .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:22 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00491 :   INFO)&lt;br /&gt;
 csa102: Hello World! .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:23 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00492 :   INFO)&lt;br /&gt;
 csa102: Hello World!  .     .&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
This indicates that the standby component has taken over for the failed active component.&lt;br /&gt;
&lt;br /&gt;
Looking in the csa102CompI0 application log you can see that this component was killed and has been restarted. Since csa102CompI1 took over as the active component this component now goes into the standby state.&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI0Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00040 :   INFO)&lt;br /&gt;
 Component [csa102CompI0] : PID [13712]. Initializing&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00041 :   INFO)&lt;br /&gt;
    IOC Address             : 0x1&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00042 :   INFO)&lt;br /&gt;
    IOC Port                : 0x80&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00043 :   INFO)&lt;br /&gt;
 csa102: Instantiated as component instance csa102CompI0.&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00044 :   INFO)&lt;br /&gt;
 csa102CompI0: Waiting for CSI assignment...&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can continue to observe this failover by alternately killing the active component.&lt;br /&gt;
&lt;br /&gt;
To stop csa102 using the SAFplus Platform Console.&lt;br /&gt;
 cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockAssignment sg csa102SGI0&lt;br /&gt;
Successfully changed state of csa102SGI0 to LockAssignment&lt;br /&gt;
 cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockInstantiation sg csa102SGI0&lt;br /&gt;
 cli[Test:SCNodeI0:CPM] -&amp;gt; end&lt;br /&gt;
 cli[Test:SCNodeI0] -&amp;gt; end&lt;br /&gt;
 cli[Test] -&amp;gt; bye&lt;br /&gt;
Successfully changed state of csa102SGI0 to LockInstantiation and exit.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
&lt;br /&gt;
This Sample Application has covered basic HA and failover, with changing the state of a component to active and standby.&lt;/div&gt;</summary>
		<author><name>Stone</name></author>	</entry>

	</feed>