tuwien.auto.calimero.knxnetip.util
Class ManufacturerDIB

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

public class ManufacturerDIB
extends DIB

Represents a manufacturer data description information block.

Since the data in this DIB is dependent on the manufacturer and might contain any information, no specific content parsing is done.

Objects of this type are immutable.


Field Summary
 
Fields inherited from class tuwien.auto.calimero.knxnetip.util.DIB
DEVICE_INFO, MFR_DATA, SUPP_SVC_FAMILIES
 
Constructor Summary
ManufacturerDIB(byte[] data, int offset)
          Creates a manufacturer data DIB out of a byte array.
 
Method Summary
 byte[] getData()
          Returns the manufacturer specific description data.
 int getID()
          Returns the KNX manufacturer ID.
 byte[] toByteArray()
          Returns the byte representation of the whole DIB structure.
 java.lang.String toString()
          Returns a textual representation of this manufacturer 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
 

Constructor Detail

ManufacturerDIB

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

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

getData

public final byte[] getData()
Returns the manufacturer specific description data.

This data block starts at byte offset 4 in the DIB structure.

Returns:
byte array with manufacturer data

getID

public final int getID()
Returns the KNX manufacturer ID.

The ID clearly identifies the manufacturer who created this DIB structure.

Returns:
ID as unsigned short

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 manufacturer DIB.

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