Pete,
I did just a quick set up of a scientist's AMC100, which should use the
same json REST api.
However, it's using the scriptable motor driver
(https://github.com/epics-motor/motorScriptMotor
<https://github.com/epics-motor/motorScriptMotor>) due to me not wanting
to deal with parsing a bunch of JSON in c/c++. So you'll need the master
branch of that motor module and to build motor against the lua epics
module (https://github.com/epics-modules/lua
<https://github.com/epics-modules/lua>).
If you still would want to use it, I have the script here:
https://github.com/keenanlang/Lua-Scripts/blob/master/motors/AMC100.lua
<https://github.com/keenanlang/Lua-Scripts/blob/master/motors/AMC100.lua>
You'll also need to grab json.lua from here:
https://github.com/rxi/json.lua <https://github.com/rxi/json.lua> (put
it in your working directory or edit line 3 of AMC100.lua to add the
path to the package search path)
Then the startup command calls are:
drvAsynIPPortConfigure("AMC100-1_IP", "<INSERT IP HERE>:9090", 0,0,0)
ScriptControllerConfig("AMC100-1", 2, "scripts/AMC100.lua",
"PORT=AMC100-1_IP")
The support assumes a motor that has an encoder. If you're dealing with
open loop steppers, it should just be a matter of switching the api
method names in the move and poll functions (lines 46 and 79).
Or, at the very least, since the scriptable motor is pretty much 1-to-1
compared to a standard model 3 driver, it shouldn't be too bad to
convert the logic to a c++ driver using https://github.com/nlohmann/json
<https://github.com/nlohmann/json> .
Keenan Lang