Phidget Constants


Defines

#define PFALSE   0x00
#define PTRUE   0x01

Enumerations

enum  CPhidget_DeviceClass {
  PHIDCLASS_ACCELEROMETER = 2, PHIDCLASS_ADVANCEDSERVO = 3, PHIDCLASS_ANALOG = 22, PHIDCLASS_BRIDGE = 23,
  PHIDCLASS_ENCODER = 4, PHIDCLASS_FREQUENCYCOUNTER = 21, PHIDCLASS_GPS = 5, PHIDCLASS_INTERFACEKIT = 7,
  PHIDCLASS_IR = 19, PHIDCLASS_LED = 8, PHIDCLASS_MOTORCONTROL = 9, PHIDCLASS_PHSENSOR = 10,
  PHIDCLASS_RFID = 11, PHIDCLASS_SERVO = 12, PHIDCLASS_SPATIAL = 20, PHIDCLASS_STEPPER = 13,
  PHIDCLASS_TEMPERATURESENSOR = 14, PHIDCLASS_TEXTLCD = 15, PHIDCLASS_TEXTLED = 16, PHIDCLASS_WEIGHTSENSOR = 17
}
enum  CPhidget_DeviceID {
  PHIDID_ACCELEROMETER_3AXIS = 0x07E, PHIDID_ADVANCEDSERVO_1MOTOR = 0x082, PHIDID_ADVANCEDSERVO_8MOTOR = 0x03A, PHIDID_ANALOG_4OUTPUT = 0x037,
  PHIDID_BIPOLAR_STEPPER_1MOTOR = 0x07B, PHIDID_BRIDGE_4INPUT = 0x03B, PHIDID_ENCODER_1ENCODER_1INPUT = 0x04B, PHIDID_ENCODER_HS_1ENCODER = 0x080,
  PHIDID_ENCODER_HS_4ENCODER_4INPUT = 0x04F, PHIDID_FREQUENCYCOUNTER_2INPUT = 0x035, PHIDID_GPS = 0x079, PHIDID_INTERFACEKIT_0_0_4 = 0x040,
  PHIDID_INTERFACEKIT_0_0_8 = 0x081, PHIDID_INTERFACEKIT_0_16_16 = 0x044, PHIDID_INTERFACEKIT_2_2_2 = 0x036, PHIDID_INTERFACEKIT_8_8_8 = 0x045,
  PHIDID_INTERFACEKIT_8_8_8_w_LCD = 0x07D, PHIDID_IR = 0x04D, PHIDID_LED_64_ADV = 0x04C, PHIDID_LINEAR_TOUCH = 0x076,
  PHIDID_MOTORCONTROL_1MOTOR = 0x03E, PHIDID_MOTORCONTROL_HC_2MOTOR = 0x059, PHIDID_RFID_2OUTPUT = 0x031, PHIDID_RFID_2OUTPUT_READ_WRITE = 0x034,
  PHIDID_ROTARY_TOUCH = 0x077, PHIDID_SPATIAL_ACCEL_3AXIS = 0x07F, PHIDID_SPATIAL_ACCEL_GYRO_COMPASS = 0x033, PHIDID_TEMPERATURESENSOR = 0x070,
  PHIDID_TEMPERATURESENSOR_4 = 0x032, PHIDID_TEMPERATURESENSOR_IR = 0x03C, PHIDID_TEXTLCD_2x20_w_8_8_8 = 0x17D, PHIDID_TEXTLCD_ADAPTER = 0x03D,
  PHIDID_UNIPOLAR_STEPPER_4MOTOR = 0x07A, PHIDID_ACCELEROMETER_2AXIS = 0x071, PHIDID_INTERFACEKIT_0_8_8_w_LCD = 0x053, PHIDID_INTERFACEKIT_4_8_8 = 4,
  PHIDID_LED_64 = 0x04A, PHIDID_MOTORCONTROL_LV_2MOTOR_4INPUT = 0x058, PHIDID_PHSENSOR = 0x074, PHIDID_RFID = 0x030,
  PHIDID_SERVO_1MOTOR = 0x039, PHIDID_SERVO_1MOTOR_OLD = 2, PHIDID_SERVO_4MOTOR = 0x038, PHIDID_SERVO_4MOTOR_OLD = 3,
  PHIDID_TEXTLCD_2x20 = 0x052, PHIDID_TEXTLCD_2x20_w_0_8_8 = 0x153, PHIDID_TEXTLED_1x8 = 0x049, PHIDID_TEXTLED_4x8 = 0x048,
  PHIDID_WEIGHTSENSOR = 0x072, PHIDID_FIRMWARE_UPGRADE = 0x098
}

Phidget States

Returned by getStatus() functions

#define PHIDGET_ATTACHED   0x1
#define PHIDGET_NOTATTACHED   0x0

