Broker 10.15 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | Creating and Initializing Events | Sequence Data Fields | Getting Sequence Field Values
 
Getting Sequence Field Values
Several functions are provided for obtaining all of the values from a sequence event field, or a subset of the sequence, with a single function call. These functions are described in awGet<type>SeqField.
You may also use the awGet<type>Field to obtain a single value from a sequence field by specifying the field name with an index.
The following example shows the use of the awGetIntegerSeqField function. The function takes the following parameters:
*A BrokerEvent reference.
*The name of the event sequence field being accessed.
*The number of elements to skip from the beginning of the sequence field in the event.
*The number of source elements to be retrieved.
*An integer where the number of retrieved elements is stored.
*The address of a pointer where the values can be stored.
long *count_array;
long num_retrieved;
. . .
err = awGetIntegerSeqField(e, "countSeq", 0, 5,
&num_retrieved, &count_array);
if (err != AW_NO_ERROR) {
printf("Error on getting event sequence field\n%s\n",
awErrorToString(err));
return 0;
}
The manner in which the target array is specified depends on the sequence's type.
Function Name
Value Type
awGetBooleanSeqField
BrokerBoolean **
awGetByteSeqField
char **
awGetCharSeqField
char **
awGetDateSeqField
BrokerDate **
awGetDoubleSeqField
double **
awGetFloatSeqField
float **
awGetIntegerSeqField
long **
awGetLongSeqField
BrokerLong **
awGetShortSeqField
short **
awGetStringSeqField
char ***
awGetUCCharSeqField
charUC *
awGetUCStringSeqField
charUC ***
You may also use the awGetSequenceField to obtain the values and type for an event sequence field.
The awGetSequenceFieldSize can be used to obtain the number of elements in a particular sequence field.