tuwien.auto.calimero.link.medium
Class RFSettings

java.lang.Object
  extended by tuwien.auto.calimero.link.medium.KNXMediumSettings
      extended by tuwien.auto.calimero.link.medium.RFSettings

public class RFSettings
extends KNXMediumSettings

Provides settings necessary for communication on RF medium.


Field Summary
 
Fields inherited from class tuwien.auto.calimero.link.medium.KNXMediumSettings
MEDIUM_PL110, MEDIUM_PL132, MEDIUM_RF, MEDIUM_TP0, MEDIUM_TP1
 
Constructor Summary
RFSettings(IndividualAddress device)
          Creates a new settings container with the device individual address for RF medium.
RFSettings(IndividualAddress device, byte[] domain, byte[] serialNumber, boolean unidirectional)
          Creates a new settings container with RF medium specific information.
 
Method Summary
 byte[] getDomainAddress()
          Returns the domain address.
 short getMedium()
          Returns the KNX medium type identifier specifying the communication medium this setting object is for.
 byte[] getSerialNumber()
          Returns the serial number of the device.
 boolean isUnidirectional()
          Returns whether unidirectional device is set.
 void setDomainAddress(byte[] domain)
          Sets a new domain address.
 java.lang.String toString()
           
 
Methods inherited from class tuwien.auto.calimero.link.medium.KNXMediumSettings
getDeviceAddress, getMediumString, setDeviceAddress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RFSettings

public RFSettings(IndividualAddress device)
Creates a new settings container with the device individual address for RF medium.

The domain address is initialized to broadcast domain, serial number is 0, unidirectional is set false.

Parameters:
device - device individual device address to use as source address in KNX messages, specifying null uses the individual address 0.0.0

RFSettings

public RFSettings(IndividualAddress device,
                  byte[] domain,
                  byte[] serialNumber,
                  boolean unidirectional)
Creates a new settings container with RF medium specific information.

Parameters:
device - device individual device address to use as source address in KNX messages, specifying null uses the individual address 0.0.0
domain - byte array containing the domain address to use in KNX messages, address is given in network byte order, domain.length = 6, supplying null defaults to the broadcast domain
serialNumber - serial number of the device, serialNumber.length = 6
unidirectional - true to indicate an unidirectional device, false otherwise
Method Detail

getDomainAddress

public final byte[] getDomainAddress()
Returns the domain address.

The address is returned in network byte order.

Returns:
domain address as byte array of length = 6

getMedium

public short getMedium()
Description copied from class: KNXMediumSettings
Returns the KNX medium type identifier specifying the communication medium this setting object is for.

Specified by:
getMedium in class KNXMediumSettings
Returns:
KNX medium type ID

getSerialNumber

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

Returns:
serial number as byte array of length = 6

isUnidirectional

public final boolean isUnidirectional()
Returns whether unidirectional device is set.

Returns:
true if unidirectional, false otherwise

setDomainAddress

public final void setDomainAddress(byte[] domain)
Sets a new domain address.

Parameters:
domain - byte array containing the domain address to use in KNX messages, address is given in network byte order, domain.length = 6, supplying null defaults to the broadcast domain

toString

public java.lang.String toString()
Overrides:
toString in class KNXMediumSettings