Phidget Error Codes

Returned by all C API calls

#define PHIDGET_ERROR_CODE_COUNT   20
#define EPHIDGET_OK   0
#define EPHIDGET_NOTFOUND   1
#define EPHIDGET_NOMEMORY   2
#define EPHIDGET_UNEXPECTED   3
#define EPHIDGET_INVALIDARG   4
#define EPHIDGET_NOTATTACHED   5
#define EPHIDGET_INTERRUPTED   6
#define EPHIDGET_INVALID   7
#define EPHIDGET_NETWORK   8
#define EPHIDGET_UNKNOWNVAL   9
#define EPHIDGET_BADPASSWORD   10
#define EPHIDGET_UNSUPPORTED   11
#define EPHIDGET_DUPLICATE   12
#define EPHIDGET_TIMEOUT   13
#define EPHIDGET_OUTOFBOUNDS   14
#define EPHIDGET_EVENT   15
#define EPHIDGET_NETWORK_NOTCONNECTED   16
#define EPHIDGET_WRONGDEVICE   17
#define EPHIDGET_CLOSED   18
#define EPHIDGET_BADVERSION   19

Phidget Error Event Codes

Returned in the Phidget error event

#define EEPHIDGET_EVENT_ERROR(code)   (0x8000 + code)
#define EEPHIDGET_NETWORK   EEPHIDGET_EVENT_ERROR(0x0001)
#define EEPHIDGET_BADPASSWORD   EEPHIDGET_EVENT_ERROR(0x0002)
#define EEPHIDGET_BADVERSION   EEPHIDGET_EVENT_ERROR(0x0003)
#define EEPHIDGET_OK   EEPHIDGET_EVENT_ERROR(0x1000)
#define EEPHIDGET_OVERRUN   EEPHIDGET_EVENT_ERROR(0x1002)
#define EEPHIDGET_PACKETLOST   EEPHIDGET_EVENT_ERROR(0x1003)
#define EEPHIDGET_WRAP   EEPHIDGET_EVENT_ERROR(0x1004)
#define EEPHIDGET_OVERTEMP   EEPHIDGET_EVENT_ERROR(0x1005)
#define EEPHIDGET_OVERCURRENT   EEPHIDGET_EVENT_ERROR(0x1006)
#define EEPHIDGET_OUTOFRANGE   EEPHIDGET_EVENT_ERROR(0x1007)
#define EEPHIDGET_BADPOWER   EEPHIDGET_EVENT_ERROR(0x1008)

Phidget Unknown Constants

Data values will be set to these constants when a call fails with EPHIDGET_UNKNOWNVAL.

#define PUNK_BOOL   0x02
#define PUNK_SHRT   0x7FFF
#define PUNK_INT   0x7FFFFFFF
#define PUNK_INT64   0x7FFFFFFFFFFFFFFFLL
#define PUNK_DBL   1e300
#define PUNK_FLT   1e30

Detailed Description

Various constants used throughout the library.

Define Documentation

#define PHIDGET_ATTACHED   0x1

Phidget attached

#define PHIDGET_NOTATTACHED   0x0

Phidget not attached

#define EPHIDGET_OK   0

Function completed successfully.

#define EPHIDGET_NOTFOUND   1

Phidget not found. "A Phidget matching the type and or serial number could not be found."

#define EPHIDGET_NOMEMORY   2

No memory. "Memory could not be allocated."

#define EPHIDGET_UNEXPECTED   3

Unexpected. "Unexpected Error. Contact Phidgets Inc. for support."

#define EPHIDGET_INVALIDARG   4

Invalid argument. "Invalid argument passed to function."

#define EPHIDGET_NOTATTACHED   5

Phidget not attached. "Phidget not physically attached."

#define EPHIDGET_INTERRUPTED   6

Interrupted. "Read/Write operation was interrupted." This code is not currently used.

#define EPHIDGET_INVALID   7

Invalid error code. "The Error Code is not defined."

#define EPHIDGET_NETWORK   8

Network. "Network Error."

#define EPHIDGET_UNKNOWNVAL   9

Value unknown. "Value is Unknown (State not yet received from device, or not yet set by user)."

#define EPHIDGET_BADPASSWORD   10

Authorization exception. "No longer used. Replaced by EEPHIDGET_BADPASSWORD"

#define EPHIDGET_UNSUPPORTED   11

Unsupported. "Not Supported."

#define EPHIDGET_DUPLICATE   12

Duplicate request. "Duplicated request."

#define EPHIDGET_TIMEOUT   13

Timeout. "Given timeout has been exceeded."

#define EPHIDGET_OUTOFBOUNDS   14

Out of bounds. "Index out of Bounds."

#define EPHIDGET_EVENT   15

Event. "A non-null error code was returned from an event handler." This code is not currently used.

