Instrument Neutral Distributed Interface INDI
2.0.2
|
#include <cstring>
#include <sys/stat.h>
#include <stdio.h>
#include <zlib.h>
#include <unistd.h>
#include <termios.h>
#include "indidevapi.h"
#include "eventloop.h"
#include "indicom.h"
#include <config.h>
#include <fitsio.h>
#include "stvdriver.h"
Go to the source code of this file.
Classes | |
struct | img_t |
Macros | |
#define | mydev "STV Guider" /* Device name */ |
#define | CONNECTION_GROUP "Connection" /* Group name */ |
#define | SETTINGS_GROUP "Setings" /* Group name */ |
#define | BUTTONS_GROUP "Buttons and Knobs" /* Button Pannel */ |
#define | IMAGE_GROUP "Download" /* Button Pannel */ |
#define | currentBuffer BufferN[0].value |
#define | currentX WindowingN[0].value |
#define | currentY WindowingN[1].value |
#define | currentLines WindowingN[2].value |
#define | currentLength WindowingN[3].value |
#define | currentCompression CompressionS[0].s |
#define | TEMPFILE_LEN 16 |
Enumerations | |
enum | STVFrames { LIGHT_FRAME = 0 , BIAS_FRAME , DARK_FRAME , FLAT_FRAME } |
Functions | |
void | addFITSKeywords (fitsfile *fptr, IMAGE_INFO *image_info) |
int | writeFITS (const char *filename, IMAGE_INFO *image_info, char errmsg[]) |
void | uploadFile (const char *filename) |
int | ISTerminateTXDisplay (void) |
int | ISRestoreTXDisplay (void) |
int | ISMessageImageInfo (int buffer, IMAGE_INFO *image_info) |
int | ISRequestImageData (int compression, int buffer, int x_offset, int y_offset, int length, int lines) |
int | STV_LRRotaryDecrease (void) |
int | STV_LRRotaryIncrease (void) |
int | STV_UDRotaryDecrease (void) |
int | STV_UDRotaryIncrease (void) |
int | STV_AKey (void) |
int | STV_BKey (void) |
int | STV_Setup (void) |
int | STV_Interrupt (void) |
int | STV_Focus (void) |
int | STV_Image (void) |
int | STV_Monitor (void) |
int | STV_Calibrate (void) |
int | STV_Track (void) |
int | STV_Display (void) |
int | STV_FileOps (void) |
int | STV_RequestImageInfo (int imagebuffer, IMAGE_INFO *image_info) |
int | STV_BufferStatus (int buffer) |
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_Download (void) |
int | STV_TXDisplay (void) |
int | STV_TerminateTXDisplay (void) |
int | STV_RequestAck (void) |
unsigned int | STV_GetBits (unsigned int x, int p, int n) |
int | STV_PrintBuffer (unsigned char *cmdbuf, int n) |
void | handleError (ISwitchVectorProperty *svp, int err, const char *msg) |
void | ISCallBack (void) |
int | init_serial (char *device_name, int bit_rate, int word_size, int parity, int stop_bits) |
int | STV_ReceivePacket (unsigned char *buf, int mode) |
int | STV_Connect (char *device, int baud) |
int | STV_SetDateTime (char *times) |
double | STV_SetCCDTemperature (double set_value) |
void | ISResetButtons (char *message) |
void | ISGetProperties (const char *dev) |
Get Device Properties. More... | |
void | ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) |
Update the value of an existing switch vector property. More... | |
void | ISNewText (const char *dev, const char *name, char *texts[], char *names[], int n) |
Update the value of an existing text vector property. More... | |
void | ISNewNumber (const char *dev, const char *name, double values[], char *names[], int n) |
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. More... | |
void | ISSnoopDevice (XMLEle *root) |
Function defined by Drivers that is called when another Driver it is snooping (by having previously called IDSnoopDevice()) sent any INDI message. More... | |
void | ISUpdateDisplay (int buffer, int line) |
Variables | |
int | fd |
char | tracking_buf [1024] |
ITextVectorProperty | UTCTP |
enum STVFrames |
void addFITSKeywords | ( | fitsfile * | fptr, |
IMAGE_INFO * | image_info | ||
) |
void handleError | ( | ISwitchVectorProperty * | svp, |
int | err, | ||
const char * | msg | ||
) |
int init_serial | ( | char * | device_name, |
int | bit_rate, | ||
int | word_size, | ||
int | parity, | ||
int | stop_bits | ||
) |
Definition at line 1526 of file stvdriver.c.
void ISGetProperties | ( | const char * | dev | ) |
Get Device Properties.
dev | the name of the device. |
This function is called by the framework whenever the driver has received a getProperties message from an INDI client. The argument
dev | is either a string containing the name of the device specified within the message, or NULL if no device was specified. If the driver does not recognize the device, it should ignore the message and do nothing. If dev matches the device the driver is implementing, or dev is NULL, the driver must respond by sending one defXXX message to describe each property defined by this device, including its current (or initial) value. The recommended way to send these messages is to call the appropriate IDDef functions. |
int ISMessageImageInfo | ( | int | buffer, |
IMAGE_INFO * | image_info | ||
) |
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.
dev | the name of the device. |
name | the name of the blob vector property to update. |
sizes | an array of base64 blob sizes in bytes before decoding. |
blobsizes | an array of the sizes of blobs after decoding from base64. |
blobs | an array of decoded data. Each blob size is found in blobsizes array. |
formats | Blob data format (e.g. fits.z). |
names | names of blob members to update. |
n | the number of blobs to update. |
void ISNewNumber | ( | const char * | dev, |
const char * | name, | ||
double | values[], | ||
char * | names[], | ||
int | n | ||
) |
void ISNewSwitch | ( | const char * | dev, |
const char * | name, | ||
ISState * | states, | ||
char * | names[], | ||
int | n | ||
) |
Update the value of an existing switch vector property.
dev | the name of the device. |
name | the name of the switch vector property to update. |
states | an array of switch states. |
names | parallel names to the array of switch states. |
n | the dimension of states[]. |
void ISNewText | ( | const char * | dev, |
const char * | name, | ||
char * | texts[], | ||
char * | names[], | ||
int | n | ||
) |
Update the value of an existing text vector property.
dev | the name of the device. |
name | the name of the text vector property to update. |
texts | an array of text values. |
names | parallel names to the array of text values. |
n | the dimension of texts[]. |
int ISRequestImageData | ( | int | compression, |
int | buffer, | ||
int | x_offset, | ||
int | y_offset, | ||
int | length, | ||
int | lines | ||
) |
void ISSnoopDevice | ( | XMLEle * | root | ) |
Function defined by Drivers that is called when another Driver it is snooping (by having previously called IDSnoopDevice()) sent any INDI message.
root | The argument contains the full message exactly as it was sent by the driver. Hint: use the IUSnoopXXX utility functions to help crack the message if it was one of setXXX or defXXX. |
int STV_AKey | ( | void | ) |
Definition at line 123 of file stvdriver.c.
int STV_BKey | ( | void | ) |
Definition at line 129 of file stvdriver.c.
int STV_BufferStatus | ( | int | buffer | ) |
Definition at line 756 of file stvdriver.c.
int STV_Calibrate | ( | void | ) |
Definition at line 165 of file stvdriver.c.
int STV_Connect | ( | char * | device, |
int | baud | ||
) |
Definition at line 1482 of file stvdriver.c.
int STV_Display | ( | void | ) |
Definition at line 177 of file stvdriver.c.
int STV_Download | ( | void | ) |
Definition at line 739 of file stvdriver.c.
int STV_FileOps | ( | void | ) |
Definition at line 183 of file stvdriver.c.
int STV_Focus | ( | void | ) |
Definition at line 147 of file stvdriver.c.
unsigned int STV_GetBits | ( | unsigned int | x, |
int | p, | ||
int | n | ||
) |
Definition at line 1190 of file stvdriver.c.
int STV_Image | ( | void | ) |
Definition at line 153 of file stvdriver.c.
int STV_Interrupt | ( | void | ) |
Definition at line 141 of file stvdriver.c.
int STV_LRRotaryDecrease | ( | void | ) |
Definition at line 99 of file stvdriver.c.
int STV_LRRotaryIncrease | ( | void | ) |
Definition at line 105 of file stvdriver.c.
int STV_Monitor | ( | void | ) |
Definition at line 159 of file stvdriver.c.
int STV_PrintBuffer | ( | unsigned char * | cmdbuf, |
int | n | ||
) |
Definition at line 1041 of file stvdriver.c.
int STV_ReceivePacket | ( | unsigned char * | buf, |
int | mode | ||
) |
Definition at line 825 of file stvdriver.c.
int STV_RequestAck | ( | void | ) |
Definition at line 749 of file stvdriver.c.
int STV_RequestImage | ( | int | compression, |
int | buffer, | ||
int | x_offset, | ||
int | y_offset, | ||
int * | length, | ||
int * | lines, | ||
int | image[][320], | ||
IMAGE_INFO * | image_info | ||
) |
Definition at line 430 of file stvdriver.c.
int STV_RequestImageInfo | ( | int | imagebuffer, |
IMAGE_INFO * | image_info | ||
) |
Definition at line 189 of file stvdriver.c.
double STV_SetCCDTemperature | ( | double | set_value | ) |
Definition at line 1230 of file stvdriver.c.
int STV_SetDateTime | ( | char * | times | ) |
Definition at line 1288 of file stvdriver.c.
int STV_Setup | ( | void | ) |
Definition at line 135 of file stvdriver.c.
int STV_TerminateTXDisplay | ( | void | ) |
Definition at line 714 of file stvdriver.c.
int STV_Track | ( | void | ) |
Definition at line 171 of file stvdriver.c.
int STV_TXDisplay | ( | void | ) |
Definition at line 708 of file stvdriver.c.
int STV_UDRotaryDecrease | ( | void | ) |
Definition at line 111 of file stvdriver.c.
int STV_UDRotaryIncrease | ( | void | ) |
Definition at line 117 of file stvdriver.c.
int writeFITS | ( | const char * | filename, |
IMAGE_INFO * | image_info, | ||
char | errmsg[] | ||
) |
ITextVectorProperty UTCTP |