op_anim_force()

Abstract

Forces the display of all animation requests which have been processed by op_vuanim, but remain buffered by the window system.

Syntax

op_anim_force ()
Argument Type Description
no arguments

Return Type

void

no return value

Example

/** Draw a symbol that represents queue saturation. **/
/** (symbol is a square containing an X) **/
sym_props = OPC_ANIM_COLOR_BLUE;

/* Draw square. */
op_anim_igp_line_draw (vid, sym_props, xpos - 20, ypos - 20, xpos + 20, ypos - 20);
op_anim_igp_line_draw (vid, sym_props, xpos - 20, ypos + 20, xpos + 20, ypos + 20);
op_anim_igp_line_draw (vid, sym_props, xpos - 20, ypos - 20, xpos - 20, ypos + 20);
op_anim_igp_line_draw (vid, sym_props, xpos + 20, ypos - 20, xpos + 20, ypos + 20);

/* Draw X. */
op_anim_igp_line_draw (vid, sym_props, xpos - 20, ypos - 20, xpos + 20, ypos + 20);
op_anim_igp_line_draw (vid, sym_props, xpos - 20, ypos + 20, xpos + 20, ypos - 20);

/* Make sure the requests are displayed together on screen. */
op_anim_force ();

Details

Modern distributed window systems (notably the X Window System) support the transmission of graphics information from a potentially remote client program to a server process that is running on the graphics display device. The client program will issue calls to graphics functions, which prepare information for display and buffer it for transmission to the server process. When the transmission buffer gets full, or a buffer force occurs, the buffer’s contents is transmitted to the server process. Unfortunately, transmission buffering can sometimes unexpectedly delay the display of graphics; this is most noticed when portions of a compound graphical figure are displayed in one buffer transmission, and the remainder are displayed in a later transmission. This KP issues a request to op_vuanim which forces all graphics information residing in its transmission buffer to be displayed. To avoid situations where portions of a compound graphical figure are buffered longer than others, this KP can be called after all components of the figure have been specified by other animation KPs. Compound graphical operations built into animation package KPs do their own buffer forcing (e.g., viewer opening, model drawing, macro drawing, object updating, and path traversing). So typically the only use of this KP is after clusters of related op_anim_igp… KPs have been issued.

Note that the architecture for interactive animation viewing is analogous to the window system client/server system: the client program is the simulation, which sends animation requests to the op_vuanim animation server. However, there is no buffering of requests by the simulation, and hence no need to force the requests through (this KP does not affect the transmission of animation requests).

Purpose

Provides a mechanism to “synchronize” the animation image on the screen with the flow of requests which implicitly describe the animation. This forcing function can ensure that graphical elements which ideally should appear at the same time do not have arbitrary delays inserted between their respective appearances. In the common situation where op_vuanim is being displayed on the console of the same workstation on which it is running, use of this KP is not usually required.

Errors

  • (no direct errors are trapped)

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