diff -ruN CERTI_TUTORIAL-0.1.1-Source_save/controlFed/controlFed.cc CERTI_TUTORIAL-0.1.1-Source_diff/controlFed/controlFed.cc
--- CERTI_TUTORIAL-0.1.1-Source_save/controlFed/controlFed.cc	2007-10-22 11:04:29.000000000 +0200
+++ CERTI_TUTORIAL-0.1.1-Source_diff/controlFed/controlFed.cc	2007-10-22 17:00:31.000000000 +0200
@@ -1,132 +1,163 @@
 /**
  * @file controlFed.cc
- * 
- * Hello Eric, if you have time please have a look at these lines of code.
- * This should be the core code lines of the tutorial, until now with
- * no special features like interactivity or command line output.
  *
- * Both federates (controlFed, processFed) are very similar. That's why
- * I commented only this file very extensivly.
+ * @brief This federate simulates a two level controller.
  *
- * For now, I think the main purpose should be that the application code is
- * as easy as possible.
+ * The federate serves as a HLA RunTime Infrastructure API 1.3 tutorial based
+ * on CERTI. 
  *
- * Tell me something about your code conventions? Tabs or no tabs etc. .
- * EN: don't worry too much about code "layout" convention
- *     we will reformat it all using astyle 
- *     http://astyle.sourceforge.net/
- *     We currently don't have code convention
- *     using default astyle behavior should be just fine
- *     unless you find it ugly and propose us appropriate options values.
+ * The HLA API is seperated in so called RTI ambassador services and federate
+ * ambassador services. The RTI ambassador services are provided by an
+ * RTIambassador object and are handled like normal method invocations. In
+ * contrast, federate ambassador services have to be implemented within the
+ * federate and can be regarded as a callback mechanism.
  *
+ * In this federate the usage of nessessary RTI ambassador method invocations
+ * and their correct calling order are shown for the management areas
+ * Federation Management, Declaration Management and Object Management. The 
+ * needed federate ambassador services are implemented in a separate class.
+ * 
+ * The controller federate computes the regulating variable u(t) on basis of
+ * its input variables. The input values consist of a static reference
+ * variable w(t) and the output variable y(t) provided by the process
+ * federate. The regulating variable u(t) serves as input for the process
+ * federate.
  */
 
-/* 
- * <RTI.hh> is the necessary include for using
- * HLA RunTime Infrastructure API
+/*
+ * <RTI.hh> 
+ * This header is the necessary include for using HLA RunTime Infrastructure 
+ * API.
  */
 #include <RTI.hh>
+
+/*
+ * <NullFederateAmbassador.hh> 
+ * The header provides virtual methods of the abstract basis class 
+ * FederateAmbassador included by <RTI.hh>. When using the 
+ * NullFederateAmbassador only required federate services have to be
+ * implemented.
+ */
 #include <NullFederateAmbassador.hh>
-#include <fedtime.hh>
 
 #include <iostream>
 
-// instead
-//
-// using namespace std;
-//
-// ?? exact specification ??
-// EN: we try to import only necessary element from std::
-//     this may avoid global namespace pollution.
-//     You may even use fully qualified name in the code
-//     if its appropriate.
 using std::string;
 using std::cout;
 using std::cerr;
 using std::endl;
 using std::auto_ptr;
 
