|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.jlab.coda.et.StationLocal
This class defines a station for ET system use.
| Field Summary | |
(package private) java.util.HashSet |
attachments
Set of attachments to this station. |
(package private) StationConfig |
config
Station configuration object. |
(package private) int |
id
Unique id number. |
(package private) EventList |
inputList
Input list of events. |
(package private) boolean |
killConductor
Flag telling this station to kill the conductor thread |
(package private) java.lang.String |
name
Unique station name. |
(package private) EventList |
outputList
Output list of events. |
(package private) java.util.LinkedList |
parallelStations
If this station is the first in a linked list of parallel stations, this list contains all the parallel stations in that group. |
(package private) EventSelectable |
selector
Predefined event selection method used when the station's select mode is Constants.stationSelectMatch. |
(package private) int |
status
Station status. |
(package private) boolean |
wasLast
Flag telling if this station was the last to receive an event when using the round-robin selection method for a parallel group of stations. |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
(package private) |
StationLocal(SystemCreate _sys,
java.lang.String _name,
StationConfig _config,
int _id)
Creates a new StationLocal object. |
| Method Summary | |
(package private) void |
addStation(StationLocal newStation,
int position,
int parallelPosition)
Method for use by SystemCreate.createStation(org.jlab.coda.et.StationConfig, java.lang.String) to grab all stations'
transfer locks and stop all event transfer before adding a new station to
the ET system's linked lists of stations. |
(package private) void |
changeStationStatus(StationLocal station,
int status)
Method for use by SystemCreate.detach(org.jlab.coda.et.AttachmentLocal) and SystemCreate.detach(org.jlab.coda.et.AttachmentLocal)
to grab all stations' transfer locks and stop all event transfer before
changing a station's status. |
int |
getId()
Gets the station id number. |
(package private) void |
moveStation(StationLocal station,
int position,
int parallelPosition)
Method for use by SystemCreate.removeStation(int) to grab all stations'
transfer locks and stop all event transfer before moving a station in
the ET system's linked lists of stations. |
(package private) void |
removeStation(StationLocal station)
Method for use by SystemCreate.removeStation(int) to grab all stations'
transfer locks and stop all event transfer before removing a station from
the ET system's linked lists of stations. |
void |
run()
Method to implement thread conducting events between stations. |
boolean |
select(SystemCreate sys,
StationLocal stat,
Event ev)
When selectMode equals Constants.stationSelectMatch, this
becomes the station's selection method. |
(package private) void |
setBlockMode(int mode)
Method to dynamically set a station's blocking mode. |
(package private) void |
setCue(int cue)
Method to dynamically set a station's cue. |
(package private) void |
setPrescale(int prescale)
Method to dynamically set a station's prescale. |
(package private) void |
setRestoreMode(int mode)
Method to dynamically set a station's restore mode. |
(package private) void |
setSelectWords(int[] select)
Method to dynamically set a station's select integers. |
(package private) void |
setUserMode(int mode)
Method to dynamically set a station's user mode. |
| Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
int id
java.lang.String name
StationConfig config
volatile int status
Constants.stationUnused,
Constants.stationCreating, Constants.stationIdle, and
Constants.stationActive.
volatile boolean killConductor
volatile boolean wasLast
java.util.LinkedList parallelStations
EventList inputList
EventList outputList
java.util.HashSet attachments
EventSelectable selector
Constants.stationSelectMatch.
| Constructor Detail |
StationLocal(SystemCreate _sys,
java.lang.String _name,
StationConfig _config,
int _id)
throws EtException
_sys - ET system object_name - station name_config - station configuration_id - unique station id number
EtException - if the station cannot load the selectClass| Method Detail |
public int getId()
void addStation(StationLocal newStation,
int position,
int parallelPosition)
throws EtException
SystemCreate.createStation(org.jlab.coda.et.StationConfig, java.lang.String) to grab all stations'
transfer locks and stop all event transfer before adding a new station to
the ET system's linked lists of stations. This method is called recursively.
newStation - station objectposition - the desired position in the main linked list of stationsparallelPosition - the desired position of a parallel station in the
group of parallel stations it's being added to
EtException - if trying to add an incompatible parallel station to an existing group
of parallel stations or to the head of an existing group of parallel
stations.void removeStation(StationLocal station)
SystemCreate.removeStation(int) to grab all stations'
transfer locks and stop all event transfer before removing a station from
the ET system's linked lists of stations. This method is called recursively.
station - station object
void moveStation(StationLocal station,
int position,
int parallelPosition)
throws EtException
SystemCreate.removeStation(int) to grab all stations'
transfer locks and stop all event transfer before moving a station in
the ET system's linked lists of stations. This method is called recursively.
station - station objectposition - the desired position in the main linked list of stationsparallelPosition - the desired position of a parallel station in the
group of parallel stations it's being added to
EtException - if trying to move an incompatible parallel station to an existing group
of parallel stations or to the head of an existing group of parallel
stations.
void changeStationStatus(StationLocal station,
int status)
SystemCreate.detach(org.jlab.coda.et.AttachmentLocal) and SystemCreate.detach(org.jlab.coda.et.AttachmentLocal)
to grab all stations' transfer locks and stop all event transfer before
changing a station's status. This method is called recursively.
station - station objectstatus - the desired status of the stationvoid setBlockMode(int mode)
mode - blocking mode valuevoid setCue(int cue)
cue - cue valuevoid setPrescale(int prescale)
prescale - prescale valuevoid setSelectWords(int[] select)
select - array of selection integersvoid setUserMode(int mode)
mode - user mode valuevoid setRestoreMode(int mode)
mode - restore mode value
public boolean select(SystemCreate sys,
StationLocal stat,
Event ev)
Constants.stationSelectMatch, this
becomes the station's selection method.
select in interface EventSelectablesys - ET system objectstat - station objectev - event object being evaluatedEventSelectablepublic void run()
run in interface java.lang.Runnable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||