Can't call send from JeroMQ library integrated with Matlab.

2 Ansichten (letzte 30 Tage)
John Dellamorte
John Dellamorte am 10 Nov. 2018
Kommentiert: Derek Wood am 24 Apr. 2020
I have some simple code that imports the JeroMQ jar file, and I'm able create a context, a socket, and a message, but when I go to send the message, I get the following error message even though when I tab-complete command. I see send as a valid function.
To use 'send', at least one of the following products must be licensed, installed, and enabled:
Parallel Computing Toolbox
Robotics System Toolbox
Here is the code boiled down to its simplest form:
import org.zeromq.ZMQ
ip = '192.168.1.20'
ZMQ_MSG_PORT='50001'
ctx = zmq.Ctx();
message = zmq.Msg();
cmdsocket = ctx.createSocket(ZMQ.REQ);
cmdsocket.connect(['tcp://' ip ':' ZMQ_MSG_PORT]);
cmdsocket.send("Hello",0);
It seems to me that there is some sort of path issue or something, because I am able to run the connect functions and the socketCreate functions. Any help is VERY MUCH appreciated.
-J
  1 Kommentar
Derek Wood
Derek Wood am 24 Apr. 2020
I know I'm late to the party, but for anyone else with this problem, I solved it by using these imports instead:
import org.zeromq.*
import java.lang.*
After this fix, matlab no longer interprets zmq.send() as an overloaded function from control toolbox.
Hope it helps!

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Platform and License finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by