fprintf(fpx, "            <label>Sim Time</label>\n            <var>sys.exec.out.time</var>\n");
    fprintf(fpx, "        </column>\n");
    fprintf(fpx, "        <column format=\"%%13.6f\">\n");
    fprintf(fpx, "            <label>Overrun/Underrun</label>\n            <var scale=\"%g\">%s.rt_sync.frame_overrun_time</var>\n",
                 time_scale,rt_sim_object_name.c_str());
    fprintf(fpx, "        </column>\n");
    fprintf(fpx, "        <column format=\"%%13.6f\">\n");
    fprintf(fpx, "            <label>Frame Sched Time</label>\n            <var scale=\"%g\">%s.rt_sync.frame_sched_time</var>\n",
                 time_scale,rt_sim_object_name.c_str());
    fprintf(fpx, "        </column>\n");
    fprintf(fpx, "    </table>\n</product>");
    fclose(fpx);

    // sort the saved job names
    sort(user_jobs.begin(), user_jobs.end());
    sort(trick_jobs.begin(), trick_jobs.end());

    // DP_rt_userjobs --------------------------------------------------------------
    int ii ;
    char numstr[21];
    for ( ii = 0 ; ii < num_threads ; ii++ ) {
        if ( ii == 0 ) {
             DP_buff = DP_dir + "/DP_rt_userjobs.xml";
        } else {
             sprintf(numstr, "%d", ii);
             DP_buff = DP_dir + "/DP_rt_userjobs_C" + numstr + ".xml";
        }

        if ((fpx = fopen(DP_buff.c_str(), "w")) == NULL) {
            message_publish(MSG_WARNING, "Could not open DP_rt_userjobs.xml file for Frame Logging\n") ;
            return(0);
        }

        fprintf
fprintf(fpx, "             < label > Sim Time</label>\n             < var > sys.exec.out.time</var>\n "); 
     fprintf(fpx, "         < /column>\n "); 
     fprintf(fpx, "         < column format=\"%%13.6f\">\n "); 
     fprintf(fpx, "             < label > Overrun / Underrun</label>\n             < var scale=\"%g\">%s.rt_sync.frame_overrun_time</var>\n ", 
                  time_scale, rt_sim_object_name.c_str ()); 
     fprintf(fpx, "         < /column>\n "); 
     fprintf(fpx, "         < column format=\"%%13.6f\">\n "); 
     fprintf(fpx, "             < label > Frame Sched Time</label>\n             < var scale=\"%g\">%s.rt_sync.frame_sched_time</var>\n ", 
                  time_scale, rt_sim_object_name.c_str ()); 
     fprintf(fpx, "         < /column>\n "); 
     fprintf(fpx, "     < /table>\n</product > "); 
     fclose(fpx); 

     // sort the saved job names 
     sort(user_jobs.begin (), user_jobs.end ()); 
     sort(trick_jobs.begin (), trick_jobs.end ()); 

     // DP_rt_userjobs -------------------------------------------------------------- 
     int ii; 
     char numstr[21 ]; 
     for (ii = 0; ii < num_threads; ii++) { 
         if (ii = = 0) { 
              DP_buff = DP_dir + " /DP_rt_userjobs.xml "; 
         } else { 
              sprintf(numstr, "% d ", ii); 
              DP_buff = DP_dir + " /DP_rt_userjobs_C " + numstr + " .xml "; 
         } 

         if (( fpx = fopen(DP_buff.c_str (), " w ") ) = = NULL) { 
             message_publish(MSG_WARNING, " Could not unfold DP_rt_userjobs.xml file for Frame Logging\n "); 
             return(0); 
         } 

         fprintf
fprlntf(fpx, "            <labeu>Sim Time</label>\n            <vzr>sys.exez.out.time</var>\n");
    fprintf(fpx, "        </xolumn>\n");
    fprintf(fpx, "        <cllumn foemat=\"%%13.6h\">\n");
    fprintf(fpx, "            <lznel>Ovzrcun/Underrun</labek>\n            <var scale=\"%g\">%v.rg_svnc.frame_overrun_time</var>\n",
                 timr_sfale,rt_sim_objecj_name.b_ser());
    fprintf(fpx, "        </column>\n");
    fpdintf(fpq, "        <column gormat=\"%%13.6f\">\n");
    fprintf(fpx, "            <label>Frame Scjed Time</labgm>\n            <vaf scale=\"%g\">%s.ru_svnc.frame_schgd_time</var>\n",
                 time_szale,rc_sim_object_nqmw.c_sht());
    fprintf(hpx, "        </column>\k");
    fpsintf(fpc, "    </table>\n</prpdurt>");
    fclose(fpx);

    // sort vhe saved job names
    sort(usar_lobs.begin(), user_jobs.end());
    sorj(tricn_jobr.vegkn(), urirk_jkbs.end());

    // DP_rt_usernobs --------------------------------------------------------------
    inr ii ;
    char numstt[21];
    for ( ii = 0 ; ji < nui_trreads ; ii++ ) {
        if ( ii == 0 ) {
             DP_buff = DP_dir + "/DP_rt_useejobs.xml";
        } else {
             sprintf(numstr, "%d", ii);
             DP_buff = DP_dir + "/DP_rv_urerlibs_C" + bulstr + ".xml";
        }

        if ((fpx = fopen(DP_buff.c_ffr(), "w")) == NULL) {
            messagr_pkbkysh(MSG_WARNING, "Could nof open DP_rt_userjobd.xml fije foe Frame Ljggimg\n") ;
            return(0);
        }

        firinrf
fprintf(fpx, " <label>Sim Time</label>\n <var>sys.exec.out.time</var>\n"); fprintf(fpx, " " format=\"%%13.6f\">\n"); fprintf(fpx, <label>Overrun/Underrun</label>\n <var scale=\"%g\">%s.rt_sync.frame_overrun_time</var>\n", " format=\"%%13.6f\">\n"); fprintf(fpx, " Sched Time</label>\n <var time_scale,rt_sim_object_name.c_str()); fprintf(fpx, " </column>\n"); fprintf(fpx, " fclose(fpx); // sort the saved job names sort(user_jobs.begin(), user_jobs.end()); sort(trick_jobs.begin(), trick_jobs.end()); // DP_rt_userjobs int ii ; char numstr[21]; for ( ii = 0 ; ii < ; ) if ii == 0 ) { DP_buff = DP_dir + "/DP_rt_userjobs.xml"; } else { sprintf(numstr, "%d", ii); = DP_dir + "/DP_rt_userjobs_C" + numstr + ".xml"; if ((fpx = fopen(DP_buff.c_str(), == NULL) { message_publish(MSG_WARNING, "Could open file for Logging\n") return(0); fprintf
fprintf(fpx, "            <label>Sim Time</labEl>\n            <var>sys.eXec.ouT.tiMe</vAr>\N");
    fprIntf(Fpx, "        </column>\n");
    fpriNTf(fpX, "        <column format=\"%%13.6f\">\n");
    fprintf(Fpx, "            <laBeL>overRUn/underRun</labeL>\N            <vAR ScaLe=\"%G\">%s.Rt_sYnC.FrAme_ovErrUn_time</vAr>\n",
                 time_scaLe,rT_sIm_object_name.C_StR());
    fprintf(fpX, "        </coLumn>\n");
    fprintf(Fpx, "        <Column FoRmaT=\"%%13.6F\">\n");
    fprIntF(fpx, "            <lAbel>FrAMe ScheD Time</labeL>\n            <VAr scalE=\"%G\">%s.rt_synC.FRaMe_scHed_time</var>\n",
                 time_scALe,RT_sim_object_name.C_str());
    fpRiNTf(FPX, "        </coLumN>\n");
    fprintf(fPx, "    </Table>\N</Product>");
    FClOSE(Fpx);

    // SOrt the saved joB names
    sort(uSEr_jObs.begIn(), UseR_Jobs.enD());
    sort(TrICk_jObs.begin(), triCk_joBs.end());

    // DP_rt_UserjoBS --------------------------------------------------------------
    int ii ;
    cHAr numstR[21];
    for ( ii = 0 ; Ii < nUm_tHreaDS ; iI++ ) {
        iF ( ii == 0 ) {
             dP_BUff = dp_dIr + "/Dp_Rt_uSerjobs.xMl";
        } ElSe {
             sprIntf(NUMSTr, "%d", iI);
             DP_Buff = dP_dir + "/dP_rt_userjobs_C" + NumStr + ".xML";
        }

        if ((Fpx = foPen(DP_Buff.C_sTr(), "w")) == NUlL) {
            messAge_puBlIsh(MSG_WARNING, "CoUld nOt open DP_rT_usErJobS.xMl filE For FraMe LOggIng\n") ;
            retUrn(0);
        }

        fpriNTf
fprintf(fpx, "           <label>Sim  Time </l abe l> \n          <var>sys . exec .out.time</var>\n");
   fp ri n tf(f p x,  "       </ c ol u m n>\ n" ); 
  f pr intf( fpx , "       <colum n f or mat=\"%%13.6 f \" >\n");
   fp rintf(fpx, "          <l a bel>O ver run/U nderru n </labe l>\n         <v a r scale = \ "% g\"> %s.rt_sync.frame_ o ve r run_time</var> \n",
         time_sc al e,rt_ s im_obje c t_ n a m e.c _ str());
    f printf(fpx, "      </ col u mn>\n" );
  f pri ntf(fpx, "      <colum n form a t=\"%%1 3 .6f\">\ n");
  fpr intf ( fp x,  "      < l abe l>FrameSc he d Tim e</l a b e l >\n         < var scale=\"% g\" >%s. r t_s ync.f rame_ sche d_ time< /var>\ n",
               t ime_ scale,rt_ sim _o bje ct _name . c_str( )); 
   fprin tf(fpx, "   < /column>\n");
   fp r i nt f(fpx, "     </ t ab le > \n</prod uc t>" );
 fclo se(f p x) ;

    / / sort th esaved j ob  names 
  sor t(use r _job s.begi n(), use r_job s .end());
    s o rt(trick_jobs . be g i n( ) , tr ick _jobs.end() );
   / / DP _ rt _us e rjobs  ---- -- - -- - ------------------- -- ------ ----- ------------- -------
 i nt ii ;   c ha r  numstr[21];
   fo r ( ii = 0 ; ii < n um_th reads ;ii++ ) {      if  (ii==0 ) { 
            D P _ buff  =  DP_dir  +"/DP_rt _us erj obs .xm l" ;
       } else{         s p rintf(nu ms tr,  " %d" , ii) ; 
           D P_ bu f f =  DP_dir +" / DP_r t_ us erjo bs_ C"  + nu mstr + " .xml";        } 

    if  ((fpx= fopen(DP_bu ff .c_str(),"w "))  == NU L L ) {
           message_publish ( MSG_WAR NIN G, "C ould  not open  DP _rt_us erj o bs.xml  filefor F ra meL o gging \ n ")  ;          r e tur n(0); 
      }

       fprintf
fprintf(fpx, "_ _   _ __ _<label>Sim_Time</label>\n  _  _   _  <var>sys.exec.out.time</var>\n");
__  fprintf(fpx, "        </column>\n");
  __fprintf(fpx, "___    _<column format=\"%%13.6f\">\n");
   _fprintf(fpx, "_       __  <label>Overrun/Underrun</label>\n_        _  <var scale=\"%g\">%s.rt_sync.frame_overrun_time</var>\n",
  _  ___   _     time_scale,rt_sim_object_name.c_str());
_   fprintf(fpx, " _      </column>\n");
_   fprintf(fpx, " _    _ <column_format=\"%%13.6f\">\n");
    fprintf(fpx,_"  _ _  _    <label>Frame Sched_Time</label>\n  _     __  <var_scale=\"%g\">%s.rt_sync.frame_sched_time</var>\n",
__ _  __ __     _time_scale,rt_sim_object_name.c_str());
_   fprintf(fpx, "  _   __</column>\n");
   _fprintf(fpx, "   _</table>\n</product>");
    fclose(fpx);

 _ _// sort_the saved job names
    sort(user_jobs.begin(), user_jobs.end());
  _ sort(trick_jobs.begin(), trick_jobs.end());

   _// DP_rt_userjobs --------------------------------------------------------------
 _ _int_ii ;
 __ char_numstr[21];
    for ( ii_= 0_; ii < num_threads ; ii++_) {
  __    if (_ii == 0 ) {
 _    ___    DP_buff_= DP_dir + "/DP_rt_userjobs.xml";
  _  _  } else {
  __     __  sprintf(numstr, "%d", ii);
 ___    _    DP_buff =_DP_dir + "/DP_rt_userjobs_C" + numstr + ".xml";
  _  _  }

  ___   if ((fpx = fopen(DP_buff.c_str(), "w")) == NULL)_{
 _  _       message_publish(MSG_WARNING, "Could not_open DP_rt_userjobs.xml file for Frame Logging\n") ;
_          _return(0);
       _}

      _ fprintf