tmm_propagation_model_get()

Note: Requires Terrain Modeling Module functionality

Abstract

Loads the shared object library that implements a specific propagation model.

Syntax

tmm_propagation_model_get (propagation_model_name)
Argument Type Description
propagation_model_name const char * the name of the propagation model to obtain

Return Value

TmmT_Propagation_Model *

pointer to a data structure with the appropriate propagation model information. This data structure includes the following fields: the name of the propagation model, path to the parameters file, a pointer to the path loss calculation function, a pointer to the parameters file, and a flag to indicate whether or not the returned data structure is a valid, usable structure.

tmm_prim_prototypes.h

Example

static TmmT_Propagation_Model         * longley_rice_model_ptr;
static TmmT_Path_Loss_Calc_Method     * loss_function_ptr;

/* ... obtain transmitter and receiver positions from packet ... */

if (longley_rice_model_ptr == OPC_NIL)
    {
    /* We haven't loaded the Longley-Rice propagation code yet. */
    /* Try to load the model now. */
    longley_rice_model_ptr = tmm_propagation_model_get ("Longley Rice");
    if (longley_rice_model_ptr == OPC_NIL)
        {
        /* Our propagation model is missing. Abort the simulation. */
        op_sim_end ("Unable to load the Longley-Rice propagation model.",
            "Please check that it is in your mod_dirs.",
            "Terminating simulation", "");
        }
    if (longley_rice_model_ptr->initialized_ok_flag == OPC_FALSE)
        {
        op_sim_end ("Longley-Rice propagation model failed to initialize",
            "correctly. Please view previous errors for details.",
            "Terminating simulation", "");
        }
    loss_function_ptr = longley_rice_model_ptr->path_loss_calc_method;
    }

Details

This is the key function for using propagation models, because it provides access to the initialization routines and path loss calculation functions. Refer to the tmm.h file for extensive comments on the TmmT_Propagation_Model data structure returned by this function and the use of its components.

Purpose

Used to load a propagation model and access the information necessary to use the functions of the model. This function is called in the closure stage of the Radio Transceiver Pipeline (stage 2), when path loss is calculated.

Errors

  • Recoverable error: Propagation model name is NIL.

Reference

  • None.

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