Hi,
First of all, many thanks for all the work done so far to offer that broad framwork and applications for astronomy. I'm struggling a little bit with interfacing to an INDI server for CCD cameras and which messages the server (driver) is sending. Therefore I would like to compare the CCDSimulator with the ASI_CCD. The use case is just exposing and wait until finished. And I'm showing the message I receive in my APP:

First the Simulator:

[2021-09-05 12:07:56.658][T][ indiBase.py][ 738] SendCmd: [newNumberVector device="CCD Simulator" name="CCD_EXPOSURE"><oneNumber name="CCD_EXPOSURE_VALUE">3.001</oneNumber></newNumberVector][2021-09-05 12:07:56.824][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, CCD Simulator, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 3.0009999999999998899 ]
[2021-09-05 12:07:56.990][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, CCD Simulator, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 2.6710000038146972656 ]
[2021-09-05 12:07:57.990][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, CCD Simulator, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 1.6699999570846557617 ]
[2021-09-05 12:07:59.164][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, CCD Simulator, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0.66999995708465576172 ]
[2021-09-05 12:07:59.660][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, CCD Simulator, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0 ]
[2021-09-05 12:07:59.752][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, CCD Simulator, Ok, 60) oneNumber (CCD_EXPOSURE_VALUE) 0 ]
My interpretation: I set the exposure to 3 s, then the driver starts exposure and send each second an update for the exposure time. During this the state is going to Busy. Last exposure time is 0 with state busy, then after a short time the driver goes to state OK. I do not get more than these messages. That's exactly what I expect, the minimum messages needed nothing more. The only point: I set the exposure on 3 seconds and got 3.000999 second in the first message back. No clue why.

Now the behavior of the ASI driver:
[2021-09-02 02:14:28.658][T][ indiBase.py][ 738] SendCmd: [newNumberVector device="ZWO CCD ASI1600MM Pro" name="CCD_EXPOSURE"><oneNumber name="CCD_EXPOSURE_VALUE">2.0</oneNumber </newNumberVector]
[2021-09-02 02:14:28.738][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 2 ]
[2021-09-02 02:14:28.739][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 2 ]
[2021-09-02 02:14:28.744][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 2 ]
[2021-09-02 02:14:29.736][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 1 ]
[2021-09-02 02:14:29.837][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0.89899998903274536133 ]
[2021-09-02 02:14:30.038][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0.79900002479553222656 ]
[2021-09-02 02:14:30.040][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0.69900000095367431641 ]
[2021-09-02 02:14:30.137][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0.59899997711181640625 ]
[2021-09-02 02:14:30.238][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0.49799999594688415527 ]
[2021-09-02 02:14:30.338][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0.39800000190734863281 ]
[2021-09-02 02:14:30.438][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0.29800000786781311035 ]
[2021-09-02 02:14:30.539][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0.19799999892711639404 ]
[2021-09-02 02:14:30.640][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0.097999997437000274658 ]
[2021-09-02 02:14:30.739][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0 ]
[2021-09-02 02:14:30.964][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0 ]
[2021-09-02 02:14:30.965][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0 ]
[2021-09-02 02:14:31.039][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0 ]
[2021-09-02 02:14:31.290][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0 ]
[2021-09-02 02:14:31.292][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0 ]
[2021-09-02 02:14:31.340][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0 ]
[2021-09-02 02:14:31.442][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0 ]
[2021-09-02 02:14:31.547][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Busy, 60) oneNumber (CCD_EXPOSURE_VALUE) 0 ]
[2021-09-02 02:14:32.296][T][ indiBase.py][ 973] RecvCmd: [setNumberVector (CCD_EXPOSURE, ZWO CCD ASI1600MM Pro, Ok, 60) oneNumber (CCD_EXPOSURE_VALUE) 0 ]

I do expose only 2 seconds (OK, it's an log of an user of my app, then I see three times the s seconds plain (out of the driver I learned that there might be some retries necessary), the number is exact as the driver rounds it. Question: why are the retires starting the exposure (if that's the case) are sent also as messages ???
Now the following message count the exposure time down. During the last second, I have shorter intervals. What is the reason for this?
Then I see multiple message always showing the same state (Busy) and exposure time 0. So nothing wrong, but why sending these messages without having anything new to tell?

There is no critics about it or the implementation work already done! But to be honest: I could not understand it. Unfortunately my understanding in C is poor. Out of the driver source I cannot interpret what's is going on. My assumption is, that at a certain stage, the message is sent in any case without regard if the sending is necessary.

As said, the Simulator seems to be perfect in this case.
Looking forward for any help and lessons to improve my understanding in drivers to be able later on to support writing them.

Michel

Read More...