Versions Compared

Key

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

...

Code Block
languagecpp
themeConfluence
EdmiError edmiRemoteGetEntityExtent(SdaiServerContext serverContextId,
                                      SdaiModel         modelId,
                                      SdaiEntity        entityId,
                                      SdaiOptions       options,
                                      SdaiAggr          *aggrId,
                                      SdaiInteger       *instances,
                                      SdaiInteger       *subtypeInstances,
                                      SdaiInvocationId  *edmiInvocationId);

Returns a numeric instanceID that uniquely identifies the entity extent of a specified instance type in a specified EDM Model. EDM Models have individual entity extents for all their defined instance types. Optionally, the returned aggregate of instanceIds may include all subtypes of the specified instance type.

...

Arguments

...

TypeNameComment
SdaiServerContext

serverContextId

Context identification, from edmiDefineServerContext

SdaiModel

modelId

The numeric modelID that uniquely identifies the edmModel population in the remote _EDMdatabase{_}.remote  EDMdatabase

SdaiEntity

entityId

The numeric entityID that uniquely identifies the instance type within the the remote _EDMdatabase{_}.remote  EDMdatabase

SdaiOptions

options

See description of available options below.
Options may be joined by using the bitwise OR operator. Default behaviour is that no subtypes be included in the returned entity extent.

SdaiAggr

aggrId

A variable that will receive an aggregateId that contains all instances of the given instance type, and optionally all instances of its subtypes.

SdaiInteger

instances

A variable that will receive the number of instances that was returned in the parameter <aggrId>.

SdaiInteger

subtypeInstances

A variable that will receive the total number of instances in the entire population of the EDM Model. This number includes all instance types.

SdaiInvocationId

edmiInvocationId

Currently not used.

Options: Descriptions:

Return Value

...

Insert excerpt
US:_r_EDMInterface
US:_r_EDMInterface
nopaneltrue

 

Options

...

  

OptionComment

SUBTYPES

Include all subtypes of the instance type specified by <entityId> in the returned aggregate of instanceIds.

 Returns:
A completion code of data type EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an _EDMinterface_ error code. Use edmiGetErrorText to get the error text corresponding to the error code.
Example:
int i, j;
EdmiError rstat;
SdaiServerContext myContext;
SdaiPrimitiveType type;
SdaiInteger nModInst, nMethod;
SdaiAggr methodAggr;
SdaiInstance *methodBuff;
SdaiModel modelId;
SdaiEntity entityId;
 
/* Define Remote Server Context */
rstat =

Example

...

 

Code Block
languagecpp
 int i, j;
 EdmiError rstat;
 SdaiServerContext myContext;
 SdaiPrimitiveType type;
 SdaiInteger nModInst, nMethod;
 SdaiAggr methodAggr;
 SdaiInstance *methodBuff;
 SdaiModel modelId;
 SdaiEntity entityId;
  
 /* Define Remote Server Context */
 rstat = edmiDefineServerContext("MyRemoteServerContext",

...


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

...

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

...

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

...

 
  
 /* Get the Id of the ExpressDataManager model */

...


 rstat = edmiRemoteGetModelBN(myContext, "SystemRepository",

...


 "ExpressDataManager", &modelId, NULL);

...

 
  
 /* Get the Id of the EDM_METHOD entity */

...


 rstat = edmiRemoteGetEntity(myContext, modelId,

...


 "EDM_METHOD", &entityId, NULL);

...

 
  
 /* Get all methods from the

...


 ExpressDataManager model */

...

 
 rstat = edmiRemoteGetEntityExtent(myContext, modelId,

...


 entityId, 0, &methodAggr, &nInst,

...

  
 &nModInst, NULL);

...

 
  
 /* Print all methods */

...


 rstat = edmiRemoteReadAggrElements(myContext, methodAggr,

...


 0, 0, nMethod, &nMethod, &type, NULL,

...

  
 &methodBuff, NULL);

...

 
  
 for (i=0;i<nMethod;i++) {

...


 SdaiString _methodType;

...

 
 SdaiString _methodName;

...

 
 SdaiString _schemaName;

...

 
 SdaiString _methodClass;

...

 
 SdaiInteger _nArgs;

...

 
 SdaiPrimitiveType _returnType;

...

 
 SdaiString *_argNames;

...

 
 SdaiPrimitiveType *_argTypes;

...

 
 SdaiString _methodDesc;

...

 
  
 rstat = edmiRemoteGetMethodSignature(myContext, methodBuff[i],

...

 
 &_methodType, &_methodName, &_schemaName,

...

  
 &_methodClass, &_nArgs, &_returnType,

...

  
 &_argNames, &_argTypes, &_methodDesc, NULL);

...

 
  
 printf("\n%d : Method %s\n%s", i, _methodName, _methodDesc);

...

 
 edmiFree(_methodName);

...

 
 edmiFree(_methodDesc);

...

 
 edmiFree(_schemaName);

...

 
 edmiFree(_methodClass);

...

 
 for(j=0;j<_nArgs;j++) {

...


 edmiFree(_argNames[i]);

...


 } 
 }
 . . .

 

See also

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