Instrument Neutral Distributed Interface INDI  2.0.2
Classes | Macros | Functions | Variables
stvdriver.c File Reference
#include <unistd.h>
#include <cstring>
#include <sys/stat.h>
#include <fcntl.h>
#include <cerrno>
#include <stdio.h>
#include <ctime>
#include <stdlib.h>
#include "config.h"
#include "stvdriver.h"
#include <libnova/libnova.h>
#include <termios.h>
#include "indicom.h"

Go to the source code of this file.




#define _GNU_SOURCE   1
#define FALSE   0
#define TRUE   1


void ISUpdateDisplay (int buffer, int line)
int STV_portWrite (char *buf, int nbytes)
int STV_TXDisplay (void)
int STV_TerminateTXDisplay (void)
int STV_FileStatus (int)
int STV_DownloadComplete (void)
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_RequestImageData (int compression, int *data, int j, int length, int *values)
int STV_Download (void)
int STV_DownloadAll (void)
int STV_RequestAck (void)
int STV_CheckHeaderSum (unsigned char *buf)
int STV_CheckDataSum (unsigned char *data)
int STV_PrintBuffer (unsigned char *buf, int n)
int STV_PrintBufferAsText (unsigned char *buf, int n)
int STV_CheckAck (unsigned char *buf)
int STV_SendPacket (int cmd, int *data, int n)
int STV_ReceivePacket (unsigned char *buf, int mode)
int STV_DecompressData (unsigned char *data, int *values, int length, int expected_n_values)
int STV_BufferStatus (int buffer)
void STV_PrintBits (unsigned int x, int n)
unsigned int STV_RecombineInt (unsigned char low_byte, unsigned char high_byte)
unsigned int STV_GetBits (unsigned int x, int p, int n)
int STV_MenueSetup (int delay)
int STV_MenueDateTime (int delay)
int STV_MenueCCDTemperature (int delay)
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 buffer, IMAGE_INFO *image_info)
double STV_SetCCDTemperature (double set_value)
int STV_SetDateTime (char *times)
int STV_Connect (char *device, int baud)
void shutdown_serial (int fd)
int init_serial (char *device_name, int bit_rate, int word_size, int parity, int stop_bits)


int fd
char tracking_buf []
struct termios orig_tty_setting
struct termios tty_setting

Macro Definition Documentation


#define _GNU_SOURCE   1

Definition at line 23 of file stvdriver.c.


#define FALSE   0

Definition at line 53 of file stvdriver.c.


#define TRUE   1

Definition at line 54 of file stvdriver.c.

Function Documentation

◆ init_serial()

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.

◆ ISUpdateDisplay()

