DAQ OS: front end libraries: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
* All vxWorks- or UNIX-specific functions must have identical names and interfaces and must be included in kernels, BSPs or separate libraries, so board-specific library will be generic. In particular following functions must be available: | * All vxWorks- or UNIX-specific functions must have identical names and interfaces and must be included in kernels, BSPs or separate libraries, so board-specific library will be generic. In particular following functions must be available: | ||
sysBusToLocalAdrs(int modifier,(char *)addr,(char **)&laddr) | sysBusToLocalAdrs(int modifier,(char *)addr,(char **)&laddr) | ||
vxMemProbe((char *)addr,int,int,(char *)&data) | |||
* Every board has distinctive name, for example v1495 or tdc1190. That name must be used in the files name, as well as in function names and global names to avoid duplicates. At least two files must be provided, for example v1495.c and v1495.h, where header file will be used in user readout lists. | * Every board has distinctive name, for example v1495 or tdc1190. That name must be used in the files name, as well as in function names and global names to avoid duplicates. At least two files must be provided, for example v1495.c and v1495.h, where header file will be used in user readout lists. |
Revision as of 11:09, 14 April 2011
All front end libraries are licated in $CODA/src/rol/code.s directory. To compile use gmake clean, gmake and gmake install. For vxWorks use clon10/clon00 servers only (it will work on RHEL as well, but historically we do it on sparc machines).
Generic software development rules
- All vxWorks- or UNIX-specific functions must have identical names and interfaces and must be included in kernels, BSPs or separate libraries, so board-specific library will be generic. In particular following functions must be available:
sysBusToLocalAdrs(int modifier,(char *)addr,(char **)&laddr) vxMemProbe((char *)addr,int,int,(char *)&data)
- Every board has distinctive name, for example v1495 or tdc1190. That name must be used in the files name, as well as in function names and global names to avoid duplicates. At least two files must be provided, for example v1495.c and v1495.h, where header file will be used in user readout lists.
- Board initialization function must have at least three following arguments (as first arguments):
first board address (as it set by onboard switches) address step between boards the number of boards
It does a scan looking for all available boards and assign board IDs starting from 0. All individual board operations must be performed using that ID. It returns the number of boards found.