Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes
com.phidgets.IRPhidget Class Reference
Inheritance diagram for com.phidgets.IRPhidget:
Inheritance graph
[legend]

List of all members.

Public Member Functions

final void addCodeListener (CodeListener l)
final void addLearnListener (LearnListener l)
final void addRawDataListener (RawDataListener l)
native IRCode getLastCode () throws PhidgetException
native IRLearnedCode getLastLearnedCode () throws PhidgetException
 IRPhidget () throws PhidgetException
native int readRaw (int[]buffer, int offset, int count) throws PhidgetException
final int readRaw (int[]buffer) throws PhidgetException
final void removeCodeListener (CodeListener l)
final void removeLearnListener (LearnListener l)
final void removeRawDataListener (RawDataListener l)
native void transmit (IRCode code, IRCodeInfo codeInfo) throws PhidgetException
native void transmitRaw (int[]data, int offset, int count, int gap, int carrierFrequency, int dutyCycle) throws PhidgetException
final void transmitRaw (int[]data) throws PhidgetException
final void transmitRaw (int[]data, int gap) throws PhidgetException
final void transmitRaw (int[]data, int offset, int count) throws PhidgetException
final void transmitRaw (int[]data, int offset, int count, int gap) throws PhidgetException
native void transmitRepeat () throws PhidgetException

Static Public Attributes

static final int RAWDATA_LONGSPACE = 0x7fffffff

Private Member Functions

native void enableCodeEvents (boolean b)
final void enableDeviceSpecificEvents (boolean b)
native void enableLearnEvents (boolean b)
native void enableRawDataEvents (boolean b)
void fireCode (CodeEvent e)
void fireLearn (LearnEvent e)
void fireRawData (RawDataEvent e)

Static Private Member Functions

static native long create () throws PhidgetException

Private Attributes

LinkedList codeListeners = new LinkedList ()
LinkedList learnListeners = new LinkedList ()
long nativeCodeHandler = 0
long nativeLearnHandler = 0
long nativeRawDataHandler = 0
LinkedList rawDataListeners = new LinkedList ()

Detailed Description

This class represents a Phidget IR. All methods to send and receive IR data are implemented in this class.

The Phidget IR Receiver-Transmitter can send and receive Consumer-IR signals. Ability to learn and re-transmit codes, as well as low-level access to raw data, is provided.

Author:
Phidgets Inc.

Definition at line 19 of file IRPhidget.java.


Constructor & Destructor Documentation

Definition at line 21 of file IRPhidget.java.


Member Function Documentation

final void com.phidgets.IRPhidget.addCodeListener ( CodeListener  l) [inline]

Adds a code listener. The code handler is a method that will be called when a new code is seen by the reader. The event is fired on each code, including repetitions.

There is no limit on the number of code handlers that can be registered for a particular Phidget.

Parameters:
lAn implemetation of the CodeListener interface

Definition at line 155 of file IRPhidget.java.

final void com.phidgets.IRPhidget.addLearnListener ( LearnListener  l) [inline]

Adds a code learn listener. The learn handler is a method that will be called when a new code is learned by the reader. This requires that the code be repeated several times.

There is no limit on the number of learn handlers that can be registered for a particular Phidget.

Parameters:
lAn implemetation of the LearnListener interface

Definition at line 186 of file IRPhidget.java.

final void com.phidgets.IRPhidget.addRawDataListener ( RawDataListener  l) [inline]

Adds a rawData listener. The rawData handler is a method that will be called when a raw IR data is received.

There is no limit on the number of rawData handlers that can be registered for a particular Phidget.

Parameters:
lAn implemetation of the RawDataListener interface

Definition at line 216 of file IRPhidget.java.

static native long com.phidgets.IRPhidget.create ( ) throws PhidgetException [static, private]
native void com.phidgets.IRPhidget.enableCodeEvents ( boolean  b) [private]
final void com.phidgets.IRPhidget.enableDeviceSpecificEvents ( boolean  b) [inline, private]

Reimplemented from com.phidgets.Phidget.

Definition at line 141 of file IRPhidget.java.

native void com.phidgets.IRPhidget.enableLearnEvents ( boolean  b) [private]
native void com.phidgets.IRPhidget.enableRawDataEvents ( boolean  b) [private]
void com.phidgets.IRPhidget.fireCode ( CodeEvent  e) [inline, private]

Definition at line 169 of file IRPhidget.java.

void com.phidgets.IRPhidget.fireLearn ( LearnEvent  e) [inline, private]

Definition at line 200 of file IRPhidget.java.

void com.phidgets.IRPhidget.fireRawData ( RawDataEvent  e) [inline, private]

Definition at line 230 of file IRPhidget.java.

Returns the last received code. This is updated right after the code event returns.

Returns:
last code
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached. See open for information on determining if a device is attached.

