All Packages Class Hierarchy This Package Previous Next Index
Class CDF.Crate
java.lang.Object
|
+----CDF.CrateVme.CrateClient
|
+----CDF.Crate
- public class Crate
- extends CrateClient
Class which encapsulates all knowledge of a VME crate, including
the server id and the boards present. Contains the code to read in
this configuration from a file and save it.
-
baseAddr
- Matrix of Base Addresses, indexed by (type) x (ith occurance).
-
board
- Array of Boards, indexed by Slot
-
commandGroup
-
-
config
- Matrix of cfgFiles, indexed by (type) x (ith occurance).
-
crateClass
-
-
crateNum
- Crate Number
-
id
- Matrix of ID strings, indexed by (type) x (ith occurance).
-
idServer
- MVME Parameter
-
location
- MVME Parameter
-
n
- Array of numbers of modules, indexed by module type
-
pinger
-
-
serverName
- MVME Parameter
-
slot
- Matrix of Slot numbers, indexed by (type) x (ith occurance).
-
Crate()
- Null Constructor for EditConfig
-
Crate(int)
- Constructor for running w/o connection to any Crates
-
Crate(int, String)
- Crate Constructor with connections to VME
-
baseAddr()
- Returns the base Address array
-
baseAddr(int, int)
- Return the base address of a given board in the crate
Ex.
-
commandGroup()
-
-
configFile()
- Return the config file array for this crate
-
configFile(int, int)
- Return the config file of a given board in the crate
Ex.
-
crateClass()
-
-
createBoards(boolean)
- Creates Board Objects and fills board[] array.
-
createCrate(int, String, String)
-
-
getCrateClass(String)
- Reads the server name from a crate file
-
getDir(String)
-
-
getNext(int, int)
- Return the next slot number of a given board in the crate
-
getPrev(int, int)
- Return the previous slot number of a given board in the crate
-
getServerName(String)
- Reads the server name from a crate file
-
id()
- Returns the id Array for this crate
-
id(int, int)
- Return the id of a given board in the crate.
-
idServer()
- Get the server ID
-
init(int)
- Opens the crate
-
n()
- Get the number of boards array
-
n(int)
- Get the number of a given type of modules in the crate.
-
ping()
-
-
readCrateConfig(String)
- Read the Crate configuration from a file.
-
serverLocation()
- Get the server location
-
serverName()
- Get the server name
-
setBaseAddr(int[][])
- Sets the baseAddr[][] array (Not Recommended!)
-
setCommandGroup(int)
-
-
setConfigFile(String[][])
- Sets the configFile array (Not recommended!)
-
setCrateClass(String)
-
-
setID(String[][])
- Copies the input into the id array.
-
setIDServer(String)
-
-
setN(int[])
- Sets the number array - Not recommended!
-
setPingerVisible(boolean)
-
-
setServerLocation(String)
- Sets the server Location (Not recommended!)
-
setServerName(String)
- Sets the serverName (Not recommended!)
-
setSlot(int[][])
- Sets the slot Array -- Not recommended!
-
slot()
- Return the slot numbner array
-
slot(int, int)
- Return the slot number of a given board in the crate.
-
timerPing()
-
-
toString()
-
-
updateServer2Crate(int, String)
- Fills in the CDFcfg.server2crate Hashtable
-
writeCrateConfig(String)
- Write the Crate configuration to a file
location
protected String location
- MVME Parameter
serverName
protected String serverName
- MVME Parameter
idServer
protected String idServer
- MVME Parameter
n
protected int n[]
- Array of numbers of modules, indexed by module type
- See Also:
- n, n
slot
protected int slot[][]
- Matrix of Slot numbers, indexed by (type) x (ith occurance).
- See Also:
- slot, slot
id
protected String id[][]
- Matrix of ID strings, indexed by (type) x (ith occurance).
- See Also:
- id, id
config
protected String config[][]
- Matrix of cfgFiles, indexed by (type) x (ith occurance).
- See Also:
- configFile, configFile
baseAddr
protected int baseAddr[][]
- Matrix of Base Addresses, indexed by (type) x (ith occurance).
- See Also:
- baseAddr, baseAddr
board
public Board board[]
- Array of Boards, indexed by Slot
crateClass
protected String crateClass
commandGroup
protected int commandGroup
crateNum
protected int crateNum
- Crate Number
pinger
protected static Crate. CratePinger pinger
Crate
public Crate()
- Null Constructor for EditConfig
Crate
public Crate(int crNum)
- Constructor for running w/o connection to any Crates
- Parameters:
- crNum - The crate number
Crate
public Crate(int crNum,
String sName) throws InvalidName
- Crate Constructor with connections to VME
- Parameters:
- crNum - The crate number in the system
- sName - The IP name of the crate CPU
updateServer2Crate
public void updateServer2Crate(int cr,
String name)
- Fills in the CDFcfg.server2crate Hashtable
- Parameters:
- cr - Crate Number
- name - Server Name
getServerName
public static String getServerName(String filename)
- Reads the server name from a crate file
- Parameters:
- filename - The file to read
getCrateClass
public static String getCrateClass(String filename)
- Reads the server name from a crate file
- Parameters:
- filename - The file to read
readCrateConfig
public boolean readCrateConfig(String filename)
- Read the Crate configuration from a file.
- Parameters:
- filename - The name of the file to read from
init
public void init(int cnum)
- Opens the crate
createCrate
public static Crate createCrate(int iCrate,
String className,
String serverName)
createBoards
public void createBoards(boolean openConnection)
- Creates Board Objects and fills board[] array.
Calls Board Constructors by Reflection with different arguements:
VME : (String ConfigFile, int CrateNum, int SlotNum, int BaseAddr)
JAVA ONLY: (String ConfigFile, int CrateNum, int SlotNum)
- Builds up parameters to look Constructor
- Loops over types in crate
- Gets Constructor
- Loops over number of Boards for this type in crate
- Fills in parameters with values from Crate arrays
- Constructs Board, fills in board[] array
- Adds board to CDFcfg.boardList vector
- Parameters:
- openConnection - ==true -> Make connections to VME.
writeCrateConfig
public boolean writeCrateConfig(String filename)
- Write the Crate configuration to a file
- Parameters:
- filename - The name of the file to write
- Returns:
- == true -> written OK
n
public int[] n()
- Get the number of boards array
- Returns:
- Array of board type counters
n
public int n(int type)
- Get the number of a given type of modules in the crate.
Ex. # of Vrbs = crate.n[Vrb.type];
- Parameters:
- type - The type of board to count
- Returns:
- number of Boards of type type in this crate
setN
public void setN(int nVar[])
- Sets the number array - Not recommended!
- Parameters:
- nVar - values for the board counter array
slot
public int[][] slot()
- Return the slot numbner array
- Returns:
- Slot array for this crate
slot
public int slot(int type,
int idx)
- Return the slot number of a given board in the crate.
Ex. Crate.slot[Vrb.type][2]; returns the slot of the 3rd Vrb board
- Parameters:
- type - The type of board
- idx - The index (not id) of the board in the crate
- Returns:
- Slot of requested board
setSlot
public void setSlot(int slotVar[][])
- Sets the slot Array -- Not recommended!
- Parameters:
- slotVar - Double index array to set Slot array to
id
public String[][] id()
- Returns the id Array for this crate
- Returns:
- id array
id
public String id(int type,
int idx)
- Return the id of a given board in the crate.
Ex. Crate.id[Vrb.type][2]; returns the id of the 3rd Vrb board
- Parameters:
- type - The type of board
- idx - The index (not id) of the board in the crate
- Returns:
- String id of the board (not the identifier()...)
setID
public void setID(String idVar[][])
- Copies the input into the id array.
- Parameters:
- idVar - values for the id array
Not Recommended, doesn;t look like it works...
configFile
public String[][] configFile()
- Return the config file array for this crate
- Returns:
- configFile[][] array
configFile
public String configFile(int type,
int idx)
- Return the config file of a given board in the crate
Ex. Crate.configFile[Vrb.type][2]; returns the config file of the 3rd Vrb board
- Parameters:
- type - The type of board
- idx - The index (not id) of the board in the crate
- Returns:
- configFile of requested board
setConfigFile
public void setConfigFile(String configVar[][])
- Sets the configFile array (Not recommended!)
- Parameters:
- configVar - Values for the configFile Array
baseAddr
public int[][] baseAddr()
- Returns the base Address array
- Returns:
- baseAddr[][] array
baseAddr
public int baseAddr(int type,
int idx)
- Return the base address of a given board in the crate
Ex. Crate.baseAddr[Vrb.type][2]; returns the base address of the 3rd Vrb board
- Parameters:
- type - The type of board
- idx - The index (not id) of the board in the crate
- Returns:
- BaseAddr
setBaseAddr
public void setBaseAddr(int baseAddrVar[][])
- Sets the baseAddr[][] array (Not Recommended!)
- Parameters:
- baseAddrVar - values to set the array to
serverLocation
public String serverLocation()
- Get the server location
- Returns:
- s the Location of the server
setServerLocation
public void setServerLocation(String loc)
- Sets the server Location (Not recommended!)
- Parameters:
- loc - value for the location
serverName
public String serverName()
- Get the server name
- Returns:
- s the serverName for this crate
setServerName
public void setServerName(String sName)
- Sets the serverName (Not recommended!)
- Parameters:
- sName - value for the Server name
idServer
public String idServer()
- Get the server ID
setIDServer
public void setIDServer(String idSer)
crateClass
public String crateClass()
commandGroup
public int commandGroup()
setCrateClass
public void setCrateClass(String ccls)
setCommandGroup
public void setCommandGroup(int cmdGrp)
getNext
public int getNext(int type,
int slotNow)
- Return the next slot number of a given board in the crate
- Parameters:
- type - The type of board
- idx - The index (not id) of the board in the crate
- Returns:
- slot number of next Board in crate
getPrev
public int getPrev(int type,
int slotNow)
- Return the previous slot number of a given board in the crate
- Parameters:
- type - The type of board
- idx - The index (not id) of the board in the crate
- Returns:
- slot number of next Board in crate
getDir
public String[] getDir(String dirName)
ping
public void ping()
- Overrides:
- ping in class CrateClient
timerPing
public long timerPing()
toString
public String toString()
- Overrides:
- toString in class Object
setPingerVisible
public void setPingerVisible(boolean vis)
All Packages Class Hierarchy This Package Previous Next Index