Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while run examples #14

Closed
byulparan opened this issue Nov 19, 2022 · 6 comments
Closed

Error while run examples #14

byulparan opened this issue Nov 19, 2022 · 6 comments

Comments

@byulparan
Copy link
Contributor

;; 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!

@zzkt
Copy link
Owner

zzkt commented Dec 9, 2022

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?

@zzkt
Copy link
Owner

zzkt commented Dec 9, 2022

...and I just noticed the familiar username! so you might also be interested in #7

@defaultxr
Copy link

defaultxr commented Nov 14, 2023

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]

@zzkt
Copy link
Owner

zzkt commented Nov 14, 2023

Thanks for the details @defaultxr

Looks like some of the changes introduced with 67118a4 need more attention. I should probably get onto #11

@defaultxr
Copy link

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.

@zzkt
Copy link
Owner

zzkt commented Nov 14, 2023

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants