NetSim Source Code Help
Loading...
Searching...
No Matches
Mobility.c File Reference
#include "main.h"
#include "Mobility.h"
#include "Animation.h"
Include dependency graph for Mobility.c:

Go to the source code of this file.

Functions

int fn_NetSim_Mobility_configure_NodeJoinProfile (void *xmlNode, NETSIM_ID nDeviceId)
 
int fn_NetSim_Mobility_NodeJoinInit (NETSIM_ID nDevIndex)
 
int fn_NetSim_Mobility_NodeJoined ()
 
int fn_NetSim_Mobility_NodeLeaved ()
 
static void init_mobility_animation ()
 
void add_mobility_animation (NETSIM_ID d, double t, double x, double y, double z)
 
int fn_NetSim_Mobility_Configure (void **var)
 
int fn_NetSim_Mobility_Init (struct stru_NetSim_Network *NETWORK_Formal, NetSim_EVENTDETAILS *pstruEventDetails_Formal, char *pszAppPath_Formal, char *pszWritePath_Formal, int nVersion_Type, void **fnPointer)
 
int fn_NetSim_Mobility_Finish ()
 
void mobility_pass_position_to_animation (NETSIM_ID devId, double time, NetSim_COORDINATES *coor)
 
int fn_NetSim_Mobility_Run ()
 
char * fn_NetSim_Mobility_Trace (NETSIM_ID id)
 
int fn_NetSim_Mobility_FreePacket ()
 
int fn_NetSim_Mobility_CopyPacket ()
 
int fn_NetSim_Mobility_Metrics ()
 
int fn_NetSim_Mobility_ConfigurePrimitives ()
 
char * fn_NetSim_Mobility_ConfigPacketTrace ()
 
char * fn_NetSim_Mobility_WritePacketTrace ()
 
int fn_NMo_RandomPoint (double *X, double *Y, double velocity, double interval, unsigned long *pulSeed1, unsigned long *pulSeed2)
 
int fnMobilityRegisterCallBackFunction (_fnMobilityCallBack fnCallBack)
 

Variables

static unsigned int nCallBackCount =0
 
_fnMobilityCallBackfnMobilityCallBack
 
ANIM_HANDLE animHandle
 

Function Documentation

◆ add_mobility_animation()

void add_mobility_animation ( NETSIM_ID  d,
double  t,
double  x,
double  y,
double  z 
)

Definition at line 38 of file Mobility.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_Mobility_ConfigPacketTrace()

char * fn_NetSim_Mobility_ConfigPacketTrace ( )

Definition at line 538 of file Mobility.c.

◆ fn_NetSim_Mobility_Configure()

int fn_NetSim_Mobility_Configure ( void **  var)

Function to configure the mobility model for all the devices

Definition at line 54 of file Mobility.c.

Here is the call graph for this function:

◆ fn_NetSim_Mobility_configure_NodeJoinProfile()

int fn_NetSim_Mobility_configure_NodeJoinProfile ( void *  xmlNode,
NETSIM_ID  nDeviceId 
)

Definition at line 23 of file NodeJoin.c.

Here is the caller graph for this function:

◆ fn_NetSim_Mobility_ConfigurePrimitives()

int fn_NetSim_Mobility_ConfigurePrimitives ( )

Definition at line 534 of file Mobility.c.

◆ fn_NetSim_Mobility_CopyPacket()

int fn_NetSim_Mobility_CopyPacket ( )

Definition at line 526 of file Mobility.c.

◆ fn_NetSim_Mobility_Finish()

int fn_NetSim_Mobility_Finish ( )

This function is to free the memory space allocated for the variables that are used in mobily

Definition at line 322 of file Mobility.c.

Here is the call graph for this function:

◆ fn_NetSim_Mobility_FreePacket()

int fn_NetSim_Mobility_FreePacket ( )

Definition at line 522 of file Mobility.c.

◆ fn_NetSim_Mobility_Init()

int fn_NetSim_Mobility_Init ( struct stru_NetSim_Network NETWORK_Formal,
NetSim_EVENTDETAILS pstruEventDetails_Formal,
char *  pszAppPath_Formal,
char *  pszWritePath_Formal,
int  nVersion_Type,
void **  fnPointer 
)

Function to initialize the parameters of positions for all nodes

Definition at line 188 of file Mobility.c.

Here is the call graph for this function:

◆ fn_NetSim_Mobility_Metrics()

int fn_NetSim_Mobility_Metrics ( )

Definition at line 530 of file Mobility.c.

◆ fn_NetSim_Mobility_NodeJoined()

int fn_NetSim_Mobility_NodeJoined ( )

Definition at line 85 of file NodeJoin.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_Mobility_NodeJoinInit()

int fn_NetSim_Mobility_NodeJoinInit ( NETSIM_ID  nDevIndex)

Definition at line 63 of file NodeJoin.c.

Here is the caller graph for this function:

◆ fn_NetSim_Mobility_NodeLeaved()

int fn_NetSim_Mobility_NodeLeaved ( )

Definition at line 105 of file NodeJoin.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fn_NetSim_Mobility_Run()

int fn_NetSim_Mobility_Run ( )

This function is used to change the positions of the devices over simulation. At the end of this function cummulativereceivedpower[][] will be updated.

Definition at line 371 of file Mobility.c.

Here is the call graph for this function:

◆ fn_NetSim_Mobility_Trace()

char * fn_NetSim_Mobility_Trace ( NETSIM_ID  id)

Definition at line 508 of file Mobility.c.

◆ fn_NetSim_Mobility_WritePacketTrace()

char * fn_NetSim_Mobility_WritePacketTrace ( )

Definition at line 542 of file Mobility.c.

◆ fn_NMo_RandomPoint()

int fn_NMo_RandomPoint ( double *  X,
double *  Y,
double  velocity,
double  interval,
unsigned long *  pulSeed1,
unsigned long *  pulSeed2 
)

This function is used to generate the random point

Definition at line 547 of file Mobility.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fnMobilityRegisterCallBackFunction()

int fnMobilityRegisterCallBackFunction ( _fnMobilityCallBack  fnCallBack)

Definition at line 590 of file Mobility.c.

Here is the caller graph for this function:

◆ init_mobility_animation()

static void init_mobility_animation ( )
static

Definition at line 27 of file Mobility.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mobility_pass_position_to_animation()

void mobility_pass_position_to_animation ( NETSIM_ID  devId,
double  time,
NetSim_COORDINATES coor 
)

Definition at line 347 of file Mobility.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ animHandle

ANIM_HANDLE animHandle

Definition at line 26 of file Mobility.c.

◆ fnMobilityCallBack

_fnMobilityCallBack* fnMobilityCallBack

Definition at line 19 of file Mobility.c.

◆ nCallBackCount

unsigned int nCallBackCount =0
static

Definition at line 18 of file Mobility.c.