DbtuFpsLib is a library released under the
GNU Lesser General Public License.
The sample implementation dbtuwho is released under the
GNU General Public License.
When I started with the developement of dbtuwho, I tryed to use the new so
called "self-describing data stream". The first job was to check
the status of the monitor switches. With the old "fixed size
structures" in mind I wasn't glad about the more of coding to get the
needed informations.
So I decided to build up an layer between the calling application and the
"self-describing data stream". The idear was to combine
- The advantages of the old model (keyword: the structure is the unique
index!)
- The informations and adaptiveness of the new model
The result is the FPS (Flow of Pointer Structs) model.
Figure 1: Illustrates the type of use of the DbtuFpsLib
In an typical scenario for the DbtuFpsLib a program takes an snapshot
using the offical API function db2GetSnapshot(). The results are stored
in the output buffer. Within this buffer the data is organized in a
unsorted
*) sequence of sqlm_header_info (one per group)
and sqlm_header_data (one per element) structs.
The next step is to call the FPS library function DbtuFps_BuildUp(). This
function walks through the given output buffer and builds up the FPS buffer.
The FPS buffer always starts with an sFpsInfoStruct_Begin struct and ends
with an sFpsInfoStruct_End struct - in between the sFpsDataStruct_* structs
are placed. Every sFpsDataStruct_* struct stands for a group of elements
(like in the fixed structure method, defined in DB2 Version 5 and lower)
and contains pointers to the data fields within the output buffer.
In a last step the calling program processes the FPS buffer and navigates
through the collected data group-/structwise. Within the group/struct the
elements can directly accessed using its name (defined in the struct).
More details can be found in the header file MyDbtuFps.h
*)Only within the same level the data can be unsorted.
When you have further neads, comments, found bugs or something else,
please feal free to
contact
me.
-> Positive feedback is good for motivation, constructive feedback
is good for the product!