Returns the datatype for the specified data item.
SMC_RETURN_CODE smc_get_dataitem_type (SMC_DATAITEM_STRUCTP dataItemHandle, SMC_DATAITEM_TYPEP ptrType)
pointer to data item and statistical type.
pointer to data value type.
Return value |
Indicates |
---|---|
SMC_RET_SUCCESS |
Function succeeded. |
SMC_RET_FAILURE |
Function failed. |
SMC_DATAITEM_STRUCT dataItem = { SMC_NAME_PAGE_LOGICAL_READ, SMC_STAT_VALUE_SAMPLE }; SMC_DATAITEM_STRUCTP dataItemHandle = &dataItem; SMC_DATAITEM_TYPE dataItemType; SMC_DATAITEM_TYPEP dataItemTypeHandle = &dataItemType;
if (smc_get_dataitem_type(dataItemHandle, dataItemTypeHandle) != SMC_RET_SUCCESS) { printf("smc_get_dataitem_type failed\n"); /* do some cleanup */ }
The data item types are as follows:
Data item type |
Description |
---|---|
SMC_DI_TYPE_CHARP |
Pointer to a character string. |
SMC_DI_TYPE_DATIM |
Sybase date and time. |
SMC_DI_TYPE_DOUBLE |
Double-precision floating-point number. |
SMC_DI_TYPE_ENUMS |
An enumerated datatype, specific to the data item. Enumerated types are defined in the mctype.sh include file and in Appendix B, “Datatypes and Structures”. |
SMC_DI_TYPE_INT |
Integer. |
SMC_DI_TYPE_LONG |
Long integer. |
If you supply a data item and statistical type that Monitor Client Library does not support, the output parameter type is set to SMC_DI_TYPE_NONE.
smc_create_view