|
|||||||||
| Home >> All >> org >> jempeg >> empeg >> [ protocol overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.jempeg.empeg.protocol
Class USBConnection

java.lang.Objectorg.jempeg.empeg.protocol.USBConnection
- All Implemented Interfaces:
- ConnectionIfc
- public class USBConnection
- extends java.lang.Object
- implements ConnectionIfc
- extends java.lang.Object
USBConnection is an implementation of ConnectionIfc that can communicate with an Empeg over a USB connection.
- Version:
- $Revision: 1.10 $
| Field Summary | |
private UsbDevice |
myDevice
|
private EmpegInputStream |
myInputStream
|
private EmpegOutputStream |
myOutputStream
|
private org.jempeg.empeg.core.DynamicConfigFile |
myPlayerConfiguration
|
| Constructor Summary | |
USBConnection(UsbDevice _device)
|
|
| Method Summary | |
void |
close()
Closes the communication channel to the Empeg |
void |
flushReceiveBuffer()
Flushes the receive buffer (for use after things like error conditions when lingering bytes may be hanging at the end of the stream. |
UsbDevice |
getDevice()
|
EmpegInputStream |
getInputStream()
Returns an input stream to read data from the Empeg |
EmpegOutputStream |
getOutputStream()
Returns an output stream to write data to the Empeg |
int |
getPacketSize()
Returns the maximum packet size of the connection. |
org.jempeg.empeg.core.DynamicConfigFile |
getPlayerConfiguration()
Returns the configuration that was obtained during discovery. |
boolean |
isOpen()
Returns whether or not this connection is open. |
void |
open()
Opens the communication channel to the Empeg |
void |
pause()
Pauses the communication channel to the Empeg. |
void |
setDevice(UsbDevice _device)
|
void |
setPlayerConfiguration(org.jempeg.empeg.core.DynamicConfigFile _playerConfiguration)
Sets the configuration that was obtained during discovery. |
void |
setTimeout(long _millis)
Sets the current timeout on the connection. |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
void |
unpause()
Unpauses the communication channel to the Empeg. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
myDevice
private UsbDevice myDevice
myInputStream
private EmpegInputStream myInputStream
myOutputStream
private EmpegOutputStream myOutputStream
myPlayerConfiguration
private org.jempeg.empeg.core.DynamicConfigFile myPlayerConfiguration
| Constructor Detail |
USBConnection
public USBConnection(UsbDevice _device)
| Method Detail |
setDevice
public void setDevice(UsbDevice _device)
throws java.io.IOException,
UsbException
getPlayerConfiguration
public org.jempeg.empeg.core.DynamicConfigFile getPlayerConfiguration()
- Description copied from interface:
ConnectionIfc - Returns the configuration that was obtained during discovery.
- Specified by:
getPlayerConfigurationin interfaceConnectionIfc
setPlayerConfiguration
public void setPlayerConfiguration(org.jempeg.empeg.core.DynamicConfigFile _playerConfiguration)
- Description copied from interface:
ConnectionIfc - Sets the configuration that was obtained during discovery.
- Specified by:
setPlayerConfigurationin interfaceConnectionIfc
getDevice
public UsbDevice getDevice()
getPacketSize
public int getPacketSize()
- Description copied from interface:
ConnectionIfc - Returns the maximum packet size of the connection.
- Specified by:
getPacketSizein interfaceConnectionIfc
getInputStream
public EmpegInputStream getInputStream()
- Description copied from interface:
ConnectionIfc - Returns an input stream to read data from the Empeg
- Specified by:
getInputStreamin interfaceConnectionIfc
getOutputStream
public EmpegOutputStream getOutputStream()
- Description copied from interface:
ConnectionIfc - Returns an output stream to write data to the Empeg
- Specified by:
getOutputStreamin interfaceConnectionIfc
open
public void open()
throws java.io.IOException
- Description copied from interface:
ConnectionIfc - Opens the communication channel to the Empeg
- Specified by:
openin interfaceConnectionIfc
close
public void close()
throws java.io.IOException
- Description copied from interface:
ConnectionIfc - Closes the communication channel to the Empeg
- Specified by:
closein interfaceConnectionIfc
pause
public void pause()
throws java.io.IOException
- Description copied from interface:
ConnectionIfc - Pauses the communication channel to the Empeg. You got me as to
why this exists -- this came from the original port. All
implementations just proxy close.
- Specified by:
pausein interfaceConnectionIfc
unpause
public void unpause()
throws java.io.IOException
- Description copied from interface:
ConnectionIfc - Unpauses the communication channel to the Empeg. You got me as to
why this exists -- this came from the original port. All
implementations just proxy open.
- Specified by:
unpausein interfaceConnectionIfc
flushReceiveBuffer
public void flushReceiveBuffer()
throws java.io.IOException
- Description copied from interface:
ConnectionIfc - Flushes the receive buffer (for use after things like
error conditions when lingering bytes may be hanging at
the end of the stream.
- Specified by:
flushReceiveBufferin interfaceConnectionIfc
setTimeout
public void setTimeout(long _millis)
throws java.io.IOException
- Description copied from interface:
ConnectionIfc - Sets the current timeout on the connection.
- Specified by:
setTimeoutin interfaceConnectionIfc
isOpen
public boolean isOpen()
- Description copied from interface:
ConnectionIfc - Returns whether or not this connection is open.
- Specified by:
isOpenin interfaceConnectionIfc
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
|
|||||||||
| Home >> All >> org >> jempeg >> empeg >> [ protocol overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.jempeg.empeg.protocol.USBConnection