1 | ************************************************* |
---|
2 | * INDI Developers Manual |
---|
3 | * Chapter 8: Tutorial |
---|
4 | ************************************************** |
---|
5 | |
---|
6 | Introduction |
---|
7 | -------------- |
---|
8 | |
---|
9 | 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. |
---|
10 | |
---|
11 | Tutorials |
---|
12 | ---------- |
---|
13 | |
---|
14 | Four tutorials are presented to introduce developers to the INDI architecture. |
---|
15 | |
---|
16 | tutorial_one: We construct a most basic (and useless) device driver to illustate basic INDI structures. |
---|
17 | tutorial_two: We create a simple simulator. We will use a few handy utility functions provided by INDI like timers, string <---> number conversion, and more. |
---|
18 | tutorial_three: We create a simple device, and establish a data channel with the client to transmit a FITS file. |
---|
19 | |
---|
20 | tutorial_dome and tutorial_rain are part of the inter-driver communication tutorial. |
---|
21 | |
---|
22 | Usage |
---|
23 | -------- |
---|
24 | |
---|
25 | 1. Running cmake in the libindi directory should build the examples binary as well. |
---|
26 | |
---|
27 | ------------------------------------------------------------------------------------------ |
---|
28 | |
---|
29 | 2. Run KStars (v1.1 or above is required) |
---|
30 | |
---|
31 | 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. |
---|
32 | |
---|
33 | A dialog box will be displayed with three fields: name, host, and port. |
---|
34 | |
---|
35 | You can enter anything in the name field, for example "my device" or "tutorial". |
---|
36 | |
---|
37 | 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. |
---|
38 | |
---|
39 | ------------------------------------------------------------------------------------------ |
---|
40 | |
---|
41 | 3. In the src/examples directory, run each tutorial |
---|
42 | |
---|
43 | $ indiserver -v -p 8000 ./tutorial_NUM |
---|
44 | |
---|
45 | where num is the tutorial number (tutorial_one, tutorial_two, or tutorial_three). |
---|
46 | |
---|
47 | For the inter-driver communications tutorial, type instead: |
---|
48 | |
---|
49 | $ indiserver -v -p 8000 ./tutorial_dome ./tutorial_rain |
---|
50 | |
---|
51 | ------------------------------------------------------------------------------------------ |
---|
52 | |
---|
53 | 4. In KStars, go the device menu --> device manager --> client and select the host you added in step #2 and hit connect. |
---|
54 | |
---|
55 | ------------------------------------------------------------------------------------------ |
---|
56 | |
---|
57 | 5. The connection icon should be changed to connected, otherwise, an error message will be displayed. |
---|
58 | |
---|
59 | ------------------------------------------------------------------------------------------ |
---|
60 | |
---|
61 | 6. Close the device manager, and open the INDI Control Panel in the device menu. You can control your device from there. |
---|
62 | |
---|