tuwien.auto.calimero.link.medium
Class PLSettings

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

public class PLSettings
extends KNXMediumSettings

Provides settings necessary for communication on PL (powerline) medium.

This settings type is used for powerline medium PL132 and PL110.


Field Summary
 
Fields inherited from class tuwien.auto.calimero.link.medium.KNXMediumSettings
MEDIUM_PL110, MEDIUM_PL132, MEDIUM_RF, MEDIUM_TP0, MEDIUM_TP1
 
Constructor Summary
PLSettings(boolean mediumPL132)
          Creates a new default container with settings for PL medium.
PLSettings(IndividualAddress device, byte[] domain, boolean mediumPL132)
          Creates a new settings container with PL 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.
 boolean isPL132()
          Returns whether settings are for communication on PL132 medium or PL110 medium.
 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

PLSettings

public PLSettings(boolean mediumPL132)
Creates a new default container with settings for PL medium.

The device address is initialized to 0.0.0 and domain address is set to broadcast domain.

Parameters:
mediumPL132 - true if communicating on PL132, false if communicating on PL110

PLSettings

public PLSettings(IndividualAddress device,
                  byte[] domain,
                  boolean mediumPL132)
Creates a new settings container with PL medium specific information.

Parameters:
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 = 2, supplying null defaults to the broadcast domain
mediumPL132 - true if communicating on PL132, false if communicating on PL110
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 = 2

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

isPL132

public final boolean isPL132()
Returns whether settings are for communication on PL132 medium or PL110 medium.

Returns:
true for PL132, false for PL110

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 = 2, supplying null defaults to the broadcast domain

toString

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