Determines whether the specified topology is correct.
int
map_topoaudit(
ade_id tpm_id);
Returns RTNORM or RTERROR.
| tpm_id | The ID of the topology to check for correctness. The topology must be open for Read. |
The function audits the geometry of a topology to determine whether the geometrical relationships defined by the topology object data are correct. It shows the location of errors.
The following sample checks a topology named "I-95_Buffer" and provides error reporting based on the results of the check.
char* pszTopoName = "I-95_Buffer";
int resultCode = tpm_acload(pszTopoName, 0);
ade_id topoId = tpm_acopen(
pszTopoName,
0);
if (ADE_NULLID != topoId)
{
resultCode = ade_errclear();
int resultCode = map_topoAudit(topoId);
if (RTNORM == resultCode) {
acutPrintf(
"\nTopology %s is correct and complete."
, pszTopoName);
}
else {
int errorStkQnty = ade_errqty();
if (errorStkQnty > 0)
{
for (int i = 0; i < errorStkQnty; i++)
{
int nErrCode = ade_errcode(i);
char* pszErrorMsg = ade_errmsg(i);
acutPrintf ("\n%s", pszErrorMsg);
}
}
}
}
else {
acutPrintf(
"\nThe topology was not opened.");
}
resultCode = tpm_acclose(topoId);
resultCode = tpm_acunload(pszTopoName);


