3 Copyright (C) 2006 Markus Wildi, markus.wildi@datacomm.ch
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT
ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License
for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with
this library;
if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
58 #define mydev "STV Guider"
59 #define CONNECTION_GROUP "Connection"
60 #define SETTINGS_GROUP "Setings"
61 #define BUTTONS_GROUP "Buttons and Knobs"
62 #define IMAGE_GROUP "Download"
64 #define currentBuffer BufferN[0].value
65 #define currentX WindowingN[0].value
66 #define currentY WindowingN[1].value
67 #define currentLines WindowingN[2].value
68 #define currentLength WindowingN[3].value
70 #define currentCompression CompressionS[0].s
72 static int compression =
OFF;
73 static int acquiring =
OFF;
74 static int guiding =
OFF;
75 static int processing =
OFF;
85 #define TEMPFILE_LEN 16
135 int STV_RequestImage(
int compression,
int buffer,
int x_offset,
int y_offset,
int *length,
int *lines,
int image[][320],
141 unsigned int STV_GetBits(
unsigned int x,
int p,
int n);
147 int init_serial(
char *device_name,
int bit_rate,
int word_size,
int parity,
int stop_bits);
153 static IText StatusT[] = {
154 {
"STATUS",
"This driver",
"is experimental, contact markus.wildi@datacomm.ch", 0, 0, 0 },
164 {
"CONNECT",
"Connect",
ISS_OFF, 0, 0 },
165 {
"DISCONNECT",
"Disconnect",
ISS_OFF, 0, 0 },
173 static IText PortT[] = { {
"PORT",
"Port", NULL, 0, 0, 0 }, {
"SPEED",
"Speed", NULL, 0, 0, 0 } };
176 mydev,
"DEVICE_PORT",
"Port",
CONNECTION_GROUP,
IP_RW,
ISR_1OFMANY,
IPS_IDLE, PortT,
NARRAY(PortT),
"", 0
179 static ISwitch TXDisplayS[] = {
181 {
"1",
"On",
ISS_ON, 0, 0 },
190 static IText DisplayCT[] = {
192 {
"DISPLAYC1",
"Line 1", NULL, 0, 0, 0 },
193 {
"DISPLAYC2",
"Line 2", NULL, 0, 0, 0 }
197 mydev,
"DISPLAYC",
"Display",
CONNECTION_GROUP,
IP_RO,
ISR_1OFMANY,
IPS_IDLE, DisplayCT,
NARRAY(DisplayCT),
"", 0
200 static IText DisplayBT[] = {
202 {
"DISPLAYB1",
"Line 1", NULL, 0, 0, 0 },
203 {
"DISPLAYB2",
"Line 2", NULL, 0, 0, 0 }
207 mydev,
"DISPLAYB",
"Display",
BUTTONS_GROUP,
IP_RO,
ISR_1OFMANY,
IPS_IDLE, DisplayBT,
NARRAY(DisplayBT),
"", 0
210 static IText DisplayDT[] = {
212 {
"DISPLAYD1",
"Line 1", NULL, 0, 0, 0 },
213 {
"DISPLAYD2",
"Line 2", NULL, 0, 0, 0 }
221 static IText UTCT[] = { {
"UTC",
"UTC", NULL, 0, 0, 0 } };
225 static INumber SetCCDTemperatureN[] = {
226 {
"TEMPERATURE",
"Cel. -55.1, +25.2",
"%6.1f", -55.8, 25.2, 0., 16., 0, 0, 0 },
238 NARRAY(SetCCDTemperatureN),
245 {
"1",
"Parameter",
ISS_OFF, 0, 0 },
246 {
"2",
"Increase",
ISS_OFF, 0, 0 },
247 {
"3",
"Decrease",
ISS_OFF, 0, 0 },
256 {
"1",
"Value",
ISS_OFF, 0, 0 },
257 {
"2",
"Increase",
ISS_OFF, 0, 0 },
258 {
"3",
"Decrease",
ISS_OFF, 0, 0 },
264 static ISwitch AuxiliaryS[] = {
266 {
"1",
"Setup",
ISS_OFF, 0, 0 },
267 {
"2",
"Interrupt",
ISS_OFF, 0, 0 },
276 {
"1",
"Focus",
ISS_OFF, 0, 0 },
277 {
"2",
"Image",
ISS_OFF, 0, 0 },
278 {
"3",
"Monitor",
ISS_OFF, 0, 0 },
286 {
"1",
"Calibrate",
ISS_OFF, 0, 0 },
287 {
"2",
"Track",
ISS_OFF, 0, 0 },
295 {
"1",
"Display/Crosshairs",
ISS_OFF, 0, 0 },
296 {
"2",
"File Ops",
ISS_OFF, 0, 0 },
302 static ISwitch CompressionS[] = {
310 CompressionS,
NARRAY(CompressionS),
"", 0 };
312 static ISwitch BufferStatusS[] = {
314 {
"1",
"Status",
ISS_OFF, 0, 0 },
322 {
"A0",
"Number 1 - 32",
"%6.0f", 1., 32., 0., 32., 0, 0, 0 },
328 static INumber WindowingN[] = {
330 {
"X",
"Offset x",
"%6.0f", 0., 199., 0., 0., 0, 0, 0 },
331 {
"Y",
"Offset y",
"%6.0f", 0., 319., 0., 0., 0, 0, 0 },
332 {
"HEIGHT",
"Lines",
"%6.0f", 1., 200., 0., 200., 0, 0, 0 },
333 {
"WIDTH",
"Length",
"%6.0f", 1., 320., 0., 320., 0, 0, 0 },
339 static ISwitch ImageInfoS[] = {
341 {
"1",
"One Image",
ISS_OFF, 0, 0 },
342 {
"2",
"All Images",
ISS_OFF, 0, 0 },
350 {
"1",
"One Image",
ISS_OFF, 0, 0 },
351 {
"2",
"All Images",
ISS_OFF, 0, 0 },
359 static IBLOB imageB = {
"CCD1",
"Image",
"", 0, 0, 0, 0, 0, 0, 0 };
361 static IBLOBVectorProperty imageBP = {
mydev,
"Image",
"Image",
IMAGE_GROUP,
IP_RO, 0,
IPS_IDLE, &imageB, 1,
"", 0 };
367 static int isInit = 0;
375 if ((DisplayCT[0].text = malloc(1024)) == NULL)
377 fprintf(stderr,
"3:Memory allocation error");
380 if ((DisplayCT[1].text = malloc(1024)) == NULL)
382 fprintf(stderr,
"4:Memory allocation error");
385 if ((DisplayBT[0].text = malloc(1024)) == NULL)
387 fprintf(stderr,
"5:Memory allocation error");
390 if ((DisplayBT[1].text = malloc(1024)) == NULL)
392 fprintf(stderr,
"5:Memory allocation error");
395 if ((DisplayDT[0].text = malloc(1024)) == NULL)
397 fprintf(stderr,
"7:Memory allocation error");
400 if ((DisplayDT[1].text = malloc(1024)) == NULL)
402 fprintf(stderr,
"8:Memory allocation error");
406 if ((STVImg = malloc(
sizeof(
img_t))) == NULL)
408 fprintf(stderr,
"9:Memory allocation error");
467 unsigned char buf[1024];
477 if (PowerS[0].s ==
ISS_ON)
510 for (k = 0; k < 24; k++)
512 if (buf[k + 6] == 0x5e)
515 DisplayCT[0].text[l - 1] = 0x50;
516 DisplayCT[0].text[l++] = 0x6b;
518 else if (buf[k + 6] == 0xd7)
520 DisplayCT[0].text[l++] = 0x28;
521 DisplayCT[0].text[l++] = 0x78;
522 DisplayCT[0].text[l++] = 0x2c;
523 DisplayCT[0].text[l++] = 0x79;
524 DisplayCT[0].text[l++] = 0x29;
525 DisplayCT[0].text[l++] = 0x20;
527 else if (buf[k + 6] > 29 && buf[k + 6] < 127)
529 DisplayCT[0].text[l++] = buf[k + 6];
534 DisplayCT[0].text[l++] = 0x20;
536 if (buf[k + 30] == 0xb0)
539 DisplayCT[1].text[m++] = 0x43;
541 else if (buf[k + 30] > 29 && buf[k + 30] < 127)
543 DisplayCT[1].text[m++] = buf[k + 30];
548 DisplayCT[1].text[m++] = 0x20;
551 DisplayCT[0].text[l] = 0;
552 DisplayCT[1].text[m] = 0;
554 strcpy(DisplayBT[0].text, DisplayCT[0].text);
555 strcpy(DisplayBT[1].text, DisplayCT[1].text);
556 strcpy(DisplayDT[0].text, DisplayCT[0].text);
557 strcpy(DisplayDT[1].text, DisplayCT[1].text);
571 if (TXDisplayS[0].s ==
ISS_ON)
582 IDMessage(
mydev,
"Switch off display read out manually first (Update Display: Off\n)");
586 tcflush(
fd, TCIOFLUSH);
595 IDMessage(
mydev,
"REQUEST_DOWNLOAD_ALL initiated at the STV not implemented");
601 strcpy(DisplayCT[0].text,
"Key press acknowledged");
602 strcpy(DisplayBT[0].text, DisplayCT[0].text);
603 strcpy(DisplayDT[0].text, DisplayCT[0].text);
632 IDLog(
"ISCallBack: Unknown response 0x%2x\n", buf[1]);
646 if (dev !=
nullptr && strcmp(
mydev, dev))
693 int lower_buffer = 0;
694 int upper_buffer = 0;
704 if (dev !=
nullptr && strcmp(dev,
mydev))
726 if ((res = strcmp(
"9600", PortT[1].text)) == 0)
730 else if ((res = strcmp(
"19200", PortT[1].text)) == 0)
734 else if ((res = strcmp(
"38400", PortT[1].text)) == 0)
738 else if ((res = strcmp(
"57600", PortT[1].text)) == 0)
742 else if ((res = strcmp(
"115200", PortT[1].text)) == 0)
749 IDSetText(&
PortTP,
"Wrong RS 232 value: %s, defaulting to 9600 baud", PortT[1].text);
768 fprintf(stderr,
"COULD not write an ACK\n");
773 fprintf(stderr,
"STV: Could not write %d\n", res);
779 IDSetSwitch(&
PowerSP,
"STV is online, port: %s, baud rate: %s", PortT[0].text, PortT[1].text);
832 else if (!strcmp(name, AuxiliarySP.
name))
840 for (i = 0; i < n; i++)
844 if (sp == &AuxiliaryS[0])
848 else if (sp == &AuxiliaryS[1])
866 else if (!strcmp(name, ControlSP.
name))
877 for (i = 0; i < n; i++)
883 if (sp == &ControlS[0])
887 else if (sp == &ControlS[1])
891 else if (sp == &ControlS[2])
909 else if (!strcmp(name, ValueSP.
name))
920 for (i = 0; i < n; i++)
924 if (sp == &ValueS[0])
928 else if (sp == &ValueS[1])
932 else if (sp == &ValueS[2])
951 else if (!strcmp(name, AcquireSP.
name))
962 for (i = 0; i < n; i++)
966 if (sp == &AcquireS[0])
970 else if (sp == &AcquireS[1])
974 else if (sp == &AcquireS[2])
992 else if (!strcmp(name, GuideSP.
name))
1003 for (i = 0; i < n; i++)
1007 if (sp == &GuideS[0])
1011 else if (sp == &GuideS[1])
1029 else if (!strcmp(name, ProcessSP.
name))
1039 for (i = 0; i < n; i++)
1043 if (sp == &ProcessS[0])
1047 else if (sp == &ProcessS[1])
1065 else if (!strcmp(name, ImageInfoSP.
name))
1074 for (i = 0; i < n; i++)
1078 if (sp == &ImageInfoS[0])
1090 else if (sp == &ImageInfoS[1])
1092 for (i = 0; i < 32; i++)
1122 else if (!strcmp(name, CompressionSP.
name))
1133 for (i = 0; i < n; i++)
1137 if (sp == &CompressionS[0])
1139 CompressionS[0].s =
ISS_ON;
1141 else if (sp == &CompressionS[1])
1143 CompressionS[1].s =
ISS_ON;
1150 else if (!strcmp(name, BufferStatusSP.
name))
1158 if ((AcquireSP.
s !=
OFF) || (GuideSP.
s !=
OFF) || (ProcessSP.
s !=
OFF))
1164 ISResetButtons(
"Interrupting ongoing image acquisition, calibration or tracking\n");
1194 fprintf(stderr,
"STV Buffer can not terminate TX %d\n", res);
1197 if (sp == &BufferStatusS[0])
1199 for (i = 31; i > -1; i--)
1231 else if (!strcmp(name, DownloadSP.
name))
1235 if ((AcquireSP.
s !=
OFF) || (GuideSP.
s !=
OFF) || (ProcessSP.
s !=
OFF))
1237 ISResetButtons(
"Interrupting ongoing image acquisition, calibration or tracking\n");
1265 fprintf(stderr,
"STV Buffer can not terminate TX %d\n", res);
1273 if (CompressionS[0].s ==
ISS_ON)
1277 for (i = 0; i < n; i++)
1281 if (sp == &DownloadS[0])
1286 else if (sp == &DownloadS[1])
1292 for (j = upper_buffer; j > lower_buffer; j--)
1308 IDMessage(
mydev,
"STV waits for SYNC TIME Do it! Setting time, PLEASE WAIT!");
1338 else if (!strcmp(name, TXDisplaySP.
name))
1348 for (i = 0; i < n; i++)
1352 if (sp == &TXDisplayS[0])
1369 else if (sp == &TXDisplayS[1])
1378 IDSetSwitch(&TXDisplaySP,
"Stopping display read out");
1406 void ISNewText(
const char *dev,
const char *name,
char *texts[],
char *names[],
int n)
1417 if (dev !=
nullptr && strcmp(dev,
mydev))
1427 if (PowerS[0].s ==
ISS_ON)
1444 fprintf(stderr,
"STV Buffer can not terminate TX %d\n", res);
1464 void ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
1467 double ccd_temperature;
1474 if (dev !=
nullptr && strcmp(dev,
mydev))
1477 if (PowerS[0].s !=
ISS_ON)
1485 if (!strcmp(name, BufferNP.
name))
1489 if (
buffer == &BufferN[0])
1498 else if (!strcmp(name, WindowingNP.
name))
1502 if (
buffer == &WindowingN[0])
1513 else if (!strcmp(name, SetCCDTemperatureNP.
name))
1517 fprintf(stderr,
"STV Buffer can not terminate TX %d\n", res);
1522 if (np == &SetCCDTemperatureN[0])
1527 SetCCDTemperatureNP.
s =
IPS_OK;
1528 SetCCDTemperatureN[0].value = ccd_temperature;
1529 IDSetNumber(&SetCCDTemperatureNP,
"CCD Temperature set to %g", SetCCDTemperatureN[0].value);
1534 IDSetNumber(&SetCCDTemperatureNP,
"Error setting CCD temperature, check connection");
1541 void ISNewBLOB(
const char *dev,
const char *name,
int sizes[],
int blobsizes[],
char *blobs[],
char *formats[],
1542 char *names[],
int n)
1562 long fpixel = 1, naxis = 2, nelements;
1566 naxes[0] = STVImg->
width;
1567 naxes[1] = STVImg->
height;
1570 snprintf(filename_rw,
TEMPFILE_LEN + 1,
"!%s", filename);
1573 fits_create_file(&fptr, filename_rw, &status);
1576 fits_create_img(fptr, USHORT_IMG, naxis, naxes, &status);
1580 nelements = naxes[0] * naxes[1];
1583 fits_write_img(fptr, TUSHORT, fpixel, nelements, STVImg->
img, &status);
1585 fits_close_file(fptr, &status);
1587 fits_report_error(stderr, status);
1602 char date_obs_s[64];
1609 snprintf(binning_s, 32,
"(%1.0f x %1.0f)", 1., 1.);
1611 else if (image_info->
binning == 2)
1613 snprintf(binning_s, 32,
"(%1.0f x %1.0f)", 2., 2.);
1615 else if (image_info->
binning == 3)
1617 snprintf(binning_s, 32,
"(%1.0f x %1.0f)", 3., 3.);
1621 fprintf(stderr,
"Error in binning information: %d\n", image_info->
binning);
1624 strcpy(frame_s,
"Light");
1643 fits_update_key(fptr, TDOUBLE,
"CCD-TEMP", &(image_info->
ccdTemp),
"CCD Temperature (Celcius)", &status);
1644 fits_update_key(fptr, TDOUBLE,
"EXPOSURE", &(image_info->
exposure),
"Total Exposure Time (ms)", &status);
1645 fits_update_key(fptr, TDOUBLE,
"PIX-SIZ", &(image_info->
pixelSize),
"Pixel Size (microns)", &status);
1646 fits_update_key(fptr, TSTRING,
"BINNING", binning_s,
"Binning HOR x VER", &status);
1647 fits_update_key(fptr, TSTRING,
"FRAME", frame_s,
"Frame Type", &status);
1648 fits_update_key(fptr, TDOUBLE,
"DATAMIN", &(image_info->
minValue),
"Minimum value", &status);
1649 fits_update_key(fptr, TDOUBLE,
"DATAMAX", &(image_info->
maxValue),
"Maximum value", &status);
1650 fits_update_key(fptr, TSTRING,
"INSTRUME",
"SBIG STV",
"CCD Name", &status);
1652 sprintf(tmp,
"%4d-", image_info->
year);
1653 strcpy(date_obs_s, tmp);
1655 if (image_info->
month < 10)
1657 sprintf(tmp,
"0%1d-", image_info->
month);
1661 sprintf(tmp,
"%2d-", image_info->
month);
1663 strcat(date_obs_s, tmp);
1665 if (image_info->
day < 10)
1667 sprintf(tmp,
"0%1dT", image_info->
day);
1671 sprintf(tmp,
"%2dT", image_info->
day);
1673 strcat(date_obs_s, tmp);
1675 if (image_info->
hours < 10)
1677 sprintf(tmp,
"0%1d:", image_info->
hours);
1681 sprintf(tmp,
"%2d:", image_info->
hours);
1683 strcat(date_obs_s, tmp);
1687 sprintf(tmp,
"0%1d:", image_info->
minutes);
1691 sprintf(tmp,
"%2d:", image_info->
minutes);
1693 strcat(date_obs_s, tmp);
1697 sprintf(tmp,
"0%1d:", image_info->
seconds);
1701 sprintf(tmp,
"%2d:", image_info->
seconds);
1703 strcat(date_obs_s, tmp);
1705 fits_update_key(fptr, TSTRING,
"DATE-OBS", date_obs_s,
"Observing date (YYYY-MM-DDThh:mm:ss UT", &status);
1707 fits_write_date(fptr, &status);
1713 unsigned char *fitsData, *compressedData;
1715 unsigned int i = 0, nr = 0;
1716 uLongf compressedBytes = 0;
1720 if (-1 == stat(filename, &stat_p))
1722 IDLog(
"Error occurred attempting to stat file.\n");
1726 totalBytes = stat_p.st_size;
1728 fitsData = (
unsigned char *)malloc(
sizeof(
unsigned char) * totalBytes);
1729 compressedData = (
unsigned char *)malloc(
sizeof(
unsigned char) * totalBytes + totalBytes / 64 + 16 + 3);
1731 if (fitsData == NULL || compressedData == NULL)
1736 free(compressedData);
1737 IDLog(
"Error! low memory. Unable to initialize fits buffers.\n");
1741 fitsFile = fopen(filename,
"r");
1743 if (fitsFile == NULL)
1746 free(compressedData);
1751 for (i = 0; i < totalBytes; i += nr)
1753 nr = fread(fitsData + i, 1, totalBytes - i, fitsFile);
1757 IDLog(
"Error reading temporary FITS file.\n");
1765 compressedBytes =
sizeof(char) * totalBytes + totalBytes / 64 + 16 + 3;
1768 r = compress2(compressedData, &compressedBytes, fitsData, totalBytes, 9);
1772 IDLog(
"internal error - compression failed: %d\n", r);
1777 imageB.blob = compressedData;
1778 imageB.bloblen = compressedBytes;
1779 imageB.size = totalBytes;
1780 strcpy(imageB.format,
".fits.z");
1786 free(compressedData);
1798 if (TXDisplayS[0].s ==
ISS_ON)
1801 IDSetSwitch(&TXDisplaySP,
"Stopping display read out");
1820 fprintf(stderr,
"STV: error writing TTXD %d\n", res);
1828 tcflush(
fd, TCIOFLUSH);
1839 if (TXDisplayS[0].s ==
ISS_ON)
1845 IDSetSwitch(&TXDisplaySP,
"Starting Display read out");
1868 IDMessage(
mydev,
"B%2d: Exposure:%6.3f, Height:%2d, Width:%2d, CCD Temperature:%3.1f\n",
buffer,
1903 int image[320][320];
1906 for (i = 0; i < 320; i++)
1908 for (k = 0; k < 320; k++)
1918 STVImg->
width = length;
1921 img_size = STVImg->
width * STVImg->
height *
sizeof(
unsigned short);
1923 STVImg->
img = malloc(img_size);
1925 for (i = 0; i < STVImg->
height; i++)
1927 for (k = 0; k < STVImg->
width; k++)
1930 STVImg->
img[STVImg->
width * i + k] = (
unsigned short)image[i][k];
1945 writeFITS(
"FITS.fits", &image_info, errmsg);
1954 if (!((line + 1) % 10))
1956 sprintf(DisplayCT[0].text,
"Buffer %2d line: %3d",
buffer + 1, line + 1);
1957 strcpy(DisplayBT[0].text, DisplayCT[0].text);
1958 strcpy(DisplayDT[0].text, DisplayCT[0].text);
1967 else if ((line + 1) == 1)
1977 sprintf(DisplayCT[0].text,
"Buffer %2d line: %3d",
buffer + 1, line + 1);
1978 strcpy(DisplayBT[0].text, DisplayCT[0].text);
1979 strcpy(DisplayDT[0].text, DisplayCT[0].text);
void IERmCallback(int callbackid)
Remove a callback function.
int IEAddCallback(int readfiledes, IE_CBF *fp, void *p)
Register a new callback, fp, to be called with userpointer as argument when readfiledes is ready.
void() IE_CBF(int readfiledes, void *userpointer)
Signature of a callback.
Public interface to INDI's eventloop mechanism.
#define NARRAY(a)
Handy macro to find the number of elements in array a[]. Must be used with actual array,...
int tty_disconnect(int fd)
Closes a tty connection and flushes the bus.
void IDLog(const char *fmt,...)
Implementations for common driver routines.
INumber * IUFindNumber(const INumberVectorProperty *nvp, const char *name)
Find an INumber member in a number text property.
void IUResetSwitch(ISwitchVectorProperty *svp)
Reset all switches in a switch vector property to OFF.
void IUSaveText(IText *tp, const char *newtext)
Function to reliably save new text in a IText.
IText * IUFindText(const ITextVectorProperty *tvp, const char *name)
Find an IText member in a vector text property.
ISwitch * IUFindSwitch(const ISwitchVectorProperty *svp, const char *name)
Find an ISwitch member in a vector switch property.
Interface to the reference INDI C API device implementation on the Device Driver side.
int IUUpdateSwitch(ISwitchVectorProperty *svp, ISState *states, char *names[], int n)
Update all switches in a switch vector property.
void IDSetNumber(const INumberVectorProperty *nvp, const char *fmt,...)
void IDSetSwitch(const ISwitchVectorProperty *svp, const char *fmt,...)
int IUUpdateText(ITextVectorProperty *tvp, char *texts[], char *names[], int n)
Update all text members in a text vector property.
void IDMessage(const char *dev, const char *fmt,...)
void IDDefNumber(const INumberVectorProperty *nvp, const char *fmt,...)
void IDSetBLOB(const IBLOBVectorProperty *bvp, const char *fmt,...)
void IDDefText(const ITextVectorProperty *tvp, const char *fmt,...)
void IDDefBLOB(const IBLOBVectorProperty *bvp, const char *fmt,...)
void IDSetText(const ITextVectorProperty *tvp, const char *fmt,...)
void IDDefSwitch(const ISwitchVectorProperty *svp, const char *fmt,...)
ISwitchVectorProperty PowerSP
ITextVectorProperty PortTP
std::vector< uint8_t > buffer
One Blob (Binary Large Object) descriptor.
BLOB (Binary Large Object) vector property descriptor.
Number vector property descriptor.
Switch vector property descriptor.
Text vector property descriptor.
int STV_ReceivePacket(unsigned char *buf, int mode)
int writeFITS(const char *filename, IMAGE_INFO *image_info, char errmsg[])
int STV_BufferStatus(int buffer)
int ISMessageImageInfo(int buffer, IMAGE_INFO *image_info)
int ISRestoreTXDisplay(void)
void ISNewBLOB(const char *dev, const char *name, int sizes[], int blobsizes[], char *blobs[], char *formats[], char *names[], int n)
Update data of an existing blob vector property.
int STV_Connect(char *device, int baud)
int init_serial(char *device_name, int bit_rate, int word_size, int parity, int stop_bits)
void ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Update the value of an existing switch vector property.
void uploadFile(const char *filename)
void ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n)
Update the value of an existing text vector property.
int STV_RequestImage(int compression, int buffer, int x_offset, int y_offset, int *length, int *lines, int image[][320], IMAGE_INFO *image_info)
int STV_SetDateTime(char *times)
void ISGetProperties(const char *dev)
Get Device Properties.
int ISTerminateTXDisplay(void)
void handleError(ISwitchVectorProperty *svp, int err, const char *msg)
int STV_PrintBuffer(unsigned char *cmdbuf, int n)
int STV_LRRotaryIncrease(void)
int ISRequestImageData(int compression, int buffer, int x_offset, int y_offset, int length, int lines)
unsigned int STV_GetBits(unsigned int x, int p, int n)
void ISSnoopDevice(XMLEle *root)
Function defined by Drivers that is called when another Driver it is snooping (by having previously c...
int STV_LRRotaryDecrease(void)
void ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n)
void addFITSKeywords(fitsfile *fptr, IMAGE_INFO *image_info)
int STV_RequestImageInfo(int imagebuffer, IMAGE_INFO *image_info)
int STV_TerminateTXDisplay(void)
double STV_SetCCDTemperature(double set_value)
void ISUpdateDisplay(int buffer, int line)
void ISResetButtons(char *message)
int STV_UDRotaryDecrease(void)
ITextVectorProperty UTCTP
int STV_UDRotaryIncrease(void)
#define REQUEST_BUFFER_STATUS
#define REQUEST_DOWNLOAD_ALL