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. |
| 3 | This is a listing and description of the HAL design JaCaVi is using to give control information to and get sensor information from the hardware. |
| 4 | |
15 | | === !CarreraControler === |
16 | | Defines the almost the minimum of functionality used by jacavi to control an carrera hardware implementation. |
| 8 | * '''ConnectorConfigurationManager''' Holds and manages several SlotCarSystemConnectors. |
| 9 | * '''ConnectorFactory''' Factory Interface includes method declarations to create the several SlotCarSystemConnectors |
| 10 | * '''FeedbackSignal''' The feedback signal contains sensor (sensor detection, Gforce) information given from the hardware back over the FeedbackConnectors |
| 11 | * '''Gforce''' Consits of x,y acceleration given back from the hardware (bluerider) |
| 12 | * '''SlotCarSystemConnector''' Consits of a SlotCarSystemDriveConnector and a SlotCarFeedbackConnector and some members to give the ConnectorConfigurationManager the |
| 13 | opportunity to manage SlotCarSystemConnector instances. An instance lets you control one (technology) specific car and get its feedback. |
| 14 | * '''SlotCarFeedbackConnector''' Implemented by an specific FeedbackConnectorAdapter it gives the interface to poll the latest FeedbackSignal from the Hardware |
| 15 | * '''SlotCarSystemDriveConnector''' Implemented by an specific FeedbackDriveConnectorAdapter it gives the functionality to control a car on the hardware |
| 16 | * '''SlotCarSpeedAdjuster''' In fact we get a CarController (speed) signal from devices or driving agent in range of 0-100 and we have several speed ranges on the hardware |
| 17 | (0-15 lib42; 0-255 bluerider; 0-? analogue) we have to adjust the signal before we give it to the hardware or get it from the hardware. This |
| 18 | is what the SlotCarSpeedAdjuster does. |
| 19 | * '''SlotCarSystemConnectorFactory''' implements the ConnectorFactory for creation of (technology) specific SlotCarSystemConnectors |
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. |
| 24 | * '''NativeLib42''' Singelton jni interface to access the underlying c library (Clib42) for 42 digital car control support |
| 25 | * '''NativeCsdLib''' Singelton jni interface to access the underlying c library (CsdLib) fro 42 digital car sensor detection |
| 26 | * '''Lib42DriveConnector''' lib42 specified interface extends from SlotCarSystemDriveConnector |
| 27 | * '''Lib42FeedbackConnector''' lib42 specified interface extends from SlotCarFeedbackConnector |
| 28 | * '''Lib42DriveConnectorAdapter''' implements Lib42Drive Connector. The car connector for one car (specified by a carID) to control a car on the digital course. |
| 29 | Maps conrol functionality on NativeLib42 instance |
| 30 | * '''Lib42FeedbackConnectorAdapter''' implements Lib42FeedbackConnector. Gets and holds the feedback from one digital car (specified by a carID). |
| 31 | A Lib42FeedbackConnectorAdapter must be subscribed to the Lib42FeedbackManager to get its feedback from NativeCsdLib. |
| 32 | * '''Lib42FeedbackManager''' Distributes digital sensor feedback to the subscribed Lib43FeedbackConnectorAdapters. Every subscribed Adapter will only get his |
| 33 | feedback specified by carID. |