DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Developing for DMI-enabled systems

Instrumentation code

The DMI package provides several procedures that facilitate the writing of instrumentation code, and several examples of instrumentation code that use these procedures. The DMI procedure libraries provide procedures for installing a component, invoking the Service Provider and accessing attributes. These procedures are introduced in Intro(3dmi). Implementation-specific issues for instrumentation code are included in ``Implementation specific details''. The rest of this Instrumentation code section summarizes the general issues and requirements for instrumentation code.

Component Providers

Instrumentation code must provide only one value at a time when invoked by the Service Provider. To be accessed by the Service Provider, all instrumentation code must support the following DMI functions as entry points:

The Service Provider supports the following DMI functions as entry points to be accessed by Component Providers: Use the code sample programs as the basis for your instrumentation code. See ``DMI 2.0 code samples'' for more information about code samples in this package.

Event Generators and Indication Consumers

Event Generators must utilize the Service Provider entry point, the DmiOriginateEvent(3dmi) function. Indication consumers, such as management applications, should provide functions for Event Delivery; for more information, see Section 7.1 in the DMI Specification.

Instrumentation development

Each instrumented component must register with the Service Provider as a direct interface. If you specify the keyword DIRECT-INTERFACE in the Path statement of the MIF file, the Service Provider can return an appropriate error if attributes are accessed while the direct interface program is not running.

Components must register by calling the Component Interface's Register function, DmiRegisterCi(3dmi), before doing anything else. In registering, the component passes its entry point to the Service Provider. The Service Provider passes control to the direct interface program when it needs to access the attribute value. When it unloads, a direct interface program must unregister with the Service Provider. The instrumentation code samples included with this package demonstrate how to do this.

Before installing your component into the Service Provider's MIF database and registering it, verify that the component has not already been installed or registered with the Service Provider.

To identify which ComponentID in the current MIF database belongs to your component, use the DmiListComponents(3dmi) function to list the components and search the list for the component class string that matches your component. These methods are demonstrated in the instrumentation code samples described in ``DMI 2.0 code samples''.


Next topic: Installing your component
Previous topic: Enabling manageable products for DMI

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004