Data structure for a Performance Services method.

typedef struct _DCIMethod {
  uint32              size;    /*  Method structure size in bytes. */
  uint32              type;    /*  Type of method. */
  UMAElementDescr     method;  /*  The variable-length descriptor for type. */
  UMAValLenData       data;    /*  Data for the method. */
} DCIMethod;

typedef   DCIMethod   * DCIMethod ;

The process by which Performance Services retrieves metric information and the provider specifies metric information is called a method. The provider must define and provide the method at registration. The DCIMethod structure is used to define the method. The method can be registered in either the lowest class level in a class with dciRegister, or the lowest instance level with dciAddInstance or dciEZRegister.

If a method is defined in both the class and instance of a metricid, the instance method takes precedence. A metric itself is never stored in the name space; only the method to retrieve it is stored.

DCI_SPI_NAME Methods

The DCI_SPI_NAME method is used when providers supply a shared library as an interface to obtain and prepare information. The method field within the DCIMethod structure for the DCI_SCP_NAME method consists of a null-terminated ASCII string which contains the library name, followed by a null-terminated ASCII string which contains the function name. Providers must specify the functions they support in the type field. For example, DCI_OPEN, DCI_GETDATA, DCI_LISTINSTANCEID, DCI_GETINSTATTR, and DCI_CLOSE might be selected by a provider who had setup and cleanup to do prior to being called for data. DCI_VOLATILE would designate a method which returned valid metric ids for volatile instances and their instance attributes (because their identifiers are too volatile to list separately in the name space). Tasks and threads need to support DCI_VOLATILE due to their dynamic nature.

See DCI_SPI_NAMEfunctionname for the invocation parameters of a DCI_SPI_NAME function .

DCI_SPI_RPC Methods

The DCI_SPI_RPC method is used by providers who want Performance Services to establish a communication path between the consumer's address space and the provider's address space in order to call a provider-supplied function within the provider's adddress space to obtain the data information for the metric id registered. The provider's function accepts as input the metricid, userword, calltype and datasize it passed at registration time, as well as the return buffer obtained for its use by Performance Services. The DCI_SPI_RPC method is the only method supported by the dciEZRegister API. The DCI_SPI_RPC method only supports the calltype of DCI_GETDATA. Performance Services keeps a table with the metricid, metricidstr, function address, userword, calltype, and datasize passed at registeration time which is checked by Performance Services during a data request.

See DCI_SPI_NAMEfunctionname for the invocation parameters of a DCI_SPI_RPC function .


[Back: DCILocalExt Field - data]
[Next: DCIMethod Field - size]