BioAPI Reference Implementation: Using

Now that you've got your framework installed, and the password BSP and sample app running, you will want to develop your own BSP or application. The examples provided should give you a pretty good idea of how to proceed, but we'll point out some of the important points here.

Applications

The sample app project (/apps/sample/win32/) is a good place to start. The main things that an application needs to do are:
  1. Include the bioapi.h file. This includes all other important header files required for most applications. Every application will require this.
  2. Include the bioapi_schema.h file. This defines the BSP schema structures and the BioAPI_EnumModules function, required for querying the MDS. Almost every application will require this.
  3. Define a set of application memory functions, according to the definitions in bioapi_type.h. These functions will be used by the BSPs to allocate memory from the application heap, rather than their own internal heaps. Alternately, if you have no special memory requirements, you may be able to use the default functions defined in bioapi_util.h, and provided in the bioapi_util.lib static link library.
  4. Implement the calls into the BioAPI framework required by your application.
  5. It is expected that most applications will want to link with the bioapi100.lib stub library, which will allow applications to automatically link dynamically with the framework. It is also possible for an application to load the framework dynamically for itself, and functions may some day be added to the bioapi_util static link library to make this easier.

BSPs

A BSP has somewhat more stringent requirements than an application. BSP developers should review section 4.2 of the specification for details.

The dummy addin project (/addins/bioapi_dummy_addin/) is a good place to start. The main things are:

  1. Include the biospi.h file. This includes all other important header files required for most BSPs. Every BSP will require this.
  2. Copy the maf_config.h file from the sample addin and modify to insert the BSP-specific options. Among the details to be specified:
  3. Provide an installation function. This is generally managed by simply copying, and possibly slightly modifying, the install.c file from the dummy addin.
  4. Define and implement the interface to be provided by the BSP. bioapi_dummy_addini.c contains a skeleton implementation of all available SPI functions. A particular BSP may implement as many or as few of these functions as desired, subject to the requirements laid out in section 4.2 of the specification.
  5. Copy mod_manage.c from the dummy addin and make any required changes.
  6. It is expected that most BSPs will want to link with the bioapi_util.lib static link library. Among other things, the default install.c makes use of functions provided in this library, and will cause link errors if it is not included.

< Prev  Next >