Classes | Defines | Typedefs | Enumerations | Functions
Phidget IR
Specific Phidgets
Collaboration diagram for Phidget IR:

Classes

struct  _CPhidgetIR_CodeInfo
struct  CPhidgetIRInfo

Defines

#define IR_DATA_ARRAY_MASK   0x7ff
#define IR_DATA_ARRAY_SIZE   2048
#define IR_DEFINEDATA_PACKET   0
#define IR_MAX_CODE_BIT_COUNT   128
#define IR_MAX_CODE_DATA_LENGTH   (IR_MAX_CODE_BIT_COUNT / 8)
#define IR_MAX_DATA_PER_PACKET   31
#define IR_MAX_DATA_us   327670
#define IR_MAX_GAP_LENGTH   100000
#define IR_MAX_REPEAT_LENGTH   26
#define IR_MIN_GAP_LENGTH   20000
#define IR_RAW_DATA_WS_KEYS_MAX   100
#define IR_STOP_RX_WHILE_TX_FLAG   0x01

Typedefs

typedef struct _CPhidgetIR_CodeInfo CPhidgetIR_CodeInfo
typedef struct
_CPhidgetIR_CodeInfo
CPhidgetIR_CodeInfoHandle

Enumerations

enum  CPhidgetIR_Encoding {
  PHIDGET_IR_ENCODING_UNKNOWN = 1, PHIDGET_IR_ENCODING_SPACE, PHIDGET_IR_ENCODING_PULSE, PHIDGET_IR_ENCODING_BIPHASE,
  PHIDGET_IR_ENCODING_RC5, PHIDGET_IR_ENCODING_RC6, PHIDGET_IR_ENCODING_UNKNOWN = 1, PHIDGET_IR_ENCODING_SPACE,
  PHIDGET_IR_ENCODING_PULSE, PHIDGET_IR_ENCODING_BIPHASE, PHIDGET_IR_ENCODING_RC5, PHIDGET_IR_ENCODING_RC6
}
enum  CPhidgetIR_Length {
  PHIDGET_IR_LENGTH_UNKNOWN = 1, PHIDGET_IR_LENGTH_CONSTANT, PHIDGET_IR_LENGTH_VARIABLE, PHIDGET_IR_LENGTH_UNKNOWN = 1,
  PHIDGET_IR_LENGTH_CONSTANT, PHIDGET_IR_LENGTH_VARIABLE
}

Functions

PHIDGET21_API int CCONV codeInfoToString (CPhidgetIR_CodeInfoHandle codeInfo, char *string)
PHIDGET21_API int CCONV CPhidgetIR_getLastCode (CPhidgetIRHandle phid, unsigned char *data, int *dataLength, int *bitCount)
PHIDGET21_API int CCONV CPhidgetIR_getLastLearnedCode (CPhidgetIRHandle phid, unsigned char *data, int *dataLength, CPhidgetIR_CodeInfo *codeInfo)
PHIDGET21_API int CCONV CPhidgetIR_getRawData (CPhidgetIRHandle phid, int *data, int *dataLength)
PHIDGET21_API int CCONV CPhidgetIR_Transmit (CPhidgetIRHandle phid, unsigned char *data, CPhidgetIR_CodeInfoHandle codeInfo)
PHIDGET21_API int CCONV CPhidgetIR_TransmitRaw (CPhidgetIRHandle phid, int *data, int length, int carrierFrequency, int dutyCycle, int gap)
PHIDGET21_API int CCONV CPhidgetIR_TransmitRepeat (CPhidgetIRHandle phid)
PHIDGET21_API int CCONV stringToCodeInfo (char *string, CPhidgetIR_CodeInfoHandle codeInfo)

Detailed Description

These calls are specific to the Phidget IR object. See your device's User Guide for more specific API details, technical information, and revision details. The User Guide, along with other resources, can be found on the product page for your device.


Define Documentation

#define IR_DATA_ARRAY_MASK   0x7ff

