cyber_effects_cmd_code_is_cyber_effect()

Abstract

Determines if the given interrupt code is the code of an effect registered with the specified cyber-effects manager.

Syntax

cyber_effects_cmd_code_is_cyber_effect (mgr_ptr, input_code)

Argument Type Description
mgr_ptr CyberT_Effect_Mgr* Cyber-effects manager of interest. The handle can be obtained by calling cyber_effects_mgr_handle_get().
input_code int Code to check against interrupt codes of registered effects (for example, the code of the current interrupt)

Return Type

Boolean

OPC_TRUE if input_code is the interrupt code for a registered effect; OPC_FALSE otherwise.

cyber_effects.h

Example

From ip_rte_central_cpu process model:

temporary variables:

/* For transition conditions */
int    intrpt_type;
int    intrpt_code;

header block:

/* Handle to the Cyber Effects manager. */
CyberT_Effect_Mgr*    effects_mgr_ptr;

...

/* Transition conditions */
#define IS_CYBER_EFFECT_CODE (cyber_effects_cmd_code_is_cyber_effect(effects_mgr_ptr, intrpt_code))
...

Details

This function should be used by a model that registers effects with the Cyber Effects framework, so it can detect when the current interrupt is an effect passed by the cyber-effects manager.

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