1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
*************************************************
* INDI Developers Manual
* Chapter 8: Tutorial
**************************************************
Introduction
--------------
The tutorials included in the INDI Library can be used with any INDI compatible client. The following instructions are provided to test the drivers with KStars. If you are running a different client, refer to your client documentation.
Tutorials
----------
Four tutorials are presented to introduce developers to the INDI architecture.
tutorial_one: We construct the most basic device.
tutorial_two: We create a simple telescope simulator.
tutorial_three: We create a simple CCD simulator, and establish a data channel with the client to transmit randomly generated FITS.
tutorial_four: We demonstrate use of skeleton files to define properties.
tutorial_five: We create two devices (Rain Detector and Dome) to demonstrate inter-driver communication in INDI.
tutorial_six: We create a simple client to set the temperature of a CCD simulator (tutorial_three).
Usage
--------
1. Running cmake in the libindi directory should build the examples binary as well.
------------------------------------------------------------------------------------------
2. Run KStars (v1.1 or above is required)
Under KStars, click on the "device" menu, then click on the "device manager". Click on the "client" tab and then click on the "add" button.
A dialog box will be displayed with three fields: name, host, and port.
You can enter anything in the name field, for example "my device" or "tutorial".
Enter "127.0.0.1" in the host name and "8000" in the port entry (without the quotes). This device will be saved in your client menu. So you only to do #2 once.
------------------------------------------------------------------------------------------
3. In the src/examples/tutorial_xxx directory, run each tutorial
$ indiserver -v -p 8000 ./tutorial_NUM
where num is the tutorial number (tutorial_one, tutorial_two...etc)
------------------------------------------------------------------------------------------
For the inter-driver communications tutorial, type instead:
$ indiserver -v -p 8000 ./tutorial_dome ./tutorial_rain
------------------------------------------------------------------------------------------
For tutorial_client. Run tutorial_three first:
$ indiserver -v ./tutorial_three
Then open another console tab, and run the client:
$ ./tutorial_client
You can connect to tutorial_three via a GUI client (e.g. KStars) before running tutorial_client. This will enable you to watch
changes in the driver as they occur from tutorial_client. Make sure to set the port to 7624 in KStars.
------------------------------------------------------------------------------------------
4. In KStars, go the device menu --> device manager --> client and select the host you added in step #2 and hit connect.
------------------------------------------------------------------------------------------
5. The connection icon should be changed to connected, otherwise, an error message will be displayed.
------------------------------------------------------------------------------------------
6. Close the device manager, and open the INDI Control Panel in the device menu. You can control your device from there.
|