Definition at line 140 of file cphidgetir.h.

#define IR_DATA_ARRAY_SIZE   2048

Definition at line 139 of file cphidgetir.h.

#define IR_DEFINEDATA_PACKET   0

Definition at line 149 of file cphidgetir.h.

#define IR_MAX_CODE_BIT_COUNT   128

Maximum bit count for sent / received data

Definition at line 15 of file cphidgetir.h.

Maximum array size needed to hold the longest code

Definition at line 16 of file cphidgetir.h.

#define IR_MAX_DATA_PER_PACKET   31

Definition at line 137 of file cphidgetir.h.

#define IR_MAX_DATA_us   327670

Definition at line 143 of file cphidgetir.h.

#define IR_MAX_GAP_LENGTH   100000

Definition at line 146 of file cphidgetir.h.

#define IR_MAX_REPEAT_LENGTH   26

Maximum array size for a repeat code

Definition at line 17 of file cphidgetir.h.

#define IR_MIN_GAP_LENGTH   20000

Definition at line 147 of file cphidgetir.h.

#define IR_RAW_DATA_WS_KEYS_MAX   100

Definition at line 153 of file cphidgetir.h.

#define IR_STOP_RX_WHILE_TX_FLAG   0x01

Definition at line 151 of file cphidgetir.h.


Typedef Documentation

The PhidgetIR CodeInfo structure contains all information needed to transmit a code, apart from the actual code data. Some values can be set to null to select defaults. See the product manual for more information.


Enumeration Type Documentation

The PhidgetIR supports these data encodings.

Enumerator:
PHIDGET_IR_ENCODING_UNKNOWN 

Unknown - the default value

PHIDGET_IR_ENCODING_SPACE 

Space encoding, or Pulse Distance Modulation

PHIDGET_IR_ENCODING_PULSE 

Pulse encoding, or Pulse Width Modulation

PHIDGET_IR_ENCODING_BIPHASE 

Bi-Phase, or Manchester encoding

PHIDGET_IR_ENCODING_RC5 

RC5 - a type of Bi-Phase encoding

PHIDGET_IR_ENCODING_RC6 

RC6 - a type of Bi-Phase encoding

PHIDGET_IR_ENCODING_UNKNOWN 
PHIDGET_IR_ENCODING_SPACE 
PHIDGET_IR_ENCODING_PULSE 
PHIDGET_IR_ENCODING_BIPHASE 
PHIDGET_IR_ENCODING_RC5 
PHIDGET_IR_ENCODING_RC6 

Definition at line 22 of file cphidgetir.h.

The PhidgetIR supports these encoding lengths

Enumerator:
PHIDGET_IR_LENGTH_UNKNOWN 

Unknown - the default value

PHIDGET_IR_LENGTH_CONSTANT 

Constant - the bitstream + gap length is constant

PHIDGET_IR_LENGTH_VARIABLE 

Variable - the bitstream has a variable length with a constant gap

PHIDGET_IR_LENGTH_UNKNOWN 
PHIDGET_IR_LENGTH_CONSTANT 
PHIDGET_IR_LENGTH_VARIABLE 

Definition at line 34 of file cphidgetir.h.


Function Documentation

PHIDGET21_API int CCONV codeInfoToString ( CPhidgetIR_CodeInfoHandle  codeInfo,
char *  string 
)

Set a Code handler. This is called when a code has been received that could be automatically decoded. Data is return as an array with MSB in index 0. Bit count and a repeat flag are also returned. Repeats are detected as either the same code repeated in < 100ms or as a special repeat code.

Parameters:
phidAn attached phidget ir handle.
fptrCallback function pointer.
userPtrA pointer for use by the user - this value is passed back into the callback function. Set a Learn handler. This is called when a code has been received for long enough to be learned. The returned CodeInfo structure can be used to retransmit the same code.
phidAn attached phidget ir handle.
fptrCallback function pointer.
userPtrA pointer for use by the user - this value is passed back into the callback function. Set a Raw Data handler. This is called when raw data has been read from the device. Raw data always starts with a space and ends with a pulse.
phidAn attached phidget ir handle.
fptrCallback function pointer.
userPtrA pointer for use by the user - this value is passed back into the callback function.

