diff --git a/csys/csys.lisp b/csys/csys.lisp index 7d92e8d..e5e5b29 100644 --- a/csys/csys.lisp +++ b/csys/csys.lisp @@ -106,10 +106,11 @@ (defun create-sensor (msg state syns env) (let* ((key (shape:data msg)) - (sensor (make-neuron actor:*self* :state key))) + (sensor (make-neuron actor:*self* :state key)) + (nmsg (message:create (list :csys :created (car key) (cadr key))))) (setf (gethash key (sensors env)) (list sensor)) - (list msg state syns))) + (list nmsg state syns))) (defun add (msg state syns env) - (list msg (+ (shape:data msg) state) syns env)) + (list msg (+ (shape:data msg) state) syns)) diff --git a/test/test-csys.lisp b/test/test-csys.lisp index 409b7a6..a501e3a 100644 --- a/test/test-csys.lisp +++ b/test/test-csys.lisp @@ -31,10 +31,11 @@ ) (defun eff-proc (msg state syns env) - (util:lgi msg) (let ((t:*test-suite* (test-suite env))) - (actor:send (core:mailbox (tc:receiver t:*test-suite*)) msg)) - (csys:handle-action msg state syns env)) + (destructuring-bind (nmsg nst nsyns) + (csys:handle-action msg state syns env) + (util:lgi nmsg) + (actor:send (core:mailbox (tc:receiver t:*test-suite*)) nmsg)))) ;;;; test runner