Professional Documents
Culture Documents
CHAPTER 1
INTRODUCTION
Computer graphics is concerned with all aspects of producing pictures or images using a
computer. Computer Graphics become a powerful tool for the rapid and economical production of
pictures. There is virtually no area in which Graphical displays cannot be used to some advantage,
so it is not surprising to find the use of CG so widespread. Here we use a particular graphics
software system, OpenGL; which has become a widely accepted standard for developing graphics
applications.
The various applications of computer graphics include:
Display of information
Design
Simulation and animation
User interface
As a software interface for the graphics hardware, OpenGL’s main purpose is render two and three
dimensional objects into a frame buffer. These objects are described as sequences of vertices (which
define geometric objects) or pixels (which define images). OpenGL performs several processing
steps on this data to convert it to pixels of form the final desired images in the frame buffer.
It deals with generating images with the aid of computers. Today, computer graphics is a core
technology in digital photography, film, video games, cell phone and computer displays, and many
specialized applications. A great deal of specialized hardware and software has been developed, with
the displays of most devices being driven by computer graphics hardware. It is a vast and recently
developed area of computer science. Computer graphics is responsible for displaying art and image
data effectively and meaningfully to the consumer. It is also used for processing image data received
from the physical world, such as photo and video content.
OpenGL provides a set of commands to render a three dimensional scene. That means you
provide the data in an OpenGL-useable form and OpenGL will show this data on the screen
(render it).It is developed by many companies and it is free to use. You can develop OpenGL-
applications without licensing.
OpenGL is a hardware and system-independent interface. An OpenGL application will
work on every platform, as long as there is an installed implementation. Because it is system
independent, there are no functions to create windows etc., but there are helper functions for each
platforms. A very useful thing is GLUT.
OpenGL is an actively developed API. New versions of the OpenGL specifications are
regularly released by the Khronos Group, each of which extends the API to support various new
features. The details of each version are decided by consensus between the Group's members,
including graphics card manufacturers, operating system designers, and general technology
companies such as Mozilla and Google.In addition to the features required by the core API, graphics
processing unit (GPU) vendors may provide additional functionality in the form of extensions.
Extensions may introduce new functions and new constants, and may relax or remove restrictions on
existingOpenGLfunctions.
Features of OpenGL:
The main features of OpenGL are
It provides 3D geometric objects such as lines, polygons, triangles, meshes, spheres, cubes,
curved surfaces.
It supports high quality rendering of scenes, including hidden surface removal, multiple
light sources, material types, transparency etc.
It provides display lists for creating graphics caches and hierarchical models.
GL provides lower level functions for drawing points, lines and polygons. All GL function
name starts with “gl”.
OpenGL Utility Library (GLU) contains several routines that use lower level OpenGL
commands to perform such tasks as setting up matrices for specific viewing orientations
Chapter 2
LITERATURE SURVEY
A literature review or narrative review is a type of review article. A literature review is a
scholarly paper, which includes the current knowledge including substantive findings, as well as
theoretical and methodological contributions to a particular topic. Literature reviews are
secondary sources, and do not report new or original experimental work. Most often associated
with academic-oriented literature, such reviews are found in academic journals, and are not to be
confused with book reviews that may also appear in the same publication. Literature reviews are a
basis for research in nearly every academic field.[1] A narrow-scope literature review may be
included as part of a peer-reviewed journal article presenting new research, serving to situate the
current study within the body of the relevant literature and to provide context for the reader. In
such a case, the review usually precedes the methodology and results sections of the work.
CHAPTER 3
System Specifications
This is mainly the specification of the problem and how the solution is to be brought
about. Since the requirements of this package are widely known, only the requirements and
specification are started without elaborating each of its functionality.
Hardware Requirements
Disk Space : 40 GB
Memory : 1 GB RAM
File System : 64 Bit
Software Requirements
Operating System (Server Side) : Windows 10, 7 and above
Operating System (Client Side) : Windows 10, 7 and above
IDE : Code Blocks
Programing language : c++
CHAPTER 4
SOFTWARE DESIGN
Selective Repeat Selective Repeat is part of the automatic repeat-request (ARQ). An ARQ
is an efficient scheme to obtain a reliable data transmission when the channel does not satisfy &e
required quality of service . Several different schemes modified by the basic ARQ strategies have
been proposed in order to improve the throughput efficiency . The key idea of this protocol is that
the sender transmits new frames continuously as long as no error occurs. When the frame error
occurs, the sender stops transmitting new frames. The transmitter numbers the packets to be
transmitted sequentially (using numbers from a finite set) and maintains a timer for each packet it
transmits. The receiver accepts each error-free block and positively acknowledges it by sending an
ACK message. On receipt of an erroneous block, the receiver negatively acknowledges the block
by sending a NAK. The acknowledgments follow a Selective Repeat style of approach such that
they include a bitmap denoting the reception status of all the packets transmitted since the last
ACK. The base station therefore only retransmits the incorrectly received packets. Among ARQ
schemes, the selective repeat (SR) is preferable than go-back-N since radio resource is very scarce
and SR gives higher channel efficiency.
The different functions performed in this project are - Packet Sending: Demo the sending of
packet from source to destination. ACK Receival: Send the ACK message, once the packets are
received. Packet Crashing: The loss and crashing of packets is demoed. NAK Receive: Send the
NAK message, once the packets are not received. Frame Resending: Sending the frame again due to
NAK receival.
Flow Chart
CHAPTER 5
IMPLEMENTATION
glutMainLoop: This function call causes the program to enter an event processing loop.It
should be the last statement in main.
glLoadIdentity: This function call sets current transformation matrix to an identity matrix.
glPushMatrix and glPopMatrix: These function call pushes to and pop from the matrix stack
corresponding to the current matrix mode..
glRotate: This function call alter the current matrix by a rotation of angle degrees about the
axis (dx,dy,dz).
glScale: This function call alter the current matrix by specified scaling factor along the axis
(x,y,d).
glClear: This function is used to clear the window. As the algorithm stores information depth
buffer, so it necessary to clear the buffer whenever we wish to redraw the display.
glutBitmapCharacter: Automatically sets the OpenGL unpack pixel storage modes it needs
appropriately and saves and restores the previous modes before returning. The generated call
to glBitmap will adjust the current raster position based on the width of the character.
#include<GL/glut.h>
#include<stdio.h>
#include<stdlib.h>
#include<GL/gl.h>
#define dx 15
#define dy 25
Dept. Of CSE, RIT, Hassan 2020-2021 Page 11
SELECTIVE REPEAT ARQ PROTOCOL
void *currentfont;
int window;
GLfloat x[25];
GLfloat y[20];
GLint i,j,k;
int w,h;
void setFont(void *font)
{
currentfont=font;
}
void drawstring(float x,float y,float z,char *string)
{
char *c;
glRasterPos3f(x,y,z);
for(c=string;*c!='\0';c++)
{ glColor3f(0.0,0.0,0.0);
glutBitmapCharacter(currentfont,*c);
}
}
drawstring(95.0,455.0,1.0,(char*)"* * * * * * * * * S E L E C T I V E REPEAT
A R Q * * * * * * * * *");
glColor3f(1.0,1.0,1.0);
drawstring(210.0,405.0,1.0,(char*)"SEND WINDOW");
glColor3f(1.0,1.0,1.0);
drawstring(200.0,350.0,1.0,(char*)" RECEIVE WINDOW");
glColor3f(1.0,1.0,1.0);
drawstring(210.0,295.0,1.0,(char*)"SAFE SENDING");
glColor3f(1.0,1.0,1.0);
drawstring(200.0,240.0,1.0,(char*)"PACKET CRASHING");
glColor3f(1.0,1.0,1.0);
glColor3f(1.0,1.0,1.0);
drawstring(200.0,350.0,1.0,(char*)" RECEIVE WINDOW");
glColor3f(1.0,1.0,1.0);
drawstring(210.0,295.0,1.0,(char*)"SAFE SENDING");
glColor3f(1.0,1.0,1.0);
drawstring(200.0,240.0,1.0,(char*)"PACKET CRASHING");
glColor3f(1.0,1.0,1.0);
glColor3f(1.0,1.0,1.0);
drawstring(225.0,130.0,1.0,(char*)" EXIT");
glFlush();
}
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_POLYGON); // send window
glColor3f(0.7f,0.2f,0.2f);
glVertex2i(305,425);
glVertex2i(180,425);
glVertex2i(180,395);
glVertex2i(305,395);
glEnd();
glFlush();
}
void myInit()
{
glClearColor(0.0,0.0,0.0,0.0);
glColor3f(0.0f,0.0f,0.0f);
glPointSize(5.0);
gluOrtho2D(0.0,500.0,0.0,500.0);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
setFont(GLUT_BITMAP_HELVETICA_18);
glColor3f(1.0f,1.0f,1.0f);
drawstring(345.0,420.0,1.0,(char*)"RECEIVER");
glColor3f(0.7,0.2,0.0);//monitor
glBegin(GL_LINE_LOOP);
glVertex2f(85,380);
glVertex2f(85,440);
glVertex2f(150,440);
glVertex2f(150,380);
glEnd();
glFlush();
glColor3f(0.7,0.2,0.0);//monitor
glBegin(GL_LINE_LOOP);
glVertex2f(87,382);
glVertex2f(87,438);
glVertex2f(148,438);
glVertex2f(148,382);
glEnd();
glFlush();
glColor3f(0.7,0.0,0.2);//vertical stand
glBegin(GL_LINES);
glVertex2f(105,380);
glVertex2f(105,375);
glVertex2f(129,380);
glVertex2f(129,375);
glEnd();
glFlush();
glColor3f(0.7,0.2,0.2); //CPU
glBegin(GL_LINE_LOOP);
glVertex2f(80,350);
glVertex2f(80,370);
glVertex2f(155,370);
glVertex2f(155,350);
glEnd();
glFlush();
glColor3f(0.7,0.8,0.2); //CPU
glBegin(GL_QUADS);
glVertex2f(95,360);
glVertex2f(95,365);
glVertex2f(115,365);
glVertex2f(115,360);
glEnd();
glFlush();
glColor3f(0.7,0.2,0.8); //CPU
glBegin(GL_QUADS);
glVertex2f(132,358);
glVertex2f(132,361);
glVertex2f(140,361);
glVertex2f(140,358);
glEnd();
glFlush();
glColor3f(0.7,0.2,0.2);//keyboard outline
glBegin(GL_LINE_LOOP);
glVertex2f(77,325);
glVertex2f(87,350);
glVertex2f(148,350);
glVertex2f(158,325);
glEnd();
glFlush();
glColor3f(0.7,0.2,0.2);//keyboard outline
glBegin(GL_POLYGON);
glVertex2f(77,325);
glVertex2f(158,325);
glVertex2f(158,322);
glVertex2f(77,322);
glEnd();
glFlush();
glVertex2f(79,330);
glVertex2f(156,330);
glVertex2f(77,325);
glVertex2f(158,325);
glEnd();
glFlush();
// COMPUTER AT RECEIVER
glColor3f(0.7,0.2,0.0);//monitior
glBegin(GL_LINE_LOOP);
glVertex2f(335,380);
glVertex2f(335,440);
glVertex2f(400,440);
glVertex2f(400,380);
glEnd();
glFlush();
glColor3f(0.7,0.2,0.0);//monitior
glBegin(GL_LINE_LOOP);
glVertex2f(337,382);
glVertex2f(337,438);
glVertex2f(398,438);
glVertex2f(398,382);
glEnd();
glFlush();
glColor3f(0.7,0.0,0.2);//ver
glBegin(GL_LINES);
glVertex2f(355,380);
glVertex2f(355,375);
glVertex2f(379,380);
glVertex2f(379,375);
glEnd();
glFlush();
glColor3f(0.7,0.3,0.2);//hor
glBegin(GL_QUADS);
glVertex2f(348,370);
glVertex2f(348,375);
glVertex2f(388,375);
glVertex2f(388,370);
glEnd();
glFlush();
glColor3f(0.7,0.2,0.2);//CPU
glBegin(GL_LINE_LOOP);
glVertex2f(330,350);
glVertex2f(330,370);
glVertex2f(405,370);
glVertex2f(405,350);
glEnd();
glFlush();
glColor3f(0.7,0.8,0.2); //CPU
glBegin(GL_QUADS);
glVertex2f(345,360);
glVertex2f(345,365);
glVertex2f(365,365);
glVertex2f(365,360);
glEnd();
glFlush()
glColor3f(0.7,0.2,0.8); //CPU
glBegin(GL_QUADS);
glVertex2f(382,358);
glVertex2f(382,361);
glVertex2f(390,361);
glVertex2f(390,358);
glEnd();
glFlush();
glColor3f(0.7,0.2,0.2);//keyboard
glBegin(GL_LINE_LOOP);
glVertex2f(327,322);
glVertex2f(337,350);
glVertex2f(398,350);
glVertex2f(408,322);
glEnd();
glFlush();
glColor3f(0.7,0.2,0.2);//keyboard
glBegin(GL_POLYGON);
glVertex2f(327,325);
glVertex2f(408,325);
glVertex2f(408,322);
glVertex2f(327,322);
glEnd();
glFlush();
glEnd();
glFlush();
glColor3f(0.3,0.6,0.8);//connectin wire
glBegin(GL_LINES);
glVertex2f(155,360);
glVertex2f(330,360);
glEnd();
glFlush();
glColor3f(1.0,0.0,0.0);
glBegin(GL_POLYGON);
glVertex2f(410,425);
glVertex2f(410,430);
glVertex2f(425,430);
glVertex2f(425,425);
glEnd();
glFlush();
setFont(GLUT_BITMAP_HELVETICA_12);
glColor3f(1.0,1.0,1.0);
drawstring(432.0,425.5,1.0,(char*)"DATA FRAMES");
glFlush();
glColor3f(0.0,1.0,1.0);
glBegin(GL_POLYGON);
glVertex2f(410,410);
glVertex2f(410,415);
glVertex2f(420,415);
glVertex2f(420,410);
glEnd();
glFlush();
glColor3f(1.0,1.0,1.0);
drawstring(432.0,410.5,1.0,(char*)"ACK ");
glFlush();
glColor3f(1.0,1.0,0.0);
glBegin(GL_POLYGON);
glVertex2f(410,395);
glVertex2f(410,400);
glVertex2f(420,400);
glVertex2f(420,395);
glEnd();
glFlush();
glColor3f(1.0,1.0,1.0);
drawstring(432.0,395.5,1.0,(char*)"NAK");
glFlush();
for(j=0;j<maxy;j++)
y[j]=y0+j*dy;
for(i=0;i<maxx-1;i++)
for(j=0;j<maxy-1;j++)
{
glBegin(GL_LINE_LOOP);
glVertex2f(x[i],y[j]);
glVertex2f(x[i],y[j+1]);
glVertex2f(x[i+1],y[j+1]);
glVertex2f(x[i+1],y[j]);
glEnd();
glFlush();
void delay()
{
j=28000;
while(j!=0)
{
j--;
i=28000;
while(i!=0)
{
void timer0()
{
glColor3f(1.4,1.9,0.78);
glBegin(GL_LINE_LOOP); // timer for frame 0
glVertex2f(100,120);
glVertex2f(100,130);
glVertex2f(225,130);
glVertex2f(225,120);
glEnd();
glFlush();
}
void timer1()
{
glColor3f(1.4,1.9,0.78);
glBegin(GL_LINE_LOOP); // timer for frame 1
glVertex2f(100,100);
glVertex2f(100,110);
glVertex2f(225,110);
glVertex2f(225,100);
glEnd();
glFlush();
void timer2()
{
glColor3f(1.4,1.9,0.78);
glBegin(GL_LINE_LOOP); // timer for frame 2
glVertex2f(100,80);
glVertex2f(100,90);
glVertex2f(225,90);
glVertex2f(225,80);
glEnd();
glFlush();
}
void timer3()
{
glColor3f(1.4,1.9,0.78);
glBegin(GL_LINE_LOOP); // timer for frame 3
glVertex2f(360,120);
glVertex2f(360,130);
glVertex2f(485,130);
glVertex2f(485,120);
glEnd();
glFlush();
}
void timer4()
{
glColor3f(1.4,1.9,0.78);
glBegin(GL_LINE_LOOP); // timer for frame 4
glVertex2f(360,100);
glVertex2f(360,110);
glVertex2f(485,110);
glVertex2f(485,100);
glEnd();
glFlush();
}
void title() // to
draw the starting screen
{
setFont(GLUT_BITMAP_HELVETICA_18);
glColor3f(1.0,1.0,1.0);
drawstring(20.0,435.0,1.0,(char*)"* * G R A P H I C A L I L L U S T R A T I O N OF S
E LECT IVE REPE AT A R Q P R O T O C O L * *");
glColor3f(1.0,1.0,1.0);
drawstring(210.0,365.0,1.0,(char*)"SUBMITTED BY");
glColor3f(0.0,1.0,1.0);
drawstring(180.0,340.0,1.0,(char*)" Name:Criston Mascarenhas USN:4VP16CS024");
glColor3f(0.0,1.0,1.0);
drawstring(180.0,320.0,1.0,(char*)" Name:Hanishraj B Rao USN:4VP16CS034");
glColor3f(1.0,1.0,1.0);
drawstring(190.0,260.0,1.0,(char*)"UNDER THE GUIDANCE OF");
glColor3f(0.0,1.0,1.0);
drawstring(70.0,230.0,1.0,(char*)" Guide:Ms. Bharathi K");
setFont(GLUT_BITMAP_HELVETICA_12);
//glColor3f(0.0,1.0,1.0);
glColor3f(0.0,1.0,1.0);
drawstring(70.0,215.0,1.0,(char*)" Assistant Professor, Dept of CSE");
glColor3f(0.0,1.0,1.0);
drawstring(70.0,200.0,1.0,(char*)" Vivekananda College Of Engineering and Technology");
//setFont(GLUT_BITMAP_HELVETICA_18);
//glColor3f(0.0,1.0,1.0);
//drawstring(280.0,230.0,1.0,(char*)" same");
//setFont(GLUT_BITMAP_HELVETICA_12);
//glColor3f(0.0,1.0,1.0);
//drawstring(360.0,230.0,1.0,(char*)" same,");
//glColor3f(0.0,1.0,1.0);
//drawstring(285.0,215.0,1.0,(char*)" same");
//glColor3f(0.0,1.0,1.0);
//drawstring(285.0,200.0,1.0,(char*)" same above");
glFlush();
}
float i,j,temp=0.3;
glColor3f(1.0,0.8,0.4);
setFont(GLUT_BITMAP_HELVETICA_18);
drawstring(30.0,125.0,1.0,(char*)" Timer 0");
timer0();
float k=0;
setFont(GLUT_BITMAP_HELVETICA_12);
glColor3f(1.0f,1.0f,0.0f);
drawstring(160.0,370.0,1.0,(char*)"FRAME 0 sending ...........");
k+=0.05;
timer(k,102.5,122,128);
glColor3f(0,0,0);
glBegin(GL_QUADS);
glVertex2i(55,238-j);glVertex2i(55,253-j);glVertex2i(60,253-j);glVertex2i(60,238-j);
glEnd();
glFlush();
}
k+=0.05;
timer(k,102.5,122,128);
glColor3f(0,0,0);
glBegin(GL_QUADS);
glVertex2i(60+i,178);glVertex2i(60+i,183);glVertex2i(75+i,183);glVertex2i(75+i,178);
glEnd();
glFlush();
}
glVertex2i(305,178+j);glVertex2i(305,193+j);glVertex2i(310,193+j);glVertex2i(310,178+j);
glEnd();
glFlush();
k+=0.05;
timer(k,102.5,122,128);
glColor3f(0,0,0);
glBegin(GL_QUADS);
glVertex2i(305,178+j);glVertex2i(305,193+j);glVertex2i(310,193+j);glVertex2i(310,178+j);
glEnd();
glFlush();
setFont(GLUT_BITMAP_HELVETICA_12);
glColor3f(0.0f,0.0f,0.0f);
glColor3f(1.0,1.0,0.0);
drawstring(160.0,370.0,1.0,(char*)"FRAME 0 sent");
// delay();
setFont(GLUT_BITMAP_HELVETICA_12);
glColor3f(0.0,0.0,0.0);
drawstring(160.0,370.0,1.0,(char*)"FRAME 0 sent");
}
void move2() // SIMULTANEOUS MOVEMENT OF ACK 1 AND FRAME 1(in safe sending)
{
float i,j,temp=0.3;
setFont(GLUT_BITMAP_HELVETICA_18);
glColor3f(1.0,0.8,0.4);
drawstring(30.0,105.0,1.0,(char*)" Timer 1");
setFont(GLUT_BITMAP_HELVETICA_12);
glColor3f(1.0f,1.0f,0.0f);
drawstring(160.0,370.0,1.0,(char*)"FRAME 1 sending ...........");
glColor3f(1.0f,1.0f,0.0f);
drawstring(230.0,345.0,1.0,(char*)"........... sending ACK1 ");
timer1();
float k=0;
glColor3f(1,0,0);
glBegin(GL_QUADS);
glVertex2i(70,265-j);glVertex2i(70,280-j);glVertex2i(75,280-j);glVertex2i(75,265-j);
glEnd();
glFlush();
glColor3f(0,0,0);
glBegin(GL_QUADS);
glVertex2i(70,265-j);glVertex2i(70,280-j);glVertex2i(75,280-j);glVertex2i(75,265-j);
glEnd();
glFlush();
glColor3f(1,0,0);
glBegin(GL_QUADS);
glVertex2i(70,238-j);glVertex2i(70,253-j);glVertex2i(75,253-j);glVertex2i(75,238-j);
glEnd();
glFlush();
k+=0.05;
timer(k,156.5,122,128);
timer(k,102.5,102,108);
glColor3f(0,0,0);
glBegin(GL_QUADS);
glVertex2i(320,228-j);glVertex2i(320,238-j);glVertex2i(325,238-j);glVertex2i(325,228-j);
glEnd();
glFlush();
glColor3f(0,0,0);
glBegin(GL_QUADS);
glVertex2i(70,238-j);glVertex2i(70,253-j);glVertex2i(75,253-j);glVertex2i(75,238-j);
glEnd();
glColor3f(1,0,0);
glBegin(GL_QUADS);
glVertex2i(70+i,178);glVertex2i(70+i,183);glVertex2i(85+i,183);glVertex2i(85+i,178);
glEnd();
glFlush();
k+=0.05;
timer(k,156.5,122,128);
timer(k,102.5,102,108);
glColor3f(0,0,0);
glBegin(GL_QUADS);
glVertex2i(310-i,168);glVertex2i(310-i,173);glVertex2i(320-i,173);glVertex2i(320-i,168);
glEnd();
glFlush();
glColor3f(0,0,0);
glBegin(GL_QUADS);
glVertex2i(70+i,178);glVertex2i(70+i,183);glVertex2i(85+i,183);glVertex2i(85+i,178);
glEnd();
glFlush();
glColor3f(1,0,0);
glBegin(GL_QUADS);
glVertex2i(320,178+j);glVertex2i(320,193+j);glVertex2i(325,193+j);glVertex2i(325,178+j);
glEnd();
glFlush();
k+=0.05;
timer(k,156.5,122,128);
timer(k,102.5,102,108);
glColor3f(0,0,0);
glBegin(GL_QUADS);
glVertex2i(70,168+j);glVertex2i(70,178+j);glVertex2i(75,178+j);glVertex2i(75,168+j);
glEnd();
glFlush();
glColor3f(0,0,0);
glBegin(GL_QUADS);
glVertex2i(320,178+j);glVertex2i(320,193+j);glVertex2i(325,193+j);glVertex2i(325,178+j);
glEnd();
glFlush();
setFont(GLUT_BITMAP_HELVETICA_12);
glColor3f(0.0f,0.0f,0.0f);
drawstring(160.0,370.0,1.0,(char*)"FRAME 1 sending ...........");
glColor3f(0.0f,0.0f,0.0f);
drawstring(230.0,345.0,1.0,(char*)"........... sending ACK1 ");
glColor3f(1.0,1.0,0.0);
drawstring(160.0,370.0,1.0,(char*)"FRAME 1 sent ");
glColor3f(1.0f,1.0f,0.0f);
drawstring(230.0,345.0,1.0,(char*)"ACK1 Recieved ");
glColor3f(0.0,0.0,0.0);
glBegin(GL_POLYGON);
glVertex2f(10,115);
glVertex2f(10,135);
glVertex2f(230,135);
glVertex2f(230,115);
glEnd();
glFlush();
setFont(GLUT_BITMAP_HELVETICA_18);
glColor3f(1.0,0.8,0.4);
drawstring(80.0,125.0,1.0,(char*)" Frame 0 sent successfully");
// delay();
setFont(GLUT_BITMAP_HELVETICA_12);
glColor3f(0.0,0.0,0.0);
drawstring(160.0,370.0,1.0,(char*)"FRAME 1 sent ");
glColor3f(0.0f,0.0f,0.0f);
drawstring(230.0,345.0,1.0,(char*)"ACK1 Recieved ");
float i,j,temp=0.3;
float k=0;
timer2();
glColor3f(1.0,0.8,0.4);
setFont(GLUT_BITMAP_HELVETICA_18);
drawstring(30.0,85.0,1.0,(char*)"Timer 2");
setFont(GLUT_BITMAP_HELVETICA_12);
glColor3f(1.0f,1.0f,0.0f);
drawstring(160.0,370.0,1.0,(char*)"FRAME 2 sending ...........");
k+=0.05;
timer(k,102.5,82,88);
glColor3f(0,0,0);
glBegin(GL_QUADS);
glVertex2i(85,265-j);glVertex2i(85,280-j);glVertex2i(90,280-j);glVertex2i(90,265-j);
glEnd();
glFlush();
glFlush();
k+=0.05;
timer(k,102.5,82,88);
glColor3f(0,0,0);
glBegin(GL_QUADS);
glVertex2i(85,238-j);glVertex2i(85,253-j);glVertex2i(90,253-j);glVertex2i(90,238-j);
glEnd();
glFlush();
}
k+=0.05;
timer(k,102.5,82,88);
glColor3f(0,0,0);
glBegin(GL_QUADS);
glVertex2i(85+i,178);glVertex2i(85+i,183);glVertex2i(100+i,183);glVertex2i(100+i,178);
glEnd();
glFlush();
Chapter 6
SCREENSHOTS
CONCLUSION
Selective repeat is combination of advantages of GO back-N and stop N wait protocol,
Selective repeat is somewhat superior to other protocols. The use of packet fragmentation and
selective repeat ARQ was considered for random access underwater networks are Throughput
efficiency, reducing end to end latency and Energy per bit consumption. Finally, the transmission of
frames between sender and receiver takes place simultaneously without the intervention at some
stages and later the retransmission of frames occurs at later stages. Using graphical representation for
stimulation of Selective Repeat protocol is done which depicts the transmission of frames from one
point to another point with the required ACK and NAK.
REFERENCES
3. Chen Jin and Wang Jinlong, “A Novel Selective Repeat Stop-Wait ARQ for
Half-Duplex Channels”, 2002 IEEE Region 10 Conference on Computers,
Communications, Control and Power Engineering.TENCOM '02. Proceedings.
4. http://www.opengl.org/
5. http://www.codecolony.de/opengl
6. http://www.wikipedia.org/opengl
7. https://www.upgrad.com/blog/heap-sort-in-data-structures/
8. https://www.softwaretestinghelp.com/heap-sort/
9. https://www.coursera.org/
10. https://www.graphicsworld.org/