\subsubsection{Bruker Magnet Controller B-EC-1} SANS is using a Bruker magnet controller. This controller is integrated into SICS as a derivate of an environment controller. The Bruker controller can be operated in two modes: in the first the current is controlled, in the second the current is controlled by an external hall sensor giving the magnetic field. Whatever is the controlling sensor, the magnetic field and the current need to be read. Furthermore this device supports switching the polarity. All this is achieved with a special driver and an additional wrapper function for handling extra commands. All this is implemented in the file bruker.h and bruker.c. The functions defined are: \begin{verbatim} pEVDriver CreateBrukerDriver(int argc, char *argv[]); int BrukerReadField(pEVControl self, float *fField); int BrukerReadCurrent(pEVControl self, float *fCurrent); int BrukerAction(SConnection *pCon, SicsInterp *pSics, void *pData, int argc, char *argv[]); \end{verbatim} \begin{description} \item[CreateBrukerDriver] creates a driver for the bruker magnet controller. \item[BrukerReadField] reads the current magnetic field. \item[BrukerReadCurrent] reads the current current in Ampere. \item[BrukerAction] a special SICS interpreter wrapper function for the Bruker Magnet. This function handles the few special Bruker commands and passes everything else to the standard environment controller handler function. \end{description}