Tutorial Six: Simple Client
This tutorial demonstrates how to create a simple INDI client that can control a CCD simulator. It shows how to connect to an INDI server, access device properties, and perform operations like setting the camera temperature and taking exposures.
What You’ll Learn
- How to create an INDI client by inheriting from
INDI::BaseClient
- How to connect to an INDI server
- How to access and modify device properties
- How to handle property updates and BLOB data
Source Code
The source code for this tutorial can be found in the INDI library repository under the examples/tutorial_six
directory.
INDI Client Development
INDI clients connect to INDI servers to control devices. The key steps for implementing an INDI client are:
- Create a class that inherits from
INDI::BaseClient
- Connect to an INDI server
- Watch for devices and properties of interest
- Handle property updates and perform operations
Code Explanation
This tutorial demonstrates:
-
Client Setup:
- Creating a client class that inherits from
INDI::BaseClient
- Connecting to an INDI server
- Watching for the “Simple CCD” device
- Creating a client class that inherits from
-
Device Control:
- Setting the camera temperature
- Taking exposures
- Receiving and saving FITS images
-
Property Handling:
- Watching for specific properties (CONNECTION, CCD_TEMPERATURE, CCD1)
- Handling property updates
- Processing BLOB data
Running the Tutorial
To run this tutorial:
-
First, run the CCD simulator (tutorial_three):
cd /path/to/indi/build indiserver -v ./tutorial_three
-
In another terminal, run the client:
cd /path/to/indi/build ./tutorial_client
-
You should see the client connect to the server, set the temperature to -20°C, and take an exposure when the temperature is reached.
-
The client will save the received image as “ccd_simulator.fits” in the current directory.
Next Steps
This tutorial demonstrates how to create a simple INDI client. In Tutorial Seven, we’ll learn how to create a telescope simulator that uses the INDI Alignment Subsystem to improve pointing performance.