Versions Compared

Key

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

...

Code Block
languagecpp
themeConfluence
EdmiError edmiRemoteTestAttrsBN(SdaiServerContext serverContextId,
                                 SdaiInstance      instanceId, 
                                 SdaiVersion       version, 
                                 SdaiInteger       attributes, 
                                 SdaiString        attributeNames[], 
                                 SdaiBoolean       **valueSet, 
                                 SdaiInvocationId  *edmiInvocationId);

Determines whether one ore more attributes, identified by their names, of a specified instance, identified by its instanceId, are unset or have been assigned values. The attribute names are specified in the input buffer argument <attributeNames>. A buffer with the same number of booleans will be returned in the argument <valueSet>. Any unset attributes will have their corresponding elements in the <valueSet> buffer set to sdaiFALSE. Likewise, if an attribute is set, i.e has been assigned a value, the corresponding <valueSet> buffer element will be set to sdaiTRUE.
Related function: edmiRemoteTestAttrs
Header:
#include "sdai.h"
Prototype:
EdmiError edmiRemoteTestAttrsBN(SdaiServerContext serverContextId,                                  SdaiInstance      instanceId,

                                   SdaiVersion       version, 
                                 SdaiInteger       attributes, 
                                 SdaiString        attributeNames[], 
                                 SdaiBoolean       **valueSet, 
                                 SdaiInvocationId  *edmiInvocationId);
 
Arguments:

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{_}.remote  EDMdatabase

SdaiVersion

version

The version of the edmModel to apply this fuction function call on. The version argument is a sequence number counting from one by increments of one for each new model version created. A zero version number means the current version of the edmModel.

SdaiInteger

attributes

The number of attribute names in the <attributeNames> argument.

SdaiString

attributeNames[]

A buffer containing all the attribute names to be checked.

SdaiBoolean

valueSet

A variable that will receive a pointer to a buffer of SdaiBoolean elements. Each element describes the set/unset status of the corresponding attribute specified in the <attributeNames> argument.

SdaiInvocationId

edmiInvocationId

Currently not used.

...

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

 

Example

...

 

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

...


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

...

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

...

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

...

 
  
 /* 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 = edmiRemoteIsInstanceOfBN(myContext,

...

 
 *pInst, "REVOLVING_DOOR",

...

  
 &isRevolvingDoor, NULL);

...

 
  
 if (! isRevolvingDoor) {

...

 
 SdaiBoolean *_valSet;

...

 
 SdaiString _attrName = "OPEN_DIRECTION";

...

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

...

 
 &_attrName, &_valSet, NULL);

...

 
 if (! _valSet[0]) {

...

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

...

  
 &_attrName, sdaiENUMERATION, "OPENDIR_OUTWARDS");

...

 
 } 
 } 
 }
 . . .

 

See also

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