1000 Projects

Join Internshala Certified Online Trainings with Live Projects on Web Development, VLSI, Java, .NET, Hacking, Robotics & more

Error Control System in Network Environment a Java Project

November 9, 2011 posted in CSE Paper Presentations, CSE Projects, CSE Projects with Source Code, Java Based Projects by Kasarla shanthan/Ramesh Gavva

Error-Control-System-in-Network-EnvironmentError Control System in Network Environment is implemented using java. This projects is useful for computer science final year students who are interested in developing network related project.

In cellular communication networks, the geographical area is divided into smaller regions, called cells. In each cell, there is one Mobile Service Station (MSS) as well as a number of Mobile Hosts (MH). The communication between MSSs is, in general, through wired links, while the links between an MH and MSS is wireless. A Mobile Host can communicate with other Mobile Hosts in the system only through the Mobile Service Station in its cell.

There are two kinds of channels available to an MH: communication channel and control channel. The former is used to support communication between an MH and the MSS in its cell, while the latter is set aside to be used exclusively to send control messages that are generated by the channel allocation algorithm. In this paper, henceforth, unless specified otherwise, the term channel or wireless channel refers to a communication channel. When an MH wants to communicate with another MH, it sends a request message to the MSS in its own cell. The request can be granted only if a wireless channel can be allocated for communication between MSS and MH. Since channels are limited, they should be reused as much as possible.



import java.lang.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

class Globals
{
static int MobileHostID=0;
static int MyChannelID=0;
static int MSSWidth=10;
static int MSSHeight=10;
static int HexWidth=70; //cell-hexagon width
static int HexHeight=90; //cell-hexagon height
static int CellStartX=95; //firstcell's xpos
static int CellStartY=140; //firstcell's ypos
}

class ChannelStatus
{
static int Allocated=0;
static int Busy=1;

static String[] StatusString;
static
{
StatusString=new String[]
{
new String("Allocated"),
new String("Busy"),
};
}
}

class MobileHost
{
int id;
int x;
int y;

MobileHost(int tx,int ty)
{
id=Globals.MobileHostID;
x=tx;
y=ty;
Globals.MobileHostID++;
}

public int getid()
{
return(id);
}

public int getx()
{
return(x);
}

public int gety()
{
return(y);
}
}

class MyChannel
{
int id;
int x;
int y;
int status;

MyChannel(int tx,int ty,int tstatus)
{
id=Globals.MyChannelID;
Globals.MyChannelID++;
x=tx;
y=ty;
status=tstatus;
}

public int getx()
{
return(x);
}

public int gety()
{
return(y);
}

public int getstatus()
{
return(status);
}
}