-
 /**
- * This class realizes the implementation of required fedamb-services
- * and holds also the data of incoming callbacks (y).
- * Flags are defined additionally. So I can determine the occurence of special
- * callbacks in my main().
- *
- * One such class for both federates is also possible. What's your opinion?
- * This would be more straightforward regarding the fedFile.
+ * The class ControlFedAmb realizes the implementation of required 
+ * federate ambassador services. It holds the data of incoming callbacks too.
+ * Flags are defined additionally. So the occurrence of special federate 
+ * services can be determined in main().
  */
 class ControlFedAmb : public NullFederateAmbassador {
 
 private:
 
+    /*
+     * private variables:
+     *
+     * output variable y provided by the process federate
+     * flag discovY to determine federate service discoverObjectInstance(...)
+     * flag newY to determine federate service reflectAttributeValues(...)
+     */
 
-    // another way is to define the variables outside the class as globals
-    // so the implementation becomes a little bit shorter. What would you prefer
-    // for the tutorial?
-    // EN: I'd rather go with NO global variable at all since it is a bad
-    //     plain C way to go. Those globals becomes a real pain if you application
-    //     goes multithreaded. 
-    //     Keep them in the class it is far better (from my point of view)
     double y;
 
-
     bool discovY;
     bool newY;
 
 public:
 
-
-    // Here the calling of the parent constructor is not required, what do you think?
-    // EN: explicitely adding what is implicitly called is a good idea
-    //     since potential C++ beginners may forget that fact.
+    /* constructor initializes private variables. */
     ControlFedAmb() : NullFederateAmbassador() {
         y          = 0;
         discovY    = false;
         newY       = false;
     }
 
-    // these methods are not required if the variables are global
-    /** getter */
+    /**
+     * @defgroup DataEncapsulation Data Encapsulation
+     * Methods in this group set and get private variables. 
+     */
+
+    /**
+     * Get value of private variable y.
+     * @ingroup DataEncapsulation
+     * @param[out] double value
+     */
     double
     getY() {
         return y;
     }
 
+    /**
+     * Get value of private variable discovY which serves as 
+     * flag for the occurrence of the federate service 
+     * discoverObjectInstance(...).
+     * @ingroup DataEncapsulation
+     * @param[out] bool value
+     */
     bool
     getDiscoverY() {
         return discovY;
     }
 
+    /**
+     * Get value of private variable newY which serves as flag
+     * for the occurrence of the federate service 
+     * reflectAttributeValues(...).
+     * @ingroup DataEncapsulation
+     * @param[out] bool value
+     */
     bool
     getNewY() {
         return newY;
     }
 
-    /** setter */
+    /**
+     * Set value of private variable discovY which serves as 
+     * flag for the occurrence of the federate service 
+     * discoverObjectInstance(...).
+     * @ingroup DataEncapsulation
+     * @param[in] bool value 
+     */
     void
     setDiscoverY (bool val) {
         discovY = val;
     }
 
+    /**
+     * Set value of private variable newY which serves as 
+     * flag for the occurrence of the federate service 
+     * reflectAttributeValues(...).
+     * @ingroup DataEncapsulation
+     * @param[in] bool value 
+     */
     void
     setNewY (bool val) {
         newY = val;
     }
 
-  /**
-   * @defgroup RequiredFederateServices Required Federate Services
-   * The method of this group MUST be implemented 
-   * by the federate.
-   */
+    /**
+     * @defgroup RequiredFederateServices Required Federate Services
+     * The method of this group MUST be implemented by the federate 
+     * and will be invoked by the RTI.
+     */
 
-    /** 
-     * Discover object instance.
+    /**
+     * Discover object instance. This callback informs the federate of the
+     * existence of an object instance in the federation that is relevant
+     * to the federate's current subscription interests.
      * @ingroup RequiredFederateServices
      * @param[in] theObject,
-     * @param[in] theObjectClass,
+     * @param[in] theObjectClass,
      * @param[in] theObjectName, the object name to discover
-     * @exception RTI::CouldNotDiscover could not discover the specified named object
+     * @exception RTI::CouldNotDiscover could not discover the specified object
      * @exception RTI::ObjectClassNotKnown the specified object class is unknown
      * @exception RTI::FederateInternalError internal error
      */
@@ -143,8 +174,10 @@
         }
     }
 
