Email Print

GFDK ADI FAQ

Questions

  1. How do I build a GFDK ADI program?
  2. How do I register a GFDK ADI program with GeoFrame?
  3. How do I run a GFDK ADI program?
  4. Why can't I pass a string to GeoFrame… why do I need to use utl_Save?
  5. How do I free memory allocated with utl_Save and utl_AllocBlock?
  6. Where can I get more information on ValueTypes?
  7. Where can I get more information on CSL Utilities?
  8. How do I retrieve the vector length for a Line_Annotation_PointV_t object?
  9. How do I build my GFDK program as a library instead of an executable?

Answers

  1. If you have properly setup your development environment, you should be able to type the following in your GeoFrame xterm:

    > gbuild -update bin/

    Please see GFDK Course for more details.

  2. To register your program, you should make an .sql file based on $GF_PATH/gf_school/gfdk_well_example.sql, then at a GeoFrame xterm type the following:

    > setenv TWO_TASK
    > sqlplus proj_name/proj_passwd

    At the SQL prompt,

    SQL> @
    .sql catalog_name
    SQL> exit

    Please see GFDK Course for more details.

  3. Assuming that you have built and registered your program correctly, you should be able to perform the following steps:

    - Launch Proman
    - Connect to your project
    - Launch Application Manager
    - Launch Process Manager
    - In Process Manager, hit File->New Activity
    - Click the Catalog Builder icon
    - In Catalog Builder, hit the Show All… button
    - Find your GFDK ADI program and hit OK
    - Hit Export and hit OK in the Confirm popup
    - To run your program, hit MB3 on the module and select Run

    Please see GFDK Course for more details.

  4. GeoFrame needs strings and other data types to be registered in GeoFrame's memory space, thus instead of calling aqi_PutAttributes or aqi_CreateDI with an argument "MyString", you should do the following:

    String_t mystring = utl_Save("MyString");

    aqi_CreateDI(… qName, mystring, …, NULL);

    Note: You should not free the allocated memory from utl_AllocBlock or utl_Save until you are done using this GeoFrame memory. So, if you write some data to the GeoFrame database and then access the data later in your program, you should not free the allocated memory until you are done accessing the data.

  5. Use the utl_FreeBlock API.

  6. Please see the ValueTypes (VT) Reference Manual on the GFDK Bookshelf.

  7. Please see the CSUTIL Reference Manual on the GFDK Bookshelf.

  8. If you don't have VECTOR_LENGTH defined in your code, write the following:

    #define VECTOR_LENGTH(VECTOR, TYPE) ( VECTOR != 0 ? \

    UTL_MEM_BUF_SIZE(VECTOR)/sizeof(TYPE):\

    0 )

    Line_Annotation_PointV_t lineAnnotationPoints = NULL;

    Int32_t numAnnotationPoints = 0;

    aqi_GetAttributes( lineAnnotationDI, NULL, &adiStatus,

    qAnnotation_Points, &lineAnnotationPoints,

    (vt_Atom_t)NULL );numAnntationPoints = VECTOR_LENGTH(lineAnnotationPoints, Line_Annotation_Point_t);

  9. Create a .pkg_def instead of a .lnk_def. in the .pkg_def put the following:

    EXPORT_OBJECT = gf_school/<your_main_source_file>.o

    REFERENCE = wk_adi/adipkg

    NOTE: Any GeoFrame packages you include in your .pkg_def will need to be activated in your initialization functions in your source using pkg_ActivateImage, so for this example, pkg_ActivateImage(adipkg_GetImageHeader(), 0);

Request More Information