For Eos System Developer

Content


Eos Enviroment Setting

  1. Eos default setting
    EOS_HOME
    Eos home directory
    EOS_HOST
    Eos working station type
  2. When you want to create a new tool on another Eos,
    EOS_ANOTHER_HOME
    Anonther Eos home directory

When you create a new tool,

Rule
  1. create new directories and proto-type source codes
    $ maketool classname toolname new
  2. change a working directory.
    $ cd $EOS_HOME/src/Tools/classname/toolname/src
  3. When you want to add new arguments, you need to modify a file of ../Config/OptionControlFile .
    Now we are creating a interactive tool, makeOptionControlFile. Wait a moment please.
  4. If you modify a file of OptionControlFile, you must update your new source codes.
    $ make update
  5. modify toolname.c (a main-source file)
    This step is essential but cannot be auto-made.
  6. check file-dependency.
    $ make depend
  7. build a new tool
    $ make
  8. fix bugs in a main-source file.
    This step is essential, too. It may take many hours to fix bugs. Eos supplies some techniques for the purpose of quick bug-fix, while the bug-fix step cannot be auto.
  9. install a new tool
    $ make install

When you create a new object

  1. protoObjectMethodCreate

Control File Format

This control file is used to generate prototype-source code.

Main Source File


Some Techiniques for Quick Bug-fix

  1. DEBUGPRINT function (#include "genUtil.h")

    Example

    If you begin to debug programs,

    #define DEBUG
    #include "genUtil.h"
    
    ................
    DEBUGPRINT("This step is OK");
    DEBUGPRINT1("This step is OK: %ld \n", mode);
    ................
    
    DEBUGPRINT6("This step is OK: %ld %ld %ld %ld %ld %ld\n", mode1, mode2, mode3, mode4, mode5, mode6);
    ................
    
    or
    
    #define DEBUG2
    #include "genUtil.h"
    
    ................
    DEBUG2PRINT("This step is OK");
    DEBUG2PRINT1("This step is OK: %ld \n", mode);
    ................
    
    DEBUG2PRINT6("This step is OK: %ld %ld %ld %ld %ld %ld\n", mode1, mode2, mode3, mode4, mode5, mode6);
    ................
    

    If you finish to debug programs,

    #undef DEBUG or #undef DEBUG2
    #include "genUtil.h"
    
    ................
    DEBUGPRINT("This step is OK");
    DEBUGPRINT1("This step is OK: %ld \n", mode);
    ................
    
    DEBUGPRINT6("This step is OK: %ld %ld %ld %ld %ld %ld\n", mode1, mode2, mode3, mode4, mode5, mode6);
    ................
    
    

    2. How to use gdb.

    Example (core analysis)

    	OS: HP, Order: mrcImagePrint -i test -o test2
    
    	gdb ~/Eos/bin/HP/mrcImagePrint.HP core
    
    	or
    
    	gdb ~/Eos/bin/HP/mrcImagePrint.HP
    	run -i test -o test2
    
    	(command list)
    	where
    	list 
    	up, down
    	print
    	break
    	next
    	

    3. Log print

    Example

    	#define LOGPRINT4(fpt,ID,ID2,x,d1,d2,d3,d4) \
    	fprintf(fpt, "%-6s %-15s ",ID,ID2); \
    	fprintf(fpt, x, d1,d2,d3,d4); \
    	fprintf(fpt, "\n"); fflush(fpt); \
    	fprintf(stdout, "%-6s %-15s ",ID,ID2); \
    	fprintf(stdout, x, d1,d2,d3,d4); \
    	fprintf(stdout, "\n"); fflush(stdout);