-    /** 
-     * Reflect Attribute Values.
+    /**
+     * Reflect Attribute Values. This callback informs the federate of a state
+     * update for a set of instance-attributes relevant to the federate's 
+     * current subscription interests.
      * @ingroup RequiredFederateServices
      * @param[in] theObject,
      * @param[in] theAttributes, 
@@ -165,23 +198,10 @@
         RTI::ULong length;
         char *attrValue;
 
-        // I think the iteration through the attributes make no sense here
-        // because we have only one. The alternative way is presented
-        // below the for loop.
-	// EN: I agree, you may add small comment telling we know
-	//     we only have 1 attribute 
-	// 
-	// EN: how to cast:
-	//     You should use C++ style cast 
-	//     static_cast
-	//     reinterpret_cast
-	//     Those cast are easier to track and their name
-	//     indicates their purpose.
-	//     see for example:
-	//        Item 2 or 27 of Scott Meyer's book, "More Effective C++".
-	//        http://www.aristeia.com/EC3E/3E_item27.pdf
-	//        or
-        //        http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=134
+        /*
+        * common implementation scheme is to iterate through the
+        * AttributeHandleValuePairSet.
+        */
         for (unsigned int i=0; i<theAttributes.size(); i++) {
 
             RTI::AttributeHandle handle = theAttributes.getHandle(i);
@@ -190,74 +210,60 @@
             theAttributes.getValue(i, attrValue, length);
 
             if (!strcmp(theTag,"y")) {
-	      y = *(reinterpret_cast<double*>(attrValue));
+                y = *(reinterpret_cast<double*>(attrValue));
                 newY = true;
             }
 
             delete[] attrValue;
-
         }
-
-        //another method
-        //double t = ((RTIfedTime&)theTime).getTime();
-	// We get the first attribute (i.e. 0) because 
-	// we know we only have one.
-        //theAttributes.getValue(0, (char*)&y, length);
-        //newY = true;
     }
 };
 
