com.amx.duet.tools.util
Class LoopBackDevice
java.lang.Object
com.amx.duet.core.master.IcspNetLinxDevice
com.amx.duet.da.NetLinxDevice
com.amx.duet.tools.util.LoopBackDevice
- All Implemented Interfaces:
- org.osgi.service.device.Device, com.amx.duet.core.master.netlinx.IcspDefine, com.amx.duet.core.master.RouterEventListener, com.amx.duet.core.master.RouterListener, com.amx.duet.core.master.SystemConstants
- public class LoopBackDevice
- extends com.amx.duet.da.NetLinxDevice
The LoopBackDevice
class resembles every aspect of the NetLinxDevice
class
except that it provides event data back to any object that is listening for the device events triggered
by this device. Much like in NetLinx, a Duet object can use this class to recieve the data that it is
sending out. Also, any object that instantiates a LoopBackDevice
with the same DPS as
another NetLinxDevice
can also receive the other device's events.
- Since:
- AMXTools 1.0.1
- Version:
- 1.0.0
Fields inherited from interface org.osgi.service.device.Device |
MATCH_NONE |
Fields inherited from interface com.amx.duet.core.master.SystemConstants |
B_BYTE_BUFF, B_WORD_BUFF, BUNDLE_NAME, BUNDLE_VERSION, DEFAULT_CHANNEL_CNT, DEFAULT_LEVEL_CNT, DEFAULT_STR_SIZE, DEVICE_CATEGORY, DEVICE_CHANNELS, DEVICE_CLASS, DEVICE_GUID, DEVICE_INTERFACE, DEVICE_LEVELS, DEVICE_MAKE, DEVICE_MODEL, DEVICE_REVISION, DEVICE_SDKCLASS, DEVICE_SDKINTERFACE, DEVICE_SERIAL, DEVICE_SERVICE, DEVICE_UUID, DUET_DEVICE, DUET_DEVICESDK_PKG, DUET_MAKE, DUET_MODEL, DUET_MODULE, DUET_REVISION, DYNAMIC_TYPE, IP_ADDRESS, L_BYTE, L_CHAR, L_DOUBLE, L_FLOAT, L_INTEGER, L_LONG, L_SINTEGER, L_SLONG, L_UNKNOWN, L_WIDECHAR, LICENSE_KEY, MATCH_CATEGORY, MATCH_CLASS, MATCH_GUID, MATCH_MAKE, MATCH_MODEL, MATCH_REVISION, MATCH_SERIAL, PHYSICAL_DEVICE, ROUTER_MAKE, ROUTER_MODEL, ROUTER_REVISION, ROUTER_SERVICE |
Fields inherited from interface com.amx.duet.core.master.netlinx.IcspDefine |
ciDeviceIDVirtual, deviceIdProp, deviceNumProp, devIdStrProp, dhcpFlagProp, eDuetRealDevice, eDuetVirtualDevice, eNetLinxDestinationID, eNullNetLinxID, extendedAddressProp, extendedAddressTypeProp, fwIdProp, gatewayProp, hostNameProp, ipAddressProp, M_ACK, M_BLINK, M_COMMAND_DM, M_COMMAND_MD, M_CUSTOM_DM, M_DEVICE_INFO_DM, M_DEVICE_INFO_EOT, M_DYNAMIC_DEV_ADDR, M_FCHANNEL_OFF, M_FCHANNEL_ON, M_GET_CURR_TIME_AND_DATE, M_GET_ETHERNET_IP_ADDR, M_ICHANNEL_OFF, M_ICHANNEL_OFFTOMASTER, M_ICHANNEL_ON, M_ICHANNEL_ONTOMASTER, M_IOCHANNEL_OFF, M_IOCHANNEL_ON, M_LEVEL_VALUE_DM, M_LEVEL_VALUE_MD, M_NACK, M_OCHANNEL_OFF, M_OCHANNEL_OFF_STATUS, M_OCHANNEL_ON, M_OCHANNEL_ON_STATUS, M_OCHANNEL_PULSE, M_PING_REQUEST, M_PING_RESPONSE, M_REQUEST_CURR_TIME_AND_DATE, M_REQUEST_DEVICE_INFO, M_REQUEST_DYNAMIC_DEV_ADDR, M_REQUEST_ETHERNET_IP_ADDR, M_SET_DEVICE_NUM, M_SET_IDENTIFY_MODE, M_SET_SERIAL_NUM, M_SET_TIME_AND_DATE, M_STATUS_DM, M_STRING_DM, M_STRING_MD, M_TOTALOFFCHANNEL, mfgIdProp, mfgProp, physicalAddressProp, physicalAddressTypeProp, portNumProp, serialNumProp, subnetMaskProp, systemNumProp, versionProp |
Constructor Summary |
LoopBackDevice()
Creates a loop back NetLinxDevice . |
LoopBackDevice(com.amx.duet.core.master.netlinx.DPS dps,
boolean virtualDevice)
Creates a loop back NetLinxDevice given a DPS object and a flag
indicating whether or not this is a virtual device. |
Method Summary |
void |
addButtonListener(com.amx.duet.core.master.netlinx.IButtonListener buttonListener)
|
void |
addChannelListener(com.amx.duet.core.master.netlinx.IChannelListener channelListener)
|
void |
addCustomListener(com.amx.duet.core.master.netlinx.ICustomListener customListener)
|
void |
addDataListener(com.amx.duet.core.master.netlinx.IDataListener dataListener)
|
void |
addLevelListener(com.amx.duet.core.master.netlinx.ILevelListener levelListener)
|
void |
notifyOffline()
|
void |
notifyOnline()
|
void |
off(int channelId)
|
void |
offInputChannel(int channelId)
|
void |
on(int channelId)
|
void |
onInputChannel(int channelId)
|
void |
sendCommand(byte[] str)
|
void |
sendCommand(char[] str)
|
void |
sendCommand(java.lang.String str)
|
void |
sendCommandWide(java.lang.String str)
|
void |
sendCustom(int id,
int eventType,
int flag,
int value1,
int value2,
int value3,
byte[] eventData,
byte[] encode)
|
void |
sendCustom(int id,
int eventType,
int flag,
int value1,
int value2,
int value3,
char[] eventData,
byte[] encode)
|
void |
sendCustom(int id,
int eventType,
int flag,
int value1,
int value2,
int value3,
java.lang.String eventData,
byte[] encode)
|
void |
sendCustomWide(int id,
int eventType,
int flag,
int value1,
int value2,
int value3,
java.lang.String eventData,
byte[] encode)
|
void |
sendLevel(int levelId,
com.amx.duet.core.master.netlinx.Level l)
|
void |
sendString(byte[] str)
|
void |
sendString(char[] str)
|
void |
sendString(java.lang.String str)
|
void |
sendStringWide(java.lang.String str)
|
Methods inherited from class com.amx.duet.da.NetLinxDevice |
finalize, noDriverFound |
Methods inherited from class com.amx.duet.core.master.IcspNetLinxDevice |
dispose, getDeviceInfo, getDPS, getDuetMake, getDuetModel, getDuetVersion, getID, getIDString, getRouterMake, getRouterModel, getRouterVersion, getUniqueID, handleButtonEvent, handleChannelEvent, handleCustomEvent, handleDataEvent, handleLevelEvent, initialize, offFeedbackChannel, offOutputChannel, onFeedbackChannel, onOutputChannel, setChannelCount, setCommandSize, setDuetInfo, setLevelCount, setLevelType, setRouterInfo, setStringSize, setUniqueID |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoopBackDevice
public LoopBackDevice(com.amx.duet.core.master.netlinx.DPS dps,
boolean virtualDevice)
- Creates a loop back
NetLinxDevice
given a DPS object and a flag
indicating whether or not this is a virtual device.
- Parameters:
dps
- virtualDevice
-
LoopBackDevice
public LoopBackDevice()
- Creates a loop back
NetLinxDevice
.
addButtonListener
public void addButtonListener(com.amx.duet.core.master.netlinx.IButtonListener buttonListener)
addChannelListener
public void addChannelListener(com.amx.duet.core.master.netlinx.IChannelListener channelListener)
addCustomListener
public void addCustomListener(com.amx.duet.core.master.netlinx.ICustomListener customListener)
addDataListener
public void addDataListener(com.amx.duet.core.master.netlinx.IDataListener dataListener)
addLevelListener
public void addLevelListener(com.amx.duet.core.master.netlinx.ILevelListener levelListener)
notifyOffline
public void notifyOffline()
notifyOnline
public void notifyOnline()
off
public void off(int channelId)
offInputChannel
public void offInputChannel(int channelId)
on
public void on(int channelId)
onInputChannel
public void onInputChannel(int channelId)
sendCommand
public void sendCommand(byte[] str)
sendCommand
public void sendCommand(char[] str)
sendCommand
public void sendCommand(java.lang.String str)
sendCommandWide
public void sendCommandWide(java.lang.String str)
sendCustom
public void sendCustom(int id,
int eventType,
int flag,
int value1,
int value2,
int value3,
byte[] eventData,
byte[] encode)
sendCustom
public void sendCustom(int id,
int eventType,
int flag,
int value1,
int value2,
int value3,
char[] eventData,
byte[] encode)
sendCustom
public void sendCustom(int id,
int eventType,
int flag,
int value1,
int value2,
int value3,
java.lang.String eventData,
byte[] encode)
sendCustomWide
public void sendCustomWide(int id,
int eventType,
int flag,
int value1,
int value2,
int value3,
java.lang.String eventData,
byte[] encode)
sendLevel
public void sendLevel(int levelId,
com.amx.duet.core.master.netlinx.Level l)
sendString
public void sendString(byte[] str)
sendString
public void sendString(char[] str)
sendString
public void sendString(java.lang.String str)
sendStringWide
public void sendStringWide(java.lang.String str)
Copyright © 2008 AMX LLC. All Rights Reserved.