edmiRemoteInstanceToContainer

EdmiError edmiRemoteInstanceToContainer(SdaiServerContext serverContextId, 
                                          SdaiContainer     sourceContainerId, 
                                          SdaiContainer     targetContainerId, 
                                          SdaiAppInstance   currInst,
                                          SdaiInvocationId  *edmiInvocationId);

Adds/removes a single instance to/from an instance container identified by its containerId. This function may also move an instance between containers. The behaviour is controlled by the values given in the source and target parameters <sourceContainerId> and < targetContainerId >. The table below illustrates this;

source

target

Behavior

Unset

Set

The instances will be inserted into the target container.

Set

Unset

The instances will be removed from the source container.

Set

Set

The instances will be moved from source to target. I.e removed from the source container and inserted into the target container.

Arguments


TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiContainer

sourceContainerId

The containerId of the instance container from which to remove the instance <currInst>. By default, the instance will not be removed from any container.

SdaiContainer

targetContainerId

The containerId of the instance container in which to insert the instance <currInst>. By default, the instance will not be inserted into any container.

SdaiAppInstance

currInst

Specifies a numeric instanceID that uniquely identifies an application instance in the EDMdatabase

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


 

int i;
 EdmiError rstat;
 SdaiContainer lockContId, *pContainers;
 SdaiServerContext myContext;
 SdaiInstance instId;
 SdaiInteger nCont;
 . . .
 /* Define Remote Server Context */
 rstat = edmiDefineServerContext("MyRemoteServerContext",
 "Johnny", "Supervisor", "cf37ftr", 
 "TCP", "9090", "MyServerHost", 
 NULL, NULL, NULL, NULL, NULL, &myContext); 
  
 /* Get all containers containing instId */
 rstat = edmiRemoteGetInstanceContainers(myContext,
 instId, ANY_CONTAINER, &lockContId,  
 &nCont, &pContainers, NULL); 
  
 /* Remove instId from all containers */
 for (i=0; i<nCont; i++) {
 rstat = edmiRemoteInstanceToContainer(myContext,
 pContainers[i], 0, instId, NULL); 
 }
 . . .

 

See also

Filter by label

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

Â