#include <stdio.h>
#include <stdlib.h>
#include <cstring>
#include <stdarg.h>
#include <cmath>
#include <unistd.h>
#include <ctime>
#include <fcntl.h>
#include <cerrno>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include "indidevapi.h"
#include "eventloop.h"
#include "indicom.h"
|
void | ISInit (void) |
| Send client definitions of all properties. More...
|
|
void | getBasicData (void) |
|
void | ISPoll (void *) |
| Used to read periodically the data from the device. More...
|
|
void | handleExposure (void *) |
|
void | connectFilter (void) |
|
int | manageDefaults (char errmsg[]) |
|
int | checkPowerS (ISwitchVectorProperty *sp) |
|
int | checkPowerN (INumberVectorProperty *np) |
|
int | checkPowerT (ITextVectorProperty *tp) |
|
int | getOnSwitch (ISwitchVectorProperty *sp) |
|
int | isFilterConnected (void) |
|
void | ISGetProperties (const char *dev) |
| Get Device Properties. More...
|
|
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 | 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) |
|
|
static int | targetFilter |
|
static int | fd |
|
const unsigned char | COMM_PRE = 0x01 |
|
const unsigned char | COMM_INIT = 0xA5 |
|
const unsigned char | COMM_FILL = 0x20 |
|
static ISwitch | PowerS [] = { { "CONNECT", "Connect", ISS_OFF, 0, 0 }, { "DISCONNECT", "Disconnect", ISS_ON, 0, 0 } } |
|
static ISwitchVectorProperty | PowerSP |
|
static IText | PortT [] = { { "PORT", "Port", 0, 0, 0, 0 } } |
|
static ITextVectorProperty | PortTP |
|
static ISwitch | HomeS [] = { { "Find", "", ISS_OFF, 0, 0 } } |
|
static ISwitchVectorProperty | HomeSP |
|
static INumber | FilterCountN [] = { { "Count", "", "%2.0f", 0, MAX_FILTER_COUNT, 1, DEFAULT_FILTER_COUNT, 0, 0, 0 } } |
|
static INumberVectorProperty | FilterCountNP |
|
static INumber | FilterPositionN [] |
|
static INumberVectorProperty | FilterPositionNP |
|
◆ CMD_JUNK
◆ CMD_RESP
◆ CMD_SIZE
◆ currentFilter
◆ DEBUG_ON
◆ DEFAULT_FILTER_COUNT
#define DEFAULT_FILTER_COUNT 5 |
◆ ERRMSG_SIZE
◆ FILTER_TIMEOUT
#define FILTER_TIMEOUT 15 /* 15 Seconds before timeout */ |
◆ FIRST_FILTER
◆ MAIN_GROUP
#define MAIN_GROUP "Main Control" |
◆ MAX_FILTER_COUNT
#define MAX_FILTER_COUNT 10 |
◆ mydev
#define mydev "TruTech Wheel" |
◆ POLLMS
◆ SIMULATION_ON
◆ checkPowerN()
◆ checkPowerS()
◆ checkPowerT()
◆ connectFilter()
void connectFilter |
( |
void |
| ) |
|
◆ getBasicData()
void getBasicData |
( |
void |
| ) |
|
◆ getOnSwitch()
◆ handleExposure()
void handleExposure |
( |
void * |
| ) |
|
◆ isFilterConnected()
int isFilterConnected |
( |
void |
| ) |
|
◆ ISInit()
Send client definitions of all properties.
◆ ISNewNumber()
void ISNewNumber |
( |
const char * |
dev, |
|
|
const char * |
name, |
|
|
double |
values[], |
|
|
char * |
names[], |
|
|
int |
n |
|
) |
| |
◆ ISPoll()
Used to read periodically the data from the device.
- Parameters
-
◆ manageDefaults()
int manageDefaults |
( |
char |
errmsg[] | ) |
|
◆ COMM_FILL
const unsigned char COMM_FILL = 0x20 |
◆ COMM_INIT
const unsigned char COMM_INIT = 0xA5 |
◆ COMM_PRE
const unsigned char COMM_PRE = 0x01 |
◆ fd
◆ FilterCountN
INumber FilterCountN[] = { { "Count", "", "%2.0f", 0, MAX_FILTER_COUNT, 1, DEFAULT_FILTER_COUNT, 0, 0, 0 } } |
|
static |
◆ FilterCountNP
Initial value:#define MAIN_GROUP
Definition: trutech_wheel.c:58
#define mydev
Definition: trutech_wheel.c:57
static INumber FilterCountN[]
Definition: trutech_wheel.c:93
Definition: indiapi.h:155
Definition: indiapi.h:178
#define NARRAY(a)
Handy macro to find the number of elements in array a[].
Definition: indiapi.h:492
◆ FilterPositionN
Initial value: 0, 0 } }
#define DEFAULT_FILTER_COUNT
Definition: trutech_wheel.c:61
◆ FilterPositionNP
Initial value:= {
mydev,
"FILTER_SLOT",
"Filter",
MAIN_GROUP,
IP_RW, 0,
IPS_IDLE,
FilterPositionN,
NARRAY(
FilterPositionN),
"", 0
}
static INumber FilterPositionN[]
Definition: trutech_wheel.c:98
#define MAIN_GROUP
Definition: trutech_wheel.c:58
#define mydev
Definition: trutech_wheel.c:57
Definition: indiapi.h:155
Definition: indiapi.h:178
#define NARRAY(a)
Handy macro to find the number of elements in array a[].
Definition: indiapi.h:492
◆ HomeS
ISwitch HomeS[] = { { "Find", "", ISS_OFF, 0, 0 } } |
|
static |
◆ HomeSP
Initial value:#define MAIN_GROUP
Definition: trutech_wheel.c:58
#define mydev
Definition: trutech_wheel.c:57
static ISwitch HomeS[]
Definition: trutech_wheel.c:88
Definition: indiapi.h:155
Definition: indiapi.h:166
Definition: indiapi.h:178
#define NARRAY(a)
Handy macro to find the number of elements in array a[].
Definition: indiapi.h:492
◆ PortT
IText PortT[] = { { "PORT", "Port", 0, 0, 0, 0 } } |
|
static |
◆ PortTP
Initial value:#define MAIN_GROUP
Definition: trutech_wheel.c:58
#define mydev
Definition: trutech_wheel.c:57
static IText PortT[]
Definition: trutech_wheel.c:83
Definition: indiapi.h:155
Definition: indiapi.h:178
#define NARRAY(a)
Handy macro to find the number of elements in array a[].
Definition: indiapi.h:492
◆ PowerS
ISwitch PowerS[] = { { "CONNECT", "Connect", ISS_OFF, 0, 0 }, { "DISCONNECT", "Disconnect", ISS_ON, 0, 0 } } |
|
static |
◆ PowerSP
Initial value:#define MAIN_GROUP
Definition: trutech_wheel.c:58
#define mydev
Definition: trutech_wheel.c:57
Definition: indiapi.h:155
Definition: indiapi.h:166
Definition: indiapi.h:178
static ISwitch PowerS[]
Definition: trutech_wheel.c:78
#define NARRAY(a)
Handy macro to find the number of elements in array a[].
Definition: indiapi.h:492
◆ targetFilter