op_id_check()

Abstract

Determines if an object ID is valid.

Syntax

op_id_check (objid)
Argument Type Description
objid Objid Object ID to be verified.

Return Type

Boolean

OPC_TRUE if the object ID is valid; OPC_FALSE otherwise.

Example

if (op_id_check (mod_objid))
	mod_root_prohndl = op_pro_root (mod_objid);

Details

An object ID is considered valid if it is greater than or equal to 0 and less than the total count of objects in the network.

Purpose

Provides a mechanism to verify the validity of an object ID before using it. Although this check is done automatically by most KPs and other APIs that take an object ID as an argument, it is not done when the super-optimized simulation kernel is being used. In such cases, you might want to use this KP to avoid anticipated problems. You can also use this KP with any kernel to avoid generating unwanted recoverable errors when a bad object ID is used.

Errors

  • No errors are trapped.

Reference

  • None

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com