esone.c File Reference


Detailed Description

The ESONE CAMAC standard call file

Definition in file esone.c.

Go to the source code of this file.

Functions

INLINE void ccinit (void)
INLINE int fccinit (void)
INLINE void cdreg (int *ext, const int b, const int c, const int n, const int a)
INLINE void cssa (const int f, int ext, unsigned short *d, int *q)
INLINE void cfsa (const int f, const int ext, unsigned long *d, int *q)
INLINE void cccc (const int ext)
INLINE void cccz (const int ext)
INLINE void ccci (const int ext, int l)
INLINE void ctci (const int ext, int *l)
INLINE void cccd (const int ext, int l)
INLINE void ctcd (const int ext, int *l)
INLINE void cdlam (int *lam, const int b, const int c, const int n, const int a, const int inta[2])
INLINE void ctgl (const int ext, int *l)
INLINE void cclm (const int lam, int l)
INLINE void cclnk (const int lam, void(*isr)(void))
INLINE void cculk (const int lam)
INLINE void ccrgl (const int lam)
INLINE void cclc (const int lam)
INLINE void ctlm (const int lam, int *l)
INLINE void cfga (int f[], int exta[], int intc[], int qa[], int cb[])
INLINE void csga (int f[], int exta[], int intc[], int qa[], int cb[])
INLINE void cfmad (int f, int extb[], int intc[], int cb[])
INLINE void csmad (int f, int extb[], int intc[], int cb[])
INLINE void cfubc (const int f, int ext, int intc[], int cb[])
INLINE void csubc (const int f, int ext, int intc[], int cb[])
INLINE void cfubr (const int f, int ext, int intc[], int cb[])
INLINE void csubr (const int f, int ext, int intc[], int cb[])


Function Documentation

INLINE void cccc const int  ext  ) 
 

Control Crate Clear.

Generate Crate Clear function. Execute cam_crate_clear()

Parameters:
ext external address
Returns:
void

Definition at line 188 of file esone.c.

INLINE void cccd const int  ext,
int  l
 

Control Crate D.

Enable or Disable Crate Demand.

Parameters:
ext external address
l action l=0 -> Clear D, l=1 -> Set D
Returns:
void

Definition at line 262 of file esone.c.

INLINE void ccci const int  ext,
int  l
 

Control Crate I.

Set or Clear Dataway Inhibit, Execute cam_inhinit_set() /clear()

Parameters:
ext external address
l action l=0 -> Clear I, l=1 -> Set I
Returns:
void

Definition at line 223 of file esone.c.

INLINE void cccz const int  ext  ) 
 

Control Crate Z.

Generate Dataway Initialize. Execute cam_crate_zinit()

Parameters:
ext external address
Returns:
void

Definition at line 205 of file esone.c.

INLINE void ccinit void   ) 
 

CAMAC initialization

CAMAC initialization must be called before any other ESONE subroutine call.

Returns:
void

Definition at line 67 of file esone.c.

INLINE void cclc const int  lam  ) 
 

Control Clear LAM.

Clear the LAM of the station pointer by the lam address.

Parameters:
lam external address
Returns:
void

Definition at line 423 of file esone.c.

INLINE void cclm const int  lam,
int  l
 

Control Crate LAM.

Enable or Disable LAM. Execute F24 for disable, F26 for enable.

Parameters:
lam external address
l action l=0 -> disable LAM , l=1 -> enable LAM
Returns:
void

Definition at line 343 of file esone.c.

INLINE void cclnk const int  lam,
void(*)(void)  isr
 

Link LAM to service procedure

Link a specific service routine to a LAM. Since this routine is executed asynchronously, care must be taken on re-entrancy.

Parameters:
lam external address
isr name of service procedure
Returns:
void

Definition at line 366 of file esone.c.

INLINE void ccrgl const int  lam  ) 
 

Relink LAM

Re-enable LAM in the controller

Parameters:
lam external address
Returns:
void

Definition at line 403 of file esone.c.

