Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
themeConfluence
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;

Behaviour

source

target

Behavior

Unset

Set

The instance instances will be inserted into the target container.

Set

Unset

The instance instances will be removed from the source container.

Set

Set

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

 
Related functions: edmiRemoteCreateInstanceContainer, edmiRemoteDeleteInstanceContainer, edmiRemoteDeleteInstanceContainerBN, edmiRemoteEmptyContainer, edmiRemoteEmptyContainerBN, edmiRemoteGetInstanceContainerId, edmiRemoteGetInstanceContainers, edmiRemoteSetContainerCheckedout, edmiRemoteUnsetContainerCheckedout, edmiRemoteUnsetContainerCheckedoutBN, edmiRemoteSetContainerCheckedoutBN, edmiRemoteInstancesToContainer, edmiRemoteInstancesToContainerBN, edmiRemoteInstanceToContainerBN.
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRemoteInstanceToContainer(SdaiServerContext serverContextId, 
                                         SdaiContainer     sourceContainerId, 
                                         SdaiContainer     targetContainerId, 
                                         SdaiAppInstance   currInst,
                                         SdaiInvocationId  *edmiInvocationId);
 
Arguments:

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

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

 

Example

...

 

Code Block
languagecpp
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 (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"