From 2258c722ea4fceb8ba65c58f124e99f4b03bea84 Mon Sep 17 00:00:00 2001 From: Jasem Mutlaq Date: Fri, 2 Aug 2024 09:50:37 +0300 Subject: [PATCH] Documentation updates --- README.md | 57 +++++++++++---------- drivers/driver-interface.md | 99 +++++++++++++++++++++++-------------- indiserver/README.md | 2 + 3 files changed, 95 insertions(+), 63 deletions(-) diff --git a/README.md b/README.md index 08fcc14..0640752 100644 --- a/README.md +++ b/README.md @@ -6,23 +6,25 @@ as information on the INDI protocol itself. First, some helpful links: -* INDI Links - * [INDI Main Repo](https://github.com/indilib/indi) - * [INDI 3rd Party Repo](https://github.com/indilib/indi-3rdparty) - * [libindi API Docs](https://www.indilib.org/api/index.html) - * [INDI Stable Builds](https://launchpad.net/~mutlaqja/+archive/ubuntu/ppa) - * [INDI Nightly Builds](https://launchpad.net/~mutlaqja/+archive/ubuntu/indinightly) -* Build Tools - * [CMake](https://cmake.org/cmake/help/latest/) -* Helpful Libraries - * [libnova](http://libnova.sourceforge.net/) - * [libgsl](https://www.gnu.org/software/gsl/) - * [libcfitsio](https://heasarc.gsfc.nasa.gov/fitsio/) -* **Bundled** Header-only Libraries +- INDI Links + - [INDI Main Repo](https://github.com/indilib/indi) + - [INDI 3rd Party Repo](https://github.com/indilib/indi-3rdparty) + - [libindi API Docs](https://www.indilib.org/api/index.html) + - [INDI Stable Builds](https://launchpad.net/~mutlaqja/+archive/ubuntu/ppa) + - [INDI Nightly Builds](https://launchpad.net/~mutlaqja/+archive/ubuntu/indinightly) +- Build Tools + - [CMake](https://cmake.org/cmake/help/latest/) +- Helpful Libraries + - [libnova](http://libnova.sourceforge.net/) + - [libgsl](https://www.gnu.org/software/gsl/) + - [libcfitsio](https://heasarc.gsfc.nasa.gov/fitsio/) + - [libxisf](https://gitea.nouspiro.space/nou/libXISF) +- **Bundled** Header-only Libraries The following C++ header-only libraries are included with libindi and may be used by any driver to handle common tasks around JSON and RESTful web services. - * [json](https://github.com/nlohmann/json): Write & parse JSON in INDI drivers (e.g. [Primalucelab Devices](https://github.com/indilib/indi/blob/master/drivers/focuser/primalucacommandset.cpp)) - * [httplib](https://github.com/yhirose/cpp-httplib): Create http(s) servers and clients. Make GET/POST/PUT calls for RESTful services (e.g. [Planewave Mount](https://github.com/indilib/indi/blob/master/drivers/telescope/planewave_mount.cpp)). - * [inifile-cpp](https://github.com/Rookfighter/inifile-cpp): a simple and easy to use single header-only ini file en- and decoder for C++ (e.g. [Planewave Mount](https://github.com/indilib/indi/blob/master/drivers/telescope/planewave_mount.cpp)). + - [json](https://github.com/nlohmann/json): Write & parse JSON in INDI drivers (e.g. [Primalucelab Devices](https://github.com/indilib/indi/blob/master/drivers/focuser/primalucacommandset.cpp)) + - [httplib](https://github.com/yhirose/cpp-httplib): Create http(s) servers and clients. Make GET/POST/PUT calls for RESTful services (e.g. [Planewave Mount](https://github.com/indilib/indi/blob/master/drivers/telescope/planewave_mount.cpp)). + - [inifile-cpp](https://github.com/Rookfighter/inifile-cpp): a simple and easy to use single header-only ini file encoder and decoder for C++ (e.g. [Planewave Mount](https://github.com/indilib/indi/blob/master/drivers/telescope/planewave_mount.cpp)). + - [nanomodbus](https://github.com/debevv/nanoMODBUS): A compact MODBUS RTU/TCP C library for embedded controllers (e.g. [Waveshare Relay](https://github.com/indilib/indi/blob/master/drivers/auxiliary/waveshare_modbus_relay.h)). ## Introduction @@ -77,12 +79,12 @@ library and device drivers to different platforms as desired. Supported operating systems include: -* Linux: Full Support -* MacOS: Full Support, except for few Linux-only drivers. -* Windows: Partial driver support via Cygwin. Client support. -* BSD: Full Support, except for few Linux-only drivers. -* iOS: Client support only. -* Android: Client support only. +- Linux: Full Support +- MacOS: Full Support, except for few Linux-only drivers. +- Windows: Partial driver support via Cygwin. Client support. +- BSD: Full Support, except for few Linux-only drivers. +- iOS: Client support only. +- Android: Client support only. INDI Library provides [Python client bindings](https://github.com/indilib/pyindi-client) to access INDI server and drivers. @@ -91,19 +93,20 @@ INDI Library provides ### Linux/Mac -* [INDI Downloads](https://indilib.org/get-indi.html) +- [INDI Downloads](https://indilib.org/get-indi.html) +- [Nou Scripts](https://gitea.nouspiro.space/nou/astro-soft-build) ### Raspberry Pi -* [Astroberry Repo](https://www.astroberry.io/repo/) -* [AstroPI3 Script](https://github.com/rlancaste/AstroPi3) +- [Astroberry Repo](https://www.astroberry.io/repo/) +- [AstroPI3 Script](https://github.com/rlancaste/AstroPi3) ### Source Instructions for building from source are available in the GitHub repos. -* [INDI GitHub](https://github.com/indilib/indi) -* [INDI 3rd Party GitHub](https://github.com/indilib/indi-3rdparty) +- [INDI GitHub](https://github.com/indilib/indi) +- [INDI 3rd Party GitHub](https://github.com/indilib/indi-3rdparty) ## Contributing diff --git a/drivers/driver-interface.md b/drivers/driver-interface.md index b283107..1ccab81 100644 --- a/drivers/driver-interface.md +++ b/drivers/driver-interface.md @@ -1,6 +1,7 @@ --- sort: 7 --- + ## Driver Interface There are several different device types recognized by the INDI ecosystem. Your driver can implement @@ -26,6 +27,11 @@ enum DRIVER_INTERFACE SPECTROGRAPH_INTERFACE = (1 << 13), /**< Spectrograph interface */ CORRELATOR_INTERFACE = (1 << 14), /**< Correlators (interferometers) interface */ AUX_INTERFACE = (1 << 15), /**< Auxiliary interface */ + OUTPUT_INTERFACE = (1 << 16), /**< Digital Output (e.g. Relay) interface */ + INPUT_INTERFACE = (1 << 17), /**< Digital/Analog Input (e.g. GPIO) interface */ + POWER_INTERFACE = (1 << 18), /**< Auxiliary interface */ + + SENSOR_INTERFACE = SPECTROGRAPH_INTERFACE | DETECTOR_INTERFACE | CORRELATOR_INTERFACE }; ``` @@ -33,53 +39,74 @@ You can let INDI know what you implement by calling `setDriverInterface` in `ini Many of these interfaces have base classes you can and should inherit from if you implmement the interface. -* `TELESCOPE_INTERFACE` - * `liibindi/inditelescope.h` - * `Telescope` +- `TELESCOPE_INTERFACE` + + - `liibindi/inditelescope.h` + - `Telescope` + +- `CCD_INTERFACE` + + - `liibindi/indiccd.h` + - `CCD` + +- `GUIDER_INTERFACE` + + - `libindi/indiguiderinterface.h` + - `GuiderInterface` + +- `FOCUSER_INTERFACE` + + - `libindi/indifocuserinterface.h` + - `FocuserInterface` + +- `FILTER_INTERFACE` + + - `libindi/indifilterinterface.h` + - `FilterInterface` + +- `DOME_INTERFACE` + + - `libindi/indidome.h` + - `Dome` + +- `GPS_INTERFACE` + + - `libindi/indigps.h` + - `GPS` + +- `WEATHER_INTERFACE` + + - `libindi/indiweatherinterface.h` + - `WeatherInterface` -* `CCD_INTERFACE` - * `liibindi/indiccd.h` - * `CCD` +- `DETECTOR_INTERFACE` -* `GUIDER_INTERFACE` - * `libindi/indiguiderinterface.h` - * `GuiderInterface` + - `libindi/indidetector.h` + - `Detector` -* `FOCUSER_INTERFACE` - * `libindi/indifocuser.h` - * `Focuser` +- `ROTATOR_INTERFACE` -* `FILTER_INTERFACE` - * `libindi/indifilterwheel.h` - * `FilterWheel` + - `libindi/indirotatorinterface.h` + - `RotatorInterface` -* `DOME_INTERFACE` - * `libindi/indidome.h` - * `Dome` +- `OUTPUT_INTERFACE` -* `GPS_INTERFACE` - * `libindi/indigps.h` - * `GPS` + - `libindi/indioutputinterface.h` + - `OutputInterface` -* `WEATHER_INTERFACE` - * `libindi/indiweather.h` - * `Weather` +- `INPUT_INTERFACE` -* `DETECTOR_INTERFACE` - * `libindi/indidetector.h` - * `Detector` + - `libindi/indiinputinterface.h` + - `InputInterface` -* `ROTATOR_INTERFACE` - * `libindi/indirotator.h` - * `Rotator` +- `SPECTROGRAPH_INTERFACE` -* `SPECTROGRAPH_INTERFACE` - * `libindi/indispectrograph.h` - * `Spectrograph` + - `libindi/indispectrograph.h` + - `Spectrograph` -* `CORRELATOR_INTERFACE` - * `libindi/indicorrelator.h` - * `Correlator` +- `CORRELATOR_INTERFACE` + - `libindi/indicorrelator.h` + - `Correlator` Each of these base classes have methods you must override for your driver to work correctly. They also take care of creating any diff --git a/indiserver/README.md b/indiserver/README.md index 4f4f621..a10e4e2 100644 --- a/indiserver/README.md +++ b/indiserver/README.md @@ -7,6 +7,8 @@ $ indiserver [options] driver [driver ...] Options: -l d : log driver messages to /YYYY-MM-DD.islog -m m : kill client if gets more than this many MB behind, default 10 + -d m : drop streaming blobs if client gets more than this many MB behind, default 5. 0 to disable + -u path : Path for the local connection socket (abstract), default /tmp/indiserver -p p : alternate IP port, default 7624 -f path : Path to fifo for dynamic startup and shutdown of drivers. -r r : maximum driver restarts on error, default 10.