diff --git a/README.md b/README.md index c5d7342..077484c 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,17 @@ If you encounter any problems or have questions about this project, please open $ rm -Rf * ``` -3. **Create the Makefile by running CMake** (from the build directory): +3. **Create the Makefile by running CMake** (from the build directory). `-DCONTROLLER=` is required; CMake stops with an error if it is missing: - | Archon | ARC | - |------------------------|----------------------------------| - | `$ cmake ..` | `$ cmake -DINTERFACE_TYPE=AstroCam ..` | + | Archon | ARC | + |-----------------------------------|--------------------------------------| + | `$ cmake -DCONTROLLER=archon ..` | `$ cmake -DCONTROLLER=astrocam ..` | + + Add `-DINSTRUMENT=` to build an instrument module, whose sources come from `camerad/Instruments/`: + + ```bash + $ cmake -DCONTROLLER=archon -DINSTRUMENT=hispec_tracking_camera .. + ``` To enable the shared-memory output (`SHM_ENABLED` in a `.cfg` file, see [Frame Outputs](#frame-outputs) below), add `-DENABLE_SHM_OUTPUT=ON -DImageStreamIO_DIR=/lib/cmake`: @@ -66,6 +72,8 @@ If you encounter any problems or have questions about this project, please open pybind11 is located by asking the interpreter CMake selected, so pass `-DPython3_EXECUTABLE=...` to build against a specific one (a virtualenv, say). The module and that interpreter then always agree on the ABI. + pybind11 is header-only and needed only to compile: the built module links cfitsio, CCfits and OpenCV but not pybind11, so it does not have to be present where the module is imported. + 4. **Compile the sources:** ```bash @@ -74,31 +82,36 @@ If you encounter any problems or have questions about this project, please open 5. **Run the Camera Server:** - - **As a foreground process:** + The configuration file is passed with `--config` and is required. + + - **As a foreground process**, logging to the console as well as to `LOGPATH`: ```bash - $ ../bin/camerad --foreground + $ ../bin/camerad --foreground --config ``` - - **As a daemon:** + - **As a daemon**, which is the default without `--foreground`: ```bash - $ ../bin/camerad -d + $ ../bin/camerad --config ``` *Replace `` with an appropriate configuration file. See the example `.cfg` files in the `config` directory (per-instrument deployment configs live in each instrument's own repo under its `config/` directory; `config/demo` here is a generic example).* + Logging always goes to a daily file under `LOGPATH`. Whether it is also written to stderr follows `--foreground`, so an operator watching a console sees it and a daemon does not duplicate its whole log into the stderr redirect. `LOG_STDERR` in the `.cfg` overrides that either way. + 6. **(Optional) Run the Archon Emulator:** ```bash - $ ../bin/emulator + $ ../bin/emulator -i ``` - *Note: The emulator software will only be compiled when `INTERFACE_TYPE` is set to Archon (default).* + The emulator reads `EMULATOR_PORT` and `EMULATOR_SYSTEM` from the same `.cfg` the server uses, so point `ARCHON_IP`/`ARCHON_PORT` at it to run without hardware. `-i generic` suits the shipped test configs. It is built only for `-DCONTROLLER=archon`. -7. **(Optional) Run Unit Tests:** +7. **(Optional) Run Unit Tests.** The tests are excluded from the default target, so build them first: ```bash + $ make run_unit_tests $ ../bin/run_unit_tests ```