|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jlab.coda.et.SystemOpen
This class opens (finds and connects to) an ET system. The use of this class is hidden from the user. There should be no reason to use it.
| Field Summary | |
(package private) SystemOpenConfig |
config
Object specifying how to open an ET system. |
(package private) int |
debug
Debug level. |
(package private) int |
endian
Endian value of the opened ET system. |
(package private) int |
eventSize
Event size in bytes of the opened ET system. |
(package private) java.lang.String |
host
Name of the host the ET system resides on. |
(package private) int |
language
Language used to implement the opened ET system. |
(package private) int |
numEvents
Total number of events of the opened ET system. |
(package private) java.util.ArrayList |
respondingHosts
In case of multiple responding ET systems, a list of their hosts. |
(package private) java.util.ArrayList |
respondingPorts
In case of multiple responding ET systems, a list of their ports. |
(package private) java.net.Socket |
sock
TCP socket connection established with an ET system's server. |
(package private) int |
stationSelectInts
Number of select integers in the opened ET system. |
(package private) int |
tcpPort
Port number of the ET system's tcp server. |
(package private) int |
version
Major version number of the opened ET system. |
| Constructor Summary | |
SystemOpen(SystemOpenConfig _config)
Create a SystemOpen object. |
|
| Method Summary | |
void |
connect()
Sets up a TCP socket connection to an ET system. |
void |
disconnect()
|
java.lang.String[] |
getAllHosts()
Gets all host names when multiple ET systems respond. |
int[] |
getAllPorts()
Gets all port numbers when multiple ET systems respond. |
SystemOpenConfig |
getConfig()
Gets a copy of the SystemOpenConfig configuration object. |
int |
getDebug()
Gets the debug output level. |
int |
getEndian()
Gets the endian value of the opened ET system. |
int |
getEventSize()
Gets the size of the normal events in bytes of the opened ET system. |
java.lang.String |
getHost()
Gets the host name the opened ET system is running on. |
int |
getLanguage()
Gets the language used to implement the opened ET system.. |
java.lang.String |
getName()
Gets the name of the ET system (file). |
int |
getNumEvents()
Gets the total number of events of the opened ET system. |
int |
getPort()
Gets the tcp server port number of the opened ET system. |
int |
getSelectInts()
Gets the number of station select integers of the opened ET system.. |
java.net.Socket |
getSocket()
Gets the socket connecting this object to the ET system.. |
int |
getVersion()
Gets the major version number of the opened ET system. |
boolean |
isConnected()
Gets whether the ET system is connected (opened) or not. |
void |
setDebug(int _debug)
Sets the debug output level. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
SystemOpenConfig config
java.net.Socket sock
java.lang.String host
int tcpPort
int debug
setDebug(int).
int endian
int numEvents
int eventSize
int version
int stationSelectInts
int language
Constants.langJava for Java, Constants.langCpp for C++,
and Constants.langC for C.
java.util.ArrayList respondingHosts
java.util.ArrayList respondingPorts
| Constructor Detail |
public SystemOpen(SystemOpenConfig _config)
_config - SystemOpenConfig object| Method Detail |
public void setDebug(int _debug)
throws EtException
Constants.debugNone,
Constants.debugSevere, Constants.debugError,
Constants.debugWarn, or Constants.debugInfo.
_debug - debug level
EtException - if bad argument valuepublic int getNumEvents()
public int getEventSize()
public int getPort()
public java.lang.String getHost()
public java.lang.String getName()
public int getEndian()
public int getVersion()
public int getLanguage()
public int getSelectInts()
public java.net.Socket getSocket()
public int getDebug()
public SystemOpenConfig getConfig()
public boolean isConnected()
public java.lang.String[] getAllHosts()
public int[] getAllPorts()
public void connect()
throws java.io.IOException,
java.net.UnknownHostException,
EtException,
EtTooManyException
java.io.IOException - if problems with network comunications
java.net.UnknownHostException - if the host address(es) is(are) unknown
EtException - if the responding ET system has the wrong name, runs a different
version of ET, or has a different value for
Constants.stationSelectInts
EtTooManyException - if there were more than one valid response when policy is set to
Constants.policyError and we are looking either
remotely or anywhere for the ET system.public void disconnect()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||