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


TypeNameComment
SdaiAggr

aggrId

A numeric aggregateID that uniquely identifies the aggregate of interest in the EDMdatabase.
The aggregateID is returned when the aggregate is created or it can be retrieved with an EDMinterface get operation.

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).
This argument is only effective for ARRAY aggregates.

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
The value of this argument must be one of the following legal data types: sdaiINTEGER, sdaiREAL, sdaiBOOLEAN, sdaiLOGICAL, sdaiSTRING, sdaiENUMERATION, sdaiBINARY, sdaiAGGR, sdaiINSTANCE or sdaiSELECT

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.
This argument is only effective when the actual aggregate is an ARRAY.

void

dataAddress

The address of the memory buffer that contains the elements to write into the aggregates.

Return Value


Error rendering macro 'excerpt-include' : User 'null' does not have permission to view the page 'US:_r_EDMInterface'.

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.