Phidget Servo
[Specific Phidgets]


Typedefs

typedef struct _CPhidgetServo * CPhidgetServoHandle

Functions

int CPhidgetServo_create (CPhidgetServoHandle *phid)
int CPhidgetServo_getMotorCount (CPhidgetServoHandle phid, int *count)
int CPhidgetServo_getPosition (CPhidgetServoHandle phid, int index, double *position)
int CPhidgetServo_setPosition (CPhidgetServoHandle phid, int index, double position)
int CPhidgetServo_getPositionMax (CPhidgetServoHandle phid, int index, double *max)
int CPhidgetServo_getPositionMin (CPhidgetServoHandle phid, int index, double *min)
int CPhidgetServo_set_OnPositionChange_Handler (CPhidgetServoHandle phid, int(*fptr)(CPhidgetServoHandle phid, void *userPtr, int index, double position), void *userPtr)
int CPhidgetServo_getEngaged (CPhidgetServoHandle phid, int index, int *engagedState)
int CPhidgetServo_setEngaged (CPhidgetServoHandle phid, int index, int engagedState)
int CPhidgetServo_getServoType (CPhidgetServoHandle phid, int index, CPhidget_ServoType *servoType)
int CPhidgetServo_setServoType (CPhidgetServoHandle phid, int index, CPhidget_ServoType servoType)
int CPhidgetServo_setServoParameters (CPhidgetServoHandle phid, int index, double min_us, double max_us, double degrees)

Detailed Description

Calls specific to the Phidget Servo. See the product manual for more specific API details, supported functionality, units, etc.

Typedef Documentation

typedef struct _CPhidgetServo* CPhidgetServoHandle

A Phidget Servo handle


Function Documentation

int CPhidgetServo_create ( CPhidgetServoHandle phid  ) 

Creates a Phidget Servo handle.

Parameters:
phid A pointer to an unallocated Phidget Servo handle.

int CPhidgetServo_getMotorCount ( CPhidgetServoHandle  phid,
int *  count 
)

Gets the number of motors supported by this controller.

Parameters:
phid An attached phidget servo handle.
count The motor count.

int CPhidgetServo_getPosition ( CPhidgetServoHandle  phid,
int  index,
double *  position 
)

Gets the current position of a motor.

Parameters:
phid An attached phidget servo handle.
index The motor index.
position The motor position.

int CPhidgetServo_setPosition ( CPhidgetServoHandle  phid,
int  index,
double  position 
)

Sets the current position of a motor.

Parameters:
phid An attached phidget servo handle.
index The motor index.
position The motor position.

int CPhidgetServo_getPositionMax ( CPhidgetServoHandle  phid,
int  index,
double *  max 
)

Gets the maximum position that a motor can be set to.

Parameters:
phid An attached phidget servo handle.
index The motor index.
max The maximum position.

int CPhidgetServo_getPositionMin ( CPhidgetServoHandle  phid,
int  index,
double *  min 
)

Gets the minimum position that a motor can be set to.

Parameters:
phid An attached phidget servo handle.
index The motor index.
min The minimum position.

int CPhidgetServo_set_OnPositionChange_Handler ( CPhidgetServoHandle  phid,
int(*)(CPhidgetServoHandle phid, void *userPtr, int index, double position)  fptr,
void *  userPtr 
)

Sets a position change event handler. This is called when the position changes.

Parameters:
phid An attached phidget servo handle
fptr Callback function pointer.
userPtr A pointer for use by the user - this value is passed back into the callback function.

int CPhidgetServo_getEngaged ( CPhidgetServoHandle  phid,
int  index,
int *  engagedState 
)

Gets the engaged state of a motor. This is whether the motor is powered or not.

Parameters:
phid An attached phidget servo handle
index The motor index.
engagedState The engaged state. Possible values are PTRUE and PFALSE.

int CPhidgetServo_setEngaged ( CPhidgetServoHandle  phid,
int  index,
int  engagedState 
)

Sets the engaged state of a motor. This is whether the motor is powered or not.

Parameters:
phid An attached phidget servo handle
index The motor index.
engagedState The engaged state. Possible values are PTRUE and PFALSE.

int CPhidgetServo_getServoType ( CPhidgetServoHandle  phid,
int  index,
CPhidget_ServoType servoType 
)

Gets the servo type of a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
servoType The servo type.

int CPhidgetServo_setServoType ( CPhidgetServoHandle  phid,
int  index,
CPhidget_ServoType  servoType 
)

Sets the servo type of a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
servoType The servo type.

int CPhidgetServo_setServoParameters ( CPhidgetServoHandle  phid,
int  index,
double  min_us,
double  max_us,
double  degrees 
)

Sets the servo parameters of a motor.

Parameters:
phid An attached phidget advanced servo handle
index The motor index.
min_us The minimum supported PCM in microseconds.
max_us The maximum supported PCM in microseconds.
degrees The degrees of rotation defined by the given PCM range.


Generated on Thu May 3 14:03:28 2012 for Phidget21 by  doxygen 1.5.9