Page 104 - Designing Autonomous Mobile Robots : Inside the Mindo f an Intellegent Machine
P. 104

Communications and Control

                                     ; 05 E0 00 01 1A <CR>



                                                           1A - Neg. Checksum of message
                                               01- Source Computer or Subsystem
                                            E0 00 - Base address of requested data
                                       05 - Number of bytes requested
                                     ; - Message type (Request Data)
                             Figure 6.4. A blackboard request (read) data message


               Blackboards and exposing parameters with symbolic addressing
               In higher-level languages, the actual physical addresses of data are not constant. In-
               stead, all data is linked to variable names at run time through a symbol table. For this
               reason, the previously described method of exposing variables is not easily accom-
               plished.
               One popular method for exposing symbolic variables through a protocol is to use
               arrays. In this type of scheme, all public variables of a class (like integers) are placed
               into an array and then simply referred to by the appropriate array index. These in-
               dexes are in turn given names. The resulting arrays can thus be treated as address
               blackboards for exposing the variables. In all but the simplest cases, these arrays will
               tend to be multidimensional. For example, instead of an integer called Mode, the
               system might have an array element, such as:

                                         System_ Integers (Control, Mode)
               The message protocol for requesting variables from these arrays will simply indicate
               the array to be accessed, the starting indexes, and the number of elements being re-
               quested. Note that each of these will be specified by an integer that had previously
               been equated to the array’s index. For example, Control might be the dimension con-
               taining all of the control variables of the System_Integers array, and Mode might be
               the 3  element of the control dimension.
                    rd
               In general, I have found this a very effective way of managing variables that are to
               be globally referenced, communicated and stored. For example, all the elements of
               the above array can be written to disk by simple loops that increment the indexes
               over their ranges, as opposed to writing long lists of individual variable names.









                                                        87
   99   100   101   102   103   104   105   106   107   108   109