.

Tuesday, January 8, 2019

Website report

However, the sample computer compute provided In the lecture notes is in C. Therefore, this mall depute is divided into the following sub-tasks Port the SSP code to Java Implement missing timekeeper related classes and licks The following sections will recompense these three sub-tasks. Porting the code Minor changes were do in order to change the phrase structure of the code to Java. As see_nor was not qualify in the given files, it was replaced with into type. In the cowcatcher code, to declare a frame named s, it employ the following syntaxHowever, to create a frame object in Java, the code was modified accordingly. The same change was draw in to the following code The resulting code was shown below. The out_buff and outcome were not declared here because they were pre-set in the given code. In order to make the piece of code below work, credit were added as parameter. As a result, it was changed to NOR_BUFFS was the uttermost buffer size (window size) that could be he ld to evacuate redundant retransmission. Therefore, It was put In as credit to Initialize the network point with the same number of buffers. Implementation of classes and functionsTwo horologe related classes were Implemented for different timekeeper purposes. D Peacetimes Peacetimes was to monitor and time how yearn had passed since a mailboat was transmitted. Cacciatore Cacciatore was to monitor the death of an cite horologe. Both of them extended from the timepiece Task class and overrode the run system to generate cacciatore_event. On the other hand, flipper functions were implemented to complete the protocol. Private null start_ horologe(into see) The start_timer started a timer function for apiece packet transmitted. If a packet timer already existed, it was cancelled.When the timer of a packet had expired (time_out), that packet would be require to resend. Private debar stop_timer(see) The stop_timer was to cancel the timer of a packet when it was called. Priv ate void start_jack_timer() The start_jack_timer was to set a timer for an citation. This was to watch that the sender could receive an realization indoors a reasonable time constraint. Originally, an acknowledgement should take advantage of piggy thorning to travel to the sender. However, when thither was no outgoing packet back to the sender, retransmission might take place. This caused redundant retransmission.Therefore, his timer was created. If it timed out, a separate acknowledgement would be sent to the sender to fate the packet was received successfully. If there was already an acknowledgement timer, the current timer would be cancelled. Private void stop_jack_timer() The stop_jack_timer was to stop the acknowledgement timer if there already existed one. However, in order to get the timers work, two files were imported. Inc(mum) This Inc function simply growinged the input parameters value by 1 . As there implemented as (mum + 1) % (MAX_SEE + 1). This would ensure that the number would increment in a circular manner.

No comments:

Post a Comment