org.jlab.coda.et
Class SystemData

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

public class SystemData
extends java.lang.Object

This class holds all system level information about an ET system. It parses the information from a stream of data sent by an ET system.


Field Summary
(package private)  int alive
          Flag which specifying whether the ET system is alive.
(package private)  int attachments
          Count of the current number of attachments.
(package private)  int attachmentsMax
          Maximum number of attachments allowed in the ET system.
(package private)  int endian
          Endian of host running the ET system.
(package private)  java.lang.String etName
          The ET system (file) name.
(package private)  int events
          Total number of events in a system.
(package private)  int eventSize
          Size of "normal" events in bytes.
(package private)  int eventsOwned
          Number of events owned by the system (as opposed to attachments).
(package private)  int heartbeat
          Heartbeat count of the ET system process.
(package private)  java.lang.String[] interfaceAddresses
          Dotted-decimal IP addresses of network interfaces on the host.
(package private)  int interfaceCount
          Number of network interfaces on the host computer.
(package private)  int mainPid
          Unix pid of the ET system process.
(package private)  java.lang.String[] multicastAddresses
          Dotted-decimal multicast addresses the UDP server listens on.
(package private)  int multicastCount
          Number of multicast addresses the UDP server listens on.
(package private)  int multicastPort
          Port number of the ET UDP multicast listening thread.
(package private)  int mutex
          System mutex status.
(package private)  int processes
          Count of the current number of processes.
(package private)  int processesMax
          Maximum number of processes allowed in the ET system.
(package private)  int selects
          The number of ints in a station's select array.
(package private)  int share
          Flag specifying whether the operating system can share mutexes between processes.
(package private)  int statAddMutex
          Add-station mutex status.
(package private)  int stations
          Count of the current number of stations in the linked list (are either active or idle).
(package private)  int stationsMax
          Maximum number of station allowed in the ET system.
(package private)  int statMutex
          Station mutex status.
(package private)  int tcpPort
          Port number of the ET TCP server.
(package private)  int temps
          Count of the current amount of temporary events.
(package private)  int tempsMax
          Maximum number of temporary events allowed in the ET system.
(package private)  int udpPort
          Port number of the ET UDP broadcast listening thread.
 
Constructor Summary
SystemData()
           
 
Method Summary
 boolean alive()
          Specifies whether the ET system is alive.
 int getAttachments()
          Get the current number of attachments.
 int getAttachmentsMax()
          Get the maximum number of attachments allowed in the ET system.
 int getEndian()
          Get the endian value of the host running the ET system.
 java.lang.String getEtName()
          Get the ET system (file) name.
 int getEvents()
          Get the total number of events in a system.
 int getEventSize()
          Get the size of "normal" events in bytes.
 int getEventsOwned()
          Get the number of events owned by the system (not by attachments).
 int getHeartbeat()
          Get the heartbeat count of the ET system process.
 java.lang.String[] getInterfaceAddresses()
          Get the dotted-decimal IP addresses of network interfaces on the host.
 int getInterfaces()
          Get the number of network interfaces on the host computer.
 int getMainPid()
          Get the Unix pid of the ET system process.
 java.lang.String[] getMulticastAddresses()
          Get the dotted-decimal multicast addresses the UDP server listens on.
 int getMulticastPort()
          Get the port number of the ET UDP multicast listening thread.
 int getMulticasts()
          Get the number of multicast addresses the UDP server listens on.
 int getMutex()
          Get the system mutex status.
 int getProcesses()
          Get the current number of processes.
 int getProcessesMax()
          Get the maximum number of processes allowed in the ET system.
 int getSelects()
          Get the number of ints in a station's select array.
 int getShare()
          Get the value specifying whether the operating system can share mutexes between processes.
 int getStatAddMutex()
          Get the add-station mutex status.
 int getStations()
          Get the current number of stations in the linked list (either active or idle).
 int getStationsMax()
          Get the maximum number of station allowed in the ET system.
 int getStatMutex()
          Get the station mutex status.
 int getTcpPort()
          Get the port number of the ET TCP server.
 int getTemps()
          Get the current number of temporary events.
 int getTempsMax()
          Get the maximum number of temporary events allowed in the ET system.
 int getUdpPort()
          Get the port number of the ET UDP broadcast listening thread.
