cphidgetservo.h
Go to the documentation of this file.
00001 #ifndef __CPHIDGETSERVO
00002 #define __CPHIDGETSERVO
00003 #include "cphidget.h"
00004 #include "cphidgetadvancedservo.h"
00005 
00012 DPHANDLE(Servo)
00013 CHDRSTANDARD(Servo)
00014 
00020 CHDRGET(Servo,MotorCount,int *count)
00021 
00028 CHDRGETINDEX(Servo,Position,double *position)
00035 CHDRSETINDEX(Servo,Position,double position)
00042 CHDRGETINDEX(Servo,PositionMax,double *max)
00049 CHDRGETINDEX(Servo,PositionMin,double *min)
00056 CHDREVENTINDEX(Servo,PositionChange,double position)
00063 CHDRGETINDEX(Servo,Engaged,int *engagedState)
00070 CHDRSETINDEX(Servo,Engaged,int engagedState)
00077 CHDRGETINDEX(Servo,ServoType,CPhidget_ServoType *servoType)
00084 CHDRSETINDEX(Servo,ServoType,CPhidget_ServoType servoType)
00093 CHDRSETINDEX(Servo,ServoParameters,double min_us,double max_us,double degrees)
00094 
00095 #ifndef REMOVE_DEPRECATED
00096 DEP_CHDRGET("Deprecated - use CPhidgetServo_getMotorCount",Servo,NumMotors,int *)
00097 DEP_CHDRSETINDEX("Deprecated - use CPhidgetServo_setPosition",Servo,MotorPosition,double)
00098 DEP_CHDRGETINDEX("Deprecated - use CPhidgetServo_getPosition",Servo,MotorPosition,double *)
00099 DEP_CHDRGETINDEX("Deprecated - use CPhidgetServo_getPositionMax",Servo,MotorPositionMax,double *)
00100 DEP_CHDRGETINDEX("Deprecated - use CPhidgetServo_getPositionMin",Servo,MotorPositionMin,double *)
00101 DEP_CHDREVENTINDEX("Deprecated - use CPhidgetServo_set_OnPositionChange_Handler",Servo,MotorPositionChange,double motorPosition)
00102 DEP_CHDRSETINDEX("Deprecated - use CPhidgetServo_setEngaged",Servo,MotorOn,int)
00103 DEP_CHDRGETINDEX("Deprecated - use CPhidgetServo_getEngaged",Servo,MotorOn,int *)
00104 #endif
00105 
00106 #ifndef EXTERNALPROTO
00107 
00108 PHIDGET21_API int CCONV setupNewServoParams(CPhidgetServoHandle phid, int Index, CPhidgetServoParameters params);
00109 
00110 #define SERVO_MAXSERVOS 4
00111 struct _CPhidgetServo {
00112         CPhidget phid;
00113 
00114         int (CCONV *fptrPositionChange)(CPhidgetServoHandle, void *, int, double);           
00115         void *fptrPositionChangeptr;
00116 
00117         //Deprecated
00118         int (CCONV *fptrMotorPositionChange)(CPhidgetServoHandle, void *, int, double);           
00119         void *fptrMotorPositionChangeptr;
00120 
00121         double motorPositionEcho[SERVO_MAXSERVOS];
00122         unsigned char motorEngagedStateEcho[SERVO_MAXSERVOS];
00123 
00124         double motorPosition[SERVO_MAXSERVOS];
00125         unsigned char motorEngagedState[SERVO_MAXSERVOS];
00126 
00127         unsigned char fullStateEcho;
00128 
00129         double motorPositionMax[SERVO_MAXSERVOS], motorPositionMin[SERVO_MAXSERVOS];
00130         double motorPositionMaxLimit, motorPositionMinLimit;
00131 
00132         CPhidgetServoParameters servoParams[ADVSERVO_MAXSERVOS];
00133         char *servoParamString[ADVSERVO_MAXSERVOS];
00134 
00135         unsigned char outputPacket[MAX_OUT_PACKET_SIZE];
00136         unsigned int outputPacketLen;
00137 } typedef CPhidgetServoInfo;
00138 #endif
00139 
00142 #endif


pedal_monitor
Author(s): Pedro Mendes
autogenerated on Fri Jun 6 2014 18:37:20