Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > E

EvmItemGet(3)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

EvmItemGet(), EvmItemListFree(), EvmItemListGet(), EvmItemRelease(), EvmItemSet(), EvmItemSetVa() — create and manipulate event items

SYNOPSIS

#include <evm/evm.h> EvmStatus_t EvmItemGet( EvmEvent_t event, EvmItemId_t item_id, EvmItemValue_t *item_value ); EvmStatus_t EvmItemListGet( EvmEvent_t event, EvmCount_t *item_count, EvmItemList_t *itemList ); EvmStatus_t EvmItemRelease( EvmItemId_t item_id, EvmItemValue_t item_value ); EvmStatus_t EvmItemSet( EvmEvent_t event, EvmItemId_t item_id, EvmItemValue_t item_value ); EvmStatus_t EvmItemSetVa( EvmEvent_t event, [EvmItemId_t item_id, EvmItemValue_t item_value]..., EvmITEM_NONE ); void EvmItemListFree( EvmItemList_t itemList );

Library

EVM Support Library (libevm.so).

Parameters

event

The event containing the item to be manipulated.

item_id

The identifier for the event data item to be set, obtained, or released by the called routine. Possible values for this operand, and the data contained by the data item are identified in the following list. See the EvmEvent(5) manpage for a description of the event data items.

IdentifierData Item
EvmITEM_NONENone (Control use)
EvmITEM_NAMEEvent name
EvmITEM_PRIORITYPriority
EvmITEM_PIDProcess identifier
EvmITEM_PPIDParent process identifier
EvmITEM_EVENT_IDEvent identifier
EvmITEM_TIMESTAMPTime posted
EvmITEM_REPEAT_COUNTRepeat count
EvmITEM_LAST_TIMESTAMPLast timestamp
EvmITEM_I18N_MSG_IDI18N message identifier
EvmITEM_I18N_SET_IDI18N message set identifier
EvmITEM_I18N_CATALOGI18N catalog
EvmITEM_HOST_IPHost IP address
EvmITEM_HOST_NAMEHost name
EvmITEM_USER_NAMEUser name
EvmITEM_FORMATEvent format
EvmITEM_REFReference
EvmITEM_VARVariables
EvmITEM_KERNEL_ONLYKernel distribution Only

  • It is also possible to supply a separate item_id for each of the supported variable types. In these cases, an extra one or two operands (depending on the type) must be supplied in addition to the item_value. See the description below for more information. The following extended variable item IDs are supported:

IdentifierVariable TypeParameters
EvmITEM_VAR_CHAREvmTYPE_CHARName, value
EvmITEM_VAR_INT16EvmTYPE_INT16Name, value
EvmITEM_VAR_INT32EvmTYPE_INT32Name, value
EvmITEM_VAR_INT64EvmTYPE_INT64Name, value
EvmITEM_VAR_UINT8EvmTYPE_UINT8Name, value
EvmITEM_VAR_UINT16EvmTYPE_UINT16Name, value
EvmITEM_VAR_UINT32EvmTYPE_UINT32Name, value
EvmITEM_VAR_UINT64EvmTYPE_UINT64Name, value
EvmITEM_VAR_FLOATEvmTYPE_FLOATName, value
EvmITEM_VAR_DOUBLEEvmTYPE_DOUBLEName, value
EvmITEM_VAR_STRINGEvmTYPE_STRINGName, value
EvmITEM_VAR_STRING_I18NEvmTYPE_STRINGName, value, I18N msgid
EvmITEM_VAR_OPAQUEEvmTYPE_OPAQUEName, value, size

item_value

The value stored into the item indicated by the associated item_id. For EvmItemGet(), this is the location where the value extracted from the event is stored.

item_count

This is the return operand. It is the number of entries in item_list, exclusive of the terminating EvmItem_NONE entry.

DESCRIPTION

These routines manipulate data in the standard items in an event.

The EvmItemSet() routine sets the value of the event data item specified by item_id to the item_value supplied by the caller.

The EvmItemSetVa() routine sets item values in the event. The list of item_id and item_value operands is terminated by an instance of item_id of EvmITEM_NONE.

The inclusion of extended variable item-IDs simplifies programming by allowing variable items to be added to an event without first having to set up an EvmVarStruct_t structure, or to release it afterwards. To use these extended item-IDs, follow each with the name of the variable, then a value of the appropriate type. In addition, an EvmITEM_VAR_STRING_I18N value must be followed by an I18N message ID, and an EvmITEM_VAR_OPAQUE value must be followed by a size.

The EvmItemGet() routine returns, in the item_value reference argument, the value of the event data item specified by item_id. The caller must use EvmItemRelease() to free any space allocated for the item.

The EvmItemRelease() routine releases any storage space that was allocated when the data item named by item_id was retrieved from an event using EvmItemGet().

The EvmItemListGet() routine returns, in the itemList reference argument, a list of all of the items, which are currently defined for the event. The last item in the list has an item_id value of EvmITEM_NONE. The number of items in the list, not including the terminating null identifier, is returned in item_count. The caller is responsible for freeing the memory used by the list by calling EvmItemListFree().

The EvmItemListFree() routine frees the memory used by an item list. The itemList operand is a list of items in an event generated by EvmItemListGet().

RETURN VALUE

EvmERROR_NONE

The operation completed without error.

EvmERROR_INVALID_ARGUMENT

One of the arguments to the function is invalid.

EvmERROR_INVALID_VALUE

A value in a structure member is invalid.

EvmERROR_NO_MEMORY

An operation failed because an attempt to acquire heap memory failed.

EvmERROR_NOT_PRESENT

A request specified an item or variable name component in an itemList or a varList that is not part of the event being processed.

ERRORS

The value of errno is not set.

SEE ALSO

Commands

evmshow(1).

Routines

EvmEventCreate(3), EvmEventDestroy(3), EvmEventFormat(3), EvmEventPost(3).

Event Management

EVM(5).

EVM Events

EvmEvent(5).

EVM Programmer's Guide.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.