osc
osc copied to clipboard
Error while run examples
;; osc-examples.lisp
(osc-examples::osc-send-test #(127 0 0 1) 6668)
The function OSC:ENCODE-MESSAGE is undefined.
[Condition of type UNDEFINED-FUNCTION]
;; osc-device-examples.lisp
(defparameter *osc-server* (make-osc-server :protocol :udp
:debug-mode t))
(boot *osc-server* 57127)
There is no class named OSC::INET-SOCKET.
[Condition of type SB-PCL:CLASS-NOT-FOUND-ERROR]
I tested on macOS(12.6.1) / SBCL(2.2.10.32-eefe83e36) / OSC(osc-20221106-git from quicklisp). Thanks for works!
looks like it might be package related. How are you loading or running the example?
do you get any errors if you (ql:quickload :osc)
and then eval the defun for osc-send-test
?
...and I just noticed the familiar username! so you might also be interested in #7
When evaluating the osc-send-test
function from osc-examples.lisp, I get this warning:
../../../../.sbcl/quicklisp/dists/quicklisp/software/osc-20230618-git/osc-examples.lisp:64:12:
style-warning: undefined function: OSC:ENCODE-MESSAGE
When I grep this library for encode-message
, I see no functions defined with that name. The only results are in osc-tests.lisp, package.lisp, and osc-examples.lisp. Looks like osc::encode-message
does not exist. It does not seem to be a package issue.
Looks like the library was refactored without updating the tests or examples, nor package.lisp.
Looks like with the current version of this library, you're supposed to do something like this:
(osc:send-msg-to (osc:make-osc-transmitter) #(127 0 0 1) 48888 "/foo" 1 2 3)
But running that code gives this error:
The function OSC::SOCKET-SEND is undefined.
[Condition of type UNDEFINED-FUNCTION]
Seems like usocket
should be added to the (:use ...)
of the (defpackage :osc ...)
.
When I load osc-tests.lisp and run (osc::run-tests)
, I get this error:
The function OSC::ENCODE-DATA is undefined.
[Condition of type UNDEFINED-FUNCTION]
Thanks for the details @defaultxr
Looks like some of the changes introduced with 67118a4a14e9defab5308eccec1f0db253015061 need more attention. I should probably get onto #11
No prob, thanks for the quick response! Also, I was wrong in my previous comment; it looks like the socket-send
function in use in this library has a signature that does not match that of usocket:socket-send
. So it seems like it's from a different library, not usocket.
The initial plan was to to keep the data formatting (e.g. encode-bundle
) and transport (the usocket stuff) separate. That's no longer the case, so not sure if it really makes much difference and seems like it could be simplified further...