com.phidgets
Class IRCodeInfo

java.lang.Object
  extended bycom.phidgets.IRCodeInfo

public final class IRCodeInfo
extends java.lang.Object

This class represents IR Code Properties needed for transmit.

Author:
Phidget Inc.

Field Summary
static int ENCODING_BIPHASE
          BiPhase encoding.
static int ENCODING_PULSE
          Pulse encoding.
static int ENCODING_RC5
          RC5 encoding.
static int ENCODING_RC6
          RC6 encoding.
static int ENCODING_SPACE
          Space encoding.
static int ENCODING_UNKNOWN
          Unknown encoding.
static int LENGTH_CONSTANT
          Constant length.
static int LENGTH_UNKNOWN
          Unknown length.
static int LENGTH_VARIABLE
          Variable length.
 
Constructor Summary
IRCodeInfo(int bitCount)
          Creates a new IR Code Info object.
IRCodeInfo(int encoding, int bitCount)
          Creates a new IR Code Info object.
IRCodeInfo(int encoding, int bitCount, int[] header, int[] zero, int[] one, int trail, int gap)
          Creates a new IR Code Info object.
IRCodeInfo(int encoding, int bitCount, int[] header, int[] zero, int[] one, int trail, int gap, int[] repeat)
          Creates a new IR Code Info object.
IRCodeInfo(int encoding, int bitCount, int[] header, int[] zero, int[] one, int trail, int gap, int[] repeat, int minRepeat, IRCode toggleMask, int length, int carrierFrequency, int dutyCycle)
          Creates a new IR Code Info object.
 
Method Summary
 int getBitCount()
          Returns the bit count.
 int getCarrierFrequency()
          Returns the carrier frequency.
 int getDutyCycle()
          Returns the duty cycle.
 int getEncoding()
          Returns the encoding.
 int getGap()
          Returns the gap.
 int[] getHeader()
          Returns the header.
 int getLength()
          Returns the length style.
 int getMinRepeat()
          Returns the min repeat.
 int[] getOne()
          Returns the one.
 int[] getRepeat()
          Returns the repeat code.
 IRCode getToggleMask()
          Returns the toggle mask.
 int getTrail()
          Returns the trail.
 int[] getZero()
          Returns the zero.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ENCODING_UNKNOWN

public static final int ENCODING_UNKNOWN
Unknown encoding. This is used with getEncoding

See Also:
Constant Field Values

ENCODING_SPACE

public static final int ENCODING_SPACE
Space encoding. This is used with getEncoding

See Also:
Constant Field Values

ENCODING_PULSE

public static final int ENCODING_PULSE
Pulse encoding. This is used with getEncoding

See Also:
Constant Field Values

ENCODING_BIPHASE

public static final int ENCODING_BIPHASE
BiPhase encoding. This is used with getEncoding

See Also:
Constant Field Values

ENCODING_RC5

public static final int ENCODING_RC5
RC5 encoding. This is used with getEncoding

See Also:
Constant Field Values

ENCODING_RC6

public static final int ENCODING_RC6
RC6 encoding. This is used with getEncoding

See Also:
Constant Field Values

LENGTH_UNKNOWN

public static final int LENGTH_UNKNOWN
Unknown length. This is used with getLength

See Also:
Constant Field Values

LENGTH_CONSTANT

public static final int LENGTH_CONSTANT
Constant length. This is used with getLength

See Also:
Constant Field Values

LENGTH_VARIABLE

public static final int LENGTH_VARIABLE
Variable length. This is used with getLength

See Also:
Constant Field Values
Constructor Detail

IRCodeInfo

public IRCodeInfo(int bitCount)
           throws PhidgetException
Creates a new IR Code Info object.

Parameters:
bitCount - the bit count

IRCodeInfo

public IRCodeInfo(int encoding,
                  int bitCount)
           throws PhidgetException
Creates a new IR Code Info object.

Parameters:
encoding - the encoding - one of ENCODING_SPACE, ENCODING_PULSE, ENCODING_BIPHASE, ENCODING_RC5 or ENCODING_RC6
bitCount - the bit count

IRCodeInfo

public IRCodeInfo(int encoding,
                  int bitCount,
                  int[] header,
                  int[] zero,
                  int[] one,
                  int trail,
                  int gap)
           throws PhidgetException
Creates a new IR Code Info object.

Parameters:
encoding - the encoding - one of ENCODING_SPACE, ENCODING_PULSE, ENCODING_BIPHASE, ENCODING_RC5 or ENCODING_RC6
bitCount - the bit count
header - the header (pulse,space)
zero - the zero (pulse, space)
one - the one (pulse, space)
trail - the trailing pulse
gap - the trailing gap

IRCodeInfo

public IRCodeInfo(int encoding,
                  int bitCount,
                  int[] header,
                  int[] zero,
                  int[] one,
                  int trail,
                  int gap,
                  int[] repeat)
           throws PhidgetException
Creates a new IR Code Info object.

Parameters:
encoding - the encoding - one of ENCODING_SPACE, ENCODING_PULSE, ENCODING_BIPHASE, ENCODING_RC5 or ENCODING_RC6
bitCount - the bit count
header - the header (pulse,space)
zero - the zero (pulse, space)
one - the one (pulse, space)
trail - the trailing pulse
gap - the trailing gap
repeat - the special repeat code

IRCodeInfo

public IRCodeInfo(int encoding,
                  int bitCount,
                  int[] header,
                  int[] zero,
                  int[] one,
                  int trail,
                  int gap,
                  int[] repeat,
                  int minRepeat,
                  IRCode toggleMask,
                  int length,
                  int carrierFrequency,
                  int dutyCycle)
           throws PhidgetException
Creates a new IR Code Info object.

Parameters:
encoding - the encoding - one of ENCODING_SPACE, ENCODING_PULSE, ENCODING_BIPHASE, ENCODING_RC5 or ENCODING_RC6
bitCount - the bit count
header - the header (pulse,space)
zero - the zero (pulse, space)
one - the one (pulse, space)
trail - the trailing pulse
gap - the trailing gap
repeat - the special repeat code
minRepeat - the minimum number of times to repeat the code
toggleMask - the bits to toggle when minRepeat is > 1
length - the length style - one of LENGTH_CONSTANT or LENGTH_VARIABLE
carrierFrequency - the carrier frequency in kHz
dutyCycle - the duty cycle in percent
Method Detail

getEncoding

public int getEncoding()
Returns the encoding.

Returns:
encoding

getLength

public int getLength()
Returns the length style.

Returns:
length style

getBitCount

public int getBitCount()
Returns the bit count.

Returns:
bit count

getGap

public int getGap()
Returns the gap.

Returns:
gap

getTrail

public int getTrail()
Returns the trail.

Returns:
trail

getMinRepeat

public int getMinRepeat()
Returns the min repeat.

Returns:
min repeat

getCarrierFrequency

public int getCarrierFrequency()
Returns the carrier frequency.

Returns:
carrier frequency

getDutyCycle

public int getDutyCycle()
Returns the duty cycle.

Returns:
duty cycle

getHeader

public int[] getHeader()
Returns the header.

Returns:
header

getZero

public int[] getZero()
Returns the zero.

Returns:
zero

getOne

public int[] getOne()
Returns the one.

Returns:
one

getRepeat

public int[] getRepeat()
Returns the repeat code.

Returns:
repeat code

getToggleMask

public IRCode getToggleMask()
Returns the toggle mask.

Returns:
toggle mask

toString

public java.lang.String toString()