class Cell
{
int id; //unique id for each cell
int x,y; //display position
int AdjCount;
int AdjCells[]=new int[6]; //maximum 6 adjacent cells for a cell
MobileHost[] MobileHosts=new MobileHost[100];
int MobileHostCount;
MyChannel[] MyChannels=new MyChannel[100];
int MyChannelCount;
int LinkedMH[]=new int[100];
int GroupCells[]=new int[100];
int GroupCellCount;

//constructor
Cell()
{
id=-1;
AdjCount=0;
MobileHostCount=0;
MyChannelCount=0;
GroupCellCount=0;
}

//set functions
public void setid(int tid)
{
id=tid;
}
public void setxy(int tx,int ty)
{
x=tx;
y=ty;
}

//get functions
public int getid()
{
return(id);
}

public int getx()
{
return(x);
}

public int gety()
{
return(y);
}

public int getMobileHostCount() //MobileHosts get functions
{
return(MobileHostCount);
}

public MobileHost getMobileHost(int index)
{
return(MobileHosts[index]);
}

public int getMobileHostID(int index)
{
return(MobileHosts[index].id);
}

public int getMobileHostX(int index)
{
return(MobileHosts[index].x);
}

public int getMobileHostY(int index)
{
return(MobileHosts[index].y);
}

public int getMyChannelCount() //MyChannels get functions
{
return(MyChannelCount);
}

public MyChannel getMyChannel(int index)
{
return(MyChannels[index]);
}

public int getMyChannelLink(int index)
{
return(LinkedMH[index]);
}

public int getMyChannelID(int index)
{
return(MyChannels[index].id);
}

public int getMyChannelX(int index)
{
return(MyChannels[index].x);
}

public int getMyChannelY(int index)
{
return(MyChannels[index].y);
}

public int getMyChannelStatus(int index)
{
return(MyChannels[index].status);
}

public void setMyChannelStatus(int tIndex,int tStatus)
{
MyChannels[tIndex].status=tStatus;
}

public int getAdjCount() //AdjCell get functions
{
return(AdjCount);
}

public int getAdjCell(int tindex)
{
int tcellid=-1;
if(tindex>=0&&tindex<=AdjCount-1) tcellid=AdjCells[tindex];
return(tcellid);
}

public int getGroupCell(int tindex)
{
int tcellid=-1;
if(tindex>=0&&tindex<=GroupCellCount-1) tcellid=GroupCells[tindex];
return(tcellid);
}

//methods
public void addAdjCell(int tcellid)
{
AdjCells[AdjCount]=tcellid;
AdjCount++;
}

public void addMobileHost(int xposition,int yposition)
{
MobileHosts[MobileHostCount]=new MobileHost(xposition,yposition);
LinkedMH[MobileHostCount]=-1;
MobileHostCount++;
}

public boolean addMyChannel(int tx,int ty,int tstatus)
{
boolean flag=false;

if(MobileHostCount!=0)
{
if(MyChannelCount<MobileHostCount)
{
MyChannels[MyChannelCount]=new MyChannel(tx,ty,tstatus);
LinkedMH[MyChannelCount]=MobileHosts[MyChannelCount].getid();
MyChannelCount++;
flag=true;
}
}

//return(flag);
return(true);
}

public void addGroupCell(int tCellID)
{
GroupCells[GroupCellCount]=tCellID;
GroupCellCount++;
}

public void draw(Graphics g)
{
//draw cell-hexagon
g.setColor(new Color(0,0,255));
Graphics2D g2d=(Graphics2D)g;
g2d.setStroke(new BasicStroke(2.0f));
g.drawLine(x,y,x+Globals.HexWidth,y);
g.drawLine(x+Globals.HexWidth,y,x+Globals.HexWidth+Globals.HexWidth/2,y+Globals.HexHeight/2);
g.drawLine(x,y,x-Globals.HexWidth/2,y+Globals.HexHeight/2);
g.drawLine(x-Globals.HexWidth/2,y+Globals.HexHeight/2,x,y+Globals.HexHeight);
g.drawLine(x+Globals.HexWidth+Globals.HexWidth/2,y+Globals.HexHeight/2,x+Globals.HexWidth,y+Globals.HexHeight);
g.drawLine(x,y+Globals.HexHeight,x+Globals.HexWidth,y+Globals.HexHeight);

//draw MSS
int tCenterX=(Globals.HexWidth-Globals.MSSWidth)/2;
int tCenterY=(Globals.HexHeight-Globals.MSSHeight)/2;
g.drawRect(x+tCenterX,y+tCenterY,Globals.MSSWidth,Globals.MSSHeight);

try
{
//Thread.sleep(1);
}
catch(Exception e)
{
System.out.println("Error: "+e.getMessage());
}
}
};

But, a channel cannot be used at the same time by two cells if they are within a threshold distance called the minimum channel reuse distance (Dmin) , because it will cause interference. Such an interference is called cochannel interference. A cell, say Ci, is said to be an interference neighbor of another cell, say Cj, if the distance between them is less than Dmin. So, if a channel r is used by a cell Ci, then none of the interference neighbors of Ci can use r concurrently. If using a channel in a cell causes no interference, then we say that this channel is available for the cell. When an MH needs a channel to support a call, it sends a request message to the MSS in its cell through a control channel.

When the MSS receives such a message, it tries to assign a channel using a channel allocation algorithm. A channel allocation algorithm is usually divided into two parts: a channel acquisition algorithm and a channel selection algorithm. The task of the former is to compute the set of channels that are not being used by cells within distance Dmin. The goal of the latter is to choose a channel from the computed set of channels smartly so that good channel reuse pattern can be achieved. If the MSS cannot assign a channel to support the call initiated by the MH, then we say that the call has failed. 

download Project Report and paper presentation and project code of Error Control System in Network Environment A Java Project.


The following two tabs change content below.
Hi, We kasarla shanthan and Ramesh Gavva graduated Btech from VTU / JNTU & former employees of Infrotrack / Wipro Technologies . We basically interested on web development from the graduation period. We are interested to write blogs on Projects and technology. By that initiation we created several websites including 1000projects.org. Our Hobbies are poetry, reading books, story writing writing, and web development.

Latest posts by Kasarla shanthan/Ramesh Gavva (see all)



‹‹‹ Visa Processing a .Net Project

Cell Phones Beyond Calls And SMS Seminar Topic ›››

Custom Search

2 Comments to "Error Control System in Network Environment a Java Project"

  1. sathish balerao wrote:

    thanx for the admin of 1000projects.org.., i want to base paper for java mini project ” online solution provider” ..please send me base paper to my mail ID satyamsathish.kumar@gmail.com

  2. pooja wrote:

    Thanx for providing info….,i want ieee paper for “Error control system in network envionment.plz send me

Leave Your Comment

 
Powered by 1000Projects.org , All rights Reserved, Copyright Policy