#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"
Go to the source code of this file.
|
void | ISInit (void) |
|
void | getBasicData (void) |
|
void | ISPoll (void *) |
|
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) |
|
◆ CMD_JUNK
◆ CMD_RESP
◆ CMD_SIZE
◆ currentFilter
#define currentFilter FilterPositionN[0].value |
◆ 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 |
| ) |
|
◆ ISGetProperties()
void ISGetProperties |
( |
const char * |
dev | ) |
|
Get Device Properties.
- Parameters
-
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
- Parameters
-
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. |
Definition at line 118 of file trutech_wheel.c.
◆ ISInit()
◆ 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
-
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. |
- 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 133 of file trutech_wheel.c.
◆ ISNewNumber()
void ISNewNumber |
( |
const char * |
dev, |
|
|
const char * |
name, |
|
|
double |
values[], |
|
|
char * |
names[], |
|
|
int |
n |
|
) |
| |
◆ 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
-
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[]. |
- 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 150 of file trutech_wheel.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
-
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[]. |
- 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 210 of file trutech_wheel.c.
◆ ISPoll()
◆ 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
-
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. |
Definition at line 145 of file trutech_wheel.c.
◆ 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 |