Definition at line 1470 of file cphidgetir.c.

PHIDGET21_API int CCONV CPhidgetIR_getLastCode ( CPhidgetIRHandle  phid,
unsigned char *  data,
int *  dataLength,
int *  bitCount 
)

Gets the last code that was received.

Parameters:
phidAn attached phidget ir handle.
dataA user array to store the code data in.
dataLengthLength of the user array - should be at least IR_MAX_CODE_DATA_LENGTH. This is set to the ammount of data actually written to the array.
bitCountset to the bit count of the code.

Definition at line 1836 of file cphidgetir.c.

PHIDGET21_API int CCONV CPhidgetIR_getLastLearnedCode ( CPhidgetIRHandle  phid,
unsigned char *  data,
int *  dataLength,
CPhidgetIR_CodeInfo codeInfo 
)

Gets the last code that was learned.

Parameters:
phidAn attached phidget ir handle.
dataA user array to store the code data in.
dataLengthLength of the user array - should be at least IR_MAX_CODE_DATA_LENGTH. This is set to the ammount of data actually written to the array.
codeInfoThe CodeInfo structure for the learned code.

Definition at line 1864 of file cphidgetir.c.

PHIDGET21_API int CCONV CPhidgetIR_getRawData ( CPhidgetIRHandle  phid,
int *  data,
int *  dataLength 
)

Read any available raw data. This should be polled continuously (every 20ms) to avoid missing data. Read data always starts with a space and ends with a pulse.

Parameters:
phidAn attached phidget ir handle.
dataA user array for raw data to be written into.
dataLengthThe maximum ammount of data to read. This is set to the actual ammount of data read.

Definition at line 1803 of file cphidgetir.c.

PHIDGET21_API int CCONV CPhidgetIR_Transmit ( CPhidgetIRHandle  phid,
unsigned char *  data,
CPhidgetIR_CodeInfoHandle  codeInfo 
)

Transmits a code according to the settings in a CodeInto structure

Parameters:
phidAn attached phidget ir handle.
dataThe code to send. Data is transmitted MSBit first. MSByte is in array index 0. LSBit is right justified, so MSBit may be in bit positions 0-7 in array index 0 depending on the bit count.
codeInfoThe CodeInfo structure specifying to to send the code. Anything left as null to select default is filled in for the user.

Definition at line 1508 of file cphidgetir.c.

PHIDGET21_API int CCONV CPhidgetIR_TransmitRaw ( CPhidgetIRHandle  phid,
int *  data,
int  length,
int  carrierFrequency,
int  dutyCycle,
int  gap 
)

Transmits RAW data as a series of pulses and spaces.

Parameters:
phidAn attached phidget ir handle.
dataThe data to send. The array must start and end with a pulse and each element is a positive time in us.
lengthThe length of the data array. Maximum length is 200, but streams should be kept much shorter, ie. < 100ms between gaps.
carrierFrequencyThe Carrier Frequency in Hz. leave as 0 for default.
dutyCycleThe Duty Cycle (10-50). Leave as 0 for default.
gapThe gap time in us. This guarantees a gap time (no transmitting) after the data is sent, but can be set to 0.

Definition at line 1693 of file cphidgetir.c.

Transmits a repeat of the last transmited code. Depending of the CodeInfo structure, this may be a retransmission of the code itself, or there may be a special repeat code.

Parameters:
phidAn attached phidget ir handle.

Definition at line 1743 of file cphidgetir.c.

PHIDGET21_API int CCONV stringToCodeInfo ( char *  string,
CPhidgetIR_CodeInfoHandle  codeInfo 
)

Definition at line 1481 of file cphidgetir.c.



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