#define EPHIDGET_NETWORK_NOTCONNECTED   16

Network not connected. "A connection to the server does not exist."

#define EPHIDGET_WRONGDEVICE   17

Wrong device. "Function is not applicable for this device."

#define EPHIDGET_CLOSED   18

Phidget Closed. "Phidget handle was closed."

#define EPHIDGET_BADVERSION   19

Version Mismatch. "No longer used. Replaced by EEPHIDGET_BADVERSION"

#define EEPHIDGET_NETWORK   EEPHIDGET_EVENT_ERROR(0x0001)

Network Error (asynchronous).

#define EEPHIDGET_BADPASSWORD   EEPHIDGET_EVENT_ERROR(0x0002)

Authorization Failed.

#define EEPHIDGET_BADVERSION   EEPHIDGET_EVENT_ERROR(0x0003)

Webservice and Client protocol versions don't match. Update to newest release.

#define EEPHIDGET_OK   EEPHIDGET_EVENT_ERROR(0x1000)

An error state has ended - see description for details.

#define EEPHIDGET_OVERRUN   EEPHIDGET_EVENT_ERROR(0x1002)

A sampling overrun happend in firmware.

#define EEPHIDGET_PACKETLOST   EEPHIDGET_EVENT_ERROR(0x1003)

One or more packets were lost.

#define EEPHIDGET_WRAP   EEPHIDGET_EVENT_ERROR(0x1004)

A variable has wrapped around.

#define EEPHIDGET_OVERTEMP   EEPHIDGET_EVENT_ERROR(0x1005)

Overtemperature condition detected.

#define EEPHIDGET_OVERCURRENT   EEPHIDGET_EVENT_ERROR(0x1006)

Overcurrent condition detected.

#define EEPHIDGET_OUTOFRANGE   EEPHIDGET_EVENT_ERROR(0x1007)

Out of range condition detected.

#define EEPHIDGET_BADPOWER   EEPHIDGET_EVENT_ERROR(0x1008)

Power supply problem detected.

#define PUNK_BOOL   0x02

Unknown Boolean (unsigned char)

#define PUNK_SHRT   0x7FFF

Unknown Short (16-bit)

#define PUNK_INT   0x7FFFFFFF

Unknown Integer (32-bit)

#define PUNK_INT64   0x7FFFFFFFFFFFFFFFLL

Unknown Integer (64-bit)

#define PUNK_DBL   1e300

Unknown Double

#define PUNK_FLT   1e30

Unknown Float

#define PFALSE   0x00

False. Used for boolean values.

#define PTRUE   0x01

True. Used for boolean values.


Enumeration Type Documentation

Phidget device class uniquely identifies a class of Phidgets.

Enumerator:
PHIDCLASS_ACCELEROMETER  Phidget Accelerometer
PHIDCLASS_ADVANCEDSERVO  Phidget Advanced Servo
PHIDCLASS_ANALOG  Phidget Analog
PHIDCLASS_BRIDGE  Phidget Bridge
PHIDCLASS_ENCODER  Phidget Encoder
PHIDCLASS_FREQUENCYCOUNTER  Phidget Frequency Counter
PHIDCLASS_GPS  Phidget GPS
PHIDCLASS_INTERFACEKIT  Phidget Interface Kit
PHIDCLASS_IR  Phidget IR
PHIDCLASS_LED  Phidget LED
PHIDCLASS_MOTORCONTROL  Phidget Motor Control
PHIDCLASS_PHSENSOR  Phidget PH Sensor
PHIDCLASS_RFID  Phidget RFID
PHIDCLASS_SERVO  Phidget Servo
PHIDCLASS_SPATIAL  Phidget Spatial
PHIDCLASS_STEPPER  Phidget Stepper
PHIDCLASS_TEMPERATURESENSOR  Phidget Temperature Sensor
PHIDCLASS_TEXTLCD  Phidget TextLCD
PHIDCLASS_TEXTLED  Phidget TextLED
PHIDCLASS_WEIGHTSENSOR  Phidget Weight Sensor

Phidget device id uniquely identifies a specific type of Phidget.

