NS3-GUI-HELPER V1.2.0
A code generator for NS-3 Scripts
Loading...
Searching...
No Matches
Ns3Objects.Devices.Device Class Reference

Public Member Functions

 Device (NetworkLink linkSettings, Network networkSettings, ArrayList< Integer > nodes, int csma_index)
 
 Device (NetworkLink linkSettings, Network networkSettings, String nodeA, String nodeB)
 
String getDeviceConfCode ()
 
String getIPConfCode ()
 
String getNodesGroup ()
 
String getDevicesGroup ()
 
String getNodesGroupCode ()
 
String toString ()
 

Public Attributes

int CSMA_INDEX = 0
 
NetworkLink linkSettings
 
Network networkSettings
 
String nodesGroup
 
String nodeA
 
String nodeB
 
ArrayList< Integer > nodes
 

Detailed Description

A class to store information of a Device in NS-3

Definition at line 20 of file Device.java.

Constructor & Destructor Documentation

◆ Device() [1/2]

Ns3Objects.Devices.Device.Device ( NetworkLink linkSettings,
Network networkSettings,
ArrayList< Integer > nodes,
int csma_index )

to instantiate the object of type Device

Parameters
linkSettingsthe link settings
networkSettingsthe network settings
nodesthe list of nodes, if type is CSMA link
csma_indexthe unique number
Since
0.3.0

Definition at line 55 of file Device.java.

◆ Device() [2/2]

Ns3Objects.Devices.Device.Device ( NetworkLink linkSettings,
Network networkSettings,
String nodeA,
String nodeB )

to instantiate the object of type Device, in case of wired point-to-point link

Parameters
linkSettingsthe link settings
networkSettingsthe network settings
nodeAthe index of first node
nodeBthe index of second node
Since
0.3.0

Definition at line 73 of file Device.java.

Member Function Documentation

◆ getDeviceConfCode()

String Ns3Objects.Devices.Device.getDeviceConfCode ( )

To generate the device configuration code

Example:


devices01 = pointToPoint.Install(nodes01); // (For P2P Link)
csmaDevices0 = csmaLink.Install(csmaNodes0); // (For CSMA Link)
Returns
the device configuration code for NS-3 Script
Since
0.3.0

Definition at line 97 of file Device.java.

◆ getDevicesGroup()

String Ns3Objects.Devices.Device.getDevicesGroup ( )

to get the device group for NetDeviceContainer in NS-3 Script

        
Example:
devices01

// (For CSMA)
csmaDevices0
Returns
the alias for the device group in NS-3 Script
Since
0.3.0

Definition at line 252 of file Device.java.

◆ getIPConfCode()

String Ns3Objects.Devices.Device.getIPConfCode ( )

To generate the network configuration code for the nodes in device

        
Example:
address.SetBase("54.0.0.0", "255.0.0.0");
Ipv4InterfaceContainer interfaces01 = address.Assign(devices01);

// (For CSMA)
address.SetBase("54.0.0.0","255.0.0.0");
Ipv4InterfaceContainer csmaInterface0 = address.Assign(csmaDevices0);
Returns
the IP configuration code for the NS-3 Script
Since
0.3.0

Definition at line 176 of file Device.java.

◆ getNodesGroup()

String Ns3Objects.Devices.Device.getNodesGroup ( )

to get the alias for the node group, used in NodeContainer

         
Example:
nodes01

// (For CSMA)
csmaNodes0
Returns
the alias for the nodes group
Since
0.3.0

Definition at line 223 of file Device.java.

◆ getNodesGroupCode()

String Ns3Objects.Devices.Device.getNodesGroupCode ( )

to get the code for node group

        
Example:
nodes01.Add(allNodes.Get(0));
nodes01.Add(allNodes.Get(1));

// (For CSMA)
csmaNodes0.Add(allNodes.Get(0));
csmaNodes0.Add(allNodes.Get(1));
// ......(variable)
Returns
the nodes groups code in NS-3
Since
0.3.0

Definition at line 281 of file Device.java.

◆ toString()

String Ns3Objects.Devices.Device.toString ( )

to get the information out of devices

Returns
information string of device

Definition at line 306 of file Device.java.

Member Data Documentation

◆ CSMA_INDEX

int Ns3Objects.Devices.Device.CSMA_INDEX = 0

to identification of each CSMA devices

Definition at line 24 of file Device.java.

◆ linkSettings

NetworkLink Ns3Objects.Devices.Device.linkSettings

for storing the links settings between the nodes in the device

Definition at line 28 of file Device.java.

◆ networkSettings

Network Ns3Objects.Devices.Device.networkSettings

for storing the network configuration between the nodes in the device

Definition at line 32 of file Device.java.

◆ nodeA

String Ns3Objects.Devices.Device.nodeA

for storing the index of first two nodes in case of link type is wired point-to-point

Definition at line 40 of file Device.java.

◆ nodeB

String Ns3Objects.Devices.Device.nodeB

Definition at line 40 of file Device.java.

◆ nodes

ArrayList<Integer> Ns3Objects.Devices.Device.nodes

to store the nodes index in case of csma link

Definition at line 44 of file Device.java.

◆ nodesGroup

String Ns3Objects.Devices.Device.nodesGroup

for storing the group of nodes

Definition at line 36 of file Device.java.


The documentation for this class was generated from the following file: