65
65
static INumberVectorProperty TemperatureNP = { mydev, "CCD_TEMPERATURE", "Temperature (C)", COMM_GROUP, IP_RW, 60, IPS_IDLE, TemperatureN, NARRAY(TemperatureN), "", 0};
67
67
/* BLOB for sending image */
68
static IBLOB imageB = {"CCD1", "Feed", "", 0, 0, 0, 0, 0, 0, 0};
69
static IBLOBVectorProperty imageBP = {mydev, "Video", "Video", COMM_GROUP,
70
IP_RO, 0, IPS_IDLE, &imageB, 1, "", 0};
68
static IBLOB imagePrimaryB = {"CCD1", "Primary", "", 0, 0, 0, 0, 0, 0, 0};
69
static IBLOBVectorProperty imagePrimaryBP = {mydev, "CCD1", "", COMM_GROUP,
70
IP_RO, 0, IPS_IDLE, &imagePrimaryB, 1, "", 0};
72
static IBLOB imageGuideB = {"CCD2", "Guide", "", 0, 0, 0, 0, 0, 0, 0};
73
static IBLOBVectorProperty imageGuideBP = {mydev, "CCD2", "", COMM_GROUP,
74
IP_RO, 0, IPS_IDLE, &imageGuideB, 1, "", 0};
72
76
void ISGetProperties (const char *dev)
79
83
IDDefSwitch(&PowerSP, NULL);
80
84
IDDefNumber(&ExposeTimeNP, NULL);
81
85
IDDefNumber(&TemperatureNP, NULL);
82
IDDefBLOB(&imageBP, NULL);
86
IDDefBLOB(&imagePrimaryBP, NULL);
87
IDDefBLOB(&imageGuideBP, NULL);
84
89
IEAddTimer(1000, ISPoll, NULL);
238
imageB.blob = compressedData;
239
imageB.bloblen = compressedBytes;
240
imageB.size = totalBytes;
241
strcpy(imageB.format, ".fits.z");
244
if (!strcmp(filename, "ngc1316o.fits"))
246
imagePrimaryB.blob = compressedData;
247
imagePrimaryB.bloblen = compressedBytes;
248
imagePrimaryB.size = totalBytes;
249
strcpy(imagePrimaryB.format, ".fits.z");
243
251
/* #7 Set BLOB state to Ok */
245
IDSetBLOB (&imageBP, NULL);
252
imagePrimaryBP.s = IPS_OK;
253
IDSetBLOB (&imagePrimaryBP, NULL);
257
imageGuideB.blob = compressedData;
258
imageGuideB.bloblen = compressedBytes;
259
imageGuideB.size = totalBytes;
260
strcpy(imageGuideB.format, ".fits.z");
262
/* #7 Set BLOB state to Ok */
263
imageGuideBP.s = IPS_OK;
264
IDSetBLOB (&imageGuideBP, NULL);
247
267
/* #8 Set Exposure status to Ok */
248
268
ExposeTimeNP.s = IPS_OK;
273
293
ExposeTimeN[0].value--;
275
295
/* Are we done yet? */
276
if (ExposeTimeN[0].value == 0)
296
if (ExposeTimeN[0].value <= 0)
298
ExposeTimeN[0].value = 0;
278
300
/* Let's set the state of OK and report that to the client */
279
301
ExposeTimeNP.s = IPS_OK;
281
303
/* Upload a sample FITS file */
282
304
uploadFile("ngc1316o.fits");
305
uploadFile("x0cj010ct_d0h.fit");
284
307
IDSetNumber(&ExposeTimeNP, NULL);