com.amx.duet.tools.util
Class DuetUtil

java.lang.Object
  extended bycom.amx.duet.tools.util.DuetUtil

public class DuetUtil
extends java.lang.Object

A utility class, which contains a few Duet specific methods. Class containing miscellaneous static methods that can be used in Duet Modules.

Since:
AMXTools 1.0.0
Version:
1.0.3

Constructor Summary
DuetUtil()
           
 
Method Summary
static LoopBackDevice createLoopBackDevice(java.lang.String vdStr, boolean bVirtual)
          Creates a new loop back device based on the DPS string passed in.
static com.amx.duet.da.NetLinxDevice createVirtualDevice(java.lang.String vdStr)
          Creates a new virtual device based on the DPS string passed in.
static java.lang.String eventValToStr(java.lang.Object caller, com.amx.duet.core.master.netlinx.Event evt)
          Converts the event data value (if it is a string) to a String object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DuetUtil

public DuetUtil()
Method Detail

eventValToStr

public static final java.lang.String eventValToStr(java.lang.Object caller,
                                                   com.amx.duet.core.master.netlinx.Event evt)
Converts the event data value (if it is a string) to a String object

Parameters:
caller - Class object that called this method
evt - Duet Event object containing the data
Returns:
String converted from a byte or character array

createVirtualDevice

public static final com.amx.duet.da.NetLinxDevice createVirtualDevice(java.lang.String vdStr)
Creates a new virtual device based on the DPS string passed in.

Parameters:
vdStr - String containing a DPS value (ie "0:1:0")
Returns:
a NetLinxDevice with the vitual flag set to true

createLoopBackDevice

public static final LoopBackDevice createLoopBackDevice(java.lang.String vdStr,
                                                        boolean bVirtual)
Creates a new loop back device based on the DPS string passed in. The device can be either virtual or physcial based on the virtual flag.

Parameters:
vdStr - String containing a DPS value (ie "0:1:0")
bVirtual - boolean value used to register the device as virtual or physical
Returns:
a newly created LoopBackDevice


Copyright © 2008 AMX LLC. All Rights Reserved.