Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#4 closed task (fixed)

Research how to access the low-level car control drivers

Reported by: Henrik Heimbuerger Owned by: Florian Roth
Priority: critical Milestone: MS1: First release (1.0.0)
Component: project Version: pre-1.0
Keywords: driver Cc:

Description

It has to be researched how JaCaVi is going to control the cars on the Carrera track.

This is not so much a technical problem as the Java-to-C aspect is mostly understood and well documented.
But communication with the other teams is necessary to get more detailed information on their interfaces.

In particular, we need to figure out how to integrate and use Marco's simulation project.

Change History (26)

comment:1 Changed 17 years ago by Henrik Heimbuerger

Status: newassigned

comment:2 Changed 17 years ago by SVN

New commit by hheimbuerger (revision [47]):
[Related to ticket #4] Added Marco Fahr's (preliminary?) diploma thesis to the repository.

Added Marco Fahr's diploma thesis to the repository. Herr Maechtel mentioned that Marco's application might be useful in JaCaVi for doing the simulation.

comment:3 in reply to:  description ; Changed 17 years ago by Florian Roth

Replying to hheimbuerger:

It has to be researched how JaCaVi is going to control the cars on the Carrera track.

This is not so much a technical problem as the Java-to-C aspect is mostly understood and well documented.
But communication with the other teams is necessary to get more detailed information on their interfaces.

In particular, we need to figure out how to integrate and use Marco's simulation project.

I checked out how JNI works by doing a HelloWorld?.
I thought we could use an existing (compiled) dynamic library (dll or so), take this and access it from Java by JNI to call their functions. THIS IS NOT.

But no problem.

We have to write an Java Class for each C-header(specifies the interfaces we need in JaCaVi). Then we can generate an JNI C-header. Then we have to implement the JNI C-header by including the original c-header and redirect JNI functions to the original C functions. Little C wrapper.

So if we've done that we must compile the given c-source to a dynamic library.

Thats about technics.

Just to let you know my sources and to contribute to a complete documentation. :-)

*How to compile JNI on Windows with cygwin
*How to configure eclipse cdt for JNI automation (really nice)
*Useful thread on JNI compile and linker problems

I think compiling JNI dynamic link library on Linux systems will be mutch easier... :-)

So now im in contact with Benjamin to figgure out the interface.
See you soon Sailamoon

comment:4 Changed 17 years ago by Florian Roth

Test

comment:5 in reply to:  3 Changed 17 years ago by Florian Roth

It has to be researched how JaCaVi is going to control the cars on the Carrera track.

This is not so much a technical problem as the Java-to-C aspect is mostly understood and well documented.
But communication with the other teams is necessary to get more detailed information on their interfaces.

In particular, we need to figure out how to integrate and use Marco's simulation project.

comment:6 Changed 17 years ago by Florian Roth

I checked out how JNI works by doing a HelloWorld?.
I thought we could use an existing (compiled) dynamic library (dll or so), take this and access it from Java by JNI to call their functions. THIS IS NOT.

But no problem.

We have to write an Java Class for each C-header(specifies the interfaces we need in JaCaVi). Then we can generate an JNI C-header. Then we have to implement the JNI C-header by including the original c-header and redirect JNI functions to the original C functions. Little C wrapper.

So if we've done that we must compile the given c-source to a dynamic library.

Thats about technics.

Just to let you know my sources and to contribute to a complete documentation. :-)

*How to compile JNI on Windows with cygwin *How to configure eclipse cdt for JNI automation (really nice)
*Useful thread on JNI compile and linker problems

I think compiling JNI dynamic link library on Linux systems will be mutch easier... :-)

So now im in contact with Benjamin to figgure out the interface.
See you soon Sailamoon

comment:7 Changed 17 years ago by SVN

New commit by froth (revision [48]):
[Related to ticket #4] + added HAL class diagram
I thought about the design in the Hardware Abstraction Layer (HAL) and modeled my thoughts in a class diagram.
This is a first concept and should be discussed.

comment:8 Changed 17 years ago by SVN

New commit by froth (revision [49]):
[Related to ticket #4] *added HAL class diagram
I added an first concept of HAL design to UML_Klassendiagramm.vsd in an extra class diagram.

comment:9 Changed 17 years ago by SVN

New commit by froth (revision [50]):
[Related to ticket #4] * changed some class names
I changed some names in the class diagram for better understanding

comment:10 Changed 17 years ago by SVN

New commit by froth (revision [51]):
[Related to ticket #4] + added Clib42 as an extra C project
Clib42 is the C library of the protocol group 42 for jacavi HAL jni support. CDT was used to build this.

comment:11 Changed 17 years ago by SVN

New commit by froth (revision [52]):
[Related to ticket #4] + all the files from the Clib42 library projects

comment:12 Changed 17 years ago by SVN

New commit by froth (revision [55]):
[Related to ticket #4] +added the fullBreak(int carID) support for lib42

comment:13 Changed 17 years ago by SVN

New commit by froth (revision [56]):
[Related to Ticket #4] +added carrera lib42 hal support

comment:14 Changed 17 years ago by SVN

New commit by froth (revision [57]):
[Related to ticket #4] Added the long expected sources of Marco's multithreaded carrera simulation driver

comment:15 Changed 17 years ago by SVN

New commit by froth (revision [58]):
[Related to ticket #4] Added an over-worked version of Marcos diploma thesis

comment:16 Changed 17 years ago by SVN

New commit by froth (revision [59]):
[Related to ticket #4] changed Final CarreraControler?

comment:17 Changed 17 years ago by SVN

New commit by froth (revision [60]):
[Related to ticket #4] updated the NativeLibraryFactory? and its implementation

comment:18 Changed 17 years ago by SVN

New commit by froth (revision [61]):
[Related to ticket #4] added an extra more specific interface for Clib42 car control
This interface specifies also functions for programming and configure cars

comment:19 Changed 17 years ago by SVN

New commit by froth (revision [62]):
[Related to ticket #4] updated NativeLib42 and the NativeLib42Adapter

comment:20 Changed 17 years ago by SVN

New commit by froth (revision [63]):
[Related to ticket #4] changed lib42.c because of given not need functionality
I did this because we use the sensor detection as an extra library.

comment:21 Changed 17 years ago by SVN

New commit by froth (revision [64]):
[Related to ticket #4] added the sensor detection library c project

comment:22 Changed 17 years ago by SVN

New commit by froth (revision [65]):
[Related to ticket #4] added the sensor detection library c project

comment:23 Changed 17 years ago by SVN

New commit by froth (revision [66]):
[Related to ticket #4] added the native CsdLib? class for sensor detection

comment:24 Changed 17 years ago by Henrik Heimbuerger

Milestone: MS1: First usable version

comment:25 Changed 17 years ago by Henrik Heimbuerger

Resolution: fixed
Status: assignedclosed

I think the research part on this is complete. Please file development notes on the integration of the project 42 library on ticket #16.

comment:26 Changed 17 years ago by SVN

New commit by froth (revision [70]):
[Related to ticket #4] added Marco's sources as eclipse project.

inclusive the carrera device driver

Note: See TracTickets for help on using tickets.