72 typedef std::function<void(
const char *joystick_n,
double mag,
double angle,
void *context)>
joystickFunc;
77 typedef std::function<void(
const char *axis_n,
double value,
void *context)>
axisFunc;
95 virtual bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n);
96 virtual bool ISNewText(
const char *dev,
const char *name,
char *texts[],
char *names[],
int n);
107 const char *initialValue);
136 static void joystickEvent(
const char *joystick_n,
double mag,
double angle,
void *context);
137 static void axisEvent(
const char *axis_n,
int value,
void *context);
138 static void buttonEvent(
const char *button_n,
int value,
void *context);
155 IText JoystickDeviceT[1] {};
158 IText *JoystickSettingT =
nullptr;
void setButtonCallback(buttonFunc buttonCallback)
setButtonCallback Sets the callback function when a new button input is detected.
static void joystickEvent(const char *joystick_n, double mag, double angle, void *context)
virtual bool ISSnoopDevice(XMLEle *root)
const char * getControllerSetting(const char *name)
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
void clearMap()
clearMap clears all properties added previously by mapController()
void mapController(const char *propertyName, const char *propertyLabel, ControllerType type, const char *initialValue)
mapController adds a new property to the joystick's settings.
virtual bool initProperties()
void setAxisCallback(axisFunc axisCallback)
setAxisCallback Sets the callback function when a new axis input is detected.
INDI::DefaultDevice * device
virtual bool saveConfigItems(FILE *fp)
virtual void ISGetProperties(const char *dev)
std::function< void(const char *button_n, ISState state, void *context)> buttonFunc
buttonFunc Button callback function signature.
axisFunc axisCallbackFunc
virtual bool updateProperties()
void setJoystickCallback(joystickFunc joystickCallback)
setJoystickCallback Sets the callback function when a new joystick input is detected.
joystickFunc joystickCallbackFunc
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n)
static void buttonEvent(const char *button_n, int value, void *context)
std::function< void(const char *axis_n, double value, void *context)> axisFunc
axisFunc Axis callback function signature.
Controller(INDI::DefaultDevice *cdevice)
Controller Default ctor.
ControllerType getControllerType(const char *name)
std::function< void(const char *joystick_n, double mag, double angle, void *context)> joystickFunc
joystickFunc Joystick callback function signature.
buttonFunc buttonCallbackFunc
static void axisEvent(const char *axis_n, int value, void *context)
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
struct _ISwitchVectorProperty ISwitchVectorProperty
struct _ITextVectorProperty ITextVectorProperty
*brief user defined string literal for JSON values *sa std::size_t n
Namespace to encapsulate INDI client, drivers, and mediator classes.