(package private)  void read(java.io.DataInputStream dis)
          Reads the system level information from a data stream which is sent out by an ET system over the network.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

alive

int alive
Flag which specifying whether the ET system is alive. A value of 1 means alive and 0 means dead.


heartbeat

int heartbeat
Heartbeat count of the ET system process. It is not relevant in Java ET systems.


temps

int temps
Count of the current amount of temporary events. It is not relevant in Java ET systems.


stations

int stations
Count of the current number of stations in the linked list (are either active or idle).

See Also:
SystemCreate.stations

attachments

int attachments
Count of the current number of attachments.

See Also:
SystemCreate.attachments

processes

int processes
Count of the current number of processes. It is not relevant in Java ET systems.


eventsOwned

int eventsOwned
Number of events owned by the system (as opposed to attachments).


mutex

int mutex
System mutex status. It has the value Constants.mutexLocked if locked and Constants.mutexUnlocked otherwise. This is only relevant in C ET systems, since in Java, mutexes cannot be tested without possibility of blocking. This is not boolean for C ET system compatibility.

See Also:
SystemCreate#systemLock.

statMutex

int statMutex
Station mutex status. It has the value Constants.mutexLocked if locked and Constants.mutexUnlocked otherwise. This is only relevant in C ET systems, since in Java, mutexes cannot be tested without possibility of blocking. This is not boolean for C ET system compatibility.

See Also:
SystemCreate#stationLock.

statAddMutex

int statAddMutex
Add-station mutex status. It has the value Constants.mutexLocked if locked and Constants.mutexUnlocked otherwise. This is only relevant in C ET systems as this mutex is not used in Java systems.


endian

int endian
Endian of host running the ET system. This can have values of either Constants.endianBig or Constants.endianLittle.


share

int share
Flag specifying whether the operating system can share mutexes between processes. It has the value Constants.mutexShare if they can be shared and Constants.mutexNoShare otherwise. This is not relevant in Java ET systems.


mainPid

int mainPid
Unix pid of the ET system process. This is not relevant for Java ET systems, and C based ET systems on Linux may have several pids.


selects

int selects
The number of ints in a station's select array.

See Also:
Constants.stationSelectInts

events

int events
Total number of events in a system.

See Also:
SystemConfig.numEvents, SystemCreate.events

eventSize

int eventSize
Size of "normal" events in bytes.

See Also:
SystemConfig.eventSize

tempsMax

int tempsMax
Maximum number of temporary events allowed in the ET system. This is not relevant in Java ET systems.


stationsMax

int stationsMax
Maximum number of station allowed in the ET system.

See Also:
SystemConfig.stationsMax

attachmentsMax

int attachmentsMax
Maximum number of attachments allowed in the ET system.

See Also:
SystemConfig.attachmentsMax

processesMax

int processesMax
Maximum number of processes allowed in the ET system. This is not relevant in Java ET systems.


tcpPort

int tcpPort
Port number of the ET TCP server.

See Also:
SystemConfig.serverPort

udpPort

int udpPort
Port number of the ET UDP broadcast listening thread.

See Also:
SystemConfig.udpPort

multicastPort

int multicastPort
Port number of the ET UDP multicast listening thread.

See Also:
SystemConfig.multicastPort

interfaceCount

int interfaceCount
Number of network interfaces on the host computer.


multicastCount

int multicastCount
Number of multicast addresses the UDP server listens on.


interfaceAddresses

java.lang.String[] interfaceAddresses
Dotted-decimal IP addresses of network interfaces on the host.


multicastAddresses

java.lang.String[] multicastAddresses
Dotted-decimal multicast addresses the UDP server listens on.

See Also:
SystemConfig.getMulticastStrings(), SystemConfig.getMulticastAddrs(), SystemConfig.addMulticastAddr(java.lang.String), SystemConfig.removeMulticastAddr(java.lang.String)

etName

java.lang.String etName
The ET system (file) name.

See Also:
SystemCreate.SystemCreate(java.lang.String, org.jlab.coda.et.SystemConfig), SystemCreate.name
Constructor Detail

SystemData

public SystemData()
Method Detail

alive

