16#ifndef _NETSIM_PROPAGATION_MODEL_H_
17#define _NETSIM_PROPAGATION_MODEL_H_
22#define NEGATIVE_DBM -1000.0
23#define ZERO_MW 1.0e-100
24#define MW_TO_DBM(mw) (mw <= ZERO_MW?NEGATIVE_DBM:10.0*log10(mw))
25#define DBM_TO_MW(dbm) (dbm == NEGATIVE_DBM? 0.0: pow(10.0,dbm/10.0))
28#define KHZ (1000.0*HZ)
29#define MHZ (1000.0*KHZ)
30#define GHZ (1000.0*MHZ)
32#ifndef MAC_LAYER_PROTOCOL
33#define MAC_LAYER_PROTOCOL int
39#define PROPAGATION_PROPAGATION_MEDIUM_DEFAULT _strdup("AIR")
40#define PROPAGATION_CHANNEL_CHARACTERISTICS_DEFAULT _strdup("FADING_AND_SHADOWING")
41#define PROPAGATION_PATHLOSS_MODEL_DEFAULT _strdup("Friis_Free_Space_propagation")
42#define PROPAGATION_FADING_MODEL_DEFAULT _strdup("NONE")
43#define PROPAGATION_SHADOWING_MODEL_DEFAULT _strdup("NONE")
44#define PROPAGATION_STANDARD_DEVIATION_DEFAULT 5.0
45#define PROPAGATION_PATHLOSS_EXPONENT_DEFAULT 2.0
46#define PROPAGATION_FADING_FIGURE_DEFAULT 1.0
47#define PROPAGATION_SHAPE_PARAMETER_DEFAULT 2.0
48#define PROPAGATION_OMEGA_DEFAULT 2.0
49#define PROPAGATION_THORP_SPREAD_COEFF_DEFAULT 2.0
50#define PROPAGATION_TEMPERATUREZONE_COUNT_DEFAULT 0
51#define PROPAGATION_Z_DEFAULT 0.0
52#define PROPAGATION_TEMPERATURE_DEFAULT 25.0
53#define PROPAGATION_SALINITY_DEFAULT 35
54#define PROPAGATION_WINDSPEED_DEFAULT 0
55#define PROPAGATION_SHIPPING_DEFAULT 0.5
311 _declspec(deprecated(
"This function is deprecated. Use propagation_create_propagation_info."))
328#define propagation_calculate_received_power(h,t,ti,r,ri,time) __pragma(message(__LOC__"propagation_calculate_received_power function is deprcated. Use _propagation_calculate_received_power")) _propagation_calculate_received_power(get_propagation_info(h,t,ti,r,ri),time)
335 double* Gset,
bool* iSet);
342 double dTx_Rx_Distance,
double dCentralFrequency,
double d0);
371 _declspec(deprecated(
"get_propagation_info is deprected."))
380#define get_tx_info(h,t,ti,r,ri) __pragma(message(__LOC__"get_tx_info function is deprcated. Use _get_tx_info")) _get_tx_info(get_propagation_info(h,t,ti,r,ri))
384#define propagation_get_received_power_dbm(h,t,ti,r,ri,time) __pragma(message(__LOC__"propagation_get_received_power_dbm function is deprcated. Use _propagation_get_received_power_dbm")) _propagation_get_received_power_dbm(get_propagation_info(h,t,ti,r,ri),time)
388#define propagation_calculate_fadingloss(h,t,ti,r,ri) __pragma(message(__LOC__"propagation_calculate_fadingloss function is deprcated. Use _propagation_calculate_fadingloss")) _propagation_calculate_fadingloss(get_propagation_info(h,t,ti,r,ri))
408#ifndef _PROPAGATIONMODEL_
409#pragma deprecated(PROPAGATION_HANDLE)
static ANIM_HANDLE handle
#define _declspec(dllexport)
This function is used to trigger the update.
double propagation_acoutics_calculate_noise(double frequency_kHz, double shipping, double windSpeed)
void(* fnGetTxInfo)(NETSIM_ID nTxId, NETSIM_ID nTxInterface, NETSIM_ID nRxId, NETSIM_ID nRxInterface, PTX_INFO Txinfo)
void propagation_calculate_Range_Based(PPROPAGATION_INFO pinfo, PRECV_POWER p)
struct stru_tx_info TX_INFO
struct stru_pathloss_var * PPATHLOSS_VAR
void propagation_calculate_hata_urban(PPROPAGATION_INFO pinfo, PRECV_POWER p)
struct stru_elevation * ptrELEVATION
struct stru_complexOscillator * ptrCOMPLEXOSCILLATOR
double propagation_acoutics_calculate_propagationDelay(NETSIM_ID tx, NETSIM_ID rx, PPROPAGATION propagation)
struct stru_fading_var FADING_VAR
@ PATHLOSSMODEL_Indoor_Factory
@ PATHLOSSMODEL_Indoor_Home
@ PATHLOSSMODEL_MATRIX_MODEL
@ PATHLOSSMODEL_Indoor_Office
@ PATHLOSSMODEL_Cost_231_Hata_Urban
@ PATHLOSSMODEL_Friis_Free_Space
@ PATHLOSSMODEL_Log_Distance
@ PATHLOSSMODEL_Cost_231_Hata_SubUrban
@ PATHLOSSMODEL_Hata_SubUrban
@ PATHLOSSMODEL_Hata_Urban
@ PATHLOSSMODEL_RANGE_BASED
struct stru_elevation ELEVATION
struct stru_complex _COMPLEX
struct stru_acoutics_propagation_var ACOUTICSPROPVAR
double calculateLooFadingDB(PPROPAGATION_INFO info)
struct stru_state_looParam * ptrLOOPARAMS
struct stru_propagation_model * PPROPAGATION
struct stru_shadowloss_var * PSHADOW_VAR
void propagation_calculate_Matrix_Model(PPROPAGATION_INFO pinfo)
struct stru_fading_var * PFADING_VAR
double _propagation_calculate_lognormalshadow(double standardDeviation, double *Gset, bool *iSet)
void _propagation_calculate_received_power(PPROPAGATION_INFO info, double time)
double _propagation_calculate_logdistancepathloss(double pathLossExponent, double dTx_Rx_Distance, double dCentralFrequency, double d0)
PPROPAGATION_INFO get_propagation_info(PROPAGATION_HANDLE handle, NETSIM_ID txid, NETSIM_ID txif, NETSIM_ID rxid, NETSIM_ID rxif)
@ PROPAGATIONMODEL_PATHLOSS_ONLY
@ PROPAGATIONMODEL_PATHLOSS_AND_SHADOWING
@ PROPAGATIONMODEL_PATHLOSS_AND_FADING_AND_SHADOWING
@ PROPAGATIONMODEL_NO_PATHLOSS
struct stru_recvpower * PRECV_POWER
struct stru_oscillator OSCILLATOR
double _propagation_get_received_power_dbm(PPROPAGATION_INFO info, double time)
Used to the received power in dBm over time.
struct stru_tx_info * PTX_INFO
void(* fnUserPathlossModel)(PPROPAGATION_INFO pinfo, PRECV_POWER p)
struct stru_complexOscillator COMPLEXOSCILLATOR
struct stru_temperature_zone * ptrTEMPERATUREZONE
void initLoo(ptrMARLOVLOO_VAR markovLooVar)
struct stru_marko_loo_fading_var * ptrMARLOVLOO_VAR
double propagation_air_calculate_propagationDelay(NETSIM_ID tx, NETSIM_ID rx, PPROPAGATION propagation)
struct stru_pathloss_var PATHLOSS_VAR
struct stru_temperature_zone TEMPERATUREZONE
void propagation_calculate_thorpPathLoss(PPROPAGATION_INFO pinfo, PRECV_POWER p)
void propagation_calculate_Two_Ray(PPROPAGATION_INFO pinfo, PRECV_POWER p)
bool(* fnCheckInterface)(NETSIM_ID nTxId, NETSIM_ID nTxInterface, NETSIM_ID nRxId, NETSIM_ID nRxInterface)
void * PROPAGATION_HANDLE
double _propagation_calculate_fadingloss(PPROPAGATION_INFO info)
Used to calculate the fading loss. Fading model and parameter must be set in PROPAGATION structure wi...
struct stru_marko_loo_fading_var MARKOVLOO_VAR
void propagation_calculate_deterministicshadow(PPROPAGATION_INFO pinfo, PRECV_POWER p)
struct stru_oscillator * ptrOSCILLATOR
struct stru_propagation_info * PPROPAGATION_INFO
void propagation_calculate_hata_Suburban(PPROPAGATION_INFO pinfo, PRECV_POWER p)
void propagation_calculate_lognormalshadow(PPROPAGATION_INFO pinfo, PRECV_POWER p)
struct stru_propagation_model PROPAGATION
struct stru_acoutics_propagation_var * ptrACOUTICSPROPVAR
struct stru_state_looParam LOOPARAMS
void propagation_finish(PROPAGATION_HANDLE handle)
void propagation_calculate_cost231hata(PPROPAGATION_INFO pinfo, PRECV_POWER p, double cm)
struct stru_complex * _ptrCOMPLEX
PROPAGATION_HANDLE propagation_init(MAC_LAYER_PROTOCOL protocol, __CALLBACK__ check_protocol_configure check, __CALLBACK__ fnGetTxInfo fnpGetTxInfo, __CALLBACK__ fnCheckInterface checkInterference)
struct stru_shadowloss_var SHADOW_VAR
PPROPAGATION_INFO propagation_create_propagation_info(NETSIM_ID txId, NETSIM_ID txIf, NETSIM_ID rxId, NETSIM_ID rxIf, char *uniqueId, PTX_INFO txInfo, PPROPAGATION propagation)
bool(* check_protocol_configure)(NETSIM_ID d, NETSIM_ID i)
PTX_INFO _get_tx_info(PPROPAGATION_INFO info)
Used to get the transmitter info. will be used by user code to change the transmitter information at ...
void propagation_calculate_logdistancepathloss(PPROPAGATION_INFO pinfo, PRECV_POWER p)
enum enum_MACProtocol MAC_LAYER_PROTOCOL
ptrTEMPERATUREZONE tempratureZone
UINT temperatureZoneCount
double ** stateTransitionProbability
ptrMARLOVLOO_VAR markovLooVar
ptrELEVATION * elevationPrams
fnCheckInterface fnpCheckInterface
SHADOW_MODEL shadow_model
ptrACOUTICSPROPVAR acouticsPropVar
PATHLOSS_MODEL pathloss_model
FADING_MODEL fading_model
struct stru_recvpower * next
UINT numDirectSignalOscillators
UINT numMultipathOscillators
UINT directSignalDopper_Hz
ptrCOMPLEXOSCILLATOR multipathOscillators
double directSignalStdDeviation_dB
double directSignalMean_dB
ptrOSCILLATOR directSignalOscillators
double initialProbability
double rmsMultiPathPower_dB