00001 #include "../stdafx.h" 00002 #include "phidget_jni.h" 00003 #include "com_phidgets_StepperPhidget.h" 00004 #include "../cphidgetstepper.h" 00005 00006 EVENT_VARS(stepperPositionChange, StepperPositionChange) 00007 EVENT_VARS(inputChange, InputChange) 00008 EVENT_VARS(stepperVelocityChange, StepperVelocityChange) 00009 EVENT_VARS(currentChange, CurrentChange) 00010 00011 JNI_LOAD(stepper, Stepper) 00012 EVENT_VAR_SETUP(stepper, stepperPositionChange, StepperPositionChange, IJ, V) 00013 EVENT_VAR_SETUP(stepper, inputChange, InputChange, IZ, V) 00014 EVENT_VAR_SETUP(stepper, stepperVelocityChange, StepperVelocityChange, ID, V) 00015 EVENT_VAR_SETUP(stepper, currentChange, CurrentChange, ID, V) 00016 } 00017 00018 EVENT_HANDLER_INDEXED(Stepper, stepperPositionChange, StepperPositionChange, 00019 CPhidgetStepper_set_OnPositionChange_Handler, long long) 00020 EVENT_HANDLER_INDEXED(Stepper, inputChange, InputChange, 00021 CPhidgetStepper_set_OnInputChange_Handler, int) 00022 EVENT_HANDLER_INDEXED(Stepper, stepperVelocityChange, StepperVelocityChange, 00023 CPhidgetStepper_set_OnVelocityChange_Handler, double) 00024 EVENT_HANDLER_INDEXED(Stepper, currentChange, CurrentChange, 00025 CPhidgetStepper_set_OnCurrentChange_Handler, double) 00026 00027 JNI_CREATE(Stepper) 00028 JNI_INDEXED_GETFUNC(Stepper, Acceleration, Acceleration, jdouble) 00029 JNI_INDEXED_SETFUNC(Stepper, Acceleration, Acceleration, jdouble) 00030 JNI_INDEXED_GETFUNC(Stepper, AccelerationMin, AccelerationMin, jdouble) 00031 JNI_INDEXED_GETFUNC(Stepper, AccelerationMax, AccelerationMax, jdouble) 00032 JNI_INDEXED_GETFUNC(Stepper, Velocity, Velocity, jdouble) 00033 JNI_INDEXED_SETFUNC(Stepper, VelocityLimit, VelocityLimit, jdouble) 00034 JNI_INDEXED_GETFUNC(Stepper, VelocityLimit, VelocityLimit, jdouble) 00035 JNI_INDEXED_GETFUNC(Stepper, VelocityMin, VelocityMin, jdouble) 00036 JNI_INDEXED_GETFUNC(Stepper, VelocityMax, VelocityMax, jdouble) 00037 JNI_INDEXED_GETFUNC(Stepper, TargetPosition, TargetPosition, jlong) 00038 JNI_INDEXED_SETFUNC(Stepper, TargetPosition, TargetPosition, jlong) 00039 JNI_INDEXED_GETFUNC(Stepper, CurrentPosition, CurrentPosition, jlong) 00040 JNI_INDEXED_SETFUNC(Stepper, CurrentPosition, CurrentPosition, jlong) 00041 JNI_INDEXED_GETFUNC(Stepper, PositionMin, PositionMin, jlong) 00042 JNI_INDEXED_GETFUNC(Stepper, PositionMax, PositionMax, jlong) 00043 JNI_INDEXED_GETFUNC(Stepper, Current, Current, jdouble) 00044 JNI_INDEXED_SETFUNC(Stepper, CurrentLimit, CurrentLimit, jdouble) 00045 JNI_INDEXED_GETFUNC(Stepper, CurrentLimit, CurrentLimit, jdouble) 00046 JNI_INDEXED_GETFUNC(Stepper, CurrentMin, CurrentMin, jdouble) 00047 JNI_INDEXED_GETFUNC(Stepper, CurrentMax, CurrentMax, jdouble) 00048 JNI_INDEXED_GETFUNCBOOL(Stepper, Stopped, Stopped) 00049 JNI_INDEXED_GETFUNCBOOL(Stepper, Engaged, Engaged) 00050 JNI_INDEXED_SETFUNC(Stepper, Engaged, Engaged, jboolean) 00051 JNI_INDEXED_GETFUNCBOOL(Stepper, InputState, InputState) 00052 JNI_GETFUNC(Stepper, MotorCount, MotorCount, jint) 00053 JNI_GETFUNC(Stepper, InputCount, InputCount, jint)