csys: fixes and improvements
This commit is contained in:
parent
cd30c9226e
commit
4d37117339
2 changed files with 7 additions and 11 deletions
|
|
@ -14,7 +14,7 @@
|
||||||
#:handle-action #:basic-actions #:forward #:notify
|
#:handle-action #:basic-actions #:forward #:notify
|
||||||
#:no-op #:printer #:value-add #:create #:connect
|
#:no-op #:printer #:value-add #:create #:connect
|
||||||
#:multiply
|
#:multiply
|
||||||
#:send-create #:send-connect))
|
#:send-message #:send-create #:send-connect))
|
||||||
|
|
||||||
(in-package :scopes/csys)
|
(in-package :scopes/csys)
|
||||||
|
|
||||||
|
|
@ -198,13 +198,10 @@
|
||||||
`(:addr ,(list domain cat loc))
|
`(:addr ,(list domain cat loc))
|
||||||
`(:categ ,(list domain cat)))))
|
`(:categ ,(list domain cat)))))
|
||||||
(setf args (alx:remove-from-plist args :domain :cat :loc))
|
(setf args (alx:remove-from-plist args :domain :cat :loc))
|
||||||
(actor:send cell
|
(send-message cell (list domain :create) (append args+ args))))
|
||||||
(message:create (list domain :create) :data (append args+ args)))))
|
|
||||||
|
|
||||||
(defun send-connect (cell target &key op (domain :csys))
|
(defun send-connect (cell target &key op (domain :csys))
|
||||||
(actor:send cell
|
(send-message cell (list domain :connect) (list :target target :op op)))
|
||||||
(message:create (list domain :connect)
|
|
||||||
:data (list :target target :op op))))
|
|
||||||
|
|
||||||
(defun printer ()
|
(defun printer ()
|
||||||
(actor:create (lambda (msg) (print msg))))
|
(actor:create (lambda (msg) (print msg))))
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,9 @@
|
||||||
(register-cell cells (list :env cat loc) ct)))))
|
(register-cell cells (list :env cat loc) ct)))))
|
||||||
|
|
||||||
(defun proc-contact (msg scope)
|
(defun proc-contact (msg scope)
|
||||||
(setf (nth 3 (shape:head msg)) (loc scope))
|
(let ((head (copy-list (shape:head msg))))
|
||||||
(actor:send (csys:environ scope) msg))
|
(setf (nth 3 head) (loc scope))
|
||||||
|
(csys:send-message (csys:environ scope) head (shape:data msg))))
|
||||||
|
|
||||||
;;;; action handlers
|
;;;; action handlers
|
||||||
|
|
||||||
|
|
@ -69,9 +70,7 @@
|
||||||
(let* ((ct-addr (cons :env (cdr addr)))
|
(let* ((ct-addr (cons :env (cdr addr)))
|
||||||
(ct (find-cell (cells scope) ct-addr)))
|
(ct (find-cell (cells scope) ct-addr)))
|
||||||
(when ct (csys:send-connect new ct)))
|
(when ct (csys:send-connect new ct)))
|
||||||
;(csys:send-message new (list (message:domain msg) :next) :data data)
|
(csys:send-message new (list (message:domain msg) :next) data)
|
||||||
(actor:send new
|
|
||||||
(message:create (list (message:domain msg) :next) :data data))
|
|
||||||
nil))
|
nil))
|
||||||
|
|
||||||
(defun forward (msg scope)
|
(defun forward (msg scope)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue