op_ima_traj_remaining_duration_get()

Abstract

Obtains the time remaining until a specified object reaches the end of the trajectory it is following.

Syntax

op_ima_traj_remaining_duration_get (objid)
Argument Type Description
objid Objid object ID of the site of interest; must be a mobile node or mobile subnet

Return Type

double

Remaining time on the trajectory, in seconds.

Example

double duration = op_ima_traj_remaining_duration_get (subnet_objid);
if (duration == 0)
   {
   op_ima_traj_set (subnet_objid, "NE_zig_zag", 0.0);
   op_ima_traj_speed_set (subnet_objid, op_dist_uniform (100.0) + 10.0, VOSC_FALSE);
   }

Details

None.

Purpose

Provides a way to determine how much time remains until a mobile site (node or subnet) reaches the end of the trajectory it is following, including any repeats or reversals.

Errors

  • Recoverable Error: Object ID (<objid>) is out-of-range.
  • Recoverable Error: Object ID (<objid>) refers to a restricted object.
  • Recoverable Error: Object (<objid>) has incorrect type (<type>); mobile sites are expected.
  • Recoverable Error: Object (<objid>) has no trajectory.
  • Recoverable Error: Object (<objid>)'s trajectory is a vector. This operation is not valid on vectors.

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