-
Notifications
You must be signed in to change notification settings - Fork 2
Worked Examples
Edit the file CMakeLists.txt. The first few lines contain user definitions, as shown below.
#
#
#
#
#
XXX.XXX.XXX Page 11 of 49
Detector Controller Server Interface 20 September
2022
----------------------------------------------------------------------------
BEGIN USER DEFINITIONS
----------------------------------------------------------------------------
user must define the interface type here
valid types are: "AstroCam" | "Archon"
set(INTERFACE_TYPE "Archon")
# If your software is not installed in the indicated directory then change this:
set(PROJECT_BASE_DIR $ENV{HOME}/Software/camera-interface)
# This prints a large number of debugging messages and may be eliminated in future releases:
#add_definitions(-DLOGLEVEL_DEBUG)Allowable interface types are (as indicated in the file), AstroCam or Archon . As shown in the above example, this user has set the interface type to Archon. Next, indicate where your software has been installed, using the syntax:
set(PROJECT_BASE_DIR $ENV{HOME}/Software/camera-interface)Above, this user has installed the software in the Software/camera-interface/ sub-directory in their home directory.
Do not run cmake or make from the same directory as the CMakeLists.txt file. Change to the build directory and run cmake and then make from there, as follows (keystrokes entered by the user are shown in blue):
[developer@localhost ~]$ cd Software/camera-interface/build
[developer@localhost build]$ cmake ..
[developer@localhost build]$ makeThe executable binary programs are located in ~/Software/camera-interface/bin and for the remaining examples in this document it will be assumed that they are in the user's path.
Example configuration files are shown in Figure 2 where an Archon-suitable configuration
file is shown at left and one for AstroCam is shown at right. The astrocam.cfg example
shown at right illustrates how to define DEFAULT_FIRMWARE as an array for multiple
controllers. In this example the system supports four PCI cards.
# Example archon.cfg
#
ARCHON_IP=192.168.1.2
ARCHON_PORT=4242
DEFAULT_FIRMWARE=/home/acf/archon.acf
EXPOSE_PARAM=Expose
IMDIR=/data
BASENAME=image
NBPORT=3030
# non-blocking port
BLKPORT=3031
# blocking port
ASYNCPORT=1234
# asynchronous message port
ASYNCGROUP=239.1.1.234
LOGPATH=/home/logs# Example astrocam.cfg supports 4 controllers
#
DEFAULT_FIRMWARE=(0 /home/dsp/E2V4240/tim.lod)
DEFAULT_FIRMWARE=(1 /home/dsp/E2V4240/tim.lod)
DEFAULT_FIRMWARE=(2 /home/dsp/E2V4240/tim.lod)
DEFAULT_FIRMWARE=(3 /home/dsp/E2V4240/tim.lod)
IMDIR=/Data/E2V4240
BASENAME=image
NBPORT=4000
# non-blocking port
BLKPORT=4001
# blocking port
ASYNCPORT=2345
# asynchronous message port
ASYNCGROUP=239.1.1.234
LOGPATH=/home/E2V4240/logsFigure 2. Example server configuration file