This is an archived, read-only instance of the JaCaVi Trac. This site is no longer actively maintained. Registration and login have been disabled. Content is preserved for reference only.

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#16 closed feature (fixed)

Implement the 42 library

Reported by: Henrik Heimbuerger Owned by: Florian Roth
Priority: major Milestone: MS1: First release (1.0.0)
Component: hal Version: pre-1.0
Keywords: lib42, hal Cc:

Description

Integrate the 42 library.

Early advancements on this can be found on ticket #4.

Change History (27)

comment:1 Changed 18 years ago by Henrik Heimbuerger

Status: newassigned

comment:2 Changed 18 years ago by Henrik Heimbuerger

Summary: Integrate the 42 library.Integrate the 42 library

comment:3 Changed 18 years ago by SVN

New commit by froth (revision [89]):
[Related to ticket#16] removed NativeCsdLib42.java this is functionality is given in NativeCsdLib?.java

comment:4 Changed 18 years ago by SVN

New commit by froth (revision [90]):
[Related to ticket#16] removed CarController?.java this is functionality is given in CarreraControler?.java

comment:5 Changed 18 years ago by SVN

New commit by froth (revision [91]):
[Related to ticket#16] removed PacecarController?.java this is functionality is given in an other controler or isnt used by jacavi

comment:6 Changed 18 years ago by Florian Roth

The design / implementation / (integration) of lib42 for accessing the real Hardware consists of the following elements:

c projects (given librarys)

Clib42
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.

CsdLib?
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.

package de.jacavi.hal

CarreraControler?
Defines the almost the minimum of functionality used by jacavi to control an carrera hardware implementation.

CarreraLibraryType?
Enumeration of several technologies to access carrera hardware.

CarreraNativeLibraryFactory?
Factory to get an CarreraControler? of an particular CarreraLibraryType?

FirstCarreraNativeLibraryFactory?
(I know its a silly name) An implementation of the CarreraNativeLibraryFactory?

package de.jacavi.hal.lib42

NativeLib42
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.

Clib42CarreraControler
An Controler interface with Base de.jacavi.hal.CarreraControler??. Its more specific to lib42 and its functionality

NativeLib42Adapter
Ilustrates 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 Clib42CarreraControler.

NativeCsdLib?
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.

Usage
->Get an CarreraNativeLibraryFactory? object.
->Select an CarreraLibraryType? and get an CarreraControler? object

comment:7 Changed 18 years ago by Florian Roth

Status: assignedaccepted

comment:8 Changed 18 years ago by SVN

New commit by froth (revision [118]):
[Related to ticket #16] added a nativeLibraryFactoryBean in the applicationContext.xml

Use this bean to give the player an TechnologyController? by calling the factory with an CarreraNativeLibraryType?

comment:9 Changed 18 years ago by SVN

New commit by froth (revision [119]):
[Related to ticket #16] changed FirstCarreraNativeLibraryFactor? to support Spring Beans added lib42TachnologyBean

comment:10 Changed 18 years ago by SVN

New commit by froth (revision [121]):
[Related to ticket #16] changed FirstCarreraNativeLibraryFactory? implementation

comment:11 Changed 18 years ago by SVN

New commit by froth (revision [126]):
[Related to ticket #16] added test folder for test cases

comment:12 Changed 18 years ago by SVN

New commit by froth (revision [164]):
[Related to ticket #16] added an Helper to check the os under jacavi

comment:13 Changed 18 years ago by SVN

New commit by froth (revision [171]):
[Related to ticket #16] added some javadoc comments and descriptions

comment:14 Changed 18 years ago by SVN

New commit by froth (revision [174]):
[Related to ticket #16] added an build ofthe lib42 native hal code

consisting of libClib42.so
and libCsdLib.so

comment:15 Changed 18 years ago by SVN

New commit by froth (revision [178]):
[Related to ticket #16] added an SpeedNormalizer? to adjust the speed

You can know normalized speed of the several devices (0-100) to the specific hardware speed and back

comment:16 in reply to:  6 Changed 18 years ago by Henrik Heimbuerger

Replying to froth:

The design / implementation / (integration) of lib42 for accessing the real Hardware consists of the following elements:
[...]

Created a wiki page from the description: CodeDesignFortyTwoIntegration

comment:17 Changed 18 years ago by Henrik Heimbuerger

Component: unspecifiedhal
Type: enhancementfeature

comment:18 Changed 18 years ago by Florian Roth

Summary: Integrate the 42 libraryImplement the 42 library

comment:19 Changed 18 years ago by SVN

New commit by froth (revision [209]):
[Related to ticket #16] added a destructor to free the native lib42

comment:20 Changed 18 years ago by SVN

New commit by froth (revision [210]):
[Related to ticket #16] added support for the feedback channel of lib42

Currently I cannot find an consistent interface for feedback channel of all the several hal technologies. So I added an marker interface called SlotCarFeedbackConnector?.

Lib42FeedbackConnector is the specialized interface for lib42 technologie and is implemented by Lib42FeedbackConnectorAdapter where you can find the callback function to be used by the TDA

comment:21 Changed 18 years ago by Florian Roth

Keywords: lib42 hal added; 42 removed
Resolution: fixed
Status: acceptedclosed

comment:22 Changed 18 years ago by Florian Roth

Resolution: fixed
Status: closedreopened

comment:23 Changed 18 years ago by SVN

New commit by froth (revision [239]):
[Related to ticket #16] changed the abstarction of hal and the implementation of the native lib42 stuff

comment:24 Changed 18 years ago by Florian Roth

Resolution: fixed
Status: reopenedclosed

comment:25 Changed 18 years ago by SVN

New commit by froth (revision [299]):
[Related to ticket #16] changed the initialisation of the c lib 42

comment:26 Changed 18 years ago by SVN

New commit by froth (revision [301]):
[Related to ticket #16] added the new compilations for 42 driving and sensor detection support

comment:27 Changed 18 years ago by SVN

New commit by froth (revision [302]):
[Related to ticket #16] fixed some 42 bugs and an Check.Precondition bug

now all works fine I tested with two players and two 42 cars.

Note: See TracTickets for help on using tickets.