print-slot-for-saving/sendingSaving and Sendingwith-reading-saved/sent-objects-blocksave-blackboard-repositoryGoTo Top

save-blackboard-repository   pathname &key external-format package read-default-float-format value => saved-repository-pathname[Function]

Purpose
Save the blackboard repository (all unit instances and space instances) to a file.

Package   :gbbopen

Module   :gbbopen-core

Arguments and values

pathname     A pathname designator
external-format     An external-file-format designator (default is :default)
package     A package designator indicating the package to be used when saving and loading the blackboard repository (default is :common-lisp)
read-default-float-format     One of the atomic type specifiers short-float, single-float, double-float, or long-float to be used when saving and loading the blackboard repository (default is single-float)
value     An object to be saved with the repository and returned when the repository is loaded (default is nil)
saved-repository-pathname     A pathname

Returns
The pathname of the saved blackboard-repository data file.

Description
If pathname does not specify a file type, the type bb is added to it. Then, (user-homedir-pathname) is used to supply any missing components to pathname.

The size of the blackboard-repository data file can be reduced by specifying a package containing the majority of the symbols that are written to the file.

A with-saving/sending-block, with the package and read-default-float-format values, is established when saving the blackboard repository.

See also
    load-blackboard-repository
    omitted-slots-for-saving/sending
    print-object-for-saving/sending
    print-slot-for-saving/sending
    with-saving/sending-block

Example
Run the GBBopen Tutorial Example application and then save the resulting blackboard repository:

  > :tutorial-example
      ...
  ;; No executable KSAs remain, exiting control shell
  ;; Control shell 1 exited: 63 cycles completed
  ;; Run time: 0.04 seconds
  ;; Elapsed time: 0 seconds
  :quiescence
  > (save-blackboard-repository "tutorial" :package ':tutorial)
  #P"<homedir>/tutorial.bb"
  >
Save the repository again, this time with a value to be returned when the repository is loaded:
  > (save-blackboard-repository "tutorial" 
      :package ':tutorial
      :value (find-instance-by-name 1 'path))
  #P"<homedir>/tutorial.bb"
  >


The GBBopen Project


print-slot-for-saving/sendingSaving and Sendingwith-reading-saved/sent-objects-blocksave-blackboard-repositoryGoTo Top