PxSysInfoGetObjType()

Request the type of an object.

APPLIES TO

1.0.0

SYNOPSIS
_PxObjType_t PxSysInfoGetObjType (PxObj_t oId);
ARGUMENTS
oId

Object id to be checked

RETURN VALUES
  • The type of the object

  • _PXObjIllObject if oId is not a valid PXROS object

DESCRIPTION

PxSysInfoGetObjType returns the object type of the given object oId. If oId is not a valid PXROS object, _PxObjIllObject is returned.

IMPLEMENTATION GUIDELINES
Before call
  • objid must be a valid PXROS-HR object, which may be checked with one of the following macros:

    • PxObjIdIsValid() must be true.

    • PxObjIdGet() must not be _PXIllegalObjId.

    • PxObjIdError() must be PXERR_NOERROR otherwise the returned error code has to be interpreted (C).

After call
  • The function returns _PXObjIllObject if the given object is invalid (C).

Best Practice
  • No restrictions

USAGE
#include "pxdef.h"

_PxObjType_t type = PxSysInfoGetObjType(oId);

if (type != _PXObjMc) {
    // Report Error
}