E852 Fastbus and CAMAC access library
General Information
To use the routines documented hereby, one should include the bsi.h
include file and link with libfastbus.a library.
The original Postscript manual
The original document created by A.Ostrovidov is here.
Initialization routines
- void bbcrate_(const int *bbfc,unsigned *retcode) - select the BBFC crate address for further Fastbus operations
-
- Arguments:
- bbfc: address of the BBFC, 1 for FastTrailer, 2 for LGD Hut.
- retcode: FEERR - invalide crate address, FENORMAL - success.
- int intini_(const int*level) - initialize the interface
-
- Arguments:
- level: initialize: 0-library, 1-interface, 2-both. User programs should use level 0.
- Return value:
- 0 - success
- BSI_ERR_INT - something is wrong with the BranchBus device driver (/dev/bb).
- BSI_ERR_PWR - something is wrong with the selected BBFC crate
(an attempt to read csr0 from nonexistant slot 31 is different from "Fastbus AS timout").
- int ssp_for_si_(const int *fbpa) - define SSP used as SI mediator
- Arguments:
fbpa: address of an SSP.
- int out_bsierr_(void) - output last BSI error message to stderr.
- Arguments: None.
Hardware allocation routines.
To prevent race conditions between different programs trying
to access the hardware simultaneously,
programs should allocate and deallocate the hardware.
To sets of hardware allocation routines exist: one set is to allocate all the hardware
and another set to allocate only hardware in the LGD hut.
- int allocate_hardware_(int *waitTime) - allocate all the hardware
-
- Arguments:
- waitTime: time to wait for others to deallocate the hardware. 0 means wait forever.
- Return value:
- 0 - success
- 1 - timeout
- -1 - error
- int deallocate_hardware_(void) - deallocate all the hardware
- int allocate_hardware_hut_(int *waitTime) - allocate the LGD hut hardware
-
- Arguments:
- waitTime: time to wait for others to deallocate the hardware. 0 means wait forever.
- Return value:
- 0 - success
- 1 - timeout
- -1 - error
- int deallocate_hardware_hut_(void) - deallocate the LGD hut hardware
Access to Fastbus devices
- -
- Arguments:
:
- -
- Arguments:
:
- -
- Arguments:
:
Access to CAMAC devices
//
CO 1995-03-26, incomplete
end file