Returns the last learned code. This is updated right after the learn event returns.

Returns:
last learned code
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached. See open for information on determining if a device is attached.
native int com.phidgets.IRPhidget.readRaw ( int[]  buffer,
int  offset,
int  count 
) throws PhidgetException

Reads raw data. Use RAWDATA_LONGSPACE to detect gaps in IR data.

Parameters:
bufferarray into which data will be read.
offsetoffset in data to start writing
countmaximum ammount of data to read
Returns:
ammount of data read
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached. See open for information on determining if a device is attached.
final int com.phidgets.IRPhidget.readRaw ( int[]  buffer) throws PhidgetException [inline]

Reads raw data. Use RAWDATA_LONGSPACE to detect gaps in IR data.

Parameters:
bufferarray into which data will be read.
Returns:
ammount of data read
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached. See open for information on determining if a device is attached.

Definition at line 122 of file IRPhidget.java.

final void com.phidgets.IRPhidget.removeCodeListener ( CodeListener  l) [inline]

Definition at line 163 of file IRPhidget.java.

final void com.phidgets.IRPhidget.removeLearnListener ( LearnListener  l) [inline]

Definition at line 194 of file IRPhidget.java.

final void com.phidgets.IRPhidget.removeRawDataListener ( RawDataListener  l) [inline]

Definition at line 224 of file IRPhidget.java.

native void com.phidgets.IRPhidget.transmit ( IRCode  code,
IRCodeInfo  codeInfo 
) throws PhidgetException

Transmits a code.

Parameters:
codethe code to transmit
codeInfothe code specification
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached. See open for information on determining if a device is attached.
native void com.phidgets.IRPhidget.transmitRaw ( int[]  data,
int  offset,
int  count,
int  gap,
int  carrierFrequency,
int  dutyCycle 
) throws PhidgetException

Transmits raw data.

Parameters:
datadata in microseconds, must start and end with a pulse
offsetoffset in the data array to start transmitting
countnumber of elements of data to transmit
gapgap size in microseconds
carrierFrequencycarrier frequency in kHz
dutyCycleduty cycle in percent
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached. See open for information on determining if a device is attached.
final void com.phidgets.IRPhidget.transmitRaw ( int[]  data) throws PhidgetException [inline]

Transmits raw data.

Parameters:
datadata in microseconds, must start and end with a pulse
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached. See open for information on determining if a device is attached.

Definition at line 65 of file IRPhidget.java.

final void com.phidgets.IRPhidget.transmitRaw ( int[]  data,
int  gap 
) throws PhidgetException [inline]

Transmits raw data.

Parameters:
datadata in microseconds, must start and end with a pulse
gapgap size in microseconds
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached. See open for information on determining if a device is attached.

Definition at line 76 of file IRPhidget.java.

final void com.phidgets.IRPhidget.transmitRaw ( int[]  data,
int  offset,
int  count 
) throws PhidgetException [inline]

Transmits raw data.

Parameters:
datadata in microseconds, must start and end with a pulse
offsetoffset in the data array to start transmitting
countnumber of elements of data to transmit
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached. See open for information on determining if a device is attached.

Definition at line 88 of file IRPhidget.java.

final void com.phidgets.IRPhidget.transmitRaw ( int[]  data,
int  offset,
int  count,
int  gap 
) throws PhidgetException [inline]

Transmits raw data.

Parameters:
datadata in microseconds, must start and end with a pulse
offsetoffset in the data array to start transmitting
countnumber of elements of data to transmit
gapgap size in microseconds
Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached. See open for information on determining if a device is attached.

Definition at line 101 of file IRPhidget.java.

Transmits a repeat. This needs to be called within the gap time of a transmit to be meaningful.

Exceptions:
PhidgetExceptionIf this Phidget is not opened and attached. See open for information on determining if a device is attached.

Member Data Documentation

LinkedList com.phidgets.IRPhidget.codeListeners = new LinkedList () [private]

Definition at line 161 of file IRPhidget.java.

LinkedList com.phidgets.IRPhidget.learnListeners = new LinkedList () [private]

Definition at line 192 of file IRPhidget.java.

Definition at line 162 of file IRPhidget.java.

Definition at line 193 of file IRPhidget.java.

Definition at line 223 of file IRPhidget.java.

final int com.phidgets.IRPhidget.RAWDATA_LONGSPACE = 0x7fffffff [static]

Represents a long space (greater then 327,670 microseconds) in raw data. This can be considered a period of no IR activity. This is used with readRaw

Definition at line 31 of file IRPhidget.java.

LinkedList com.phidgets.IRPhidget.rawDataListeners = new LinkedList () [private]

Definition at line 222 of file IRPhidget.java.


The documentation for this class was generated from the following file:


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