homegear
Class HomeGearParameter

java.lang.Object
  extended by homegear.HomeGearParameter

public class HomeGearParameter
extends java.lang.Object

Representation of a device parameter.


Field Summary
 java.lang.String peerName
          Peer name
 
Constructor Summary
HomeGearParameter(int id_, int channel_, java.lang.String name_, java.lang.String peerName_, HomeGearArray data_)
          Constructs a parameter.
 
Method Summary
 int channel()
          Returns channel
 HomeGearArray data()
          Returns parameter data
 boolean equals(java.lang.Object a)
          Comapare with another instance
 int id()
          Returns peer id
 java.lang.String name()
          Returns parameter name
 java.lang.String stringValue()
          Returns the value as a String or null if value can't be determined
static java.lang.String stringValue(HomeGearArray data_)
          Returns the value as a String or null if value can't be determined.
 java.lang.String toString()
          Returns a string representation.
 java.lang.Boolean update(HomeGearArray data_)
          Updates data.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

peerName

public java.lang.String peerName
Peer name

Constructor Detail

HomeGearParameter

public HomeGearParameter(int id_,
                         int channel_,
                         java.lang.String name_,
                         java.lang.String peerName_,
                         HomeGearArray data_)
Constructs a parameter.

Parameters:
id_ - ID of the per
channel_ - channel of the parameter
name_ - name of the parameter
peerName_ - name of the peer. It can be null and is only used to produce readable output.
data_ - parameter data. The data buffer is copied using HomeGearArray.copy().
Method Detail

id

public int id()
Returns peer id

Returns:
peer id.

channel

public int channel()
Returns channel

Returns:
channel.

name

public java.lang.String name()
Returns parameter name

Returns:
parameter name

data

public HomeGearArray data()
Returns parameter data

Returns:
parameter data

stringValue

public static java.lang.String stringValue(HomeGearArray data_)
Returns the value as a String or null if value can't be determined.

Parameters:
data_ - the parameter data.
Returns:
the value as a String

stringValue

public java.lang.String stringValue()
Returns the value as a String or null if value can't be determined

Returns:
the value as a String

update

public java.lang.Boolean update(HomeGearArray data_)
Updates data. Data is only updated if value has been changed.

Parameters:
data_ - new data. The data buffer is copied using HomeGearArray.copy().
Returns:
true if data is changed

equals

public boolean equals(java.lang.Object a)
Comapare with another instance

Overrides:
equals in class java.lang.Object
Parameters:
a - The other instance.
Returns:
True if equal.

toString

public java.lang.String toString()
Returns a string representation.

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