Megatest

task_records.scm at [2f7180aa77]
Login

File task_records.scm artifact a7bc5593be part of check-in 2f7180aa77


;;======================================================================
;; Copyright 2006-2012, Matthew Welland.
;; 
;; This file is part of Megatest.
;; 
;;     Megatest is free software: you can redistribute it and/or modify
;;     it under the terms of the GNU General Public License as published by
;;     the Free Software Foundation, either version 3 of the License, or
;;     (at your option) any later version.
;; 
;;     Megatest is distributed in the hope that it will be useful,
;;     but WITHOUT ANY WARRANTY; without even the implied warranty of
;;     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;     GNU General Public License for more details.
;; 
;;     You should have received a copy of the GNU General Public License
;;     along with Megatest.  If not, see <http://www.gnu.org/licenses/>.
;;======================================================================

;; make-vector-record tasks task id action owner state target name test item params creation_time execution_time 
(define (make-tasks:task)(make-vector 11))
(define (tasks:task-get-id               vec)    (vector-ref  vec 0))
(define (tasks:task-get-action           vec)    (vector-ref  vec 1))
(define (tasks:task-get-owner            vec)    (vector-ref  vec 2))
(define (tasks:task-get-state            vec)    (vector-ref  vec 3))
(define (tasks:task-get-target           vec)    (vector-ref  vec 4))
(define (tasks:task-get-name             vec)    (vector-ref  vec 5))
(define (tasks:task-get-testpatt         vec)    (vector-ref  vec 6))
(define (tasks:task-get-keylock          vec)    (vector-ref  vec 7))
(define (tasks:task-get-params           vec)    (vector-ref  vec 8))
(define (tasks:task-get-creation_time    vec)    (vector-ref  vec 9))
(define (tasks:task-get-execution_time   vec)    (vector-ref  vec 10))

(define (tasks:task-set-state!  vec val)(vector-set! vec 3 val))


;; make-vector-record tasks monitor id pid start_time last_update hostname username
(define (make-tasks:monitor)(make-vector 5))
(define (tasks:monitor-get-id            vec)    (vector-ref  vec 0))
(define (tasks:monitor-get-pid           vec)    (vector-ref  vec 1))
(define (tasks:monitor-get-start_time    vec)    (vector-ref  vec 2))
(define (tasks:monitor-get-last_update   vec)    (vector-ref  vec 3))
(define (tasks:monitor-get-hostname      vec)    (vector-ref  vec 4))
(define (tasks:monitor-get-username      vec)    (vector-ref  vec 5))