aboutsummaryrefslogtreecommitdiffstats
path: root/Java/com_phidgets_StepperPhidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'Java/com_phidgets_StepperPhidget.c')
-rw-r--r--Java/com_phidgets_StepperPhidget.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/Java/com_phidgets_StepperPhidget.c b/Java/com_phidgets_StepperPhidget.c
new file mode 100644
index 0000000..bdc12a6
--- /dev/null
+++ b/Java/com_phidgets_StepperPhidget.c
@@ -0,0 +1,53 @@
+#include "../stdafx.h"
+#include "phidget_jni.h"
+#include "com_phidgets_StepperPhidget.h"
+#include "../cphidgetstepper.h"
+
+EVENT_VARS(stepperPositionChange, StepperPositionChange)
+EVENT_VARS(inputChange, InputChange)
+EVENT_VARS(stepperVelocityChange, StepperVelocityChange)
+EVENT_VARS(currentChange, CurrentChange)
+
+JNI_LOAD(stepper, Stepper)
+ EVENT_VAR_SETUP(stepper, stepperPositionChange, StepperPositionChange, IJ, V)
+ EVENT_VAR_SETUP(stepper, inputChange, InputChange, IZ, V)
+ EVENT_VAR_SETUP(stepper, stepperVelocityChange, StepperVelocityChange, ID, V)
+ EVENT_VAR_SETUP(stepper, currentChange, CurrentChange, ID, V)
+}
+
+EVENT_HANDLER_INDEXED(Stepper, stepperPositionChange, StepperPositionChange,
+ CPhidgetStepper_set_OnPositionChange_Handler, long long)
+EVENT_HANDLER_INDEXED(Stepper, inputChange, InputChange,
+ CPhidgetStepper_set_OnInputChange_Handler, int)
+EVENT_HANDLER_INDEXED(Stepper, stepperVelocityChange, StepperVelocityChange,
+ CPhidgetStepper_set_OnVelocityChange_Handler, double)
+EVENT_HANDLER_INDEXED(Stepper, currentChange, CurrentChange,
+ CPhidgetStepper_set_OnCurrentChange_Handler, double)
+
+JNI_CREATE(Stepper)
+JNI_INDEXED_GETFUNC(Stepper, Acceleration, Acceleration, jdouble)
+JNI_INDEXED_SETFUNC(Stepper, Acceleration, Acceleration, jdouble)
+JNI_INDEXED_GETFUNC(Stepper, AccelerationMin, AccelerationMin, jdouble)
+JNI_INDEXED_GETFUNC(Stepper, AccelerationMax, AccelerationMax, jdouble)
+JNI_INDEXED_GETFUNC(Stepper, Velocity, Velocity, jdouble)
+JNI_INDEXED_SETFUNC(Stepper, VelocityLimit, VelocityLimit, jdouble)
+JNI_INDEXED_GETFUNC(Stepper, VelocityLimit, VelocityLimit, jdouble)
+JNI_INDEXED_GETFUNC(Stepper, VelocityMin, VelocityMin, jdouble)
+JNI_INDEXED_GETFUNC(Stepper, VelocityMax, VelocityMax, jdouble)
+JNI_INDEXED_GETFUNC(Stepper, TargetPosition, TargetPosition, jlong)
+JNI_INDEXED_SETFUNC(Stepper, TargetPosition, TargetPosition, jlong)
+JNI_INDEXED_GETFUNC(Stepper, CurrentPosition, CurrentPosition, jlong)
+JNI_INDEXED_SETFUNC(Stepper, CurrentPosition, CurrentPosition, jlong)
+JNI_INDEXED_GETFUNC(Stepper, PositionMin, PositionMin, jlong)
+JNI_INDEXED_GETFUNC(Stepper, PositionMax, PositionMax, jlong)
+JNI_INDEXED_GETFUNC(Stepper, Current, Current, jdouble)
+JNI_INDEXED_SETFUNC(Stepper, CurrentLimit, CurrentLimit, jdouble)
+JNI_INDEXED_GETFUNC(Stepper, CurrentLimit, CurrentLimit, jdouble)
+JNI_INDEXED_GETFUNC(Stepper, CurrentMin, CurrentMin, jdouble)
+JNI_INDEXED_GETFUNC(Stepper, CurrentMax, CurrentMax, jdouble)
+JNI_INDEXED_GETFUNCBOOL(Stepper, Stopped, Stopped)
+JNI_INDEXED_GETFUNCBOOL(Stepper, Engaged, Engaged)
+JNI_INDEXED_SETFUNC(Stepper, Engaged, Engaged, jboolean)
+JNI_INDEXED_GETFUNCBOOL(Stepper, InputState, InputState)
+JNI_GETFUNC(Stepper, MotorCount, MotorCount, jint)
+JNI_GETFUNC(Stepper, InputCount, InputCount, jint)