op_vvec_valid()

Abstract

Determines whether a value vector is valid.

Syntax

op_vvec_valid (vvector)
Argument Type Description
vvector Vvec_Vector value vector of interest

Return Type

int

OPC_TRUE if the value vector pointer is valid; OPC_FALSE otherwise.

Example

if (op_vvec_valid (target_vector))
	{
	sum = 0;
	for (i = 0; i < op_vvec_size_get (target_vector); i++)
		{
		/* get current value. */
		op_vvec_value_get (target_vector, i, &val);

		sum = sum + val;
		}
	}

/* sum now contains the summation over the value vector. */

Details

None.

Purpose

Provides a way to determine whether the specified value vector is valid.

Errors

  • No errors 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