Gift-VT Tools Development Overview

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Gift-VT Tools Development Overview - Presentation Transcript

    1. GIFT-VT Tools Overview
    2. Agenda
      • Tools Levels.
      • The gift file.
      • Execute Tool by the Server.
      • Tools MakeFile.
    3. The Tools layer
      • We have several types of Tools:
        • Generic.
          • LineShmoo, ExecuteAllPats etc.
        • Product specific.
          • ScanOut, LCP etc.
        • Platform Specific
          • S9KPutCompare
        • Produc & Platform Specific
          • DTN_S9KRaster
    4. Tools layer
      • For each type we have:
        • Service classes
          • Common task which used by Tools and Modules (i.e. CoutputServer or CfailureTable)
        • Module classes
          • Implements a specific algorithm within a Tool, this algorithm may be used by several Tools (i.e. CShmoo or CStability )
        • Tool classes
          • Implements a specific Tool algorithm (i.e. CColumnShmoo or CLCP_DC ).
    5. Classes – Tools, Modules & Services CBaseTool Modules Tools Services inheritance CBaseTool C2DShmoo CShmoo CStability CLineShmoo CLCP_DC CRunShmoo CScanOut CFailureTable COutputServer CAddressCalc CConfigServer
    6. Gift file
      • Every tool need a gift file:
      • The gift file include the tool name
          • # UF: ToolName
      • All Tool Params (Globlas)
        • A line starting with “ # ” is a comment.
        • A line starting with “: ;” is an empty line.
        • A line like “:XXX;” is a header line (the XXX will be green in the GUI).
        • All other lines are parameter lines, each divided into fields by the “;” delimiter:
          • First field is a name and must begin with the “-“ character (for clift).
          • Second field is the parameter name to be passed to the Tool.
          • Third field is the parameter type (INT, FLOAT, STRING).
          • Fourth field is the parameter short description to appear in the GUI and in the Tool header.
    7. Gift file cont’
        • Fourth field parameter
          • If the field ends with “#0” the field is read only – user can change it only if it has a drop-down menu.
          • If the field ends with “#5!” the field appears as a button. The five subsequent lines will correspond to a sub window that will pop up when clicking the button.
        • Fifth field is the parameter help line that appears in the GUI when the mouse points at the parameter.
        • Sixth field is optional. When it exists the field becomes a menu field.
          • The tokens in the field (separated by coma “,”) are the menu contents.
          • If the content of the field is “<2#>” the menu content will come from the configuration file.
        • Seventh field is also optional. The value(s) of each token replaces the corresponding item selected in the sixth field menu for transmission to the Tool.
    8. Gift file Example.
      • # GIFT/CLIFT Configuration file for Example
      • # UF: Example
      • # -------------------------------------------
      • # This is a comment.
      • :This is the header;
      • -First; DBG_First_Param; int; First Parameter#0; Help line 1; One,Two; 1,2;
      • # Empty line
      • : ;
      • -Second; DBG_Second_Param; string; Second Parameter; Help line 2; One,Two,Three;
      • :This is another header;
      • -Third; DBG_Third_Param; int; Third Parameter; Help line 3;
      • -Options; DBG_Options; string; Options#2!; More options; Yes,No; 1,2;
      • :Options header;
      • -FirstOption; DBG_First_Options; int; First Option;
      • -SecondOption; DBG_Second_Options; int; Second Option;
      • #end of gift file
    9. Execute Tool
      • In order to execute a tool the server translate a string tool name to the func pointer.
        • Get Tool Name form the .gift file
          • E.g. MyTool
        • Loading the tool from the disk to mem.
          • P = dlopen(“ MyTool ”);
        • Get ‘MyTool’ exec & Check functions
          • Pcheck = dlsym(p,” MyTool _Check”);
          • Prun = dlsym(p,” MyTool _Run”)
        • Note:
          • The name of Run/Check functions has to be the same as Tool MyTool file name.
    10. MakeFile
      • # This is a Makefile for the VT project
      • # General flags
      • GIFTVT_ROOT = /afs/iil.intel.com/tmn/eng/tcg/TMN_TCG_11/GiftVT
      • TARGET = $(GIFTVT_ROOT)/VT_lib/tools_lib/generic_tools_lib/
      • LIBNAME = libExample
      • GIFTNAME = Example.gift
      •  
      • CFLAGS = -fPIC -fexceptions -g -c –o
      •  
      • INCLUDE = -I$(GIFTVT_ROOT)/src/include
      • -I$(GIFTVT_ROOT)/src/GiftVT_Utiles
      • -I$(GIFTVT_ROOT)/src/generic_tools/ToolFuncs
      •  
      • LIBS = -L$(GIFTVT_ROOT)/VT_lib/emul_funcs_lib/ - lVTfuncs
      • -L$(GIFTVT_ROOT)/VT_lib/tools_lib/generic_tools_lib/ - lToolFuncs
      • SRCS = CExample.cpp
      • OBJS = ${SRCS:.cpp=.o}
    11. Makefile cont’
      • build_objects:
      •  
      • make_lib_share: ${OBJS}
      • @echo &quot;Building Shared Library &quot; ${TARGET}/${LIBNAME}.so.${M1}.${M2} &quot; ...&quot;
      • ${LD} -shared -G -z text -o ${TARGET}/${LIBNAME}.so.${M1}.${M2} ${OBJS} ${LIBS}
      • @echo &quot;Done.&quot;
      • @echo &quot;&quot;
      • make_link:
      • @echo &quot;Make a link to &quot; ${TARGET}/${LIBNAME}.so.${M1}.${M2} &quot; ...&quot;
      • @ rm -f ${TARGET}/${LIBNAME}.so
      • ln -s ${LIBNAME}.so.${M1}.${M2} ${TARGET}/${LIBNAME}.so
      • @echo &quot;Done.&quot;
      • @echo &quot;&quot;
      • add_gift:
      • @echo &quot;Add Gift file&quot; ${GIFTNAME} &quot;to &quot; ${TARGET}/${LIBNAME}.so.${M1}.${M2} &quot; ...&quot;
      • @echo &quot;&quot; >> ${TARGET}/${LIBNAME}.so.${M1}.${M2}
      • @cat ${GIFTNAME} >> ${TARGET}/${LIBNAME}.so.${M1}.${M2}
      • @echo &quot;Done.&quot;
      • @echo &quot;&quot;
    12. System Architecture GIFT-VT Typical GUI
    13. S9K IX Tester IMS Vanguard Tester S9K KX Tester
      • Features:
      • Select the component to work on
      • Select the tester to use
      • All User interface is GUI based
      • Same Tool used over Platform
      • Same platform for many componets
      GIFT-VT Debug Tool suite, Over Platform
      • System used in:
      • Odem CD (IMS & KX)
      • Banias CD (IMS & IX)
      • DV (KX)
      • Banias (IX)
      • SC
      Structural Tester (ST2) tester support (VT) is being developed in SC
    14. Gift1.0 disadvantages
      • Define only for S9K.
      • User have to know basic ASAP.
      • All tools linked together (take them all).
      • In case of problem in one tool you can’t compile/run ASAP.
      • Gift files not part of the tool.
      • New tool.
        • Change other tools and compile them too.
        • Add tool to TP.
        • Add some blocks to your TP (globals pat_list etc.).
          • (done in gift1.25).
        • Compile again your TP.
    15. VTtools base
      • VTtools
        • readme.1.0.txt
        • src
          • include
          • bns_tools
          • ims_funcs
          • s9k_funcs
        • VT_lib
          • bns_tools_lib
          • ims_funcs_lib
          • s9k_funcs_lib
    16. src
      • tools
        • Makefile
        • Tools C functions (-> Tools_liblibtools.so )
      • ims_funcs
        • Makefile
        • ims C++ functions (-> Funcs_libims_liblibfuncs.so )
      • s9k_funcs
        • Makefile
        • .c9k UF ( -> .op )
        • s9k C functions (-> Funcs_libs9k_liblibfuncs.so )
    17. lib
      • Tools_lib
        • libserver.so.
        • libLineShmoo.so.
        • etc.
      • Funcs_lib
        • all_lib
          • libfuncs.so
        • ims_lib
          • libfuncs.so
        • s9k_lib
          • libfuncs.so
      • include
        • .h files
    18. Con’t VT imp
      • Run Tool
        • gift send ToolParameters, ToolName to server().
        • Server :
          • SetToolParams.
          • Load lib tool .so and call tool.
        • Tool :
          • GetToolParams.
          • Load & Run VTfuncs.
    19. PutCompare
      • //////////////////////////////////////////////////////////////////////////////
      • // CTMN_S9KPutCompare . cpp
      • // $GIFT - VT;Tool;timna$
      • //
      • // Contains : definitions for class CTMN_S9KPutCompare
      • //
      • // 23/06/2001 Cohen Alon Creation
      • // Revision History : None
      • /*
      • * $Header : / afs / iil . intel . com / tmn / eng / tcg / TMN_TCG_4 / GIFT_FILES / Tools / Active / Aux / RCS / TMN_S9KPutCompare . cpp,v 1.0 2001-06-14 23:03:13+03 cecp Exp $
      • * $RCSfile : TMN_S9KPutCompare . cpp,v $
      • * $Revision : 1.0 $
      • * $Date : 2001-06-14 23:03:13+03 $
      • * $Id : TMN_S9KPutCompare . cpp,v 1.0 2001-06-14 23:03:13+03 cecp Exp $
      • * $Log : TMN_S9KPutCompare . cpp,v $
      • * Revision 1.0 2001-06-14 23:03:13+03 cecp
      • * Initial revision
      • *
      • *
      • *
      • */
      • // CTMN_S9KPutCompare
      • //////////////////////////////////////////////////////////////////////////////
      • #include <stdio . h>
      • #include <stdlib . h>
      • #include <iostream . h>
      • #include <vtFunctions . h>
      • #include <CTimer . h>
      • #include <CGlobalsHandle . h>
      • #define S9K_TOOL_NAME &quot; TMN_S9KPutCompare &quot;
      • #define RUN_S9K_TOOlS_DBG 1
      • typedef int (* func1 )( char * buffer, FILE * fic ) ;
      • typedef int (* func2 )( void ) ;
      • static char * rcsid = &quot; $Id : TMN_S9KPutCompare . cpp,v 1.0 2001-06-14 23:03:13+03 cecp Exp $ &quot; ;
      • static char * rcsrev = &quot; $Revision : 1.0 $ &quot; ;
      • extern &quot; C &quot; {
      • extern int check_PutCompare ( char * buffer, FILE * fic ) ;
      • extern int PutCompare ( void ) ;
      • VTBoolean TMN_S9KPutCompare_Check ( ParamsContainer & Container, char * zResponseBuf ) ;
      • VTBoolean TMN_S9KPutCompare_Run ( ParamsContainer & Container, char * zResponseBuf ) ;
      • }
      • static func1 pFuncCheck = check_PutCompare;
      • static func2 pFuncExec = PutCompare;
      • //--------------------------------------------------------------------
      • // TMN_S9KPutCompare_Check
      • //--------------------------------------------------------------------
      • VTBoolean TMN_S9KPutCompare_Check ( ParamsContainer & Container, char * zResponseBuf )
      • {
      • VTBoolean bOk = VT_TRUE;
      • VTBoolean obRet = VT_TRUE;
      • // CGlobalsHandle MyGlobalsHandle ( Container ) ;
      • // if ( RUN_S9K_TOOlS_DBG )
      • // MyGlobalsHandle . mOutObj . PrintDebug ( VT_TRUE ) ;
      • if (! zResponseBuf ) {
      • // ERROR
      • // MyGlobalsHandle . mOutObj . Print ( ERROR, &quot; zResponseBuf is NULL &quot;) ;
      • return VT_FALSE;
      • }
      • sprintf ( zResponseBuf, &quot;% s; &quot; ,zResponseBuf ) ;
      • // bOk = MyGlobalsHandle . SetAllToolsParams () ;
      • ///////////////////////////////////////////////////////////////////////////////////////
      • string sName = &quot; UFG_comp_field &quot; ;
      • ParamsContainer :: iterator Iter = Container . find ( sName ) ;
      • if ( Iter == Container . end ()) {
      • printf (&quot;% s - Paremeter name not found &quot; ,sName . c_str ()) ;
      • }
      • else{
      • vtSetToolParam (( char *)(* Iter ). second . msName . c_str () ,SVAL, ( char *)(* Iter ). second . msValue . c_str ()) ;
      • }
      • sName = &quot; UFG_comp_field1 &quot; ;
      • Iter = Container . find ( sName ) ;
      • if ( Iter == Container . end ()) {
      • printf (&quot;% s - Paremeter name not found &quot; ,sName . c_str ()) ;
      • }
      • else{
      • vtSetToolParam (( char *)(* Iter ). second . msName . c_str () ,SVAL, ( char *)(* Iter ). second . msValue . c_str ()) ;
      • }
      • sName = &quot; UFG_comp_field2 &quot; ;
      • Iter = Container . find ( sName ) ;
      • if ( Iter == Container . end ()) {
      • printf (&quot;% s - Paremeter name not found &quot; ,sName . c_str ()) ;
      • }
      • else{
      • vtSetToolParam (( char *)(* Iter ). second . msName . c_str () ,SVAL, ( char *)(* Iter ). second . msValue . c_str ()) ;
      • }
      • ///////////////////////////////////////////////////////////////////////////////////////
      • // MyGlobalsHandle . mOutObj . Print ( DEBUG, &quot; Check Tool % s &quot; ,S9K_TOOL_NAME ) ;
      • // Execute CheckS9ktool
      • printf (&quot;**** run pFuncCheck *** &quot;) ;
      • obRet = ( VTBoolean ) pFuncCheck ( zResponseBuf,NULL ) ;
      • // MyGlobalsHandle . mOutObj . Print ( DEBUG, &quot; Check return % d, zResponseBuf = % s &quot; ,obRet,zResponseBuf ) ;
      • printf (&quot;**** End of run pFuncCheck *** &quot;) ;
      • return obRet;
      • }
      • //--------------------------------------------------------------------
      • // TMN_S9KPutCompare_Run
      • //--------------------------------------------------------------------
      • VTBoolean TMN_S9KPutCompare_Run ( ParamsContainer & Container, char * zResponseBuf )
      • {
      • VTBoolean bOk = VT_TRUE;
      • VTBoolean obRet = VT_TRUE;
      • CTimer Timer;
      • CGlobalsHandle MyGlobalsHandle ( Container ) ;
      • if ( RUN_S9K_TOOlS_DBG )
      • MyGlobalsHandle . mOutObj . PrintDebug ( VT_TRUE ) ;
      • MyGlobalsHandle . mOutObj . Print ( DEBUG, &quot; Running % s with Verbose Mode &quot; ,S9K_TOOL_NAME ) ;
      • if (! zResponseBuf ) {
      • MyGlobalsHandle . mOutObj . Print ( ERROR, &quot; zResponseBuf is NULL &quot;) ;
      • return VT_FALSE;
      • }
      • // bOk = MyGlobalsHandle . SetAllToolsParams () ;
      • // if (! bOk )
      • // {MyGlobalsHandle . mOutObj . Print ( ERROR, &quot; SetAllToolsParams () Fail &quot;) ;
      • // }
      • MyGlobalsHandle . mOutObj . Print ( DEBUG, &quot; Running Tool % s &quot; ,S9K_TOOL_NAME ) ;
      • // Execute S9ktool
      • obRet = ( VTBoolean ) pFuncExec () ;
      • if (! obRet ) MyGlobalsHandle . PrintLastVTError () ;
      • MyGlobalsHandle . mOutObj . Print ( DEBUG,
      • &quot;--------------- End of TMN_S9KPutCompare ----------------- &quot;) ;
      • // bOk = MyGlobalsHandle . GetAllToolsParams ( zResponseBuf ) ;
      • // if (! bOk ) MyGlobalsHandle . PrintLastVTError () ;
      • return obRet;
      • }
    20. Example
      • //////////////////////////////////////////////////////////////////////////////
      • // \ A line starting with // \ is special comments for the Example . cpp program
      • // \ Following is the string that is used by our RCS automatic identifier :
      • // $GIFT - VT;Tool;generic$
      • // CExample . cpp
      • //
      • //****************************************************************************
      • // ( C ) COPYRIGHT INTEL CORPORATION . <2001> .
      • //
      • // You may not use, copy, modify, or transfer the program,
      • // or any copy, modification or merged portion, in whole,
      • // or in part,
      • // except as expressly provided for by license from Intel .
      • //
      • //****************************************************************************
      • //
      • // Contains : source for class CExample methods :
      • // Cto'r ( Constructor )
      • // Dto'r ( Destructor )
      • // CheckParams
      • // PrintHeader
      • // Execute
      • // RunTool
      • //
      • // V0 27 MAR 2001 Efi Rosental ?Creation?
      • // Author : Efi Rosental efi . [email_address] . com 04-865-5483
      • //
      • // Revision History : None
      • /*
      • * $Header : / afs / iil . intel . com / tmn / eng / tcg / TMN_TCG_4 / GIFT_FILES / Tools / Active / Aux / RCS / CExample . cpp,v 1.2 2001-02-19 02:20:52+02 cecp Exp $
      • * $RCSfile : CExample . cpp,v $
      • * $Revision : 1.2 $
      • * $Date : 2001-02-19 02:20:52+02 $
      • * $Id : CExample . cpp,v 1.2 2001-02-19 02:20:52+02 cecp Exp $
      • * $Log : CExample . cpp,v $
      • */
      • //////////////////////////////////////////////////////////////////////////////
      • /////////////////////////// @@ #include <stdlib . h>
      • // \Every Tool should include this on, for interface to the IDC provided VT ( libVTfuncs . so )
      • #include <vtFunctions . h>
      • // \Tools that need to call IFs from the added VT, the libExampleVTfuncs . so in out example
      • #include <vtExampleFunctions . h>
      • #include <CTimer . h>
      • #include &quot; CExample . h &quot;
      • static char * rcsid = &quot; $Id : CExample . cpp,v 1.2 2001-02-19 02:20:52+02 cecp Exp $ &quot; ;
      • static char * rcsrev = &quot; $Revision : 1.2 $ &quot; ;
      • // \Functions should look to the outside world as C language functions .
      • extern &quot; C &quot; {
      • VTBoolean Example_Check ( ParamsContainer & Container, char * zResponseBuf ) ;
      • VTBoolean Example_Run ( ParamsContainer & Container, char * zResponseBuf ) ;
      • }
      • //--------------------------------------------------------------------
      • // \ Check function is a must in each Tool source file . It checkes the parameters
      • // \ received from the server and errors are reported back to the server .
      • // Example_Check
      • //
      • // Purpose : To run &quot; check &quot; on parmeters ( used by server ).
      • //--------------------------------------------------------------------
      • VTBoolean Example_Check ( ParamsContainer & Container, char * zResponseBuf )
      • {
      • // \
      • CExample MyExample ( Container ) ;
      • return MyExample . CheckParams ( zResponseBuf ) ;
      • }
      • //--------------------------------------------------------------------
      • // \Run function is a must in each Tool source file . It runs Tool algorithm .
      • // Example_Run
      • //
      • // Purpose : To run the tool ( used by server ).
      • //--------------------------------------------------------------------
      • VTBoolean Example_Run ( ParamsContainer & Container, char * zResponseBuf )
      • {
      • CTimer Timer;
      • CExample MyExample ( Container ) ;
      • return MyExample . RunTool ( zResponseBuf ) ;
      • }
      • //--------------------------------------------------------------------
      • // Cto'r ( Constructor )
      • //--------------------------------------------------------------------
      • CExample :: CExample ( ParamsContainer & Container ): CBaseTool ( Container )
      • {
      • // \ FillToolParams, defined in CBaseTool . cpp, takes all parameters send
      • // \ from the server, and initializes the parameters
      • VTBoolean bOk = FillToolParams () ;
      • if (! bOk )
      • mOutObj . Print ( ERROR, &quot; CExample :: CExample () &quot;) ;
      • }
      • //--------------------------------------------------------------------
      • // Dto'r ( Destructor )
      • //--------------------------------------------------------------------
      • CExample :: ~CExample ()
      • {
      • }
      • //--------------------------------------------------------------------
      • // RunTool
      • //
      • // Purpose : Call Execute () and print the tool header .
      • //--------------------------------------------------------------------
      • VTBoolean CExample :: RunTool ( char * zResponseBuf )
      • {
      • PrintHeader () ;
      • /////////////////////////////// @@ call Run, which will call Execute per pattern
      • VTBoolean obRet = Execute () ;
      • mOutObj . Print ( INFORMATION,
      • &quot;--------------- End Example Tool run ----------------- &quot;) ;
      • return obRet;
      • }
      • //--------------------------------------------------------------------
      • // Execute
      • //
      • // Purpose : Run the tool algorithm .
      • // In this case it is just creating the CAddressCalc .
      • //--------------------------------------------------------------------
      • VTBoolean
      • CExample :: Execute ()
      • {
      • char zStringToUse [ MAX_NAME_LENGTH ] ;
      • VTBoolean ReturnValue;
      • mOutObj . Print ( REGULAR, &quot; This is just an Example Tool &quot;) ;
      • // \ print out current Pattern name .
      • // \ The following vtGetCurrentPatternName IF is found in the IDC provided VT,
      • // \ the libVTfuncs . so Shared Object ( Shared Library ):
      • ReturnValue = vtGetCurrentPatternName ( zStringToUse ) ;
      • if ( ReturnValue == VT_FALSE ) {
      • PrintLastVTError () ;
      • return VT_FALSE;
      • }
      • mOutObj . Print ( INFORMATION, &quot; Current Pattern Name % s &quot; ,zStringToUse ) ;
      • // \ print out current Tester's Software release .
      • // \ This vtExampleRun IF is found in the Example VT,
      • // \ the libExampleVTfuncs . so Shared Library, dropped in the same place
      • // \ as the libVTfuncs . so . Please note that the libExampleVTfuncs . so accesses
      • // \ the libVTfuncs . so file ( refer to its source ) taking vital papareters fro there .
      • ReturnValue = vtExampleRun ( zStringToUse ) ;
      • if ( ReturnValue == VT_FALSE ) {
      • PrintLastVTError () ;
      • return VT_FALSE;
      • }
      • mOutObj . Print ( INFORMATION, &quot; Tester version is : % s &quot; ,zStringToUse ) ;
      • return VT_TRUE;
      • }
      • //--------------------------------------------------------------------
      • // PrintHeader
      • //
      • // Purpose : Prints the parameters description and values
      • //--------------------------------------------------------------------
      • VTBoolean
      • CExample :: PrintHeader ()
      • {
      • mOutObj . Print ( REGULAR, &quot; ; Tool Example --- Begin Header ---&quot;) ;
      • // print CBaseTool parameters .
      • CBaseTool :: PrintHeader () ;
      • // print CExample tool parameters .
      • char zDescriptionBuf [ MAX_VALUE_CHARS ] ;
      • GetParamDescription ( FIRST_PARAM, zDescriptionBuf ) ;
      • mOutObj . Print ( REGULAR, &quot; ; %-45s : % d &quot; , zDescriptionBuf, mFirst ) ;
      • GetParamDescription ( SECOND_PARAM, zDescriptionBuf ) ;
      • mOutObj . Print ( REGULAR, &quot; ; %-45s : % s &quot; , zDescriptionBuf, msSecond . c_str ()) ;
      • GetParamDescription ( THIRD_PARAM, zDescriptionBuf ) ;
      • mOutObj . Print ( REGULAR, &quot; ; %-45s : % d &quot; , zDescriptionBuf, mThird ) ;
      • GetParamDescription ( OPTIONS, zDescriptionBuf ) ;
      • mOutObj . Print ( REGULAR, &quot; ; %-45s : % d &quot; , zDescriptionBuf, mOptions ) ;
      • GetParamDescription ( FIRST_OPTION, zDescriptionBuf ) ;
      • mOutObj . Print ( REGULAR, &quot; ; %-45s : % d &quot; , zDescriptionBuf, mFirstOption ) ;
      • GetParamDescription ( SECOND_OPTION, zDescriptionBuf ) ;
      • mOutObj . Print ( REGULAR, &quot; ; %-45s : % d &quot; , zDescriptionBuf, mSecondOption ) ;
      • mOutObj . Print ( REGULAR, &quot; ; ------------------------------------------ &quot;) ;
      • return VT_TRUE;
      • }
      • //--------------------------------------------------------------------
      • // CheckParams
      • //
      • // Purpose : check the parameters values received from the GUI .
      • // Output : print in to zResponseBuf the tool revition and an error
      • // message for each parameter found wrong .
      • // returns VT_FALSE if there is any .
      • //--------------------------------------------------------------------
      • VTBoolean
      • CExample :: CheckParams ( char * zResponseBuf )
      • {
      • if (! zResponseBuf ) {
      • // ERROR
      • return VT_FALSE;
      • }
      • sprintf ( zResponseBuf, &quot;% s; &quot; ,rcsrev ) ; // Return RCS rev
      • // Invoke CheckParams () of base classes
      • VTBoolean obRet = CBaseTool :: CheckParams ( zResponseBuf ) ;
      • // Then check the tool own parameters if any .
      • return obRet;
      • }
      • //--------------------------------------------------------------------
      • // FillToolParams
      • //
      • // Purpose : Get the parameters values from the GUI .
      • //--------------------------------------------------------------------
      • VTBoolean
      • CExample :: FillToolParams ()
      • {
      • char zValBuf [ MAX_VALUE_CHARS ] ;
      • try{
      • GetParamValue ( FIRST_PARAM, zValBuf ) ;
      • mFirst = atoi ( zValBuf ) ;
      • GetParamValue ( SECOND_PARAM, zValBuf ) ;
      • msSecond = zValBuf;
      • GetParamValue ( THIRD_PARAM, zValBuf ) ;
      • mThird = atoi ( zValBuf ) ;
      • GetParamValue ( OPTIONS, zValBuf ) ;
      • mOptions = atoi ( zValBuf ) ;
      • GetParamValue ( FIRST_OPTION, zValBuf ) ;
      • mFirstOption = atoi ( zValBuf ) ;
      • GetParamValue ( SECOND_OPTION, zValBuf ) ;
      • mSecondOption = atoi ( zValBuf ) ;
      • }
      • catch ( char * zError ) {
      • mOutObj . Print ( ERROR, &quot;% s &quot; ,zError ) ;
      • return VT_FALSE;
      • }
      • return VT_TRUE;
      • }

    + stn_tkillerstn_tkiller, 4 years ago

    custom

    2428 views, 0 favs, 0 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 2428
      • 2428 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories