| 1 | = Code design of the 42 integration = |
| 2 | |
| 3 | The design / implementation / (integration) of lib42 for accessing the real Hardware consists of the following elements: |
| 4 | |
| 5 | == c projects (given librarys) == |
| 6 | |
| 7 | === Clib42 === |
| 8 | This shared library supports to control the digital carrera course (hardware) over the 42 Blackbox. To control the hardware it's accessing /dev/ttyS1 serial device. -> minicom must be started on /dev/ttyS1 to activate the serial interface. Jacavi is using this library by native calls. |
| 9 | |
| 10 | === !CsdLib === |
| 11 | This library is also part of Clib42. It supports the sensor detection on the digital carrera course over the 42 Blackbox. In feasibility study of the 42 protocol group it was more efficient to integrate both, drive control and sensor detection, in one library. Now the design of jacavi uses a more modular concept so we decided to have an extra shared library to achieve the jacavi sensordetection interface. It uses /dev/ttyS0 serial interface witch has to be started before use with minicom. |
| 12 | |
| 13 | == package de.jacavi.hal == |
| 14 | |
| 15 | === !CarreraControler === |
| 16 | Defines the almost the minimum of functionality used by jacavi to control an carrera hardware implementation. |
| 17 | |
| 18 | === !CarreraLibraryType === |
| 19 | Enumeration of several technologies to access carrera hardware. |
| 20 | |
| 21 | === !CarreraNativeLibraryFactory === |
| 22 | Factory to get a !CarreraController of an particular !CarreraLibraryType |
| 23 | |
| 24 | === !FirstCarreraNativeLibraryFactory === |
| 25 | (I know it's a silly name) An implementation of the !CarreraNativeLibraryFactory |
| 26 | |
| 27 | == package de.jacavi.hal.lib42 == |
| 28 | |
| 29 | === !NativeLib42 === |
| 30 | This class offers to access the complete functionality of the Clib42. It loads the c library and redirects all calls to it. Its the interface to access Clib42 functionality. |
| 31 | |
| 32 | === !Clib42CarreraController === |
| 33 | An Controller interface with base de.jacavi.hal.!CarreraController. It's more specific to lib42 and its functionality. |
| 34 | |
| 35 | === !NativeLib42Adapter === |
| 36 | Illustrates an adapter between native library and java on java side. It was intended to fix compatibility problems or and adapt the functionality for given interfaces. It is an implementation of the Clib42CarreraController. |
| 37 | |
| 38 | === !NativeCsdLib === |
| 39 | This class offers to get information about sensors activated by a passing car. This is implemented by a callback function. An object of the class loads the !CsdLib for accesing its functionality. |
| 40 | |
| 41 | == Usage == |
| 42 | ->Get an !CarreraNativeLibraryFactory object. |
| 43 | |
| 44 | ->Select an !CarreraLibraryType and get an !CarreraController object |