public boolean alive()
Specifies whether the ET system is alive.


getHeartbeat

public int getHeartbeat()
Get the heartbeat count of the ET system process. It is not relevant in Java ET systems.


getTemps

public int getTemps()
Get the current number of temporary events.


getStations

public int getStations()
Get the current number of stations in the linked list (either active or idle).


getAttachments

public int getAttachments()
Get the current number of attachments.


getProcesses

public int getProcesses()
Get the current number of processes. It is not relevant in Java ET systems.


getEventsOwned

public int getEventsOwned()
Get the number of events owned by the system (not by attachments).


getMutex

public int getMutex()
Get the system mutex status. It has the value Constants.mutexLocked if locked and Constants.mutexUnlocked otherwise. This is only relevant in C ET systems as this mutex is not used in Java systems.


getStatMutex

public int getStatMutex()
Get the station mutex status. It has the value Constants.mutexLocked if locked and Constants.mutexUnlocked otherwise. This is only relevant in C ET systems as this mutex is not used in Java systems.


getStatAddMutex

public int getStatAddMutex()
Get the add-station mutex status. It has the value Constants.mutexLocked if locked and Constants.mutexUnlocked otherwise. This is only relevant in C ET systems as this mutex is not used in Java systems.


getEndian

public int getEndian()
Get the endian value of the host running the ET system. This can have values of either Constants.endianBig or Constants.endianLittle.


getShare

public int getShare()
Get the value specifying whether the operating system can share mutexes between processes. It has the value Constants.mutexShare if they can be shared and Constants.mutexNoShare otherwise. It is not relevant in Java ET systems.


getMainPid

public int getMainPid()
Get the Unix pid of the ET system process. Java ET systems return -1, and C based ET systems on Linux may have several, additional pids not given here.


getSelects

public int getSelects()
Get the number of ints in a station's select array.

See Also:
Constants.stationSelectInts

getEvents

public int getEvents()
Get the total number of events in a system.

See Also:
SystemConfig.numEvents, SystemCreate.events

getEventSize

public int getEventSize()
Get the size of "normal" events in bytes.

See Also:
SystemConfig.eventSize

getTempsMax

public int getTempsMax()
Get the maximum number of temporary events allowed in the ET system. This is not relevant in Java ET systems.


getStationsMax

public int getStationsMax()
Get the maximum number of station allowed in the ET system.

See Also:
SystemConfig.stationsMax

getAttachmentsMax

public int getAttachmentsMax()
Get the maximum number of attachments allowed in the ET system.

See Also:
SystemConfig.attachmentsMax

getProcessesMax

public int getProcessesMax()
Get the maximum number of processes allowed in the ET system. This is not relevant in Java ET systems.


getTcpPort

public int getTcpPort()
Get the port number of the ET TCP server.

See Also:
SystemConfig.serverPort

getUdpPort

public int getUdpPort()
Get the port number of the ET UDP broadcast listening thread.

See Also:
SystemConfig.udpPort

getMulticastPort

public int getMulticastPort()
Get the port number of the ET UDP multicast listening thread.

See Also:
SystemConfig.multicastPort

getInterfaces

public int getInterfaces()
Get the number of network interfaces on the host computer.


getMulticasts

public int getMulticasts()
Get the number of multicast addresses the UDP server listens on.


getInterfaceAddresses

public java.lang.String[] getInterfaceAddresses()
Get the dotted-decimal IP addresses of network interfaces on the host.


getMulticastAddresses

public java.lang.String[] getMulticastAddresses()
Get the dotted-decimal multicast addresses the UDP server listens on.

See Also:
SystemConfig.getMulticastStrings(), SystemConfig.getMulticastAddrs(), SystemConfig.addMulticastAddr(java.lang.String), SystemConfig.removeMulticastAddr(java.lang.String)

getEtName

public java.lang.String getEtName()
Get the ET system (file) name.

See Also:
SystemCreate.SystemCreate(java.lang.String, org.jlab.coda.et.SystemConfig), SystemCreate.name

read

void read(java.io.DataInputStream dis)
    throws java.io.IOException
Reads the system level information from a data stream which is sent out by an ET system over the network.

Parameters:
dis - data input stream
Throws:
java.io.IOException - if data stream read error