op_cvanim

A utility that performs conversion between animation script and history files.

Description

Animations created by simulations are stored in animation history files (file type suffix “.ah”), which encode animation requests in binary form. Sometimes it is useful to analyze or modify the exact sequence of animation requests that have been issued by a simulation. In this case, an animation script file (file type suffix “.as”) is useful because it stores files in ASCII (i.e., editable) form. After editing, animation script files are typically converted back into history files (also using op_cvanim), because the animation viewer program (op_vuanim) can read the files in binary form only.

Animation script files may contain literal constant values which represent information specific to models and objects. These constants are associated with animation requests generated via the KPs op_anim_ime_npath_traverse(), op_anim_ime_nobj_update(), and op_anim_ime_nmod_draw(). See the “Discrete Event Simulation API” for more information on these KPs.

The constant values are listed in the following tables:

Table 20: Object Types

Object Type Script Constant
subnet 0
node 1
simplex link 2
duplex link 3
bus link 4
tap 5
module 6
packet stream 7
statistic wire 8
process state 9
process transition 10

Table 21: Model Types

Model Type Script Constant
network 0
node 1
process 2

Preferences

This program supports the following preference sets:

This program also supports the following additional preferences.

m

Specifies the name of the animation to be converted. This preference may refer to an animation history file or an animation script file, depending on the value of the “reverse” preference. The animation name should not include the file type suffix.

This preference is required.

  • Type: string
  • Default Value: “”

reverse

Specifies that the normal conversion performed by op_cvanim be reversed, so that an animation script file is produced from an animation history file. If this preference is disabled, normal conversion from an animation script file to an animation history file will be performed.

  • Type: boolean
  • Default Value: FALSE

Example Usage

The following example uses op_cvanim and the example animation, my_anim to demonstrate:

  • converting an animation history file to a script file using the -reverse command-line flag,
  • editing the animation script via the Linux text editor, vi
  • converting the animation script back to a history file.
% op_cvanim -m my_anim -reverse

% vi my_anim.as

% op_cvanim -m my_anim

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