op_anim_flow_end()

Abstract

Stops an active animation flow, causing future animation requests to be ignored.

Syntax

op_anim_flow_end()
Argument Type Description
no arguments

Return Type

void

no return value

Example

/** Received an update packet from mobile node **/
/** obtain a pointer to the incoming packet. **/
pkptr = op_pk_get;

/* Extract the packet type field and position */
op_pk_nfd_get (pkptr, "type", &pktype);
op_pk_nfd_get (pkptr, "xpos", &xpos);
op_pk_nfd_get (pkptr, "ypos", &ypos);

/* All packet types cause depiction of new node position */
depict_mobnode_pos (xpos, ypos);

/* Last position update; depict new position & stop animation */
if (pktype == PKTYPE_END_POS_UPDATE)
     op_anim_flow_end();

Details

The term animation flow includes the data generated by all user-invoked (custom) animation KPs or kernel-invoked (automatic) animation functions in a simulation. When this KP is executed by any process model, transceiver pipeline model, or external C function, the simulation’s animation flow is stopped. Thus later invocations of custom or automatic animation functions are essentially inert; they do not generate new animation data or cause the printing of errors or messages. However, when custom animation KP invocations are being traced in the simulation debugger (ODB), the trace statements indicate that the invocations were “masked” (ignored) due to an inactive animation flow (the exact message describes the execution status of the KP as masked—animation inactive).

Once a simulation’s animation flow has been stopped, there is no way to restart it (i.e., there is no corresponding KP which restarts the flow). To collect animation data over a range of simulation time which does not start at the beginning of the simulation, the anim start and anim stop attributes of animation probes can be used.

Purpose

Provides a mechanism for stopping animation processing before the end of a simulation. This is useful when only a portion of a simulation requires animation (for instance, when a representative view of a switch’s packet flow is desired, but having the animation extend to all packets switched in the simulation is not necessary). Side benefits of stopping an animation flow before the end of a simulation are enhanced execution speed (due to non-completion of the animation KPs) and a smaller limit on animation history file size. In fact, tiny disk quotas will often force the reduction of animation data collection.

Errors

  • Recoverable Error: Write to animation history file <file_name> failed. Unable to continue animation flow (due to an animation history file access problem).
  • Recoverable Error: Unable to locate header in file: <file_name> (due to a corrupted or invalid animation history file)
  • Recoverable Error: Unable to write header into file: <file_name> (due to an animation history file access problem).

Reference

  • Use the KP op_anim_viewer_close() to just shut down a single animation viewer (erases the viewer window in op_vuanim).
  • Use the KP op_sim_end() to stop the simulation as a whole (cleanly ends animation and closes the history file or op_vuanim session).

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