help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mqtt subscribe and public


From: Kurt Fellenberg
Subject: mqtt subscribe and public
Date: Thu, 16 Jun 2016 18:31:50 +0200
User-agent: Alpine 2.20 (LSU 67 2015-01-07)

Dear All,

Using Octave, we would like to both write and listen to mqtt messages. To steer our backend, incoming messages need to trigger calculations which will then result in writing a message. Thus, two separate Octave instances (one for reading and another for writing) are not an option.

Using org.eclipse.paho.client.mqttv3-1.0.2.jar via the (now built-in) java package of Octave 4.0.0, we have no problems writing. Also, incoming messages can be stored in a java vector and accessed from Octave without a problem. We can even see a message arrive by having the java listener write it to stdout. But we fail to trigger any Octave function call by the java event.

I assume this must have been possible in the past by using e.g.
org.octave.Octave.doEvalString(java.lang.String) as described e.g. at https://lists.gnu.org/archive/html/help-octave/2014-06/msg00063.html
In our hands, as well, this always results in an UnsatisfiedLinkError:

error: [java] java.lang.UnsatisfiedLinkError:
org.octave.Octave.doEvalString(Ljava/lang/String;)V

Also when adding the directory of liboctinterp.so to LD_LIBRARY_PATH or
System.loadLibrary("octinterp") to the java code.

Another way would be to just alter any graphics object property (putting a
callback with addlistener). But I don't know how to access any from java
(in fact appreciating without end that Octave graphics are NOT java).

Is calling Octave functions by java code evt. deprecated on purpose? I read about the two recommendations (kenai project and jopas) for doing so. But as explained, our project requires both directions (i.e. calling Octave from java and calling java from Octave) to and from one and the same Octave instance. And I do not think kenai nor jopas can do this. Please correct me if I'm wrong.

Any advice how to solve this or if we should better go via C/mex or any other way to both recieving and sending mqtt messages to/from the same Octave session are very welcome.

Thanking you in advance,
with kind regards,
Kurt





reply via email to

[Prev in Thread] Current Thread [Next in Thread]