Instrument Neutral Distributed Interface INDI
1.9.5
|
Go to the documentation of this file.
32 controller =
new Controller(
this);
34 controller->setJoystickCallback(joystickHelper);
35 controller->setButtonCallback(buttonHelper);
101 if (strcmp(
name,
"FILTER_SLOT") == 0)
166 if (!strcmp(joystick_n,
"Change Filter"))
172 if (angle > 0 && angle < 180)
183 if (angle > 180 && angle < 360)
204 if (!strcmp(button_n,
"Reset"))
216 bool FilterWheel::callHandshake()
218 if (filterConnection > 0)
233 if (value == 0 || (mask & value) == 0)
239 filterConnection = value;
static void buttonHelper(const char *button_n, ISState state, void *context)
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
virtual bool saveConfigItems(FILE *fp)
Connection::Serial * serialConnection
The Serial class manages connection with serial devices including Bluetooth. Serial communication is ...
The TCP class manages connection with devices over the network via TCP/IP. Upon successfull connectio...
bool processNumber(const char *dev, const char *name, double values[], char *names[], int n)
Process number properties.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
const char * FILTER_TAB
FILTER_TAB Where all the properties for filter wheels are located.
const char * getDeviceName() const
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
void setFilterConnection(const uint8_t &value)
setFilterConnection Set Filter connection mode. Child class should call this in the constructor befor...
void mapController(const char *propertyName, const char *propertyLabel, ControllerType type, const char *initialValue)
mapController adds a new property to the joystick's settings.
bool updateProperties()
updateProperties Defines or Delete proprties based on default device connection status
virtual bool initProperties()
Initilize properties initial state and value. The child class must implement this function.
virtual bool ISSnoopDevice(XMLEle *root) override
Process a snoop event from INDI server. This function is called when a snooped property is updated in...
virtual bool ISSnoopDevice(XMLEle *root)
Process a snoop event from INDI server. This function is called when a snooped property is updated in...
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
virtual bool ISSnoopDevice(XMLEle *root)
virtual void ISGetProperties(const char *dev)
Connection::TCP * tcpConnection
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n)
Process the client newNumber command.
void registerConnection(Connection::Interface *newConnection)
registerConnection Add new connection plugin to the existing connection pool. The connection type sha...
Provides interface to implement Filter Wheel functionality.
void processJoystick(const char *joystick_n, double mag, double angle)
ITextVectorProperty * FilterNameTP
static void joystickHelper(const char *joystick_n, double mag, double angle, void *context)
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual void ISGetProperties(const char *dev)
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
bool saveConfigItems(FILE *fp)
saveConfigItems save Filter Names in config file
bool processText(const char *dev, const char *name, char *texts[], char *names[], int n)
Process text properties.
Namespace to encapsulate INDI client, drivers, and mediator classes.
void registerHandshake(std::function< bool()> callback)
registerHandshake Register a handshake function to be called once the intial connection to the device...
int PortFD
For Serial & TCP connections.
#define DEBUGF(priority, msg,...)
virtual bool saveConfigItems(FILE *fp)
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
void processButton(const char *button_n, ISState state)
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
virtual void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
virtual bool initProperties()
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Process the client newSwitch command.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
void initProperties(const char *groupName)
Initilize filter wheel properties. It is recommended to call this function within initProperties() of...
virtual int QueryFilter() override
Return current filter position.
virtual bool Handshake()
perform handshake with device to check communication
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n)
Process the client newSwitch command.
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n)
void setDriverInterface(uint16_t value)
setInterface Set driver interface. By default the driver interface is set to GENERAL_DEVICE....
virtual bool updateProperties()
virtual bool SelectFilter(int) override
Select a new filter position.
virtual bool updateProperties()
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
Connection::Interface * getActiveConnection()