tuwien.auto.calimero.knxnetip.util
Class DIB

java.lang.Object
  extended by tuwien.auto.calimero.knxnetip.util.DIB
Direct Known Subclasses:
DeviceDIB, ManufacturerDIB, SuppFamiliesDIB

public abstract class DIB
extends java.lang.Object

Description Information Block (DIB).

A DIB is used to return device specific information.
This DIB is a common base for more detailed description formats contained in DIBs. For usage of the different description information available, refer to the DIB subtypes.

The currently known valid descriptor type codes (KNXnet/IP core specification v1.2) are defined as available DIB constants.


Field Summary
static short DEVICE_INFO
          Description type code for device information e.g.
static short MFR_DATA
          Description type code for further data defined by device manufacturer.
static short SUPP_SVC_FAMILIES
          Description type code for service families supported by the device.
 
Constructor Summary
protected DIB(byte[] data, int offset)
          Creates a new DIB out of a byte array.
 
Method Summary
 short getDescTypeCode()
          Returns the description type code of this DIB.
 short getStructLength()
          Returns the structure length of this DIB in bytes.
 byte[] toByteArray()
          Returns the byte representation of the whole DIB structure.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEVICE_INFO

public static final short DEVICE_INFO
Description type code for device information e.g. KNX medium.

See Also:
Constant Field Values

MFR_DATA

public static final short MFR_DATA
Description type code for further data defined by device manufacturer.

See Also:
Constant Field Values

SUPP_SVC_FAMILIES

public static final short SUPP_SVC_FAMILIES
Description type code for service families supported by the device.

See Also:
Constant Field Values
Constructor Detail

DIB

protected DIB(byte[] data,
              int offset)
       throws KNXFormatException
Creates a new DIB out of a byte array.

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

getDescTypeCode

public final short getDescTypeCode()
Returns the description type code of this DIB.

The type code specifies which kind of description information is contained in the DIB.

Returns:
description type code as unsigned byte

getStructLength

public final short getStructLength()
Returns the structure length of this DIB in bytes.

Returns:
structure length as unsigned byte

toByteArray

public byte[] toByteArray()
Returns the byte representation of the whole DIB structure.

Returns:
byte array containing structure