|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object model.device.ADMXDevice model.device.USBDMXInterface
public class USBDMXInterface
This is a concrete implementation of the ADMXDevice framework for the USBDMX.com DMX controller. This driver required the D2xx driver for the USBDMX.com controller to be installed on the system, and utilizes the USBDMX Java Driver.dll file to communicate with the driver.
TODO: fadeValue is commented out because the program never uses it, and the code for it is out of date. It should probably exist, but I havn't seen the need yet.
Constructor Summary | |
---|---|
USBDMXInterface()
This constructor will instantiate a new USBDMX.com device. |
Method Summary | |
---|---|
void |
closeDevice()
This method will be called before the program closes, or when the program is disconnecting from the device. |
Channel[] |
fadeValues(Channel[] startValues,
Channel[] endValues,
long fadeUpMillis,
long fadeDownMillis,
IUpdateChannel channelUpdater,
IUpdateFadeProgress fadeUpdater)
This method will start a fade from the startValues to the endValues. |
void |
setMaxAddress(short address)
This method allows you to set a maximum address on the device, if the device supports it. |
Channel |
setValue(Channel channel)
This method sets the given channel, value pair on the device. |
Channel[] |
setValues(Channel[] channels)
This method sets a series of values on the device. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public USBDMXInterface() throws ADMXDeviceException
ADMXDeviceException
- This exception will be thrown if there is an error trying to connect to
the USBDMX.com device.Method Detail |
---|
public Channel setValue(Channel channel) throws ADMXDeviceException
setValue
in class ADMXDevice
channel
- The Channel object with the address, value pair to set on the device.
ADMXDeviceException
- This exception will be thrown if there is an error while writting to the device.public Channel[] setValues(Channel[] channels) throws ADMXDeviceException
setValues
in class ADMXDevice
channels
- The array of address, value pairs to set on the device.
ADMXDeviceException
- This exception will be thrown if there is an error while writting to the device.public Channel[] fadeValues(Channel[] startValues, Channel[] endValues, long fadeUpMillis, long fadeDownMillis, IUpdateChannel channelUpdater, IUpdateFadeProgress fadeUpdater) throws ADMXDeviceException
fadeValues
in class ADMXDevice
startValues
- The Channel object array of the starting values for the fade. These values will be faded down in fadeDownMillis milliseconds. This
array must be the same length as endValues, and contain the same addresses in the same order.endValues
- The Channel object array of the ending values for the fade. These values will be faded up in fadeUpMillis milliseconds. This
array must be the same length as startValues, and contain the same addresses in the same order.fadeUpMillis
- The time in milliseconds that it will take to fade in the endValues.fadeDownMillis
- The time in milliseconds that it will take to fade out the startValues.channelUpdater
- This interface contains two methods that will be called every time a new value is written to the device. These
methods tell the model the current values of the channels during the fade. Using these values, the view can be updated as the channels
fade.fadeUpdater
- This class contains two methods that are used to update the fade progress bars during the fade. They should be called
every time a value is written to the device.
ADMXDeviceException
- This exception will be thrown if there is an error while writting to the device.public void setMaxAddress(short address) throws ADMXDeviceException
TODO: This method should be renamed to setMaxChannels().
setMaxAddress
in class ADMXDevice
maxChannels
- The maximum number of channels.
ADMXDeviceException
- This exception will be thrown if there is an error while writting to the device.public void closeDevice() throws ADMXDeviceException
closeDevice
in class ADMXDevice
ADMXDeviceException
- This exception will be thrown if there is an error while closing the device.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |