Hi,
I’ve done some experiments with mTango REST API, using the Tango9 VM.
It’s working quite well, but I’m facing few issues for which your comments are welcome!
I used the doc from here.
1. Rest services for devices tree
$ curl -v -u “tango-cs:tango” “http://tango9-vm:8080/mtango/rest/families?domain=sim”
returns:
…
HTTP/1.1 500 Internal Server Error
…
Unknown @PathParam: domain for path: /families
Now, if I’m using the info from this post, I can get my devices tree without problem. Is the doc on the wiki outdated ?
2. Events
$ curl -v -u “tango-cs:tango” "http://tango9-vm:8080/mtango/rest/device/sim/motor/1/position.change »
1st call: OK
{“argout”:61.02,“quality”:“VALID”,“timestamp”:1482416967728}
2nd call: after ~10s, I get:
{“errors”:[“Device threw an exception:\nZmqEventConsumer.checkIfHeartbeatSkipped():API_NoHeartbeat(No heartbeat from dserver/simmotor/test)\n”],“quality”:“INVALID”,“timestamp”:1482417067607}
.. and any other call returns the same error. If I understand correctly, the call should be blocking, until the attribute value changes. Is the 1st call supposed to return the initial value ?
(Note that doing the same thing with the java API, the events are returned correctly when the attribute value change).
- Using the latest tango.war (mtango.server-rc3-0.1.zip)
I tried to use the latest version of mTango.
Trying to deploy it, I get:
(extract from catalina.out)
…
DEBUG 2016-12-22 12:22:17,721 [http-bio-8080-exec-15 - - o.t.c.d.c.DatabaseCache] o.t.c.database.cache.ServerCache.:38 - current database cache version release 1.9
Error Level 0:
- desc: device dserver/tangorestserver/development not defined in the database localhost:10000 !
- origin: DataBase::ImportDevice()
- reason: DB_DeviceNotDefined
- severity: ERROR
Error Level 1:
- desc: Cannot execute command DbImportDevice on sys/database/2
- origin: Connection.command_inout()
- reason: TangoApi_CANNOT_EXECUTE_COMMAND
- severity: PANIC
…
Thanks for your help,
Jerome