tmm_cache_entry_add()

Note: Requires Terrain Modeling Module functionality

Abstract

Adds data about a position pair into the cache, as well as the status of the path loss calculation and the value of the path loss, if calculated.

Syntax

tmm_cache_entry_add (cache, users_entry_ptr)
Argument Type Description
cache TmmT_Cache the cache to which data is added.
users_entry_ptr TmmT_Cache_Entry * pointer to the user-created entry to be added to the specified cache.

Return Value

void

No return value.

tmm.h

Example

TmmT_Cache_Entry    loss_entry;

/* prepare the key used to search the cache with */
/* our Tx/Rx positions and heights               */
loss_entry.tx_quantized_position = *tx_pos_ptr;
loss_entry.rx_quantized_position = *rx_pos_ptr;

/* Search cache for a value that has already been computed */
if (tmm_cache_entry_find (cache_ptr, &loss_entry) == OPC_FALSE)
    {

    /* Do work needed to calculate the loss */
    ...

    /* Add the newly calculated value to our cache */
    tmm_cache_entry_add (cache_ptr, &loss_entry);
    }

FRET (loss_entry.loss_value);

Details

The data to be added should be in a data structure of type TmmT_Cache_Entry. The contents of this structure are the same as an individual cache entry, as shown in the Details section of tmm_cache_create().

This function makes a copy of the user's entry and adds it to the specified cache.

Purpose

This function adds information about a position pair and the associated path loss calculation to the specified cache. This information can then be reused by new positions that are within a certain tolerance area, so that the path loss does not have to be recalculated.

Errors

  • Pointer to Entry key data structure is NULL. You should be calling tmm_cache_entry_find() with a cache and the address of a TmmT_Cache_Entry.

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