edmiWriteAggrElements
EdmiError edmiWriteAggrElements(SdaiAggr aggrId, SdaiInteger firstElementIndex, SdaiInteger numberOfElements, SdaiPrimitiveType elementType, SdaiBoolean **elementsValueSet, void *dataAdress);
Writes a memory buffer to the specified aggregate. The memory buffer can be written to any aggregate types with the following operations:
- ARRAY: The argument < firstElementIndex> specifies the first element number in the ARRAY to write into. The argument <elementsSet> specifies element value set/element value unset.
- LIST: The memory buffer elements will be appended to the specified LIST.
- BAG and SET: The memory buffer elements will be added to the specified BAG or SET.
- This operation is only applicable to data models.
The actual data model must be open for write access before this operation can be successfully performed.
Arguments
Type | Name | Comment |
SdaiAggr | aggrId | A numeric aggregateID that uniquely identifies the aggregate of interest in the EDMdatabase. |
SdaiInteger | firstElementIndex | A SdaiInteger variable that defines the first index of an ARRAY to write into. The first index in an ARRAY is equal to the lower index in the ARRAY declaration in the actual dictionary model (Express schema). |
SdaiInteger | numberOfElements | A SdaiInteger variable that defines the number of elements to write into the specified aggregate. |
SdaiPrimitiveType | elementType | Specifies the data type ( primitive type) of the elements to write into the aggregate |
SdaiBoolean | elementsValueSet | Address to an array of SdaiBoolean that contains one element for each memory buffer element. An element value of sdaiTRUE means a set (valid) element, an element value of sdaiFALSE means an unset element. The corresponding ARRAY aggregate elements will be set/unset according to the value of the corresponding element number in <elementsValueSet> array. |
void | dataAddress | The address of the memory buffer that contains the elements to write into the aggregates. |
Return Value
Options
Example
EdmiError rstat; SdaiAggr aggrId; SdaiInteger integerBuffer[MAX_ELEMENTS]; . . . if (rstat = edmiWriteAggrElements (&aggrId, 0, 256, sdaiINTEGER, NULL, /* Assume aggrId is not ARRAY */ (void *) integerBuffer)) { /* Error in operation */ printf("\nError: %s in edmiWriteAggrElements\n", edmiGetErrorText(rstat)); goto error; } . . .
See also
Filter by label
There are no items with the selected labels at this time.