tuwien.auto.calimero.knxnetip.util
Class DeviceDIB

java.lang.Object
  extended by tuwien.auto.calimero.knxnetip.util.DIB
      extended by tuwien.auto.calimero.knxnetip.util.DeviceDIB

public class DeviceDIB
extends DIB

Represents a device description information block.

Objects of this type are immutable.

See Also:
DescriptionResponse

Field Summary
static short MEDIUM_PL110
          KNX medium code for power line 110 kHz (1200 bit/s).
static short MEDIUM_PL132
          KNX medium code for power line 132 kHz (2400 bit/s), inherited from EHS.
static short MEDIUM_RF
          KNX medium code for radio frequency (868 MHz).
static short MEDIUM_TP0
          KNX medium code for twisted pair 0 (2400 bit/s), inherited from BatiBUS.
static short MEDIUM_TP1
          KNX medium code for twisted pair 1 (9600 bit/s).
 
Fields inherited from class tuwien.auto.calimero.knxnetip.util.DIB
DEVICE_INFO, MFR_DATA, SUPP_SVC_FAMILIES
 
Constructor Summary
DeviceDIB(byte[] data, int offset)
          Creates a device DIB out of a byte array.
 
Method Summary
 IndividualAddress getAddress()
          Returns the device individual address.
 short getDeviceStatus()
          Returns the device status byte.
 byte getInstallation()
          Returns the installation number for the device.
 short getKNXMedium()
          Returns the KNX medium code.
 java.lang.String getKNXMediumString()
          Returns a textual representation of the KNX medium code.
 byte[] getMACAddress()
          Returns the device Ethernet MAC address.
 java.lang.String getMACAddressString()
          Returns a textual representation of the device Ethernet MAC address.
 byte[] getMulticastAddress()
          Returns the device routing multicast address.
 java.lang.String getName()
          Returns the device friendly name.
 short getProject()
          Returns the project number for the device.
 int getProjectInstallID()
          Returns the project-installation identifier of this device.
 byte[] getSerialNumber()
          Returns the KNX serial number of the device.
 java.lang.String getSerialNumberString()
          Returns a textual representation of the device KNX serial number.
 byte[] toByteArray()
          Returns the byte representation of the whole DIB structure.
 java.lang.String toString()
          Returns a textual representation of this device DIB.
 
Methods inherited from class tuwien.auto.calimero.knxnetip.util.DIB
getDescTypeCode, getStructLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MEDIUM_PL110

public static final short MEDIUM_PL110
KNX medium code for power line 110 kHz (1200 bit/s).

See Also:
Constant Field Values

MEDIUM_PL132

public static final short MEDIUM_PL132
KNX medium code for power line 132 kHz (2400 bit/s), inherited from EHS.

See Also:
Constant Field Values

MEDIUM_RF

public static final short MEDIUM_RF
KNX medium code for radio frequency (868 MHz).

See Also:
Constant Field Values

MEDIUM_TP0

public static final short MEDIUM_TP0
KNX medium code for twisted pair 0 (2400 bit/s), inherited from BatiBUS.

See Also:
Constant Field Values

MEDIUM_TP1

public static final short MEDIUM_TP1
KNX medium code for twisted pair 1 (9600 bit/s).

See Also:
Constant Field Values
Constructor Detail

DeviceDIB

public DeviceDIB(byte[] data,
                 int offset)
          throws KNXFormatException
Creates a device DIB out of a byte array.

Parameters:
data - byte array containing device DIB structure
offset - start offset of DIB in data
Throws:
KNXFormatException - if no DIB found or invalid structure
Method Detail

getAddress

public final IndividualAddress getAddress()
Returns the device individual address.

Returns:
individual address as IndividualAddress

getDeviceStatus

public final short getDeviceStatus()
Returns the device status byte.

Bit 0 is programming mode flag.

Returns:
status as unsigned byte

getInstallation

public final byte getInstallation()
Returns the installation number for the device.

The installation number is the lower 4 bits of the project-installation identifier.

Returns:
installation number as 4 bit unsigned value
See Also:
getProjectInstallID()

getKNXMedium

public final short getKNXMedium()
Returns the KNX medium code.

Returns:
KNX medium as unsigned byte

getKNXMediumString

public java.lang.String getKNXMediumString()
Returns a textual representation of the KNX medium code.

Returns:
KNX medium as string format
See Also:
getKNXMedium()

getMACAddress

public final byte[] getMACAddress()
Returns the device Ethernet MAC address.

Returns:
byte array containing MAC address

getMACAddressString

public final java.lang.String getMACAddressString()
Returns a textual representation of the device Ethernet MAC address.

Returns:
MAC address as string format

getMulticastAddress

public final byte[] getMulticastAddress()
Returns the device routing multicast address.

For devices which don't implement routing, the multicast address is 0.

Returns:
multicast address as byte array

getName

public final java.lang.String getName()
Returns the device friendly name.

This name is used to display a device in textual format. The maximum name length is 30 characters.

Returns:
device name as string

getProject

public final short getProject()
Returns the project number for the device.

The project number is the upper 12 bits of the project-installation identifier.

Returns:
project number as 12 bit unsigned value
See Also:
getProjectInstallID()

getProjectInstallID

public final int getProjectInstallID()
Returns the project-installation identifier of this device.

This ID uniquely identifies a device in a project with more than one installation. The lowest 4 bits specify the installation number, bit 4 to 15 (MSB) contain the project number.

Returns:
project installation identifier as unsigned short

getSerialNumber

public final byte[] getSerialNumber()
Returns the KNX serial number of the device.

The serial number uniquely identifies a device.

Returns:
byte array with serial number

getSerialNumberString

public final java.lang.String getSerialNumberString()
Returns a textual representation of the device KNX serial number.

Returns:
serial number as string

toByteArray

public byte[] toByteArray()
Description copied from class: DIB
Returns the byte representation of the whole DIB structure.

Overrides:
toByteArray in class DIB
Returns:
byte array containing structure

toString

public java.lang.String toString()
Returns a textual representation of this device DIB.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object