C언어를 이용한 GoBckN ARQ 구현
- 최초 등록일
- 2007.06.25
- 최종 저작일
- 2007.01
- 14페이지/ 한컴오피스
- 가격 5,000원
소개글
데이터 통신에서 배우는
데이터링크 과정에서 흐름제어와 오류제어를 하는 ARQ중에 한 방법인
GO BACK N ARQ 를 C로 구현하여 실행해본다.
각 에러율을 이용해서 throughput 을 구해본다.
목차
1. Flow chart 작성
- System
- Sender
- Receiver
2. Source Code 설명
3. 실행결과에 대한 설명
본문내용
2. Source Code 설명
*******************************************************************************/
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include <math.h>
#include "myLib.h" // for string input and Random Generate
/************************* Function Implementation ****************************/
// overall First_Initial procedure
void First_Initial(void)
{
printf("Go-Back N ARQ \n");
simTime = 0;
Prob_loss_Number = 0;
Time_Capsulated = 0;
generateDataSize = 0;
Accept_DataSize = 0;
sendDataSize = 0;
// init next event type
Type_Select_Netx = 0;
// init number of events
Event_Index = 3;
// Initialize event list. Since no customers are present, the departure
// (service completion) event is eliminated from consideration.
time_next_event[1] = Time_Capsulated + 1;
time_next_event[2] = 1.0e+30; //infinite time.
time_next_event[3] = 1.0e+30; //infinite time.
참고 자료
없음