Instrument Neutral Distributed Interface INDI  1.9.2
Macros | Functions | Variables
intelliscope.c File Reference
#include "config.h"
#include "indidevapi.h"
#include "indicom.h"
#include <termios.h>

Go to the source code of this file.

Macros

#define mydev   "Intelliscope"
 
#define BASIC_GROUP   "Main Control"
 
#define POLLMS_OVERRIDE   1000
 
#define currentRA   eq[0].value
 
#define currentDEC   eq[1].value
 
#define INTELLISCOPE_TIMEOUT   5
 

Functions

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...
 
int updateIntelliscopeCoord (int fd, double *ra, double *dec)
 

Variables

int fd
 
ISwitchVectorProperty PowerSP
 
INumber eq []
 
INumberVectorProperty eqNum
 

Macro Definition Documentation

◆ BASIC_GROUP

#define BASIC_GROUP   "Main Control"

Definition at line 33 of file intelliscope.c.

◆ currentDEC

#define currentDEC   eq[1].value

Definition at line 36 of file intelliscope.c.

◆ currentRA

#define currentRA   eq[0].value

Definition at line 35 of file intelliscope.c.

◆ INTELLISCOPE_TIMEOUT

#define INTELLISCOPE_TIMEOUT   5

Definition at line 37 of file intelliscope.c.

◆ mydev

#define mydev   "Intelliscope"

Definition at line 32 of file intelliscope.c.

◆ POLLMS_OVERRIDE

#define POLLMS_OVERRIDE   1000

Definition at line 34 of file intelliscope.c.

Function Documentation

◆ ISGetProperties()

void ISGetProperties ( const char *  dev)

Get Device Properties.

Parameters
devthe 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

Parameters
devis 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.

Definition at line 75 of file intelliscope.c.

◆ ISNewBLOB()

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.

Parameters
devthe name of the device.
namethe name of the blob vector property to update.
sizesan array of base64 blob sizes in bytes before decoding.
blobsizesan array of the sizes of blobs after decoding from base64.
blobsan array of decoded data. Each blob size is found in blobsizes array.
formatsBlob data format (e.g. fits.z).
namesnames of blob members to update.
nthe number of blobs to update.
Note
You do not need to call this function, it is called by INDI when new blob values arrive from the client. e.g. BLOB element with name names[0] has data located in blobs[0] with size sizes[0] and format formats[0].

Definition at line 126 of file intelliscope.c.

◆ ISNewNumber()

void ISNewNumber ( const char *  dev,
const char *  name,
double  values[],
char *  names[],
int  n 
)

Definition at line 117 of file intelliscope.c.

◆ ISNewSwitch()

void ISNewSwitch ( const char *  dev,
const char *  name,
ISState states,
char *  names[],
int  n 
)

Update the value of an existing switch vector property.

Parameters
devthe name of the device.
namethe name of the switch vector property to update.
statesan array of switch states.
namesparallel names to the array of switch states.
nthe dimension of states[].
Note
You do not need to call this function, it is called by INDI when new switch values arrive from the client.

Definition at line 86 of file intelliscope.c.

◆ ISNewText()

void ISNewText ( const char *  dev,
const char *  name,
char *  texts[],
char *  names[],
int  n 
)

Update the value of an existing text vector property.

Parameters
devthe name of the device.
namethe name of the text vector property to update.
textsan array of text values.
namesparallel names to the array of text values.
nthe dimension of texts[].
Note
You do not need to call this function, it is called by INDI when new text values arrive from the client.

Definition at line 101 of file intelliscope.c.

◆ ISSnoopDevice()

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.

Parameters
rootThe 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.

Definition at line 138 of file intelliscope.c.

◆ updateIntelliscopeCoord()

int updateIntelliscopeCoord ( int  fd,
double *  ra,
double *  dec 
)

Definition at line 143 of file intelliscope.c.

Variable Documentation

◆ eq

INumber eq[]
Initial value:
= {
{ "RA", "RA H:M:S", "%10.6m", 0., 24., 0., 0., 0, 0, 0 },
{ "DEC", "Dec D:M:S", "%10.6m", -90., 90., 0., 0., 0, 0, 0 },
}

Definition at line 54 of file intelliscope.c.

◆ eqNum

Initial value:
= {
mydev, "EQUATORIAL_EOD_COORD", "Equatorial JNow", BASIC_GROUP, IP_RO, 0, IPS_IDLE, eq, NARRAY(eq), "", 0
}

Definition at line 58 of file intelliscope.c.

◆ fd

int fd

Definition at line 43 of file intelliscope.c.

◆ PowerSP

Initial value:
= { mydev, "CONNECTION", "Connection", BASIC_GROUP, IP_RW, ISR_1OFMANY,
0, IPS_IDLE, PowerS, NARRAY(PowerS), "", 0 }

Definition at line 46 of file intelliscope.c.

IP_RO
@ IP_RO
Definition: indiapi.h:183
mydev
#define mydev
Definition: intelliscope.c:32
NARRAY
#define NARRAY(a)
Handy macro to find the number of elements in array a[]. Must be used with actual array,...
Definition: indiapi.h:499
BASIC_GROUP
#define BASIC_GROUP
Definition: intelliscope.c:33
eq
INumber eq[]
Definition: intelliscope.c:54
ISR_1OFMANY
@ ISR_1OFMANY
Definition: indiapi.h:172
IPS_IDLE
@ IPS_IDLE
Definition: indiapi.h:160
IP_RW
@ IP_RW
Definition: indiapi.h:185