안녕하세요.. HDLC ARQ Go-back-n 알고리즘 도와주세요.
염소자리
//************************************************************ // // methods implementing logic of go-back-n ARQ // these were in dllogic.cpp in C++ NW
/** tests whether range between two numbers is smaller than * the window (DLC_WINDOW_FRAMES), given DLC counter range (DL_WINDOW_MAX) * Nmin is logically lower end of range, the lowest number not ACKed * Nmax is logically higher end of range, the next number to be used */ boolean LTwindow(int Nmin, int Nmax) { int testmax=Nmax; if(Nmin Nmax) testmax = testmax+DL_WINDOW_MAX; return(testmax-Nmin DL_WINDOW_FRAMES); }
/** tests whether range between two numbers is within the * window (DLC_WINDOW_FRAMES), given DLC counter range (DL_WINDOW_MAX) * Nmin is logically lower end of range, the lowest number not ACKed * Nmax is logically higher end of range, the next number to be used */ boolean INwindow(byte Nmin, byte Nmax) { //// student replaces FALSE with appropriate code int testmax=Nmax; if(Nmin Nmax) testmax = testmax-DL_WINDOW_MAX; return(testmax-Nmin = DL_WINDOW_FRAMES); //return false; }
/** tests whether the window has become full * SNmin is SN of the lowest frame sent and not ACKed * SNmax is one greater (mod DL_WINDOW_MAX) than SN of * highest frame sent and not acked */ boolean window_full(int SNmin, int SNmax) { //// student replaces FALSE with appropriate code
return false; }
/** tests whether frames have been sent for which ACKs * have not been received * SNmin is SN of the lowest frame sent and not ACKed * SNmax is one greater (mod DL_WINDOW_MAX) than SN of * highest frame sent and not acked */ boolean frames_remain_unacked(int SNmin, int SNmax) { //// student replaces FALSE with appropriate code return false; }
/** returns incremented SNmax for an interface within * the modular range, which is of size DL_WINDOW_MAX */ int increment_SNmax(int SNmax) { //// student replaces 0 with appropriate code return SNmax + SNmax%3; }
/** returns updated value of SNmin in HDLCState */ int update_SNmin(int newSNmin) { //// student replaces 0 with appropriate code return 0; }
/** updates the RN of interface, * based on received SN */ int update_RN(int received_SN) { //// student replaces 0 with appropriate code return 0; }
/** tests whether to accept frame, based on its SN and the RN associated with receiving interface*/ boolean accept_frame(int received_SN,int interface_RN) { //// student replaces FALSE with appropriate code return false; } }// end class HDLC위에껀 어찌어찌 했는데 밑에 부분이 영 이해가 가지 않네요.. ㅜㅜ혹시 괜찮으시다면 조언좀 해주세요.감사합니다.코드가 다 필요하시면 올려드릴께요.
번호 | 제 목 | 글쓴이 | 날짜 |
---|---|---|---|
2703971 | 접근성에 맞는dtd선언하기 (2) | 하루 | 2025-08-06 |
2703917 | div코딩 어느 해상도에서도 중앙정렬문의!!ㅠㅠ | 해긴 | 2025-08-05 |
2703887 | 미치겠습니다. 테마 등록, | 강남맨 | 2025-08-05 |
2703862 | 아바다 테마 사용도중 질문 드려요~! | 모은 | 2025-08-05 |
2703831 | 자바에서 애프릿이랑 어플리케이션 같이쓸때 창 닫는법 (1) | 소리 | 2025-08-04 |
2703806 | (MFC) 현재 선택된 콤보박스 값을 EDIT박스에 어떻게 넣을까요;; | 빵돌 | 2025-08-04 |
2703752 | K-WAH4.4 웹접근성 title페이지 제목 없음 이거 아시는분 계신가요? | 갤2 | 2025-08-04 |
2703692 | 초보가 헤메고 있습니다. ㅠㅠ (3) | 이루리 | 2025-08-03 |
2703607 | MFC 작성중에 인터넷(Web)관련하여 연동이 되게끔 만들려고 하고 있습니다 | Addictive | 2025-08-02 |
2703579 | 톰캣-아파치 서버에 관한 질문입니다. (2) | 바나나맛사탕 | 2025-08-02 |
2703520 | 직사각형그리기 질문이요~! | 펴라 | 2025-08-02 |
2703461 | 웹호스팅을 변경하려고 합니다. | 찬놀 | 2025-08-01 |
2703432 | dl이 dt크기만큼 안늘어납니다. (5) | 불꾼 | 2025-08-01 |
2703372 | 조직도이미지의 대체텍스트는... (9) | 한샘가온 | 2025-07-31 |
2703348 | 쿽스모드가 무엇인지 궁금합니다. (4) | 나려 | 2025-07-31 |
2703324 | [접근성]더보기 (8) | 매1혻적 | 2025-07-31 |
2703274 | AVADA 테마 메인화면 슬라이드 질문.. | 뿌우 | 2025-07-30 |
2703218 | kboard 게시판 질문요 !! | 핑크빛입술 | 2025-07-30 |
2703188 | HTML 4.01에서 faq 제이쿼리 슬라이드업 되면서 떨림문제 (2) | 꺄홋 | 2025-07-30 |
2703163 | 수다님 죄송한데 질문하나하겠습니다.. (1) | 나오 | 2025-07-29 |