Codync
免费开源的 1:1 Grok Bot 与 Muse 替代方案。可在 iPhone、Mac 或 Linux 桌面上将 Claude 代码、Codex、Cursor 以及 40 多个编码代理作为持久机器人使用。支持群组聊天、线程、应用。
AI 翻译
INDI Core Library Repository
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗INDI is a standard for astronomical instrumentation control. INDI Library is an Open Source POSIX implementation of the Instrument-Neutral-Device-Interface protocol.
INDI core library is composed of the following components:
INDI core device drivers are shipped with INDI library by default.
INDI 3rd party drivers are available in a dedicated 3rdparty repository and maintained by their respective owners.
Learn more about INDI:
On Debian/Ubuntu:
sudo apt-get install -y \
git \
cdbs \
dkms \
cmake \
ninja-build \
fxload \
libev-dev \
libgps-dev \
libgsl-dev \
libraw-dev \
libusb-dev \
zlib1g-dev \
libftdi-dev \
libjpeg-dev \
libkrb5-dev \
libnova-dev \
libtiff-dev \
libfftw3-dev \
librtlsdr-dev \
libcfitsio-dev \
libgphoto2-dev \
build-essential \
libusb-1.0-0-dev \
libdc1394-dev \
libboost-regex-dev \
libcurl4-gnutls-dev \
libtheora-dev \
libxisf-dev \
liberfa-dev
On Arch Linux:
sudo pacman -S --needed \
libnova \
cfitsio \
libusb \
zlib \
libev \
gsl \
base-devel \
cmake \
ninja \
git \
libjpeg-turbo \
curl \
libtiff \
fftw \
libxisf \
erfa
On macOS, install Xcode or the Command Line Tools (xcode-select --install), then the dependencies with Homebrew:
brew install \
git \
cmake \
ninja \
libnova \
cfitsio \
libusb \
libev \
gsl \
jpeg \
curl \
fftw \
librtlsdr \
erfa
If a build on macOS fails with 'cstddef' file not found, the Command Line Tools are missing or an existing build directory still points to a macOS SDK removed by a system update: run xcode-select --install and delete the build directory before building again.
mkdir -p ~/Projects
cd ~/Projects
To build INDI in order to run drivers, then it is recommended to perform a quick shallow clone that will save lots of bandwidth and space:
git clone --depth 1 https://github.com/indilib/indi.git
On the other hand, if you plan to submit a PR or engage in INDI driver development, then getting a full clone is recommended:
git clone https://github.com/indilib/indi.git
It is worth making your own fork of indi in your own personal repository and cloning from that rather than cloning directly from the root indi.
cd ~/Projects/indi
cmake -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
cmake --build build
sudo cmake --install build
On macOS, /usr is read-only, so install to /usr/local instead: -DCMAKE_INSTALL_PREFIX=/usr/local.
Alternatively, you can use the developer-build.bash script for faster build and less stress on your SSD or HDD.
cd ~/Projects/indi
./developer-build.bash
By default, this script builds the indi-core inside machine's RAM, i.e. /dev/shm.
However, you can change the target build directory using the -o option, for instance:
./developer-build.bash -o /path/to/new/build/dir
Also, this script checks if the target build directory has at least 512MB of memory available and aborts if this is not the case.
You can force skip this test with the -f option:
./developer-build.bash -f
Furthermore, this script executes make in parallel by default.
If you are having problems or need to use fewer CPU cores, please adjust using the -j option.
For example, to disable parallel execution:
./developer-build.bash -j1
This script creates a soft symbolic link file named build to the target build directory.
This helps easier access by simply following the symbolic link:
cd ~/Projects/indi/build
Lastly, you could give all the options and arguments at once.
For instance, if you want to build in ~/indi-build directory, skip the memory check, and run make using 8 cores, call the script with the following options:
cd ~/Projects/indi
./developer-build.bash -o ~/indi-build -f -j8
If your are planning to develop using Qt Creator then still follow this process and do a manual build first. Then in QT Creator:
It is very easy to get this process wrong and all sorts of subtle things can happen, such as everything appearing to build but your new functionality not being present.
INDI includes a default .vscode directory with default settings for building and launching the project. After opening the project for the first time in VS Code, install all the recommended extensions. You need to also install the following packages:
sudo apt-get -y install astyle clangd
Enable clangd extension in settings. The default launch script debugs INDI simulator telescope driver. The first driver is also the one that can be debugged.
INDI offers preliminary interoparbility with ASCOM Alpaca devices.
INDI provides drivers that enable connection to remote ASCOM Alpaca devices, presenting them as native INDI drivers to INDI clients. These drivers act as a bridge, translating Alpaca commands and responses to the INDI protocol, allowing existing Alpaca-compatible hardware to be controlled through the INDI ecosystem.
For each of these INDI client drivers, you need to specify the remote Alpaca device's host, port, and device number to establish a connection:
indi_alpaca_ccdindi_alpaca_domeindi_weather_safety_alpacaThe indi_alpaca_server is an INDI driver that acts as a bridge, enabling existing INDI drivers to be exposed and controlled as native ASCOM Alpaca devices over the network. This allows any ASCOM Alpaca-compatible client (which can run on any OS) to seamlessly interact with your INDI-controlled hardware.
The server connects to your INDI drivers (either locally or remotely via an INDI server) and automatically parses their capabilities to generate the appropriate Alpaca device interfaces.
Network Discovery:
The indi_alpaca_server implements the ASCOM Alpaca Discovery protocol. It listens for IPv4 broadcasts (and potentially IPv6 multicasts) on a designated discovery port (default 32227, but configurable). It responds to discovery messages (alpacadiscovery1) with a JSON object containing its Alpaca port ({"AlpacaPort":12345}). This allows Alpaca clients to automatically locate and identify available INDI drivers exposed as Alpaca devices on the local network.
Configuration:
When running the indi_alpaca_server, you can configure the following parameters via the INDI control panel:
indi_alpaca_server will listen for incoming Alpaca client connections (e.g., 0.0.0.0:11111).localhost:7624).indi_alpaca_server attempts to connect to the INDI server, useful for ensuring the INDI server is fully ready.Currently, the following INDI device types are supported for exposure as Alpaca devices:
Typical INDI Client / Server / Driver / Device connectivity:
INDI Client 1 ----| |---- INDI Driver A ---- Dev X
| |
INDI Client 2 ----| |---- INDI Driver B ---- Dev Y
| | |
... |--- indiserver ---| |-- Dev Z
| |
| |
INDI Client n ----| |---- INDI Driver C ---- Dev T
Client INET Server UNIX Driver Hardware
processes sockets process pipes processes devices
INDI server is the public network access point where one or more INDI Clients may contact one or more INDI Drivers. indiserver launches each driver process and arranges for it to receive the INDI protocol from clients on its stdin and expects to find commands destined for clients on the driver's stdout. Anything arriving from a driver process' stderr is copied to indiserver's stderr. INDI server only provides convenient port, fork and data steering services. If desired, a client may run and connect to INDI Drivers directly.
INDI uses Artistic Style to format all the C++ source files. Please make sure to apply the following astyle rules to any code that is submitted to INDI. On Linux, you can create ~/.astylerc file containing the following rules:
--style=allman
--align-reference=name
--indent-switches
--indent-modifiers
--indent-classes
--pad-oper
--indent-col1-comments
--lineend=linux
--max-code-length=124
Some IDEs (e.g. QtCreator) support automatic formatting for the code everytime you save the file to disk.
How to contribute to INDI full guide
Here is the short version on how to submit a PR:
If you would like to make cleaner PR (recommended!) please read this tutorial and follow it. The best way is to keep one logical change per commit and not pollute the history by multiple small fixes to the PR.
When submitting a new driver, the driver user documentation is required as part of the submission process.
You can base a new driver from an existing driver. Look in either the examples or drivers/skeleton directories on how to get started.
In order to run the unit test suite you must first install the Google Test Framework. You will need to build and install this from source code as Google does not recommend package managers for distributing distros.(This is because each build system is often unique and a one size fits all approach does not work well).
Once you have the Google Test Framework installed follow this alternative build sequence:-
mkdir -p build/indi
cd build/indi
cmake -DINDI_BUILD_UNITTESTS=ON -DCMAKE_BUILD_TYPE=Debug ../../
make
make test
For more details refer to the scripts in the .circleci directory.