edmiRemoteGetInstanceContainerId

EdmiError edmiRemoteGetInstanceContainerId(SdaiServerContext serverContextId,
                                             SdaiModel         modelId,
                                             SdaiString        containerName,
                                             SdaiContainerType *containerType,
                                             SdaiContainer     *containerId,
                                             SdaiAggr          *containerInstancesId,
                                             SdaiInvocationId  *edmiInvocationId);

Returns the id, type and contents of an instance container identified by its name and modelId.

Arguments


TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiModel

modelId

The modelId that uniquely identifies the edmModel in the remote EDMdatabase

SdaiString

containerName

The name that was assigned to the instance container when it was created.

SdaiContainerType

containerType

Variable that will receive an enumeration value representing the type of instance container. Possible values are; CONTAINER, LOCK_CONTAINER, MODEL_CONTAINER and MODEL_LOCK_CONTAINER.

SdaiContainer

containerId

Variable that will receive the containerId that uniquely represents the instance container in the remote EDMdatabase

SdaiAggr

containerInstancesId

Variable that will receive the aggregateId of an aggregate containing all instances in the container.

SdaiInvocationId

edmiInvocationId

Currently not used

Return Value


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

 

Options


  

 

Example


 

 EdmiError rstat;
 SdaiModel modelId;
 SdaiContainerType contType;
 SdaiContainer contId;
 SdaiAggr contAggr;
 SdaiServerContext myContext;
 SdaiInteger nInst;
 . . .
 /* Define Remote Server Context */
 rstat = edmiDefineServerContext("MyRemoteServerContext",
 "Johnny", "Supervisor", "cf37ftr", 
 "TCP", "9090", "MyServerHost", 
 NULL, NULL, NULL, NULL, NULL, &myContext); 
  
 rstat = edmiRemoteGetInstanceContainerId(myContext,
 modelId, "myContainer",  
 &contType, &contId, &contAggr,  
 NULL); 
  
 rstat = edmiRemoteGetMemberCount(myContext, contAggr, 0,
 &nInst, NULL); 
  
 printf("The container myContainer has ID %d and is a", contId);
 switch (contType) {
 case CONTAINER: 
 printf(" Plain Instance Container"); 
 break; 
 case LOCK_CONTAINER: 
 printf(" Lockable Instance Container"); 
 break; 
 case MODEL_CONTAINER: 
 printf(" Plain Instance Model Container"); 
 break; 
 case MODEL_LOCK_CONTAINER: 
 printf(" Lockable Instance Model Container"); 
 break; 
 default: 
 printf("n unknown Instance Container Type"); 
 goto err; 
 }
 printf("\nIt contains %d instances.", nInst);
 . . . 

 

See also

Filter by label

There are no items with the selected labels at this time.

Â