INLINE void cculk const int  lam  ) 
 

Unlink LAM from service procedure

Performs complementary operation to cclnk.

Parameters:
lam external address
Returns:
void

Definition at line 386 of file esone.c.

INLINE void cdlam int *  lam,
const int  b,
const int  c,
const int  n,
const int  a,
const int  inta[2]
 

Control Declare LAM.

Declare LAM, Identical to cdreg.

Parameters:
lam external LAM address
b branch number (0..7)
c crate number (0..)
n station number (0..30)
a sub-address (0..15)
inta implementation dependent
Returns:
void

Definition at line 306 of file esone.c.

INLINE void cdreg int *  ext,
const int  b,
const int  c,
const int  n,
const int  a
 

Control Declaration REGister.

Compose an external address from BCNA for later use. Accessing CAMAC through ext could be faster if the external address is memory mapped to the processor (hardware dependent). Some CAMAC controller do not have this option see Supported hardware.

Parameters:
ext external address
b branch number (0..7)
c crate number (0..)
n station number (0..30)
a sub-address (0..15)
Returns:
void

Definition at line 104 of file esone.c.

Referenced by cdlam().

INLINE void cfga int  f[],
int  exta[],
int  intc[],
int  qa[],
int  cb[]
 

Control Full (24bit) word General Action.

Parameters:
f function code
exta[] external address array
intc[] data array
qa[] Q response array
cb[] control block array
cb[0] : number of function to perform
cb[1] : returned number of function performed
Returns:
void

Definition at line 462 of file esone.c.

INLINE void cfmad int  f,
int  extb[],
int  intc[],
int  cb[]
 

Control Full (24bit) Address Q scan.

Scan all sub-address while Q=1 from a0..a15 max from address extb[0] and store corresponding data in intc[]. If Q=0 while A<15 or A=15 then cross station boundary is applied (n-> n+1) and sub-address is reset (a=0). Perform action until either cb[0] action are performed or current external address exceeds extb[1].

implementation of cb[2] for LAM recognition is not implemented.

Parameters:
f function code
extb[] external address array
extb[0] : first valid external address
extb[1] : last valid external address
intc[] data array
cb[] control block array
cb[0] : number of function to perform
cb[1] : returned number of function performed
Returns:
void

Definition at line 516 of file esone.c.

INLINE void cfsa const int  f,
const int  ext,
unsigned long *  d,
int *  q
 

Control Full Operation.

24 bit operation on a given external CAMAC address.

The range of the f is hardware dependent. The number indicated below are for standard ANSI/IEEE Std (758-1979) Execute cam24i for f<8, cam24o for f>15, camc_q for (f>7 or f>23)

Parameters:
f function code (0..31)
ext external address
d data long word
q Q response
Returns:
void

Definition at line 160 of file esone.c.

Referenced by cfga(), cfubc(), and cfubr().

INLINE void cfubc const int  f,
int  ext,
int  intc[],
int  cb[]
 

Control Full (24bit) Block Repeat with Q-stop.

Execute function f on address ext with data intc[] while Q.

Parameters:
f function code
ext external address array
intc[] data array
cb[] control block array
cb[0] : number of function to perform
cb[1] : returned number of function performed
Returns:
void

Definition at line 613 of file esone.c.

INLINE void cfubr const int  f,
int  ext,
int  intc[],
int  cb[]
 

Repeat Mode Block Transfer (24bit).

Execute function f on address ext with data intc[] if Q. If noQ keep current intc[] data. Repeat cb[0] times.

Parameters:
f function code
ext external address array
intc[] data array
cb[] control block array
cb[0] : number of function to perform
cb[1] : returned number of function performed
Returns:
void

Definition at line 676 of file esone.c.

INLINE void csga int  f[],
int  exta[],
int  intc[],
int  qa[],
int  cb[]
 

Control (16bit) word General Action.

Parameters:
f function code
exta[] external address array
intc[] data array
qa[] Q response array
cb[] control block array
cb[0] : number of function to perform
cb[1] : returned number of function performed
Returns:
void

