...
Code Block | ||||
---|---|---|---|---|
| ||||
EdmiError edmiGetModelOpenModeBN(SdaiString repositoryName,
SdaiString modelName,
SdaiAccessMode *mode);
|
Returns the current open mode, i.e. the current access rights to the specified model.
...
Arguments
...
Type | Name | Comment |
SdaiString | repositoryName | Specifies the name of the repository in the EDMdatabase that holds the model of interest. Repository names are case sensitive. |
SdaiString | modelName | Specifies the name of the model of interest. Model names are case sensitive. The combination of the <repositoryName> and <modelName> arguments uniquely identifies a model in an EDMdatabase. |
SdaiAccessMode | mode | Address of the variable that will receive the current open mode of the specified model. |
...
The possible returned values are:
|
Return Value
...
Insert excerpt | ||||||
---|---|---|---|---|---|---|
|
Options
...
Example
...
Code Block | ||
---|---|---|
| ||
SdaiAccessMode mode; EdmiError rstat; . . . if (rstat = edmiGetModelOpenModeBN("DataRepository", |
...
"Building_AAA87654B", |
...
&mode)) { |
...
/* Error in operation */ |
...
printf("\nError: %s in edmiGetModelOpenModeBN\n", |
...
edmiGetErrorText(rstat)); |
...
goto error; |
...
} switch (mode) { |
...
case sdaiRO: |
...
. . . /* READ ONLY access */ |
...
break; |
...
case sdaiRW: |
...
. . . /* READ and WRITE access */ |
...
break; |
...
case sdaiNOACCESS: |
...
. . . /* No access, i.e., model is closed */ |
...
break; |
...
default: |
...
/* unknown value */ |
...
}
. . . |
See also
Filter by label (Content by label) | ||||||
---|---|---|---|---|---|---|
|