.:idlwrapper:home

From ADPAA
Jump to navigation Jump to search

IDL Wrapper Code

To produce a wrap around code it is necessary to identify which program is being modified to produce the new program. For simplicity and the sake of this example, assume the program being modified is old_program and the program being produced is titled new_program.

  • Create directory for new_program.
        ex. mkdir /usr/local/ADPAA/Level_2/new_program
  • Copy all needed files from old_program into the new_program directory. Files of particular interest are:
 old_program
 old_program_compile.idl
 old_program_recompile.idl 
 start_old_program.
  • The old_program file must be modified.
  1. Make sure the name of the copied file is changed to new_program.
  2. Edit new_program by changing all instances of old_program to new_program.
  3. Modify the new_program comment section and meta-data appropriately.
  4. Make sure the code calls new_program_compile.idl
  • Create new_program_compile.idl
  1. Copy old_program_compile.idl to new_program directory and rename it.
    * ex. cp /usr/local/ADPAA/src/Level2/old_program/old_program_compile.idl/usr/local/ADPAA/src/Level2/new_program/new_program_compile.idl
  2. Edit new_program_compile.idl using the same directions followed previously in step 2 of modifying old_program.
  3. Edit new_program_compile.idl comments and header information appropriately.
  4. Make sure the code calls new_program_recompile.idl and START_NEW_PROGRAM.
  • Modify new_program_recompile.idl
  1. Copy old_program_recompile.idl to new_program directory and rename it.
    * ex. cp /usr/local/ADPAA/src/Level2/old_program/old_program_recompile.idl/usr/local/ADPAA/src/Level2/new_program/new_program_recompile.idl//
  2. Modify code by changing instances where old_program exists with new_program.
  3. This specific subroutine is responsible for compiling all IDL code used by the new_program.
  4. This subroutine consists primarily of .rnew lines and one .run line. Remove each of them and look in the new_program directory. For every *.pro file, type a .rnew line and list the files alphabetically. Also make sure a .run start_new_program line is present at the end of the program. This will be the next program to be edited.
  • Repeat above procedure regarding the deleting of all instances where old_program appears and change it to new_program. Make sure all files called by START_NEW_PROGRAM are modified appropriately.
  • Test and debug new_program.