op_vvec_type_get()

Abstract

Obtains the data type of a vector.

Syntax

op_vvec_type_get (vector)
Argument Type Description
vector Vvec_Vector value vector of interest

Return Type

int

Constant indicating the data type of each element of a value vector

See Table 98 “Value Vector Type Symbolic Constants“ on page 35 for the list of constants used as return values.

Example

/* Determine whether a value vector's type matches an esys interface's */
/* type before applying the vector to the esys interface.                         */
op_ima_obj_attr_get (interface_id, "type", &interface_type);
if (op_vvec_type_get (src_vector) == interface_type)
	{
	/* apply the vector value. */
	op_esys_interface_vector_set (interface_id, op_sim_time (), src_vector, 0);
	}
else
	{
	printf ("Error: interface type and vector type do not match.\n");
	}

Details

A vector can store only data that matches its data type.

Purpose

Provides a mechanism to determine the data type of a value vector.

Errors

  • Recoverable Error: Value vector is invalid.

Reference

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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