Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To create a new data provider on SLC, we begin on an AFS unix node and use facilities in the Aida makefile system for creating the CORBA stubs and skeletons of a new Aida server. We then copy all the files so created over to VMS and continue real development there (where real developers work):

Code Block
rdh@tersk09 $ mkdir work2
rdh@tersk09 $ cd work2
rdh@tersk09 $ cvs co package/aida
cvs checkout: Updating package/aida
U package/aida/.classpath....

Source the Aida development setup files. Note the 2nd argument to aidaSetEnvDev.csh is the directory of your development instance of aida (what you created in the previous step):

Code Block
rdh@tersk09 $ source /afs/slac/g/cd/soft/dev/script/ENVS.csh
rdh@tersk09 $ source /afs/slac/g/cd/soft/dev/script/aidaSetEnvDev.csh dev ${HOME}/work2/package/aida

cd to the dp directory

Code Block
rdh@tersk09 $ cd package/aida/edu/stanford/slac/aida/dp/

Create a new Data Provider (dp) directory. Then copy an existing Makefile.sun4 from one of the existing dps, on which we'll base a new one.

Code Block
rdh@tersk09 $ mkdir dpSlcMagnet
rdh@tersk09 $ cd dpSlcMagnet/
rdh@tersk09 $ cp ../dpSlcModel/Makefile.sun4 .

Modify the Makefile, replacing the PACKAGE, MODULE and INTERFACENAME values with values appropriate for your new data provider.

Code Block
rdh@tersk09 $ emacs Makefile.sun4
<edit PACKAGE, MODULE and INTERFACENAME>

Run the Makefile.sun4; this will create all client and server sides, except the _impl.java file. You will create an _impl.java file by hand later.Ignore the jidl complaint about not finding an idl file, it's not supposed to.

Code Block
rdh@tersk09 $ gmake -f Makefile.sun4
jidl: couldn't open /u/cd/rdh/work2/package/aida/idl/dpSlcMagnet.idl
echo 'me first'
me first
sed -e 's/THIS/dpSlcMagnet/g' ....
...

...

Code Block
/*
      **MEMBER**=SLCLIBS:AIDASHRLIB
      **ATTRIBUTES**=JNI
*/
#include "dpslcbpm_jni.h"

...

Create the dp<servername>_jni_helper.c file. This is the module that defines the functions that access the control system. The names of the functions it *defines* must all be in upper-case (due to the compiling and linking configurations specified in slccom:compile.com and the build com files). But the functions that those function call (in the control system shareables), need not be in upper-case.

...