org.jlab.coda.et
Class Station

java.lang.Object
  extended byorg.jlab.coda.et.Station

public class Station
extends java.lang.Object

This class defines a station for the ET system user.


Field Summary
(package private)  int id
          Unique id number.
(package private)  java.lang.String name
          Name of the station.
(package private)  SystemUse sys
          User's ET system object.
(package private)  boolean usable
          Flag telling whether this station object is usable or the station it represents has been removed.
 
Constructor Summary
(package private) Station(java.lang.String _name, int _id, SystemUse _sys)
          Creates a station object.
 
Method Summary
 int getBlockMode()
          Gets the station configuration's block mode.
 int getCue()
          Gets the station configuration's cue.
 int getId()
          Gets the station id.
 int getInputCount()
          Gets the number of events in the station's input list.
 java.lang.String getName()
          Gets the station name.
 int getNumAttachments()
          Gets the station's number of attachments.
 int getOutputCount()
          Gets the number of events in the station's output list.
 int getPrescale()
          Gets the station configuration's prescale.
 int getRestoreMode()
          Gets the station configuration's restore mode.
 java.lang.String getSelectClass()
          Gets the name of the class containing the station's user-defined select method.
 java.lang.String getSelectFunction()
          Gets the name of the station's user-defined select function.
 java.lang.String getSelectLibrary()
          Gets the name of the library containing the station's user-defined select function.
 int getSelectMode()
          Gets the station configuration's select mode.
 int[] getSelectWords()
          Gets the station's select array - used for filtering events.
 int getStatus()
          Gets the station's status.
 int getUserMode()
          Gets the station configuration's user mode.
 void setBlockMode(int mode)
          Sets the station's block mode dynamically.
 void setCue(int cue)
          Sets the station's cue size dynamically.
 void setPrescale(int prescale)
          Sets the station's prescale dynamically.
 void setRestoreMode(int mode)
          Sets the station's restore mode dynamically.
 void setSelectWords(int[] select)
          Sets the station's select array - used for filtering events.
 void setUserMode(int mode)
          Sets the station's user mode dynamically.
 boolean usable()
          Tells if this station object is usable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

int id
Unique id number.


usable

boolean usable
Flag telling whether this station object is usable or the station it represents has been removed. Set by the user's ET system object.


name

java.lang.String name
Name of the station.


sys

SystemUse sys
User's ET system object.

Constructor Detail

Station

Station(java.lang.String _name,
        int _id,
        SystemUse _sys)
Creates a station object. Done by the ET system object only.

Parameters:
_name - station name
_id - station id number
_sys - user's ET system object
Method Detail

getName

public java.lang.String getName()
Gets the station name.

Returns:
station name

getId

public int getId()
Gets the station id.

Returns:
station id

usable

public boolean usable()
Tells if this station object is usable.

Returns:
true if station object is usable and false otherwise

getSelectWords

public int[] getSelectWords()
                     throws java.io.IOException,
                            EtException
Gets the station's select array - used for filtering events.

Returns:
array of select integers
Throws:
EtException - if the station has been removed or cannot be found
java.io.IOException
See Also:
StationConfig.select

setSelectWords

public void setSelectWords(int[] select)
                    throws java.io.IOException,
                           EtException
Sets the station's select array - used for filtering events.

Parameters:
select - array of select integers
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed or cannot be found, if wrong size array, or if the station is GRAND_CENTRAL
See Also:
StationConfig.select

getSelectLibrary

public java.lang.String getSelectLibrary()
                                  throws java.io.IOException,
                                         EtException
Gets the name of the library containing the station's user-defined select function. This is only relevant for station's on C language ET systems.

Returns:
station's user-defined select function library
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed
See Also:
StationConfig.selectLibrary

getSelectFunction

public java.lang.String getSelectFunction()
                                   throws java.io.IOException,
                                          EtException
Gets the name of the station's user-defined select function. This is only relevant for station's on C language ET systems.

Returns:
station's user-defined select function
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed
See Also:
StationConfig.selectFunction

getSelectClass

public java.lang.String getSelectClass()
                                throws java.io.IOException,
                                       EtException
Gets the name of the class containing the station's user-defined select method. This is only relevant for station's on Java language ET systems.

Returns:
station's user-defined select method class
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed
See Also:
StationConfig.selectClass

getNumAttachments

public int getNumAttachments()
                      throws java.io.IOException,
                             EtException
Gets the station's number of attachments.

Returns:
station's number of attachments
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed

getStatus

public int getStatus()
              throws java.io.IOException,
                     EtException
Gets the station's status. It may have the values Constants.stationUnused, Constants.stationCreating, Constants.stationIdle, and Constants.stationActive.

Returns:
station's status
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed

getInputCount

public int getInputCount()
                  throws java.io.IOException,
                         EtException
Gets the number of events in the station's input list.

Returns:
number of events in the station's input list
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed

getOutputCount

public int getOutputCount()
                   throws java.io.IOException,
                          EtException
Gets the number of events in the station's output list.

Returns:
number of events in the station's output list
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed

getBlockMode

public int getBlockMode()
                 throws java.io.IOException,
                        EtException
Gets the station configuration's block mode.

Returns:
station's block mode
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed
See Also:
StationConfig.blockMode

setBlockMode

public void setBlockMode(int mode)
                  throws java.io.IOException,
                         EtException
Sets the station's block mode dynamically.

Parameters:
mode - block mode value
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed, bad mode value, or the station is GRAND_CENTRAL
See Also:
StationConfig.blockMode

getUserMode

public int getUserMode()
                throws java.io.IOException,
                       EtException
Gets the station configuration's user mode.

Returns:
station's user mode
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed
See Also:
StationConfig.userMode

setUserMode

public void setUserMode(int mode)
                 throws java.io.IOException,
                        EtException
Sets the station's user mode dynamically.

Parameters:
mode - user mode value
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed, bad mode value, or the station is GRAND_CENTRAL
See Also:
StationConfig.userMode

getRestoreMode

public int getRestoreMode()
                   throws java.io.IOException,
                          EtException
Gets the station configuration's restore mode.

Returns:
station's restore mode
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed
See Also:
StationConfig.restoreMode

setRestoreMode

public void setRestoreMode(int mode)
                    throws java.io.IOException,
                           EtException
Sets the station's restore mode dynamically.

Parameters:
mode - restore mode value
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed, bad mode value, or the station is GRAND_CENTRAL
See Also:
StationConfig.restoreMode

getSelectMode

public int getSelectMode()
                  throws java.io.IOException,
                         EtException
Gets the station configuration's select mode.

Returns:
station's select mode
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed
See Also:
StationConfig.selectMode

getCue

public int getCue()
           throws java.io.IOException,
                  EtException
Gets the station configuration's cue.

Returns:
station's cue
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed
See Also:
StationConfig.cue

setCue

public void setCue(int cue)
            throws java.io.IOException,
                   EtException
Sets the station's cue size dynamically.

Parameters:
cue - cue value
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed, bad cue value, or the station is GRAND_CENTRAL
See Also:
StationConfig.cue

getPrescale

public int getPrescale()
                throws java.io.IOException,
                       EtException
Gets the station configuration's prescale.

Returns:
station's prescale
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed
See Also:
StationConfig.prescale

setPrescale

public void setPrescale(int prescale)
                 throws java.io.IOException,
                        EtException
Sets the station's prescale dynamically.

Parameters:
prescale - prescale value
Throws:
java.io.IOException - if there are problems with network communication
EtException - if the station has been removed, bad prescale value, or the station is GRAND_CENTRAL
See Also:
StationConfig.prescale