nl.tbdev.IR
Class Device

java.lang.Object
  |
  +--nl.tbdev.IR.Device

public class Device
extends java.lang.Object

The Device class contains information about discovered devices.


Field Summary
private  int address
           
static byte COMM
          device supports IrCOMM
static byte COMPUTER
          device is a computer
static byte EXT1
          flag additional byte with information
static byte EXT2
          flag yet another byte of information
static byte FAX
          device is a FAX
private  byte[] info
           
static byte LAN
          device has LAN capabilities
static byte MODEM
          device is a modem
static byte OBEX
          device supports IrOBEX
static byte PDA
          device is a PDA
static byte PnP
          device is Plug-and-Play compatible
static byte PRINTER
          device is a printer
static byte SERVER
          device is a server
static byte TELEPHONE
          device supports telephone API
 
Constructor Summary
Device(int iAddress, byte[] iInfo)
          Create new device.
 
Method Summary
 int getAddress()
          Get address for this device
 java.lang.String getAddressHex()
          Get address for this device
 byte[] getInfo()
          Return the additional information
 java.lang.String getInfoString()
          Get the additional information in string form.
 java.lang.String getInfoStringPlus()
          Return the additional information in string form with the option bytes in HEX format as well.
 boolean isComm()
          Does this device support IrCOMM?
 boolean isComputer()
          is this a computer?
 boolean isExt1()
          is there a second byte of information available?
 boolean isExt2()
          is there more information available?
 boolean isFax()
          is this a FAX?
 boolean isLan()
          is this device LAN compatible?
 boolean isModem()
          is this a modem?
 boolean isObex()
          Does this device support IrOBEX?
 boolean isPda()
          is this a PDA?
 boolean isPnp()
          is this a Plug-and-Play device?
 boolean isPrinter()
          is this a printer?
 boolean isServer()
          is this a server?
 boolean isTelephone()
          is this a telephony compatibale devices?
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

info

private byte[] info

address

private int address

PnP

public static final byte PnP
device is Plug-and-Play compatible

PDA

public static final byte PDA
device is a PDA

COMPUTER

public static final byte COMPUTER
device is a computer

PRINTER

public static final byte PRINTER
device is a printer

MODEM

public static final byte MODEM
device is a modem

FAX

public static final byte FAX
device is a FAX

LAN

public static final byte LAN
device has LAN capabilities

EXT1

public static final byte EXT1
flag additional byte with information

TELEPHONE

public static final byte TELEPHONE
device supports telephone API

SERVER

public static final byte SERVER
device is a server

COMM

public static final byte COMM
device supports IrCOMM

OBEX

public static final byte OBEX
device supports IrOBEX

EXT2

public static final byte EXT2
flag yet another byte of information
Constructor Detail

Device

public Device(int iAddress,
              byte[] iInfo)
Create new device.
Parameters:
iAddress - Address of the device
iInfo - Array with additional information on the device
Method Detail

getAddress

public int getAddress()
Get address for this device
Returns:
int representing the address

getAddressHex

public java.lang.String getAddressHex()
Get address for this device
Returns:
String with HEX representation of the address. Suitable for printing

getInfo

public byte[] getInfo()
Return the additional information
Returns:
the additional inforamtion as byte array.

isPnp

public boolean isPnp()
is this a Plug-and-Play device?
Returns:
true if Plug-and-Play

isPda

public boolean isPda()
is this a PDA?
Returns:
true if PDA

isComputer

public boolean isComputer()
is this a computer?
Returns:
true if computer

isPrinter

public boolean isPrinter()
is this a printer?
Returns:
true if printer

isModem

public boolean isModem()
is this a modem?
Returns:
true if modem

isFax

public boolean isFax()
is this a FAX?
Returns:
true if fax

isLan

public boolean isLan()
is this device LAN compatible?
Returns:
true if LAN compatible

isExt1

public boolean isExt1()
is there a second byte of information available?
Returns:
true if a second byte is available

isExt2

public boolean isExt2()
is there more information available?
Returns:
true if more available

isTelephone

public boolean isTelephone()
is this a telephony compatibale devices?
Returns:
true if telephony compatibale

isServer

public boolean isServer()
is this a server?
Returns:
true if server

isComm

public boolean isComm()
Does this device support IrCOMM?
Returns:
true if IrCOMM supported

isObex

public boolean isObex()
Does this device support IrOBEX?
Returns:
true if IrOBEX supported

getInfoString

public java.lang.String getInfoString()
Get the additional information in string form.
Returns:
String with decoded additional information

getInfoStringPlus

public java.lang.String getInfoStringPlus()
Return the additional information in string form with the option bytes in HEX format as well.
Returns:
String with decoded version of the additional information