HP-UX Reference (11i v3 07/02) - 3 Library Functions A-M (vol 6)

e
EvmItemGet(3) EvmItemGet(3)
EvmITEM_REF Reference
EvmITEM_VAR Variables
EvmITEM_KERNEL_ONLY Kernel 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:
Identifier Variable Type Parameters
EvmITEM_VAR_CHAR EvmTYPE_CHAR Name, value
EvmITEM_VAR_INT16 EvmTYPE_INT16 Name, value
EvmITEM_VAR_INT32 EvmTYPE_INT32 Name, value
EvmITEM_VAR_INT64 EvmTYPE_INT64 Name, value
EvmITEM_VAR_UINT8 EvmTYPE_UINT8 Name, value
EvmITEM_VAR_UINT16 EvmTYPE_UINT16 Name, value
EvmITEM_VAR_UINT32 EvmTYPE_UINT32 Name, value
EvmITEM_VAR_UINT64 EvmTYPE_UINT64 Name, value
EvmITEM_VAR_FLOAT EvmTYPE_FLOAT Name, value
EvmITEM_VAR_DOUBLE EvmTYPE_DOUBLE Name, value
EvmITEM_VAR_STRING EvmTYPE_STRING Name, value
EvmITEM_VAR_STRING_I18N EvmTYPE_STRING Name, value, I18N msgid
EvmITEM_VAR_OPAQUE EvmTYPE_OPAQUE Name, 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 terminat-
ing
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 EvmI-
temListFree()
.
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.
HP-UX 11i Version 3: February 2007 2 Hewlett-Packard Company 397