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.
Header
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.