;;; Hey, Emacs, this file is -*- Common-Lisp -*- ... got that?

(in-package :tsdb)

(setf *tsdb-cache-connections-p* t)

(defparameter %logon% 
  (let ((root (system:getenv "LOGONROOT")))
    (when root (namestring (parse-namestring root)))))

(when %logon%
  ;;
  ;; point to Norwegian skeletons, rather than the default English ones
  ;;
  (tsdb 
   :skeleton
   (format nil "~a/lingo/lkb/src/tsdb/skeletons/norsk" %logon%))
  ;;
  ;; define [incr tsdb()] clients in terms of binary to run, command-line
  ;; arguments, and the host to run on; if the default of `(short-site-name)'
  ;; for the current host does not work for you, then contact me for advice.
  ;;                                                         (17-dec-03; oe)
  ;;
  (let ((binary (format nil "~a/franz/~a/alisp" %logon% mk::%system-binaries%))
	(image 
	 (format nil "~a/franz/~a/base.dxl" %logon% mk::%system-binaries%)))
    (setf *pvm-cpus*
      (list
       (make-cpu 
	:host (short-site-name)
	:spawn binary
	:options (list "-I" image "-qq" 
		       "-L" (format nil "~a/uib/client.lisp" %logon%))
	:class :norgram :grammar "NorGram (17-jul-04)" :name "xle" 
	:task '(:parse))
       (make-cpu 
        :host (short-site-name)
        :spawn binary
        :options (list "-I" image "-qq" 
                       "-L" (format nil "~a/lingo/exnoen.lisp" %logon%))
        :class :exnoen :name "exnoen" :grammar "ExNoEn (25-jul-04)" 
        :task '(:transfer))
       (make-cpu 
        :host (short-site-name)
        :spawn binary
        :options (list "-I" image "-qq" 
                       "-L" (format nil "~a/lingo/noen.lisp" %logon%))
        :class :noen :name "noen" :grammar "NoEn (21-may-04)" 
        :task '(:transfer))
       (make-cpu 
        :host (short-site-name)
        :spawn binary
        :options (list "-I" image "-qq" 
                       "-L" (format nil "~a/lingo/erg.lisp" %logon%))
        :class :erg :threshold 2 :task '(:generate))))))