Definition at line 485 of file esone.c.

INLINE void csmad int  f,
int  extb[],
int  intc[],
int  cb[]
 

Control (16bit) Address Q scan.

Scan all sub-address while Q=1 from a0..a15 max from address extb[0] and store corresponding data in intc[]. If Q=0 while A<15 or A=15 then cross station boundary is applied (n-> n+1) and sub-address is reset (a=0). Perform action until either cb[0] action are performed or current external address exceeds extb[1].

implementation of cb[2] for LAM recognition is not implemented.

Parameters:
f function code
extb[] external address array
extb[0] : first valid external address
extb[1] : last valid external address
intc[] data array
cb[] control block array
cb[0] : number of function to perform
cb[1] : returned number of function performed
Returns:
void

Definition at line 568 of file esone.c.

INLINE void cssa const int  f,
int  ext,
unsigned short *  d,
int *  q
 

Control Short Operation.

16 bit operation on a given external CAMAC address.

The range of the f is hardware dependent. The number indicated below are for standard ANSI/IEEE Std (758-1979) Execute cam16i for f<8, cam16o for f>15, camc_q for (f>7 or f>23)

Parameters:
f function code (0..31)
ext external address
d data word
q Q response
Returns:
void

Definition at line 125 of file esone.c.

Referenced by csga(), csubc(), and csubr().

INLINE void csubc const int  f,
int  ext,
int  intc[],
int  cb[]
 

Control (16bit) Block Repeat with Q-stop.

Execute function f on address ext with data intc[] while Q.

Parameters:
f function code
ext external address array
intc[] data array
cb[] control block array
cb[0] : number of function to perform
cb[1] : returned number of function performed
Returns:
void

Definition at line 644 of file esone.c.

INLINE void csubr const int  f,
int  ext,
int  intc[],
int  cb[]
 

Repeat Mode Block Transfer (16bit).

Execute function f on address ext with data intc[] if Q. If noQ keep current intc[] data. Repeat cb[0] times.

Parameters:
f function code
ext external address array
intc[] data array
cb[] control block array
cb[0] : number of function to perform
cb[1] : returned number of function performed
Returns:
void

Definition at line 707 of file esone.c.

INLINE void ctcd const int  ext,
int *  l
 

Control Test Crate D.

Test Crate Demand.

Parameters:
ext external address
l D cleared -> l=0, D set -> l=1
Returns:
void

Definition at line 284 of file esone.c.

INLINE void ctci const int  ext,
int *  l
 

Test Crate I.

Test Crate Inhibit, Execute cam_inhibit_test()

Parameters:
ext external address
l action l=0 -> Clear I, l=1 -> Set I
Returns:
void

Definition at line 244 of file esone.c.

INLINE void ctgl const int  ext,
int *  l
 

Control Test Demand Present.

Test the LAM register.

Parameters:
ext external LAM register address
l l !=0 if any LAM is set.
Returns:
void

Definition at line 323 of file esone.c.

INLINE void ctlm const int  lam,
int *  l
 

Test LAM.

Test the LAM of the station pointed by lam. Performs an F8

Parameters:
lam external address
l No LAM-> l=0, LAM present-> l=1
Returns:
void

Definition at line 441 of file esone.c.

INLINE int fccinit void   ) 
 

CAMAC initialization with return status

fccinit can be called instead of ccinit to determine if the initialization was successful

Returns:
1 for success, 0 for failure

Definition at line 81 of file esone.c.


Midas DOC Version 1.9.5 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Sergio Ballestrero - Suzannah Daviel - Doxygen - Peter Green - Qing Gu - Greg Hackman - Gertjan Hofman - Paul Knowles - Rudi Meier - Glenn Moloney - Dave Morris - John M O'Donnell - Konstantin Olchanski - Renee Poutissou - Tamsen Schurman - Andreas Suter - Jan M.Wouters - Piotr Adam Zolnierczuk