From ac4074ecccaef481764b0d27b28f73b242b90a1e Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Wed, 11 Mar 2026 15:14:24 +0100 Subject: [PATCH] csys: modify message after sensor creation, + fix test: eff-proc --- csys/csys.lisp | 7 ++++--- test/test-csys.lisp | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) 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