![]() | ![]() |
Home |
|
|
Adaptive Server Enterprise Monitor Client-Library Programmer's Guide |
|
| Appendix B: Datatypes and Structures |
Table B-1 lists Monitor Client Library type constants with descriptions and their corresponding C or Open Client datatypes.
|
| Corresponding |
|---|---|---|
SMC_ALARM_ACTION_TYPE | Specifies the type of action to take when an alarm is triggered | None |
SMC_ALARM_ID | Alarm identifier | size_t |
SMC_ALARM_IDP | Pointer to alarm identifier | size_t* |
SMC_BOOL | Boolean | int |
SMC_CHAR | Character | char |
SMC_CHARP | Character pointer | char* |
SMC_CHARPP | Pointer to character pointer | char** |
SMC_CCHARP | Constant character pointer | CS_CONST char* |
SMC_CLOSE_TYPE | Specifies an option when closing a Adaptive Server Enterprise Monitor connection | None |
SMC_COMMAND_ID | Command identifier | size_t |
SMC_COMMAND_IDP | Pointer to command identifier | size_t* |
SMC_CONNECT_ID | Connection identifier | size_t |
SMC_CONNECT_IDP | Pointer to connection identifier | size_t* |
SMC_DATETIME | Date and time | CS_DATETIME |
SMC_DATAITEM_NAME | Identifies a particular piece of performance data that Monitor Client Library is to obtain | None |
SMC_DATAITEM_NAMEP | Pointer to SMC_DATAITEM_NAME | None |
SMC_DATAITEM_STATTYPE | Identifies what normalization, if any, Monitor Client Library should perform on data | None |
SMC_DATAITEM_STRUCT | Identifies data that Monitor Client Library is to obtain | None |
SMC_DATAITEM_STRUCTP | Pointer to SMC_DATAITEM_STRUCT | None |
SMC_DATAITEM_TYPE | Identifies data type of data that Monitor Client Library obtains | None |
SMC_DATAITEM_TYPEP | Pointer to SMC_DATAITEM_TYPE | None |
SMC_DOUBLE | Double precision floating point | double |
SMC_DOUBLEP | Pointer to double precision | double* |
SMC_ERR_SEVERITY | Indicates the degree of severity of an error | None |
SMC_FILTER_ID | Filter identifier | size_t |
SMC_FILTER_IDP | Pointer to filter identifier | size_t* |
SMC_FILTER_TYPE | Specifies the type of filter to create with smc_create_filter | None |
SMC_HS_ESTIM_OPT | Specifies whether, in playback of historical performance data, to authorize estimation of data that cannot be calculated reliably from the available recorded data | None |
SMC_HS_MISSDATA_OPT | Specifies whether, in playback of historical performance data, a sample should be returned for a period of time for which no data is available | None |
SMC_HS_PLAYBACK_OPT | Specifies whether playback of historical performance data should be normalized or summarized or both | None |
SMC_HS_SESS_DELETE_OPT | Specifies whether to delete data files associated with a Historical Server session | None |
SMC_HS_SESS_ERR_OPT | Specifies whether a recording session should continue after an error | None |
SMC_HS_SESS_PROT_LEVEL | Specifies whether the data in a recording session should be accessible to other users | None |
SMC_HS_SESS_SCRIPT_OPT | Specifies whether to create a script to create tables corresponding to the views in a recording session | None |
SMC_HS_TARGET_OPT | Specifies whether playback of historical performance data should be sent to the client application, or used to create a new session | None |
SMC_INFO_TYPE | Specifies the type of information to request in a call to smc_get_command_info | None |
SMC_INT | Integer | int |
SMC_INTP | Pointer to integer | int* |
SMC_LOCK_RESULT | Identifies the possible outcomes of a lock request | None |
SMC_LOCK_RESULT_SUMMARY | Identifies the two major categories of outcomes of a lock request | None |
SMC_LOCK_STATUS | Identifies the possible statuses of a lock or lock request | None |
SMC_LOCK_TYPE | Identifies the granularity and exclusivity of a lock | None |
SMC_LONG | Long | long |
SMC_LONGP | Pointer to long | long* |
SMC_OBJ_TYPE | Identifies the type of an object in an Adaptive Server database | None |
SMC_PROC_STATE | Identifies the possible statuses of an Adaptive Server process | None |
SMC_PROP_ACTION | Specifies the action to take in a call to smc_connect_props | None |
SMC_PROP_TYPE | Specifies the property that is the object of a call to smc_connect_props | None |
SMC_RETURN_CODE | Indicates whether a Monitor Client Library operation succeeded, and, if not, what error occurred | None |
SMC_SERVER_MODE | Specifies whether a Adaptive Server Enterprise Monitor connection is to obtain live performance data or whether to manipulate historical data | None |
SMC_SESSION_ID | Session identifier | size_t |
SMC_SESSION_IDP | Pointer to session identifier | size_t* |
SMC_SIZET | unsigned integer | size_t |
SMC_SIZETP | Pointer to unsigned integer | size_t* |
SMC_SOURCE | Indicates the software layer that detected an error | None |
SMC_VALUE_UNION | Structure containing data | None |
SMC_VALUE_UNIONP | Pointer to SMC_VALUE_UNION | None |
SMC_VIEW_ID | View identifier | size_t |
SMC_VIEW_IDP | Pointer to view identifier | size_t* |
SMC_VOID | Void | void |
SMC_VOIDP | Pointer to void | void* |
The rest of this appendix describes individual datatypes that have no equivalent in C or Open-Client Client Library.
An enum to identify the type of action taken when an alarm is triggered:
SMC_ALARM_A_EXEC_PROC |
SMC_ALARM_A_LOG_TO_FILE |
SMC_ALARM_A_NOTIFY |
An enum used to identify the extent of a close command:
SMC_CLOSE_REQUEST |
An enum used in conjunction with smc_create_view to specify performance data. See Chapter 2, "Data Items and Statistical Types," for a list of the available data items.
An enum used in conjunction with smc_create_view to identify statistical type and accumulation interval of performance data.
SMC_STAT_VALUE_SAMPLE |
SMC_STAT_VALUE_SESSION |
SMC_STAT_RATE_SAMPLE |
SMC_STAT_RATE_SESSION |
SMC_STAT_AVG_SAMPLE |
SMC_STAT_AVG_SESSION |
A structure used in conjunction with smc_create_view to identify performance data.
typedef struct SMC_DATAITEM_STRUCT{ | ||
|---|---|---|
SMC_DATAITEM_NAME | dataItemName; | |
SMC_DATAITEM_STATTYPE | dataItemStatType; | |
} SMC_DATAITEM_STRUCT; | ||
An enum used in conjunction with smc_get_dataitem_type to identify physical type of performance data results:
SMC_DI_TYPE_NONE |
SMC_DI_TYPE_CHARP |
SMC_DI_TYPE_DATIM |
SMC_DI_TYPE_DOUBLE |
SMC_DI_TYPE_ENUMS |
SMC_DI_TYPE_INT |
SMC_DI_TYPE_LONG |
An enum used in conjunction with smc_get_command_info to identify the severity of an error, warning, or informational notification.
SMC_ERR_SEV_INFO |
SMC_ERR_SEV_WARN |
SMC_ERR_SEV_FATAL |
An enum to identify the types of filters:
SMC_FILT_T_EQ |
SMC_FILT_T_NEQ |
SMC_FILT_T_GE |
SMC_FILT_T_LE |
SMC_FILT_T_GE_AND_LE |
SMC_FILT_T_TOP_N |
An enum to specify whether to allow certain data to be estimated during a playback session.
SMC_HS_ESTIM_ALLOW |
SMC_HS_ESTIM_DISALLOW |
An enum to specify what action Historical Server should take if a given sample during a playback session has no performance data to play back:
SMC_HS_MISSDATA_SHOW |
SMC_HS_MISSDATA_SKIP |
An enum to specify whether data for a playback session should be normalized, summarized, or both.
SMC_HS_PBTYPE_ENTIRE |
SMC_HS_PBTYPE_ACTUAL |
SMC_HS_PBTYPE_INTERVAL |
SMC_HS_PBTYPE_RAW |
An enum to specify whether to delete data files associated with a Historical Server connection.
SMC_HS_SESS_DELETE_FILES |
SMC_HS_SESS_RETAIN_FILES |
An enum to specify what action Historical Server should take if a recording session encounters non-fatal errors:
SMC_HS_SESS_ERR_CONT |
SMC_HS_SESS_ERR_HALT |
An enum to specify the protection level for access to performance data recorded by Historical Server:
SMC_HS_SESS_PROT_PRIVATE |
SMC_HS_SESS_PROT_PUBLIC |
An enum to specify the type of script (if any) that Historical Server should create to help the user to manipulate the performance data of a recording session:
SMC_HS_SESS_SCRIPT_SYBASE |
SMC_HS_SESS_SCRIPT_NONE |
An enum to specify whether the playback session will return data to the application or whether playback will create a new session on Historical Server:
SMC_HS_TARGET_CLIENT |
SMC_HS_TARGET_FILE |
An enum to identify the various pieces of data that are available for querying from a callback function, using smc_get_command_info:
SMC_INFO_ALARM_ACTION_DATA |
SMC_INFO_ALARM_ALARMID |
SMC_INFO_ALARM_CURRENT_VALUE |
SMC_INFO_ALARM_DATAITEM |
SMC_INFO_ALARM_ROW |
SMC_INFO_ALARM_THRESHOLD_VALUE |
SMC_INFO_ALARM_TIMESTAMP |
SMC_INFO_ALARM_VALUE_DATATYPE |
SMC_INFO_ALARM_VIEWID |
SMC_INFO_ERR_MAPSEVERITY |
SMC_INFO_ERR_MSG |
SMC_INFO_ERR_NUM |
SMC_INFO_ERR_SEVERITY |
SMC_INFO_ERR_SOURCE |
SMC_INFO_ERR_STATE |
An enum to identify results of a lock request:
SMC_LOCK_R_GRANTED |
SMC_LOCK_R_NOTNEEDED |
SMC_LOCK_R_WAITED |
SMC_LOCK_R_DIDNTWAIT |
SMC_LOCK_R_DEADLOCK |
SMC_LOCK_R_INTERRUPTED |
An enum to identify whether the lock request was granted or not granted:
SMC_LOCK_RS_GRANTED |
SMC_LOCK_RS_NOTGRANTED |
An enum to identify the status of a lock:
SMC_LOCK_S_HELD_BLOCKING |
SMC_LOCK_S_HELD_NOTBLOCKING |
SMC_LOCK_S_REQUESTED_BLOCKED |
SMC_LOCK_S_REQUESTED_NOTBLOCKED |
An enum to identify lock types:
SMC_LOCK_T_EX_TAB |
SMC_LOCK_T_SH_TAB |
SMC_LOCK_T_EX_INT |
SMC_LOCK_T_SH_INT |
SMC_LOCK_T_EX_PAGE |
SMC_LOCK_T_SH_PAGE |
SMC_LOCK_T_UP_PAGE |
An enum to identify object types:
SMC_OBJ_T_STP |
SMC_OBJ_T_TBL |
An enum to identify process states:
SMC_PROC_STATE_ALARM_SLEEP |
SMC_PROC_STATE_BACKGROUND |
SMC_PROC_STATE_BAD_STATUS |
SMC_PROC_STATE_INFECTED |
SMC_PROC_STATE_LOCK_SLEEP |
SMC_PROC_STATE_RECV_SLEEP |
SMC_PROC_STATE_RUNNABLE |
SMC_PROC_STATE_RUNNING |
SMC_PROC_STATE_SEND_SLEEP |
SMC_PROC_STATE_SLEEPING |
SMC_PROC_STATE_STOPPED |
SMC_PROC_STATE_TERMINATING |
SMC_PROC_STATE_YIELDING |
SMC_PROC_STATE_REMOTE_IO |
SMC_PROC_STATE_SYNC_SLEEP |
An enum used to identify the desired action of an smc_connect_props function call:
SMC_PROP_ACT_SET |
SMC_PROP_ACT_GET |
SMC_PROP_ACT_CLEAR |
An enum used to identify the property to operate on in a call to smc_connect_props:
SMC_PROP_APPNAME |
SMC_PROP_ERROR_CALLBACK |
SMC_PROP_IFILE |
SMC_PROP_LOGIN_TIMEOUT |
SMC_PROP_PACKETSIZE |
SMC_PROP_PASSWORD |
SMC_PROP_SERVERMODE |
SMC_PROP_SERVERNAME |
SMC_PROP_TIMEOUT |
SMC_PROP_USERDATA |
SMC_PROP_USERNAME |
An enum to identify the types of return codes:
SMC_RET_SUCCESS |
SMC_RET_FAILURE |
SMC_RET_INSUFFICIENT_MEMORY |
SMC_RET_CONNECTION_ERROR |
SMC_RET_UNABLE_TO_CONNECT_TO_SMS |
SMC_RET_UNABLE_TO_CONNECT_TO_SS |
SMC_RET_MISSING_RESULT_TABLE |
SMC_RET_INVALID_USER_PASSWD |
SMC_RET_INVALID_PARAMETER |
SMC_RET_INVALID_CACHE |
SMC_RET_INVALID_DCID |
SMC_RET_INVALID_COMMAND |
SMC_RET_INVALID_VIEWID |
SMC_RET_INVALID_DINAME |
SMC_RET_INVALID_DISTAT |
SMC_RET_INVALID_DI_STRUCT |
SMC_RET_DI_STAT_MISMATCH |
SMC_RET_INVALID_DI_COMBO |
SMC_RET_INVALID_DATATYPE |
SMC_RET_INVALID_VALUE_COUNT |
SMC_RET_INVALID_FILTER_VALUE |
SMC_RET_INVALID_FILTER_RANGE |
SMC_RET_DATAITEM_CONTAINS_FILTER |
SMC_RET_INVALID_COMPOSITE_FILTER |
SMC_RET_INVALID_SVR_MODE |
SMC_RET_MISSING_DATAITEM |
SMC_RET_INVALID_FILTERID |
SMC_RET_INVALID_ALARMID |
SMC_RET_INVALID_ALARM_VALUE |
SMC_RET_INVALID_DINAME_FOR_ALARM |
SMC_RET_INVALID_API_FUNC_SEQUENCE |
SMC_RET_INVALID_API_FUNCTION |
SMC_RET_INVALID_PROPERTY |
SMC_RET_INVALID_INFOTYPE |
SMC_RET_CONNECT_NOT_CLOSED |
SMC_RET_ARITHMETIC_OVERFLOW |
SMC_RET_LOGIN_LACKS_SA_ROLE |
SMC_RET_INTERNAL_ERROR |
An enum to identify the types of Adaptive Server Enterprise Monitor connections:
SMC_SERVER_M_LIVE |
SMC_SERVER_M_HISTORICAL |
An enum used in conjunction with ErrorCallback to identify the source of an error, warning or informational notification.
SMC_SRC_UNKNOWN |
SMC_SRC_HS |
SMC_SRC_SMC |
SMC_SRC_CT |
SMC_SRC_SS |
SMC_SRC_SMS |
A union used in conjunction with smc_connect_props, smc_get_command_info, and smc_get_dataitem_value to set and retrieve results.
typedef union SMC_VALUE_UNION { | ||
|---|---|---|
SMC_INT | intValue; | |
SMC_LONG | longValue; | |
SMC_DOUBLE | doubleValue; | |
SMC_SIZET | sizetValue; | |
SMC_CHARP | stringValue; | |
SMC_VOIDP | voidpValue; | |
SMC_DATETIME | datetimeValue; | |
} SMC_VALUE_UNION; | ||
|
|