void ISUpdateDisplay ( int  buffer,
int  line 

Definition at line 1952 of file stv.c.

◆ shutdown_serial()

void shutdown_serial ( int  fd)

Definition at line 1501 of file stvdriver.c.

◆ STV_AKey()

int STV_AKey ( void  )

Definition at line 123 of file stvdriver.c.

◆ STV_BKey()

int STV_BKey ( void  )

Definition at line 129 of file stvdriver.c.

◆ STV_BufferStatus()

int STV_BufferStatus ( int  buffer)

Definition at line 756 of file stvdriver.c.

◆ STV_Calibrate()

int STV_Calibrate ( void  )

Definition at line 165 of file stvdriver.c.

◆ STV_CheckAck()

int STV_CheckAck ( unsigned char *  buf)

Definition at line 1169 of file stvdriver.c.

◆ STV_CheckDataSum()

int STV_CheckDataSum ( unsigned char *  data)

Definition at line 1010 of file stvdriver.c.

◆ STV_CheckHeaderSum()

int STV_CheckHeaderSum ( unsigned char *  buf)

Definition at line 991 of file stvdriver.c.

◆ STV_Connect()

int STV_Connect ( char *  device,
int  baud 

Definition at line 1482 of file stvdriver.c.

◆ STV_DecompressData()

int STV_DecompressData ( unsigned char *  data,
int *  values,
int  length,
int  expected_n_values 

Definition at line 625 of file stvdriver.c.

◆ STV_Display()

int STV_Display ( void  )

Definition at line 177 of file stvdriver.c.

◆ STV_Download()

int STV_Download ( void  )

Definition at line 739 of file stvdriver.c.

◆ STV_DownloadAll()

int STV_DownloadAll ( void  )

Definition at line 744 of file stvdriver.c.

◆ STV_DownloadComplete()

int STV_DownloadComplete ( void  )

Definition at line 734 of file stvdriver.c.

◆ STV_FileOps()

int STV_FileOps ( void  )

Definition at line 183 of file stvdriver.c.

◆ STV_FileStatus()

int STV_FileStatus ( int  status)

Definition at line 728 of file stvdriver.c.

◆ STV_Focus()

int STV_Focus ( void  )

Definition at line 147 of file stvdriver.c.

◆ STV_GetBits()

unsigned int STV_GetBits ( unsigned int  x,
int  p,
int  n 

Definition at line 1190 of file stvdriver.c.

◆ STV_Image()

int STV_Image ( void  )

Definition at line 153 of file stvdriver.c.

◆ STV_Interrupt()

int STV_Interrupt ( void  )

Definition at line 141 of file stvdriver.c.

◆ STV_LRRotaryDecrease()

int STV_LRRotaryDecrease ( void  )

Definition at line 99 of file stvdriver.c.

◆ STV_LRRotaryIncrease()

int STV_LRRotaryIncrease ( void  )

Definition at line 105 of file stvdriver.c.

◆ STV_MenueCCDTemperature()

int STV_MenueCCDTemperature ( int  delay)

Definition at line 1276 of file stvdriver.c.

◆ STV_MenueDateTime()

int STV_MenueDateTime ( int  delay)

Definition at line 1445 of file stvdriver.c.

◆ STV_MenueSetup()

int STV_MenueSetup ( int  delay)

Definition at line 1465 of file stvdriver.c.

◆ STV_Monitor()

int STV_Monitor ( void  )

Definition at line 159 of file stvdriver.c.

◆ STV_portWrite()

int STV_portWrite ( char *  buf,
int  nbytes 

Definition at line 1142 of file stvdriver.c.

◆ STV_PrintBits()

void STV_PrintBits ( unsigned int  x,
int  n 

Definition at line 1196 of file stvdriver.c.

◆ STV_PrintBuffer()

int STV_PrintBuffer ( unsigned char *  buf,
int  n 

Definition at line 1041 of file stvdriver.c.

◆ STV_PrintBufferAsText()

int STV_PrintBufferAsText ( unsigned char *  buf,
int  n 

Definition at line 1060 of file stvdriver.c.

◆ STV_ReceivePacket()

int STV_ReceivePacket ( unsigned char *  buf,
int  mode 

Definition at line 825 of file stvdriver.c.

◆ STV_RecombineInt()

unsigned int STV_RecombineInt ( unsigned char  low_byte,
unsigned char  high_byte 

Definition at line 1185 of file stvdriver.c.

◆ STV_RequestAck()

int STV_RequestAck ( void  )

Definition at line 749 of file stvdriver.c.

◆ STV_RequestImage()

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.

◆ STV_RequestImageData()

int STV_RequestImageData ( int  compression,
int *  data,
int  j,
int  length,
int *  values 

Definition at line 520 of file stvdriver.c.

◆ STV_RequestImageInfo()

int STV_RequestImageInfo ( int  buffer,
IMAGE_INFO image_info 

Definition at line 189 of file stvdriver.c.

◆ STV_SendPacket()

int STV_SendPacket ( int  cmd,
int *  data,
int  n 

Definition at line 1080 of file stvdriver.c.

◆ STV_SetCCDTemperature()

double STV_SetCCDTemperature ( double  set_value)

Definition at line 1230 of file stvdriver.c.

◆ STV_SetDateTime()

int STV_SetDateTime ( char *  times)

Definition at line 1288 of file stvdriver.c.

◆ STV_Setup()

int STV_Setup ( void  )

Definition at line 135 of file stvdriver.c.

◆ STV_TerminateTXDisplay()

int STV_TerminateTXDisplay ( void  )

Definition at line 714 of file stvdriver.c.

◆ STV_Track()

int STV_Track ( void  )

Definition at line 171 of file stvdriver.c.

◆ STV_TXDisplay()

int STV_TXDisplay ( void  )

Definition at line 708 of file stvdriver.c.

◆ STV_UDRotaryDecrease()

int STV_UDRotaryDecrease ( void  )

Definition at line 111 of file stvdriver.c.

◆ STV_UDRotaryIncrease()

int STV_UDRotaryIncrease ( void  )

Definition at line 117 of file stvdriver.c.

Variable Documentation

◆ di

Definition at line 95 of file stvdriver.c.

◆ fd

int fd

Definition at line 43 of file intelliscope.c.

◆ orig_tty_setting

struct termios orig_tty_setting

Definition at line 49 of file stvdriver.c.

◆ tracking_buf

char tracking_buf[]

Definition at line 109 of file stv.c.

◆ tty_setting

struct termios tty_setting

Definition at line 49 of file stvdriver.c.