-
-// What do you think about exception handling within the
-// tutorial? Should every call of an rtiamb-service
-// surrounded by a try-catch-construct?
-
+/**
+ * main of controlFed.cc
+ */
 int main() {
     RTI::RTIambassador   rtiAmb;
     ControlFedAmb        myFedAmb;
 
-    // hard coding or parameters by command line input?
     string federationName = "TwoLevelController";
     string federateName   = "controlFed";
     string fedFile        = "TwoLevelController.fed";
 
-    /** Federation Management */
+    /* Federation Management */
 
     cout << "Create Federation execution " << federationName << "." << endl;
 
-    /** create federation execution */
+    /* create federation execution */
     try {
         rtiAmb.createFederationExecution(federationName.c_str(), fedFile.c_str());
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::FederationExecutionAlreadyExists ) {
+        cout << "Federation already created by another federate." << endl;
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... ) {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
     cout << "Federate " << federateName << " joins federation execution "
     << federationName << "." << endl;
 
-    /** join federation execution */
-    // "spinning while joining" ??
+    /* join federation execution */
     try {
         rtiAmb.joinFederationExecution(federateName.c_str(),
                                        federationName.c_str(),
                                        &myFedAmb);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... ) {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
-    /** Declaration Management */
+    /* Declaration Management */
 
-    /** get handles */
+    /* get handles */
     cout << "Get handles from fedFile " << fedFile.c_str() << "." << endl;
 
     RTI::ObjectClassHandle twoLevelContrID;
@@ -265,34 +271,28 @@
 
     try {
         twoLevelContrID = rtiAmb.getObjectClassHandle("TwoLevelControllerClass");
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... ) {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
     try {
         uID = rtiAmb.getAttributeHandle("U", twoLevelContrID);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... ) {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
     try {
         yID = rtiAmb.getAttributeHandle("Y", twoLevelContrID);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... ) {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
@@ -304,43 +304,37 @@
     attrU->add(uID);
     attrY->add(yID);
 
-    /** publish u */
+    /* publish u */
     try {
         rtiAmb.publishObjectClass(twoLevelContrID, *attrU);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... ) {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
-    /** subscribe to y */
+    /* subscribe to y */
     try {
         rtiAmb.subscribeObjectClassAttributes(twoLevelContrID, *attrY);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... ) {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
-    /** Object Management */
+    /* Object Management */
 
-    /** register object */
+    /* register object */
     RTI::ObjectHandle objInstID_u;
 
     try {
         objInstID_u = rtiAmb.registerObjectInstance(twoLevelContrID, "u");
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... ) {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
@@ -349,12 +343,10 @@
 
         try {
             rtiAmb.tick();
-        }
-        catch ( RTI::Exception &e ) {
+        } catch ( RTI::Exception &e ) {
             cerr << "RTI exception: " << e._name << " ["
             << (e._reason ? e._reason : "undefined") << "]." << endl;
-        }
-        catch ( ... )  {
+        } catch ( ... ) {
             cerr << "Error: unknown non-RTI exception." << endl;
         }
 
@@ -362,7 +354,7 @@
     }
     myFedAmb.setDiscoverY(false);
 
-    /** simulation loop */
+    /* simulation loop */
 
     const double tEnd     = 30;
     const double tStart   = 0;
@@ -383,33 +375,29 @@
         if (y < w-0.1 ) u=1;
         if (y > w+0.1 ) u=0;
 
-        /** update attribute */
+        /* update attribute */
         ahvps -> add(uID, (char*)&(u), sizeof(double));
 
         try {
             rtiAmb.updateAttributeValues(objInstID_u, *ahvps, "u");
-        }
-        catch ( RTI::Exception &e ) {
+        } catch ( RTI::Exception &e ) {
             cerr << "RTI exception: " << e._name << " ["
             << (e._reason ? e._reason : "undefined") << "]." << endl;
-        }
-        catch ( ... )  {
+        } catch ( ... ) {
             cerr << "Error: unknown non-RTI exception." << endl;
         }
 
         ahvps -> empty ();
 
-        /** tick */
+        /* tick */
         while (!myFedAmb.getNewY()) {
 
             try {
                 rtiAmb.tick();
-            }
-            catch ( RTI::Exception &e ) {
+            } catch ( RTI::Exception &e ) {
                 cerr << "RTI exception: " << e._name << " ["
                 << (e._reason ? e._reason : "undefined") << "]." << endl;
-            }
-            catch ( ... )  {
+            } catch ( ... ) {
                 cerr << "Error: unknown non-RTI exception." << endl;
             }
 
@@ -420,63 +408,53 @@
         tSim += h;
     }
 
-    /** Declaration Management */
+    /* Declaration Management */
 
-    // these services are not fundamental, shall I use them, shouldn't I ?
     try {
         rtiAmb.unpublishObjectClass(uID);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... ) {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
     try {
         rtiAmb.unsubscribeObjectClass(yID);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... ) {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
-    /** Federation Management */
+    /* Federation Management */
 
     cout << "Federate " << federateName << " resigns federation execution "
     << federationName << "." << endl;
 
-    /** resign federation exection */
+    /* resign federation exection */
     try {
         rtiAmb.resignFederationExecution(
             RTI::DELETE_OBJECTS_AND_RELEASE_ATTRIBUTES);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... ) {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
     cout << "Destroy Federation execution " << federationName << "." << endl;
 
-    /** destroy federation execution */
+    /* destroy federation execution */
     try {
         rtiAmb.destroyFederationExecution(federationName.c_str());
-    }
-    catch (RTI::FederatesCurrentlyJoined) {
+    } catch (RTI::FederatesCurrentlyJoined) {
         cout << "Federates currently joined." << endl;
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... ) {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
diff -ruN CERTI_TUTORIAL-0.1.1-Source_save/COPYING CERTI_TUTORIAL-0.1.1-Source_diff/COPYING
--- CERTI_TUTORIAL-0.1.1-Source_save/COPYING	2007-10-22 11:04:29.000000000 +0200
+++ CERTI_TUTORIAL-0.1.1-Source_diff/COPYING	2007-10-22 13:45:29.000000000 +0200
@@ -1 +1,15 @@
-choose your license
+
+CERTI_TUTORIAL is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as 
+published by the Free Software Foundation; either version 2 of 
+the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program, in the file "gpl.txt"; if not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA
diff -ruN CERTI_TUTORIAL-0.1.1-Source_save/processFed/processFed.cc CERTI_TUTORIAL-0.1.1-Source_diff/processFed/processFed.cc
--- CERTI_TUTORIAL-0.1.1-Source_save/processFed/processFed.cc	2007-10-22 11:04:29.000000000 +0200
+++ CERTI_TUTORIAL-0.1.1-Source_diff/processFed/processFed.cc	2007-10-22 17:00:44.000000000 +0200
@@ -1,20 +1,69 @@
+/**
+ * @file processFed.cc
+ *
+ * @brief This federate simulates a low pass process of first order.
+ *
+ * The federate serves as a HLA RunTime Infrastructure API 1.3 tutorial based
+ * on CERTI. 
+ *
+ * The HLA API is seperated in so called RTI ambassador services and federate
+ * ambassador services. The RTI ambassador services are provided by an
+ * RTIambassador object and are handled like normal method invocations. In
+ * contrast, federate ambassador services have to be implemented within the
+ * federate and can be regarded as a callback mechanism.
+ *
+ * In this federate the usage of nessessary RTI ambassador method invocations
+ * and their correct calling order are shown for the management areas
+ * Federation Management, Declaration Management and Object Management. The 
+ * needed federate ambassador services are implemented in a separate class.
+ * 
+ * The process federate computes the output variable y(t) on basis of
+ * its input variable. The input value consists of the regulating variable u(t)
+ * provided by the control federate.
+ */
+
+/*
+ * <RTI.hh> 
+ * This header is the necessary include for using HLA RunTime Infrastructure 
+ * API.
+ */
 #include <RTI.hh>
+
+/*
+ * <NullFederateAmbassador.hh> 
+ * The header provides virtual methods of the abstract basis class 
+ * FederateAmbassador included by <RTI.hh>. When using the 
+ * NullFederateAmbassador only required federate services have to be
+ * implemented.
+ */
 #include <NullFederateAmbassador.hh>
-#include <fedtime.hh>
 
 #include <iostream>
 
-// using namespace std;
 using std::string;
 using std::cout;
 using std::cerr;
 using std::endl;
 using std::auto_ptr;
 
+/**
+ * The class ProcessFedAmb realizes the implementation of required 
+ * federate ambassador services. It holds the data of incoming callbacks too.
+ * Flags are defined additionally. So the occurrence of special federate 
+ * services can be determined in main().
+ */
 class ProcessFedAmb : public NullFederateAmbassador {
 
 private:
 
+    /*
+     * private variables:
+     *
+     * output variable u provided by the control federate
+     * flag discovU to determine federate service discoverObjectInstance(...)
+     * flag newU to determine federate service reflectAttributeValues(...)
+     */
+
     double u;
 
     bool discovU;
@@ -22,40 +71,94 @@
 
 public:
 
+    /* constructor initializes private variables. */
     ProcessFedAmb() : NullFederateAmbassador() {
         u          = 0;
         discovU    = false;
         newU       = false;
     }
 
-    /** getter */
+    /**
+     * @defgroup DataEncapsulation Data Encapsulation
+     * Methods in this group set and get private variables. 
+     */
+
+    /**
+     * Get value of private variable u.
+     * @ingroup DataEncapsulation
+     * @param[out] double value
+     */
     double
     getU() {
         return u;
     }
 
+    /**
+     * Get value of private variable discovU which serves as 
+     * flag for the occurrence of the federate service 
+     * discoverObjectInstance(...).
+     * @ingroup DataEncapsulation
+     * @param[out] bool value
+     */
     bool
     getDiscoverU() {
         return discovU;
     }
 
+    /**
+     * Get value of private variable newU which serves as flag
+     * for the occurrence of the federate service 
+     * reflectAttributeValues(...).
+     * @ingroup DataEncapsulation
+     * @param[out] bool value
+     */
     bool
     getNewU() {
         return newU;
     }
 
-    /** setter */
+    /**
+     * Set value of private variable discovU which serves as 
+     * flag for the occurrence of the federate service 
+     * discoverObjectInstance(...).
+     * @ingroup DataEncapsulation
+     * @param[in] bool value 
+     */
     void
     setDiscoverU (bool val) {
         discovU = val;
     }
 
+    /**
+     * Set value of private variable newU which serves as 
+     * flag for the occurrence of the federate service 
+     * reflectAttributeValues(...).
+     * @ingroup DataEncapsulation
+     * @param[in] bool value 
+     */
     void
     setNewU (bool val) {
         newU = val;
     }
 
-    /** required federate services */
+    /**
+     * @defgroup RequiredFederateServices Required Federate Services
+     * The method of this group MUST be implemented by the federate 
+     * and will be invoked by the RTI.
+     */
+
+    /**
+     * Discover object instance. This callback informs the federate of the
+     * existence of an object instance in the federation that is relevant
+     * to the federate's current subscription interests.
+     * @ingroup RequiredFederateServices
+     * @param[in] theObject,
+     * @param[in] theObjectClass,
+     * @param[in] theObjectName, the object name to discover
+     * @exception RTI::CouldNotDiscover could not discover the specified object
+     * @exception RTI::ObjectClassNotKnown the specified object class is unknown
+     * @exception RTI::FederateInternalError internal error
+     */
     void
     discoverObjectInstance ( RTI::ObjectHandle theObject,
                              RTI::ObjectClassHandle theObjectClass,
@@ -69,6 +172,15 @@
         }
     }
 
+    /**
+     * Reflect Attribute Values. This callback informs the federate of a state
+     * update for a set of instance-attributes relevant to the federate's 
+     * current subscription interests.
+     * @ingroup RequiredFederateServices
+     * @param[in] theObject,
+     * @param[in] theAttributes, 
+     * @param[in] 
+     */
     void
     reflectAttributeValues( RTI::ObjectHandle,
                             const RTI::AttributeHandleValuePairSet&
@@ -84,6 +196,10 @@
         RTI::ULong length;
         char *attrValue;
 
+        /*
+        * common implementation scheme is to iterate through the
+        * AttributeHandleValuePairSet.
+        */
         for (unsigned int i=0; i<theAttributes.size(); i++) {
 
             RTI::AttributeHandle handle = theAttributes.getHandle(i);
@@ -92,21 +208,18 @@
             theAttributes.getValue(i, attrValue, length);
 
             if (!strcmp(theTag,"u")) {
-                u = *((double*)attrValue);
+                u = *(reinterpret_cast<double*>(attrValue));
                 newU = true;
             }
 
             delete[] attrValue;
-
         }
-
-        //another method
-        //double t = ((RTIfedTime&)theTime).getTime();
-        //theAttributes.getValue(0, (char*)&u, length);
-        //newU = true;
     }
 };
 
+/**
+ * main of processFed.cc
+ */
 int main() {
     RTI::RTIambassador   rtiAmb;
     ProcessFedAmb        myFedAmb;
@@ -115,42 +228,40 @@
     string federateName   = "processFed";
     string fedFile        = "TwoLevelController.fed";
 
-    /** Federation Management */
+    /* Federation Management */
 
     cout << "Create Federation execution " << federationName << "." << endl;
 
-    /** create federation execution */
+    /* create federation execution */
     try {
         rtiAmb.createFederationExecution(federationName.c_str(), fedFile.c_str());
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::FederationExecutionAlreadyExists ) {
+        cout << "Federation already created by another federate." << endl;
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... )  {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
     cout << "Federate " << federateName << " joins federation execution "
     << federationName << "." << endl;
 
-    /** join federation execution */
+    /* join federation execution */
     try {
         rtiAmb.joinFederationExecution(federateName.c_str(),
                                        federationName.c_str(),
                                        &myFedAmb);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... )  {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
-    /** Declaration Management */
+    /* Declaration Management */
 
-    /** get handles */
+    /* get handles */
     cout << "Get handles from fedFile " << fedFile.c_str() << "." << endl;
 
     RTI::ObjectClassHandle twoLevelContrID;
@@ -158,34 +269,28 @@
 
     try {
         twoLevelContrID = rtiAmb.getObjectClassHandle("TwoLevelControllerClass");
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... )  {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
     try {
         uID = rtiAmb.getAttributeHandle("U", twoLevelContrID);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... )  {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
     try {
         yID = rtiAmb.getAttributeHandle("Y", twoLevelContrID);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... )  {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
@@ -197,43 +302,37 @@
     attrU->add(uID);
     attrY->add(yID);
 
-    /** publish y */
+    /* publish y */
     try {
         rtiAmb.publishObjectClass(twoLevelContrID, *attrY);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... )  {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
-    /** subscribe to u */
+    /* subscribe to u */
     try {
         rtiAmb.subscribeObjectClassAttributes(twoLevelContrID, *attrU);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... )  {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
-    /** Object Management */
+    /* Object Management */
 
-    /** register object */
+    /* register object */
     RTI::ObjectHandle objInstID_y;
 
     try {
         objInstID_y = rtiAmb.registerObjectInstance(twoLevelContrID, "y");
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... )  {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
@@ -242,12 +341,10 @@
 
         try {
             rtiAmb.tick();
-        }
-        catch ( RTI::Exception &e ) {
+        } catch ( RTI::Exception &e ) {
             cerr << "RTI exception: " << e._name << " ["
             << (e._reason ? e._reason : "undefined") << "]." << endl;
-        }
-        catch ( ... )  {
+        } catch ( ... )  {
             cerr << "Error: unknown non-RTI exception." << endl;
         }
 
@@ -255,7 +352,7 @@
     }
     myFedAmb.setDiscoverU(false);
 
-    /** simulation loop */
+    /* simulation loop */
 
     const double tEnd     = 30;
     const double tStart   = 0;
@@ -277,12 +374,10 @@
         while (!myFedAmb.getNewU()) {
             try {
                 rtiAmb.tick();
-            }
-            catch ( RTI::Exception &e ) {
+            } catch ( RTI::Exception &e ) {
                 cerr << "RTI exception: " << e._name << " ["
                 << (e._reason ? e._reason : "undefined") << "]." << endl;
-            }
-            catch ( ... )  {
+            } catch ( ... )  {
                 cerr << "Error: unknown non-RTI exception." << endl;
             }
         }
@@ -294,17 +389,15 @@
         ydot = ( -y + u*K ) / T1;
         y = y + h*ydot;
 
-        /** update attribute */
+        /* update attribute */
         ahvps -> add(yID, (char*)&(y), sizeof(double));
 
         try {
             rtiAmb.updateAttributeValues(objInstID_y, *ahvps, "y");
-        }
-        catch ( RTI::Exception &e ) {
+        } catch ( RTI::Exception &e ) {
             cerr << "RTI exception: " << e._name << " ["
             << (e._reason ? e._reason : "undefined") << "]." << endl;
-        }
-        catch ( ... )  {
+        } catch ( ... )  {
             cerr << "Error: unknown non-RTI exception." << endl;
         }
 
@@ -314,61 +407,52 @@
         tSim += h;
     }
 
-    /** Declaration Management */
+    /* Declaration Management */
     try {
         rtiAmb.unpublishObjectClass(yID);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... )  {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
     try {
         rtiAmb.unsubscribeObjectClass(uID);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... )  {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
-    /** Federation Management */
+    /* Federation Management */
 
     cout << "Federate " << federateName << " resigns federation execution "
     << federationName << "." << endl;
 
-    /** resign federation exection */
+    /* resign federation exection */
     try {
         rtiAmb.resignFederationExecution(
             RTI::DELETE_OBJECTS_AND_RELEASE_ATTRIBUTES);
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... )  {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
     cout << "Destroy Federation execution " << federationName << "." << endl;
 
-    /** destroy federation execution */
+    /* destroy federation execution */
     try {
         rtiAmb.destroyFederationExecution(federationName.c_str());
-    }
-    catch (RTI::FederatesCurrentlyJoined) {
+    } catch (RTI::FederatesCurrentlyJoined) {
         cout << "Federates currently joined." << endl;
-    }
-    catch ( RTI::Exception &e ) {
+    } catch ( RTI::Exception &e ) {
         cerr << "RTI exception: " << e._name << " ["
         << (e._reason ? e._reason : "undefined") << "]." << endl;
-    }
-    catch ( ... )  {
+    } catch ( ... )  {
         cerr << "Error: unknown non-RTI exception." << endl;
     }
 
