EdmiError edmiRemoteActivateModel (SdaiServerContext serverContextId, SdaiString remoteArchivedModelName, SdaiRepository remoteRepositoryName, SdaiString remoteModelName, SdaiOptions options, SdaiModel *modelId SdaiInvocationId *edmiInvocationId);
Returns a buffer with containerIds of all the instance containers of a given type in which a given instanceId is contained.
Arguments
Type | Name | Comment |
SdaiServerContext | serverContextId | Context identification, from edmiDefineServerContext |
SdaiAppInstance | currInst | A numeric instanceID that uniquely identifies the instance of interest in the EDMdatabase |
SdaiOptions | options | Specifies what type of instance containers to search for. The option value may be a bitwise OR of any combination of the options listed below. If this parameter is unset, the default behaviour is that the <containerId> parameter will receive the id of any lockable container in which the instance is located. |
SdaiContainer | containerId | Variable that will receive the the Id of the lockable container in which the instance Id is located. No instance may be contained by more than one lockable instance container at the same time. Hence, only a single container Id may result when searching for lockable containers. If the instance is not located in any lockable containers, this parameter will be unset. |
SdaiInteger | numberOfContainers | The total number of instance container ids returned in the <containerIds> buffer. |
SdaiContainer | containerIds | Variable that will receive a pointer to a buffer of container ids in which the instance given in <currInst> is located. When searching for lockable containers, the id of the container will be returned in this buffer as well as in the parameter <containerId> |
SdaiInvocationId | edmiInvocationId | currently not used |
Return Value
Options
Option | Comment |
CONTAINER | Search for all plain instance containers. |
LOCK_CONTAINER | Search for any lockable instance container. |
MODEL_CONTAINER | Search for all plain instance model containers. |
MODEL_LOCK_CONTAINER | Search for any lockable instance model container. |
ANY_CONTAINER | Search for any type of container. |
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.