Laserfiche WebLink
Low-level DMI Library <br />In order to provide the maximum flexibility during development as well as to limit duplicate efforts, <br />a library of low-level DMI routines has been developed. Because the database is queried with <br />ESQL, these routines have been written in C. At the lowest level, these routines grab one piece of <br />information. At a higher level, utility routines return more information. For example, the <br />DMIGetTS <br /> routine returns a time series, but may call several other routines to get information about <br />the time series. The number and function of these routines is defined by the model needs. The <br />performance of these routines will be fine-tuned according to how the data are stored in the database. <br />DMI DMI <br />See the man page for for information about the library. <br />It is anticipated that a need will arise for routines to place data back in the CRDSS database. <br />However, this need should not arise until the development of the scenario database is undertaken in <br />Year 2. During Year 1, CRDSS data have been updated using database administration tools, such as <br />INFORMIX 4GL. However, a library of low-level D MI write routines can be developed using the <br />same procedures as the read routines. <br />All low-level DMI routines are archived in a single library file. As discussed in Task Memoranda <br />1.05-9, 1.05-16, 1.05-17, and 1.05-18, this library is used by higher-level DMI routines and display <br />routines. <br />Definition of Data Objects <br />The definition of data objects that are handled by DMI routines is made when the database design <br />has been completed and when the model needs are fully identified. Data objects are either <br />C structures defined as data types (using ?typedef?) or are C++ classes. Regardless of form, data <br />objects are well-documented in UNIX man pages. Hopefully, the data types will not change, <br />although their contents may change. For example, a ?Station? data type will remain the same; <br />however, the data within the station data type may change based on database contents and other <br />needs. Consequently, a change in a data object will require a recompile of all code (header files will <br />contain object definitions). <br />The low-level DMI routines operate on the data objects that have been defined. The database side of <br />the routine uses ESQL to access the database. The application side of the DMI routine stores the <br />data in the object that is appropriate. Data objects should not depend on a specific database or model <br />data object. This allows the database and models to evolve while the data objects remain fairly <br />stable. For example, the water rights planning model may have a predefined ?Diversion? data type. <br />However, this data type may not have the same contents of the CRDSS database. The data object <br />used by DMI routines is a more generic ?Diversion? data type. The DMI utility decides what data <br />are to be used from this data type, and how they are to be formatted. <br />Responsibility for Developing Low-level DMI Library <br />The majority of low-level ESQL work has been done at RTi. The library of routines created in this <br />effort has been documented and is available to other developers. Utility routines that use larger data <br />items (data that have inheritance features) may require programming efforts by CSU team members <br />who are working on specific models. <br />3 <br />A275 01.08.95 1.05-8 Malers <br />