-
Notifications
You must be signed in to change notification settings - Fork 13
EPICS Code Debugging
The package that deals with EPICS connections in Seqexec is edu.gemini.epics.acm. This package uses epics-service, provided by GIAPI. The actual EPICS network protocol is provided by CAJ (Channel Access for Java), which is used by epics-service. CAJ is in turn an implementation of JCA (Java Channel Access).
The JCA and CAJ classes are provided by two JAR files. GIAPI uses a copy of the files stored in our own repository, under the group names edu.gemini.external.osgi.com.cosylab.epics.caj and edu.gemini.external.osgi.com.cosylab.epics.jca. The GIAPI packages themselves are accessed by ocs3 through the same repository.
The way the packages are accessed makes difficult to implement changes to debug a problem that involves CAJ. Here there is the procedure to create a build environment that involves using a local repository.
The latest version of JCA, available in Github, integrates CAJ in the same package.
- Retrieve the JCA code.
git clone https://github.com/epics-base/jca cd jca - Build the JCA package locally.
mvn install
That procedure will put the JCA jar file in the local Maven repository, usually located in ~/.m2/repository
- First, retrieve the code
svn checkout http://source.gemini.edu/software/giapi/giapi-osgi/branches/gmp-ng giapi cd giapi - Edit the POM files to use the local copy of JCA-CAJ. The following files must be edited:
** cas/pom.xml
** casdb/pom.xml
** epics-api/pom.xml
** epics-service/pom.xml
** integration-tests/pom.xml
** pom.xml
Remove all dependencies on
caj, and change the groupId forjcatoorg.epics. Also, the version must be changed to the latest snapshot. - Build the packages
mvn install
OCS3 build settings must be modified to use the local GIAPI and JCA-CAJ packages.
- Modify the package versions in
project/Settings.sbtto use the snapshots. They versions to change are: ** epicsService ** gmpCommandRecords ** giapi ** giapiJmsUtil ** giapiJmsProvider ** giapiCommandsClient ** giapiStatusService - Enable the use of the local Maven repository. Uncomment the following line in
build.sbt:resolvers in ThisBuild += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository
If necessary, modify it to point to your local repository.
To test changes made in CAJ, all the packages have to be rebuilt:
- Build JCA
- Build GIAPI
- Build OCS3