edmiRemoteReadAggrElements
EdmiError edmiRemoteReadAggrElements(SdaiServerContext serverContextId, SdaiAggr aggrId, SdaiVersion version, SdaiAggrIndex firstIndex, SdaiInteger maxElements, SdaiInteger *actualElementsRead, SdaiPrimitiveType *elementType, SdaiBoolean **elementsValueSet, SdaiVoid dataAddress, SdaiInvocationId *edmiInvocationId);
Reads all or a selection of elements from a specified aggregate. The aggregate elements will be stored in a buffer in local memory allocated by the EDMclient that is being part of the calling application. This memory should eventually be released by edmiFree.
Arguments
Type | Name | Comment |
SdaiServerContext | serverContextId | Context identification, from edmiDefineServerContext |
SdaiAggr | aggrId | The numeric aggregateID that uniquely identifies the aggregate of interest in the remote EDMdatabase |
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 | firstIndex | The index of the first aggregate element to read. The legal index range for all aggregate types is [0 <= index < N] where N is the number of elements in aggregate. |
SdaiInteger | maxElements | The maximum number of aggregate elements to read. |
SdaiInteger | actualElementsRead | A variable that will receive the number of elements contained in the returned locally allocated memory buffer. |
SdaiPrimitiveType | elementType | A variable that will receive the primitive type of the elements in the returned locally allocated memory buffer. |
SdaiBoolean | elementsValueSet | A variable that will receive the address of a locally allocated buffer of SdaiBoolean elements. This buffer will only be returned if the aggregate specified in the <aggrId> argument is an ARRAY type. The number of elements will be the same as the number of elements returned in the <dataAddress> buffer. Each element in the boolean <elementsValueSet> buffer correlates to the element with the same index in the <dataAddress> buffer. An sdaiTRUE value indicate that the corresponding array element in the <dataAddress> buffer has been assigned a value. An sdaiFALSE value indicate that the corresponding data element is unset. This buffer will be allocated in local memory by the EDMclient that is being part of the calling application. This memory should eventually be released by edmiFree. |
SdaiVoid | dataAddress | A variable that will receive a pointer to a locally allocated buffer containing all the read aggregate elements. The buffer elements will be of the primitive type that is returned in the <elementType> argument. This memory should eventually be released by edmiFree. |
SdaiInvocationId | edmiInvocationId | Currently not used. |
Return Value
Â
Options
 Â
Â
Example
Â
 int i; EdmiError rstat; SdaiServerContext myContext; SdaiPrimitiveType type; SdaiInteger nModInst, nInst, nMethod; SdaiAggr methodAggr; SdaiInstance *methodBuff; /* Define Remote Server Context */ rstat = edmiDefineServerContext("MyRemoteServerContext", "Johnny", "Supervisor", "cf37ftr", "TCP", "9090", "MyServerHost", NULL, NULL, NULL, NULL, NULL, &myContext); /* Get all methods from the ExpressDataManager model */ rstat = edmiRemoteGetEntityExtentBN(myContext, "SystemRepository", "ExpressDataManager", "EDM_METHOD", 0, &methodAggr, &nInst, &nModInst, NULL); nMethod = 100; rstat = edmiRemoteReadAggrElements(myContext, methodAggr, 0, 0, 100, &nMethod, &type, NULL, &methodBuff, NULL); /* Print all methods names and descriptions */ for (i=0;i<nMethod;i++) { SdaiString _methodType; SdaiString _methodName; SdaiString _schemaName; SdaiString _methodClass; SdaiInteger _nArgs; SdaiPrimitiveType _returnType; SdaiString *_argNames; SdaiPrimitiveType *_argTypes; SdaiString _methodDesc; rstat = edmiRemoteGetMethodSignature(myContext, methodBuff[i], &_methodType, &_methodName, &_schemaName, &_methodClass, &_nArgs, &_returnType, &_argNames, &_argTypes, &_methodDesc, NULL); printf("\n%d : Method %s\n %s", i, _methodName, _methodDesc); } . . .
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â