org.indi.objects
Class SwitchVector

java.lang.Object
  extended by org.indi.objects.Object<T>
      extended by org.indi.objects.Vector<Switch>
          extended by org.indi.objects.SwitchVector
All Implemented Interfaces:
java.io.Serializable

public class SwitchVector
extends Vector<Switch>

A indivector hosting indiswitches

Author:
Dirk Hünniger
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.indi.objects.Vector
device, group, label, name, permission, state, timeout, timestamp
 
Fields inherited from class org.indi.objects.Object
children, message, transferType
 
Constructor Summary
SwitchVector(java.lang.String device, java.lang.String name, State state, double timeout, java.lang.String timestamp, java.lang.String message)
          class constructor
SwitchVector(java.lang.String device, java.lang.String name, java.lang.String timestamp)
          class constructor
SwitchVector(java.lang.String device, java.lang.String name, java.lang.String label, java.lang.String group, State state, Permission permission, double timeout, java.lang.String timestamp, SwitchRule switchRule, java.lang.String message)
          class constructor
SwitchVector(java.lang.String device, java.lang.String name, java.lang.String label, java.lang.String group, State state, Permission permission, SwitchRule switchRule, double timeout)
          class constructor
 
Method Summary
 java.lang.String getStartTag(TransferType type, java.lang.String message)
           
 SwitchRule getSwitchRule()
           
protected  java.lang.String getType()
           
protected static java.lang.String switchRuleToString(SwitchRule rule)
          convert a switch rule to a string as used by the indi protocol
 
Methods inherited from class org.indi.objects.Vector
add, getChlidren, getDateFormat, getDevice, getEndTag, getGroup, getName, getState, getXML, getXML, hashCode, oEquals, permissionToString, setState, update
 
Methods inherited from class org.indi.objects.Object
equals, getChildren, getMessage, getTransferType, setTransferType, treeEquals
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwitchVector

public SwitchVector(java.lang.String device,
                    java.lang.String name,
                    java.lang.String timestamp)
class constructor

Parameters:
device - the name of the device this SwitchVector is associated with
name - the name of this SwitchVector
timestamp - the timestamp to be sent along with this vector

SwitchVector

public SwitchVector(java.lang.String device,
                    java.lang.String name,
                    java.lang.String label,
                    java.lang.String group,
                    State state,
                    Permission permission,
                    double timeout,
                    java.lang.String timestamp,
                    SwitchRule switchRule,
                    java.lang.String message)
class constructor

Parameters:
device - the name of the device this SwitchVector is associated with
name - the name of this SwitchVector
label - the label to be used for this SwitchVector by a GUI
group - the group this vector belongs to
state - the State this vector is in
permission - the permissions the user has to change the properties of this vector
timeout - the worst case time it takes for a property of this vector to change
timestamp - the timestamp to be sent along with this vector
switchRule - a rule defining how switches can be On at the same time
message - a message to be sent along with this vector

SwitchVector

public SwitchVector(java.lang.String device,
                    java.lang.String name,
                    State state,
                    double timeout,
                    java.lang.String timestamp,
                    java.lang.String message)
class constructor

Parameters:
device - the name of the device this SwitchVector is associated with
name - the name of this SwitchVector
state - the State this vector is in
timeout - the worst case time it takes for a property of this vector to change
timestamp - the timestamp to be sent along with this vector
message - a message to be sent along with this vector

SwitchVector

public SwitchVector(java.lang.String device,
                    java.lang.String name,
                    java.lang.String label,
                    java.lang.String group,
                    State state,
                    Permission permission,
                    SwitchRule switchRule,
                    double timeout)
class constructor

Parameters:
device - the name of the device this SwitchVector is associated with
name - the name of this SwitchVector
label - the label to be used for this SwitchVector by a GUI
group - the group this vector belongs to
state - the State this vector is in
permission - the permissions the user has to change the properties of this vector
timeout - the worst case time it takes for a property of this vector to change
switchRule - a rule defining how switches can be On at the same time
Method Detail

getSwitchRule

public SwitchRule getSwitchRule()
Returns:
the switchrule of this vector

switchRuleToString

protected static java.lang.String switchRuleToString(SwitchRule rule)
convert a switch rule to a string as used by the indi protocol

Parameters:
rule - the switchrule to be converted
Returns:
the string representation of the switchrule

getStartTag

public java.lang.String getStartTag(TransferType type,
                                    java.lang.String message)
Overrides:
getStartTag in class Vector<Switch>

getType

protected java.lang.String getType()
Specified by:
getType in class Vector<Switch>


Copyright © 2008. All Rights Reserved.