Checks if the ARRAY element pointed to by the specified iterator is set (has a valid value) or unset (indeterminate).
Returns sdaiTRUE when the specified ARRAY element has an assigned value, else sdaiFALSE is returned.
An ARRAY element can be assigned a value by one of the following operations: sdaiPutAggrByIndex , sdaiPutAggrByIterator , edmiWriteAggrElements . An assigned ARRAY element value can be removed, i.e. unset by one the operations sdaiUnsetAggrByIndex or sdaiUnsetAggrByIterator .
This operation is only applicable for ARRAY aggregates.
The model that holds the actual aggregate must be open before this function can be successfully performed.
Related functions: sdaiTestAggrByIndex , sdaiPutAggrByIndex , sdaiPutAggrByIterator , sdaiUnsetAggrByIndex , sdaiUnsetAggrByIterator
Header:
#include "sdai.h"
Prototype:
SdaiBoolean edmiTestAggrByIterator(SdaiIterator iterId);
Arguments:
iterId |
A numeric iteratorID that uniquely identifies an iterator in the actual EDMserver. The current element of the iterator will be the actual aggregate element to test for existing value. |
Returns:
A SdaiBoolean value that has the following value:
sdaiTRUE : The actual ARRAY element has an assigned value.
sdaiFALSE : The actual ARRAY element value is indeterminate, i.e. the element value is unset (non existing). Use sdaiErrorQuery to check for error in operation.
EXAMPLE
SdaiArray arrayId;
SdaiIterator iterId;
SdaiBoolean isSet;
...
iterId = sdaiCreateIterator(arrayId);
if (! iterId) {
/* Error in operation */
printf("\nError in sdaiCreateIterator: %s",
edmiGetErrorText(sdaiErrorQuery()));
goto error;
}
sdaiNext(iterId);
isSet = edmiTestAggrByIterator(iterId);
if (isSet == sdaiTRUE) {
/* Array element is set */
. . .