AB Controls | SL Controls | PS Controls | LHC-CP | ST Controls

 

 

Some simple examples illustrate use of the Device API. For the time being due to different naming services in PS and SL it is mandatory to specify the configuration file when running the examples.

HelloGet.java illustrates synchronous get which work with the example Hello server (see SUM). HelloMonitor.java and ExampleHandler.java illustrate use of subscription with the example Hello server. To run these examples it is necessary to link with the CMW jar files and to specify -Dcmw.config=http://slwww/~pca/cmw/sl.cfg for configuration file.

Access to real SPS or PS devices is done the same way, except that different device directory servers are involved. The following example here shows how both PS and SPS devices can be accessed in the same program. Please note that by running these examples you may act on devices in operation so that they should be used with moderation, ideally replacing the device names with ones you know you can access. 

 

Copyright CERN
Modified 07/11/02 .  For comments send email to Kris.Kostro@cern.ch