Enumerator:
PHIDID_ACCELEROMETER_3AXIS  Phidget 3-axis Accelerometer (1059)
PHIDID_ADVANCEDSERVO_1MOTOR  Phidget 1 Motor Advanced Servo (1066)
PHIDID_ADVANCEDSERVO_8MOTOR  Phidget 8 Motor Advanced Servo (1061)
PHIDID_ANALOG_4OUTPUT  Phidget Analog 4-output (1002)
PHIDID_BIPOLAR_STEPPER_1MOTOR  Phidget 1 Motor Bipolar Stepper Controller with 4 Digital Inputs (1063)
PHIDID_BRIDGE_4INPUT  Phidget Bridge 4-input (1046)
PHIDID_ENCODER_1ENCODER_1INPUT  Phidget Encoder - Mechanical (1052)
PHIDID_ENCODER_HS_1ENCODER  Phidget High Speed Encoder (1057)
PHIDID_ENCODER_HS_4ENCODER_4INPUT  Phidget High Speed Encoder - 4 Encoder (1047)
PHIDID_FREQUENCYCOUNTER_2INPUT  Phidget Frequency Counter 2-input (1054)
PHIDID_GPS  Phidget GPS (1040)
PHIDID_INTERFACEKIT_0_0_4  Phidget Interface Kit 0/0/4 (1014)
PHIDID_INTERFACEKIT_0_0_8  Phidget Interface Kit 0/0/8 (1017)
PHIDID_INTERFACEKIT_0_16_16  Phidget Interface Kit 0/16/16 (1012)
PHIDID_INTERFACEKIT_2_2_2  Phidget Interface Kit 2/2/2 (1011)
PHIDID_INTERFACEKIT_8_8_8  Phidget Interface Kit 8/8/8 (1013, 1018, 1019)
PHIDID_INTERFACEKIT_8_8_8_w_LCD  Phidget Interface Kit 8/8/8 with TextLCD (1201, 1202, 1203)
PHIDID_IR  Phidget IR Receiver Transmitter (1055)
PHIDID_LED_64_ADV  Phidget LED 64 Advanced (1031)
PHIDID_LINEAR_TOUCH  Phidget Linear Touch (1015)
PHIDID_MOTORCONTROL_1MOTOR  Phidget 1 Motor Motor Controller (1065)
PHIDID_MOTORCONTROL_HC_2MOTOR  Phidget 2 Motor High Current Motor Controller (1064)
PHIDID_RFID_2OUTPUT  Phidget RFID with Digital Outputs and Onboard LED (1023)
PHIDID_RFID_2OUTPUT_READ_WRITE  Phidget RFID with R/W support (1024)
PHIDID_ROTARY_TOUCH  Phidget Rotary Touch (1016)
PHIDID_SPATIAL_ACCEL_3AXIS  Phidget Spatial 3-axis accel (1049, 1041, 1043)
PHIDID_SPATIAL_ACCEL_GYRO_COMPASS  Phidget Spatial 3/3/3 (1056, 1042, 1044)
PHIDID_TEMPERATURESENSOR  Phidget Temperature Sensor (1051)
PHIDID_TEMPERATURESENSOR_4  Phidget Temperature Sensor 4-input (1048)
PHIDID_TEMPERATURESENSOR_IR  Phidget Temperature Sensor IR (1045)
PHIDID_TEXTLCD_2x20_w_8_8_8  Phidget TextLCD with Interface Kit 8/8/8 (1201, 1202, 1203)
PHIDID_TEXTLCD_ADAPTER  Phidget TextLCD Adapter (1204)
PHIDID_UNIPOLAR_STEPPER_4MOTOR  Phidget 4 Motor Unipolar Stepper Controller (1062)
PHIDID_ACCELEROMETER_2AXIS  Phidget 2-axis Accelerometer (1053, 1054)
PHIDID_INTERFACEKIT_0_8_8_w_LCD  Phidget Interface Kit 0/8/8 with TextLCD (1219, 1220, 1221)
PHIDID_INTERFACEKIT_4_8_8  Phidget Interface Kit 4/8/8
PHIDID_LED_64  Phidget LED 64 (1030)
PHIDID_MOTORCONTROL_LV_2MOTOR_4INPUT  Phidget 2 Motor Low Voltage Motor Controller with 4 Digital Inputs (1060)
PHIDID_PHSENSOR  Phidget PH Sensor (1058)
PHIDID_RFID  Phidget RFID without Digital Outputs
PHIDID_SERVO_1MOTOR  Phidget 1 Motor Servo Controller (1000)
PHIDID_SERVO_1MOTOR_OLD  Phidget 1 Motor Servo Controller - Old Version
PHIDID_SERVO_4MOTOR  Phidget 4 Motor Servo Controller (1001)
PHIDID_SERVO_4MOTOR_OLD  Phidget 4 Motor Servo Controller - Old Version
PHIDID_TEXTLCD_2x20  Phidget TextLCD without Interface Kit (1210)
PHIDID_TEXTLCD_2x20_w_0_8_8  Phidget TextLCD with Interface Kit 0/8/8 (1219, 1220, 1221)
PHIDID_TEXTLED_1x8  Phidget TextLED 1x8
PHIDID_TEXTLED_4x8  Phidget TextLED 4x8 (1040)
PHIDID_WEIGHTSENSOR  Phidget Weight Sensor (1050)


Generated on Tue Apr 9 16:06:02 2019 for Phidget21 by  doxygen 1.5.9