|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--inp.camac.CamacDriver
CamacDriver is a basic abstract class to extend by real implementations of CAMAC hardware. Implemntations must have default constructor without parameters. This implementation of CamacDriver initialize instantiated by name class calling it's init() method. Application software must use the following code to load driver by class name
CamacDriver driver = CamacDriver.loadDriver("inp.camac.cc232.DriverCC232"); Crate crate = driver.getCrate(0); Module module = new Module(); crate.addModule(module,2); crate.Z(); crate.C(); crate.I(true); module.addLAMlistener(new myLAMlistener());
Constructor Summary | |
CamacDriver()
|
Method Summary | |
abstract void |
C(int crateN)
Execute C cycle in specified crate |
abstract void |
close(int crateN)
Close crate connectection and release all allocated resources for this crate |
abstract void |
executeNAF(int crateN,
int N,
int A,
int F,
int[] data,
int bits,
Module module)
Execute NAF in Crate |
Crate |
getCrate(int crateN)
|
abstract void |
I(int crateN,
boolean inhibit)
set I (inhibit) bus state |
abstract void |
init()
Implement here whatever needed to initialize camac driver called by loadDriver when new driver loaded. |
abstract void |
initCrate(int crateN)
Implement here whatever needed to initialize connection with crate controller. |
static CamacDriver |
loadDriver(java.lang.String className)
Get driver by class name |
void |
onLAM(int crateN,
int N)
Callback. |
abstract void |
setLAMMask(int crateN,
int mask)
set LAM bit mask to filter out LAM events only from given positions. |
abstract void |
Z(int crateN)
Execute Z cycle in specified crate |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public CamacDriver()
Method Detail |
public static CamacDriver loadDriver(java.lang.String className) throws java.lang.Exception
className
- driver class name to load and/or instantiate,public abstract void executeNAF(int crateN, int N, int A, int F, int[] data, int bits, Module module) throws java.io.IOException
crateN
- Crate number from 0 to MAXCRATESN
- Camac module position (1..24)A
- Camac subaddressF
- Camac functiondata
- Array of data, NAF will be executed as many times as data.length is.
If data is null than NAF will be executed once without data transfer.
In case of write operation, data from this array must be written
in target module. In case of read operation data read from module
must be placed in this array.bits
- Number of significant bits in data transfer. For some sort of
hardware this parameter might be usefull to reduce data transfer
time. Implementation might return either all 24 bits either only
required number of bitsModule
- module reference, Usefull in particular implementations to check
module.mustHaveX() and module.mustHaveQ() for correct exceptions
handling.public abstract void C(int crateN) throws java.io.IOException
crateN
- crate Numberpublic abstract void Z(int crateN) throws java.io.IOException
crateN
- crate Numberpublic abstract void I(int crateN, boolean inhibit) throws java.io.IOException
crateN
- crate Numberinhibit
- public abstract void initCrate(int crateN) throws java.io.IOException
public abstract void init() throws java.io.IOException
public abstract void setLAMMask(int crateN, int mask) throws java.io.IOException
crateN
- crate numbermask
- LAM mask. 1 enables LAM, 0 disables LAM.
LSB bit 0 of mask corresponds to position 1public abstract void close(int crateN)
crateN
- crate number to release.public Crate getCrate(int crateN) throws java.io.IOException
public void onLAM(int crateN, int N)
crateN
- crate numberN
- module position must be from 1 to 24.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |