Chapter 146 Table Tennis Game
Like the Internet protocol, the infrared protocol designed by Lin Hong is also divided into a hierarchical structure, with a total of three layers, from the bottom to the top, namely the physical layer, the network layer and the application layer, which is more streamlined than the W buckle protocol.
These are the basic functions of the agreement. The content of the agreement is similar to that of the manufacturers that Arthur had seen before, but from the second manuscript, the content began to change, and Arthur's face began to slowly become serious.
"Asynchronous annual duplex communication? Waveform compression?" Wu Se was surprised.
These technologies are already very profound. As far as Arthur knows, only a few manufacturers can achieve this part of the content.
"This..." Arthur's face began to appear in shock. "Why have you never seen this principle of encoding and decoding?"
He was shocked to see that the coding and decoding principles described in the manuscript in his hand were completely different from the popular protocols.
The existing infrared communication is based on the asynchronous communication transceiver UART. Due to the limitation of its communication rate, the maximum speed of the protocol realized by all manufacturers can only reach 115.2KBPS Di*, which is the highest speed of the computer serial communication port. —
However, Arthur saw that the data transmission principle implemented by Lin Hong is to "identify the transmitted data information through the phase of the pulse". The communication principle is completely different from before, but it can be well compatible with the previous communication protocol. What makes Arthur feel even more interesting is that the use of this principle is the most The high communication rate has a qualitative leap, which can reach K*!
4MKBPS, what is this concept? Nearly 40 times the improvement!
Arthur couldn't sit still anymore. In the surprised eyes of the teacher and other classmates, he packed up his things, ran out of the classroom, ran to Matthew's classroom, and then called Matthew, who was in economics.
"Arthur, what the hell is going on? Is it so urgent?" Matthew asked.
Just when he saw Arthur appear at the door of his classroom, he came out without any hesitation. In the United States, although the teaching environment is relatively relaxed, it is not recommended to open the class. If the teacher is more serious, he is likely to be called to the principal's office to talk.
"Do you have your calculator on you?" Arthur did not answer the question.
"I'm here." Arthur patted the schoolbag he carried with him. Since it was cracked, it has now become a must-have for him. In the past, he usually only took it with him in math class or exams.
"We're going to the school computer room now." Arthur turned around and left.
"Wait a minute." Matthew quickly stopped him and said, "What the hell is going on? Tell me first so that I can have an idea in my heart."
"The communication problem may have been solved!" Arthur said excitedly. "I'm a little excited."
"Really?" Matthew suddenly refreshed, "Have you found an agreement suitable for a calculator?"
Last night, the two of them discussed on the Internet and didn't go to bed until late at night, but they didn't find a suitable solution. Either it was difficult to achieve or the hardware requirements could not meet the requirements, and the communication speed was too slow to meet the standards needed to play games.
Originally, Matthew also thought that he could not solve this problem before the dance began. Unexpectedly, it was only the first class, and Arthur said that he had found a way.
"It's not that I found Tingzhou..." Arthur still can't believe it. "You can't imagine that this agreement was written by STONE in a few hours!"
He took out a pile of manuscripts from his schoolbag and shook it.
"STONE is so cool!" Matthew praised it.
Arthur was only a little surprised to see him, knowing that he had not yet realized the meaning of these manuscripts in his hand.
He shook his head: "It's not just cool to describe! Do you know how much the maximum transmission rate of this protocol can reach in theory?
Seeing him like this, Matthew couldn't help but be stunned: "How much can he reach?" CAN IT REACH THE MAXIMUM OF 115.2KBPS? If that's the case, then I really admire STONE!"
He has also learned about infrared communication and knows that this rate is usually only theoretical. In fact, many manufacturers can't reach this height. Even the protocol implemented by Texas Instruments can only reach poor 9.6KBPS.
"You're wrong, it's a big mistake!" EARther WAS PROUD AND SAID LOUDLY, "THEORETICALLY, THE AGREEMENT IMPLEMENTED BY STONE CAN REACH 4MKBPS!"
"Sorry, can you repeat it?"
"Haha, there is nothing wrong with your understanding, and I'm not wrong. It's really 4MKBPS!" Seeing the expected reaction, Arthur laughed proudly.
Matthew grabbed Arthur: "Are you kidding? How is this possible? I have also studied the infrared communication protocol before. 115.2KBPS is the maximum speed, which is the upper limit, which is determined by its basic principles.
"The key is here." Arthur pulled out a manuscript and pointed to it and said, "The communication method used by STONE is not modulation according to the width of the pulse signal as before, but the health phase. Yes, it is the modulation of the pulse phase. IT IS FOR THIS REASON THAT THE APSOM RATE OF INFRARED COMMUNICATION CAN BE INCREASED TO 4MKBPS! What's more rare is that this protocol can still be compatible with some previous protocols, which is unbelievable!"
When Matthew heard the words, he grabbed the manuscript from Arthur's hand and looked at it.
"Oh, my God, be careful and don't break it!" Arthur reminded..
Matthew looked at it for a long time and didn't understand what the picture on it meant. He was still not as good as Arthur in the software.
He returned the manuscript to Arthur: "You mean that STONE may have created a communication protocol that is stronger than all other manufacturers?"
Arthur was slightly stunned, and then nodded: "Yes, you can say so."
"Wow, that's really cool!"
The first thing Matthew thought of was how much sensation this agreement would cause if it was known to those manufacturers.
"Arthur, do you know what this means? Dollars, a lot of dollars!"
Matthew's understanding of business is not comparable to Arthur's. He thought of the commercial significance of this agreement. At present, major manufacturers are competing for the standard of communication agreements. They all think that their agreement is the best, but they never expect that now there is a middle from [Zhong] country. The students, who were only a few hours old, wrote an agreement that was many times better than their agreements. If their engineers knew it, they would be ashamed to hit the wall.
Arthur has just been completely shocked by the speed that this protocol can transmit, and he didn't think about it at all. Now after his reminder, think it's true that the more than a dozen manuscripts in his hand may really be worth a lot of dollars.
"A pass..." Arthur was not good for a while. What should he do? "Are you going to return it to STONE now?"
"It must belong to STONE, but let's see if this protocol really works on our calculator. Let's go to the computer room to implement its first application first." In the end, Matthew still wanted to see for himself whether the agreement was really effective as Arthur said. You know, there had been no such case before.
So, the two of them quickly came to the school computer room.
Then start writing the corresponding code according to the rules described in the protocol. The only part of the table tennis game written by Arthur is communication, and you can use this protocol to implement it.
In the morning class, both Arthur and Matthew turned up. They have been completely immersed in the implementation of this agreement. At least for now, nothing wrong has been found.
Soon, the first version that could successfully pass the detection of various syntax rules was newly released. Arthur compiled it into machine code, and then ported the game program to their calculators.
"I hope to succeed!" Arthur said with patience with the excitement in his heart.
"Haha, it can't be wrong!" Matthew is completely confident at this moment. This agreement is complete, and it has reached this point. Will there be any problems? The two of them launched a game program called "PINGPONG..." respectively, and then paired the computer infrared communication transceiver.
Just see the display on the calculator display: "Signal search..."
"Search for the following devices, please confirm whether they are connected..."
Confirm!
"Connecting..."
The connection has been successfully established.
Seeing this prompt message, Arthur and Matthew looked at each other and cheered: "YES..."
Then it entered the game screen. A small black oval appeared on their display screen, indicating the racket, which is at the lower end and can only be moved left and right.
In the middle of the display screen, there is a rectangular box representing half a table.
At the beginning of the game, Arthur will serve first.
After pressing the serve button, a small black round ball appears in the display.
Arthur moved the racket to the right end, and then pressed the hit button. He only heard the calculator make a "beep" sound. The ball began to fly forward in a curved route. When it flew to the top, the black ball suddenly disappeared. However, the next moment, it suddenly appeared in the calculator display screen in Matthew's hand, and looked at its trajectory, which was completely consistent with the trajectory of the small ball sent by Arthur before.
When Matthew saw the small ball appear, he showed a [Xing] smile on his face. He immediately pressed the direction key to adjust the direction of his racket. When the ball fell into his table and bounced up again, his racket hit the ball.
"du"
The ball flew back again.
This time, Arthur failed to react, and the ball fell into the periphery.
After a few simple tones, different results appeared on their respective displays.
Arthur's display screen [middle] Yang: "You lost!" In the upper right corner, 0:1.
Matthew's display: "You won!" In the upper right corner, 1:0
After pressing the confirmation button, the next round begins...