United States-English |
|
|
HP-UX Reference > EEvmVarGet(3)HP-UX 11i Version 3: February 2007 |
|
NAMEEvmVarGet(), EvmVarGetOpaque(), EvmVarGetString(), EvmVarGetType(), EvmVarGetXxx(), EvmVarListFree(), EvmVarListGet(), EvmVarRelease(), EvmVarSet(), EvmVarSetOpaque(), EvmVarSetStringI18N(), EvmVarSetXxx() — manipulate event variables SYNOPSIS#include <evm/evm.h> EvmStatus_t EvmVarGet( EvmEvent_t event, EvmVarName_t v_name, EvmVarStruct_t *var ); EvmStatus_t EvmVarGetOpaque( EvmEvent_t event, EvmVarName_t v_name, EvmOpaque_t *item_value, EvmSize_t *size ); EvmStatus_t EvmVarGetString( EvmEvent_t event, EvmVarName_t v_name, EvmString_t *item_value, EvmI18NMsgId_t *msg_id ); EvmStatus_t EvmVarGetType( EvmEvent_t event, EvmVarName_t v_name, EvmVarType_t *type ); EvmStatus_t EvmVarGetXxx( EvmEvent_t event, EvmVarName_t v_name, evm_type *item_value ); EvmStatus_t EvmVarListFree( EvmVarList_t varlist ); EvmStatus_t EvmVarListGet( EvmEvent_t event, EvmCount_t *var_count, EvmVarList_t *varList ); EvmStatus_t EvmVarRelease( EvmVarStruct_t *var ); EvmStatus_t EvmVarSet( EvmEvent_t event, EvmVarName_t v_name, EvmVarType_t type, EvmVarValue_t item_value, EvmI18NMsgId_t msg_id, EvmSize_t size ); EvmStatus_t EvmVarSetOpaque( EvmEvent_t event, EvmVarName_t v_name, const EvmOpaque_t item_value, EvmSize_t size ); EvmStatus_t EvmVarSetStringI18N( EvmEvent_t event, EvmVarName_t v_name, const EvmString_t item_value, EvmI18NMsgId_t msg_id ); EvmStatus_t EvmVarSetXxx( EvmEvent_t event, EvmVarName_t v_name, const evm_type item_value ); Parameters
DESCRIPTIONThe EvmVarSet() routine sets the value of a variable data item, indicated by v_name, in an event. This routine is used both for adding a variable and for altering its value. If the v_name variable is not already present in the event, it is added. The EvmVarSetXxx(), EvmVarSetStringI18N(), and EvmVarSetOpaque() routines offer a simpler means of setting a variable than the generic EvmVarSet() routine. Using these routines, a single call can set a variable of any type. To use these routines, replace the Xxx() in the routine name with the required type name, and supply a value of the corresponding type as the item_value operand. The following types are supported: Boolean, Char, Int16, Int32, Int64, Uint8, Uint16, Uint32, Uint64, Float, Double, String. Use EvmVarSetStringI18N() to set a string variable with a non-zero I18N message-ID. Use EvmVarSetOpaque() to set an opaque variable. Each of these routines requires one more operand than the others in this group. The EvmVarGet() routine returns the event variable indicated by v_name in the var variable. The caller must free any space used by the variable by calling EvmVarRelease(). The EvmVarGetType() routine returns the type of the named variable. The EvmVarGetXxx(), EvmVarGetString(), and EvmVarGetOpaque() routines offer a simpler means of retrieving a variable value than the generic EvmVarGet() routine. These routines can retrieve a variable of a specific type with a single call. To use these routines, replace the Xxx() in the routine name with the required type name, and supply a pointer to a location of the corresponding type as the item_value pointer. Refer to the description of EvmVarSetXxx() above for details of the supported types. Use EvmVarGetString() to retrieve a string variable, specifying NULL for the msg_id operand if you do not want to receive an I18N message-ID. Use EvmVarGetOpaque() to retrieve an opaque variable. Each of these routines requires one more operand than the others in this group. Note that EvmVarGetString() and EvmVarGetOpaque() return their variable values in heap memory. Use free() to free this space when it is no longer needed. The EvmVarRelease() routine releases any storage space allocated when the specified var was retrieved from an event using EvmVarGet(). It is important that this routine is called when the variable is no longer needed to ensure that all memory associated with the variable is released. Do not use this routine to release variables retrieved with any of the EvmVarGetXxx() routines. The EvmVarListGet() routine returns, in the varList reference argument, a pointer to an array of pointers to names of all the variables contained in the event. The last entry in the array is a NULL pointer. The var_count argument receives the number of names in the list, not counting the terminating null value. The caller must free the memory used by the list by calling EvmVarListFree(). The EvmVarListFree() routine frees the memory used by a variable list (varList). RETURN VALUE
|
Printable version | ||
|