LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-15-2004, 05:13 AM   #1
gamehack
Member
 
Registered: Jun 2003
Location: Sevenoaks, UK
Distribution: Ubuntu
Posts: 183

Rep: Reputation: 30
Hal


Hello all,

I want to integrate HAL into an application but I cannot find any HOWTO. Does somebody know if some tutorials exist?

Thanks
 
Old 12-15-2004, 06:26 AM   #2
Marius2
Member
 
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 276

Rep: Reputation: 31
Huh? What exactly do you mean by the term "HAL"? If you're talking about the hardware abstraction layer, you don't integrate that in an application since it's already there, and as long as you stick to using the OS you are using it automatically (since, for example, you don't talk to the graphics adapter directly, you're using Xlib or whichever graphics library).
 
Old 12-15-2004, 07:01 AM   #3
gamehack
Member
 
Registered: Jun 2003
Location: Sevenoaks, UK
Distribution: Ubuntu
Posts: 183

Original Poster
Rep: Reputation: 30
I meant this http://www.freedesktop.org/wiki/Software_2fhal
 
Old 12-15-2004, 07:25 AM   #4
Marius2
Member
 
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 276

Rep: Reputation: 31
It's already in your X server, you don't have to add anything to your application than Xlib (and, if required, its extensions).
 
Old 12-15-2004, 11:30 AM   #5
kamstrup
Member
 
Registered: Aug 2003
Location: Aarhus, Denmark
Distribution: Slackware, Ubuntu
Posts: 122

Rep: Reputation: 15
From the HAL faq:
Quote:
The fun can begin when (existing) libraries for accessing devices adopts HAL. The simplest use-case would be accessing a camera. The application programmer uses HAL for finding a camera device; he then tosses the HAL device id to the camera library and gets the pictures. In the process the application programmer is not concerned with any hardware specific parts of the device.

Other future applications of HAL include handling of pluggable storage, network-transparent device access, device ACL's, locking of devices etc. Right now we are working on the basics.

-- Main.DavidZeuthen - 24 Nov 2003
Isn't that contradicting your claims Marius2 ?
 
Old 12-16-2004, 12:54 AM   #6
Marius2
Member
 
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 276

Rep: Reputation: 31
Quote:
Originally posted by kamstrup
[...]
Isn't that contradicting your claims Marius2 ?
No - actually the opposite is the case.

Maybe a small sketch may shed more light on this, we're talking of the following layers:

gamehacks application
|
|talks to, through standardized interfaces
V
X server (Xlib for example, that's the libs mentioned by Mr. Zeuthen)
|
|talks to, through its own interfaces
V
HAL
|
|talks to, through OS and implementation specific interfaces
V
driver
|
|talks to, through hw specific interfaces (=hw registers)
V
hardware

As you can see, an application would not talk to the HAL directly. Actually it would be a bad idea to do so (its very well possible, at least if you have the appropriate bindings), since the HAL may be implementation specific, that is: XFree86 HAL may be completely different from Xorg HAL (while the interfaces to application level are the same).
 
Old 12-16-2004, 01:38 AM   #7
kamstrup
Member
 
Registered: Aug 2003
Location: Aarhus, Denmark
Distribution: Slackware, Ubuntu
Posts: 122

Rep: Reputation: 15
I must admit not being a X hacker in any way, but how would XLib be aware of digital cameras? I would more excpect this to be a Gnome thing..?
 
Old 12-16-2004, 02:03 AM   #8
Marius2
Member
 
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 276

Rep: Reputation: 31
I did not say that Xlib can handle cameras (if it can, I'd rather
suspect the functionality to be in the X extensions). This was
just to illustrate the relation to Mr. Zeuthens remark.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
hal krusty_lab Fedora 3 10-10-2005 10:23 AM
HAL... the circle. Peingune Linux - Newbie 10 08-16-2005 06:01 AM
HAL demon chocobanana Linux - Hardware 1 06-06-2005 05:24 PM
Mounting a HD under HAL rtcary Linux - General 4 05-07-2005 12:29 PM
Mounting HD using HAL rtcary Linux - Newbie 1 03-14-2005 06:56 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration