Page 256 - Anatomy of a Robot
P. 256

09_200256_CH09/Bergren   4/17/03  11:24 AM  Page 241
                                                                                  COMMUNICATIONS 241
                            BIDIRECTIONAL COMMUNICATION CHANNELS
                            A bidirectional communication channel enables the receiver to send the transmitter
                            information  about  the  state  of  the  channel  and  the  integrity  of  the  received  data.
                            Several tools are used in a bidirectional communication channel to help send duplicate
                            data. These tools are not confined to use in a bidirectional channel, but they can be used
                            to take maximum advantage of the reverse communications link. In fact, all the tools
                            used  in  a  unidirectional  communication  channel  will  also  work  in  a  bidirectional
                            channel.


                            BLOCK CHECKSUMS

                            When the receiver receives data, it must determine, to the extent possible, whether the
                            channel has changed the data. It does not matter where in the channel the data was
                            changed. Noise from lightening storms or sunspots may have changed the data en route
                            or the receiver might have had a temporary power glitch. The only thing that counts is
                            whether the receiver’s data buffer got the same data that was transmitted. Much like
                            aspirin bottles that come with a safety seal that ensures protection, data can be wrapped
                            in a checksum that will guarantee the integrity of the data.
                              A checksum is a series of data bits that serve to summarize a block of data. The
                            sender can chop the data stream into a series of blocks that may be many bytes long.
                            The checksum is computed and appended to the data block before transmission. We’ll
                            discuss just how checksums are computed later. The receiver knows, by prior arrange-
                            ment, how the checksum will be computed. The receiver, upon receiving the data block
                            (and checksum), independently computes the checksum again and compares it to the
                            received checksum. If the results are different, then a problem exists. If the checksums
                            are the same, then the data is accepted and the receiver moves on to the next block. But
                            suppose a problem exists. In this case, several different actions are possible.


                            Single Error Detection

                            If the transmitted checksum information has relatively few bytes, it’s possible that an
                            error can only be detected. There may not be enough information to either correct the
                            error or to even detect more than one error in the data block. If an error is detected, the
                            receiver can ask the transmitter to retransmit the block of information. One protocol
                            used in the retransmission of data is discussed later.
   251   252   253   254   255   256   257   258   259   260   261