4 require './hitachicontrol'
6 require './jeolcontrol'
7 class Vemapi < Sinatra::Base
9 "stagea" => "setStageA",
10 "stager" => "setStager",
11 "spotsize" => "setSpotSize",
12 "magnification" => "setMagnification",
14 "beamtilt" => "setBeamTilt",
20 "Access-Control-Allow-origin" => "*"
26 "Access-Control-Allow-origin" => "*"
27 @@vem = VEM.create("#{params[:emname]}");
28 result = @@vem.__send__("getCondition")
32 get '/:emname/set/:command' do
34 "Access-Control-Allow-origin" => "*"
35 @@vem = VEM.create("#{params[:emname]}");
36 command = "#{params[:command]}"
37 result = @@vem.__send__(@@controls[command], params)
42 Vemapi.run! :host => 'localhost', :port => 9090