edmiRemoteTestAggrElements
EdmiError edmiRemoteTestAggrElements(SdaiServerContext serverContextId, SdaiAggr aggrId, SdaiVersion version, SdaiAggrIndex indexes[], SdaiInteger elements, SdaiBoolean **result, SdaiInvocationId *edmiInvocationId);
Returns the set/unset status of a selection of array elements identified by their element indexes. This function is only applicable on aggregates of array type.
Â
Arguments
Type | Name | Comment |
SdaiServerContext | serverContextId | Context identification, from edmiDefineServerContext |
SdaiAggr | aggrId | The numeric aggregateID that uniquely identifies the array for which to test a selection of indexed elements. |
SdaiVersion | version | The version of the edmModel to apply this function call on. The <version> parameter is a numeric sequence number counting from one by increments of one for each new model version that is created. A zero model version number means the current version. |
SdaiAggrIndex | indexes | A locally declared buffer containing the indexes of the array elements to test. |
SdaiInteger | elements | The number of indexes in the <indexes> buffer. |
SdaiBoolean | result | A variable that will receive the address of an allocated buffer of SdaiBoolean. Each element in this buffer corresponds to the array element with the index that is listed in the same position in the <indexes> buffer. |
SdaiInvocationId | edmiInvocationId | Currently not used. |
Return Value
Â
Options
 Â
Â
Example
Â
 /* SCHEMA DentalStatus; ENTITY Tooth; Fillings : INTEGER; END_ENTITY; ENTITY Incisor SUBTYPE OF (Tooth); END_ENTITY; ENTITY Canin SUBTYPE OF (Tooth); END_ENTITY; ENTITY Molar SUBTYPE OF (Tooth); END_ENTITY; ENTITY Wisdom SUBTYPE OF (Molar); END_ENTITY; ENTITY Patient; CustomerId : INTEGER; ToothSet : ARRAY [1:32] OF OPTIONAL Tooth; END_ENTITY; END_SCHEMA; */ int i, n; EdmiError rstat; SdaiServerContext myContext; SdaiModel modelId; SdaiInteger wisdomMolars[4] = {1,16,17,32}; SdaiInteger nHits, index; SdaiBoolean *inPlace; SdaiInstance patientId; SdaiAggr toothSet; /* Define Remote Server Context */ rstat = edmiDefineServerContext("MyRemoteServerContext", "Johnny", "Dentist", "cf37ftr", "TCP", "9090", "MyServerHost", NULL, NULL, NULL, NULL, NULL, &myContext); /* Get the modelId of the patient register model */ rstat = edmiRemoteGetModelBN(myContext, "DataRepository", "PatientRegister", &modelId, NULL); /* Get the instance Id of the patient with customerId 8745 */ nHits = 1; index = 0; rstat = edmiRemoteFindInstancesBN(myContext, modelId, "Patient", "CustomerId = 8745", sizeof(SdaiInstance), &index, &nHits, &patientId, NULL); /* Get the patients toothset */ rstat = edmiRemoteGetAttrsBN(myContext, patientId, 0, 1, NULL, "ToothSet", sdaiAGGR, &toothSet); /* Check if the patient has got all his wisdom molars */ rstat = edmiRemoteTestAggrElements(myContext, toothSet, 0, wisdomMolars, 4, &inPlace, NULL); n = 0; for (i=0;i<4;i++) if (inPlace) n++; printf("\nThe patient has %d wisdom molars in place", n); . . .
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â