Versions Compared

Key

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

...

Code Block
languagecpp
themeConfluence
EdmiError edmiRemoteIsInstanceOf(SdaiServerContext serverContextId,
                                   SdaiInstance      instanceId, 
                                   SdaiEntity        entityId, 
                                   SdaiBoolean       *isInstanceOf, 
                                   SdaiInvocationId  *edmiInvocationId);

Determines whether an instance is an instance of exactly the specified instance type.

Arguments

...

TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiInstance

instanceId

A numeric instanceID that uniquely identifies the instance of interrest interest in the remote _EDMdatabase{_}.

SdaiEntity

entityId

The numeric entityID that uniquely identifies the entity definition instance in a dictionary model in the remote _EDMdatabase{_}.remote  EDMdatabase

SdaiBoolean

isInstanceOf

A variable that will receive TRUE if the instance given in argument <instanceId> is of the instance type given in the argument <entityId>. Otherwise, FALSE will be returned.

SdaiInvocationId

edmiInvocationId

Currently not used.

...

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

OptionComment
Option nameComment

 

Example

...

 

Code Block
languagecpp
 EdmiError rstat;
 SdaiServerContext myContext;
 SdaiQueryResult qexRes;
 SdaiInstance *pInst;
 SdaiInteger index = 0, nHits = 10000;
 SdaiBoolean isRevolvingDoor;
 SdaiModel modelId;
 SdaiEntity revolvingDoorEID;
 SdaiAttr openDirAID;
  
 /* Define Remote Server Context */
 rstat = edmiDefineServerContext("MyRemoteServerContext",

...


 "Johnny", "Supervisor", "cf37ftr",

...

 
 "TCP", "9090", "MyServerHost",

...

 
 NULL, NULL, NULL, NULL, NULL, &myContext);

...

 
  
 /* Get the model Id */

...


 rstat = edmiRemoteGetModelBN(myContext, "DataRepository",

...


 "GeneralHospital", &modelId, NULL);

...

 
  
 /* Get Revolving Door entity Id */

...


 rstat = edmiRemoteGetEntity(myContext, modelId,

...


 "REVOLVING_DOOR", &revolvingDoorEID, NULL);

...

 
  
 /* Get Open Direction attribute Id */

...


 rstat = edmiRemoteGetAttrDefinitionBN(myContext, "GeneralHospital",

...


 "DOOR", "OPEN_DIRECTION", &openDirAID, NULL);

...

 
  
 /* Select all doors on first floor */

...


 rstat = edmiRemoteSelectInstances(myContext,

...


 "DataRepository", "GeneralHospital",

...

 
 "DOOR", "FLOOR = 1", SUBTYPES | ONLY_INSTANCE_IDS,

...

  
 NULL, NULL, NULL, &index, &nHits, &qexRes,

...

  
 NULL, NULL, NULL, NULL);

...

 
  
 /* All doors shall open outwards,

...


 unless already specified otherwise.

...

 
 Leave revolving doors unchanged */

...

 
  
 pInst = qexRes->instanceIds;

...


 while (pInst) {

...


 rstat = edmiRemoteIsInstanceOf(myContext, *pInst,

...

 
 revolvingDoorEID, &isRevolvingDoor, NULL);

...

 
 if (! isRevolvingDoor) {

...

 
 SdaiBoolean *_valSet;

...

 
 rstat = edmiRemoteTestAttrs(myContext, *pInst, 0, 1,

...

 
 &openDirAID, &_valSet, NULL);

...


 if (! _valSet[0]) {

...


 rstat = edmiRemotePutAttrsBN(myContext, *pInst, 1, NULL,

...

  
 &openDirAID, sdaiENUMERATION, "OPENDIR_OUTWARDS");

...

 
 } 
 } 
 }
 . . .

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "model" and parent = "6062220"