GSI, , Software
| Computing | HADES | HADES @ GSI | GSI |

Using external Hardware

To use external Hadware, such as ADCs or so on, you need to access a memory-area, which is used to communicate with the external modules. But because of the internal structure of a multitasking system it is very difficult to allow programs to access the memory directly.

The solution for this is to create a virtual memory segment, which is nothing else than a mirror of the physical memory segment you want to access.

If you want to use some external modules, it's not necessary to know about this. So I built some C++-classes, which take control of all these stuff.

The main class is crate. All classes for the modules of the crates should be a child of this class. This concept is for those people who don't want to learn all the details about using the hardware.

If you use a module in Camac crate the basis class for the module class should be camac, because you can only use sixteen Camac crates as the same time, so it is enough to specifie one single module to know the crate number and the slot number (in the crate). On the other hand the creation of the memory segment is not the same as the creation of another (eg. VME) module. Because of some internal restrictions in Camac systems, its helpfull to create one single memory segment for all modules in one Camac crate. So the Camac-class ensures, that only one segment per crate will be created.

So, this is the whole class concept at this time:
This class handles the memory, it's the basis for all other classes
This class handles the memory in a special way for the Camac crates, it should be the basis for all camac modules
This is a VME module
This is a Camac 64 channel ADC
This is a Camac TDC (the class is not tested yet)
This class handles all functions of the HADES-TDC.

The files are stored with CVS.
To get the files you should start
. setcvs mdc new
first (you could use this at the ~/.profile). Then start
cvs co MdcClasses
to get a local copy of these files. If you want to write changes to the MdcClasses-library use:
cvs commit [-m] "short description of your changes" [filename]
If you omit the -m option with the log message text, CVS starts an editor in order that you put a log message. If you don't give a file name the message is defined for all files modified since the last 'commit'.

If there are some problems with this classes, that should be solved; some new classes classes you want to have for another module; some questions about this stuff: PLEASE WRITE AN EMAIL TO !

last updated, Thomas Bretz, 26.9.1997@GSI