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

Go to the source code of this file.

Macros

#define LIGHT_SPEED   299792458.0
 
#define calculate_tx_time(size, rate)   ((size * 8.0) / rate)
 

Functions

double get_propagation_delay (NETSIM_ID i, NETSIM_ID j)
 
static void add_phy_in (NetSim_PACKET *packet, NETSIM_ID d, NETSIM_ID in, NETSIM_ID c, NETSIM_ID ci)
 
static double transmit_over_wired (NetSim_PACKET *packet, NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId)
 
static double wireless_transmit (NetSim_PACKET *packet, NETSIM_ID d, NETSIM_ID in, NETSIM_ID c, NETSIM_ID ci)
 
static double wireless_P2MP_unicast (NetSim_PACKET *packet, NETSIM_ID d, NETSIM_ID in)
 
static double wireless_P2MP_broadcast (NetSim_PACKET *packet, NETSIM_ID d, NETSIM_ID in)
 
static double wireless_MP2MP_unicast (NetSim_PACKET *packet, NETSIM_ID d, NETSIM_ID in)
 
static double wireless_MP2MP_broadcast (NetSim_PACKET *packet, NETSIM_ID d, NETSIM_ID in)
 
static double transmit_over_wireless (NetSim_PACKET *packet, NETSIM_ID d, NETSIM_ID in)
 
static double fnTransmitPacket (NetSim_PACKET *pPacket, NETSIM_ID nDeviceId, NETSIM_ID nInterfaceId)
 
int P2P_PhyOut_Handler ()
 
PACKET_STATUS P2P_Wireless_CalculateError (NETSIM_ID d, NETSIM_ID in, NetSim_PACKET *packet)
 
PACKET_STATUS P2P_Wired_CalculateError (NETSIM_ID d, NETSIM_ID in, NetSim_PACKET *packet)
 
static void P2P_Calculate_Error ()
 
int P2P_PhyIn_Handler ()
 

Macro Definition Documentation

◆ calculate_tx_time

#define calculate_tx_time (   size,
  rate 
)    ((size * 8.0) / rate)

Definition at line 36 of file P2P_Phy.c.

◆ LIGHT_SPEED

#define LIGHT_SPEED   299792458.0

Definition at line 28 of file P2P_Phy.c.

Function Documentation

◆ add_phy_in()

static void add_phy_in ( NetSim_PACKET packet,
NETSIM_ID  d,
NETSIM_ID  in,
NETSIM_ID  c,
NETSIM_ID  ci 
)
static

Definition at line 38 of file P2P_Phy.c.

Here is the caller graph for this function:

◆ fnTransmitPacket()

static double fnTransmitPacket ( NetSim_PACKET pPacket,
NETSIM_ID  nDeviceId,
NETSIM_ID  nInterfaceId 
)
static

Definition at line 225 of file P2P_Phy.c.

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

◆ get_propagation_delay()

double get_propagation_delay ( NETSIM_ID  i,
NETSIM_ID  j 
)

Definition at line 30 of file P2P_Phy.c.

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

◆ P2P_Calculate_Error()

static void P2P_Calculate_Error ( )
static

Definition at line 306 of file P2P_Phy.c.

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

◆ P2P_PhyIn_Handler()

int P2P_PhyIn_Handler ( )

Definition at line 317 of file P2P_Phy.c.

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

◆ P2P_PhyOut_Handler()

int P2P_PhyOut_Handler ( )

Definition at line 243 of file P2P_Phy.c.

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

◆ P2P_Wired_CalculateError()

PACKET_STATUS P2P_Wired_CalculateError ( NETSIM_ID  d,
NETSIM_ID  in,
NetSim_PACKET packet 
)

Definition at line 299 of file P2P_Phy.c.

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

◆ P2P_Wireless_CalculateError()

PACKET_STATUS P2P_Wireless_CalculateError ( NETSIM_ID  d,
NETSIM_ID  in,
NetSim_PACKET packet 
)

Definition at line 286 of file P2P_Phy.c.

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

◆ transmit_over_wired()

static double transmit_over_wired ( NetSim_PACKET packet,
NETSIM_ID  nDeviceId,
NETSIM_ID  nInterfaceId 
)
static

Definition at line 71 of file P2P_Phy.c.

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

◆ transmit_over_wireless()

static double transmit_over_wireless ( NetSim_PACKET packet,
NETSIM_ID  d,
NETSIM_ID  in 
)
static

Definition at line 199 of file P2P_Phy.c.

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

◆ wireless_MP2MP_broadcast()

static double wireless_MP2MP_broadcast ( NetSim_PACKET packet,
NETSIM_ID  d,
NETSIM_ID  in 
)
static

Definition at line 175 of file P2P_Phy.c.

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

◆ wireless_MP2MP_unicast()

static double wireless_MP2MP_unicast ( NetSim_PACKET packet,
NETSIM_ID  d,
NETSIM_ID  in 
)
static

Definition at line 167 of file P2P_Phy.c.

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

◆ wireless_P2MP_broadcast()

static double wireless_P2MP_broadcast ( NetSim_PACKET packet,
NETSIM_ID  d,
NETSIM_ID  in 
)
static

Definition at line 136 of file P2P_Phy.c.

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

◆ wireless_P2MP_unicast()

static double wireless_P2MP_unicast ( NetSim_PACKET packet,
NETSIM_ID  d,
NETSIM_ID  in 
)
static

Definition at line 128 of file P2P_Phy.c.

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

◆ wireless_transmit()

static double wireless_transmit ( NetSim_PACKET packet,
NETSIM_ID  d,
NETSIM_ID  in,
NETSIM_ID  c,
NETSIM_ID  ci 
)
static

Definition at line 93 of file P2P_Phy.c.

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