Opened 16 years ago

Closed 15 years ago

#3185 closed enhancement (fixed)

Device Manager Application

Reported by: PieterPanman Owned by: stippi
Priority: normal Milestone: R1
Component: Applications/Devices Version: R1/Development
Keywords: Cc: olive@…
Blocked By: Blocking:
Platform: All

Description

I'm working on a new Device Manager application. I know there's one in preferences/devices, but personally I'm not too charmed by it, and it doesn't work now. Therefore I'm putting my design online here, and I'll report as I make more progress. Feedback will be much appreciated. It looks a bit like the ubuntu hardware information application. I've included a screenshot of what I got working so far.

Interesting points:

  • Support for many different bus types (PCI, USB, SCSI, ...)
  • Allow a dump to text file or email
  • Report hardware support from this application.

P.S. there is no Devices or DeviceManager component.

Attachments (5)

DeviceManager.png (99.4 KB ) - added by PieterPanman 16 years ago.
Screenshot of what is to come
Design.txt (5.1 KB ) - added by PieterPanman 16 years ago.
connection_view.png (109.0 KB ) - added by PieterPanman 15 years ago.
Sort by connection
category_view.png (86.9 KB ) - added by PieterPanman 15 years ago.
Sort by category
devices.patch (46.5 KB ) - added by PieterPanman 15 years ago.
new patch with cleaned up sources

Download all attachments as: .zip

Change History (36)

by PieterPanman, 16 years ago

Attachment: DeviceManager.png added

Screenshot of what is to come

by PieterPanman, 16 years ago

Attachment: Design.txt added

comment:1 by stippi, 16 years ago

Looks like a good start! Thanks for working on it!

comment:2 by stippi, 16 years ago

The Design plan looks cool too! You've thought about a lot.

What the BeOS Device preflet was also supposed to do is let you assign resources. But since Haiku can't do this at the moment anyways, it's good to focus on the reporting capabilities you have thought up for now.

comment:3 by PieterPanman, 16 years ago

Yeah I saw that. My thoughts are that configuration of devices can go into another tab view when that time comes, and each bus type can provide its own interface. (so an isa configurable device will also provide a view with config options, etc, etc.) Then we'll also need a button to add a device manually, etc. That's for later.

This would also justify naming it DeviceManager, instead of Devices. Judging the names of the other preference apps, its name should be DeviceManager, not Device Manager.

There will probably need to be some changes to the kernel required to provide some information. For example, on which PCI device a USB hub is. This way I can place all USB devices under that hub, under that PCI device. Also, which driver is loaded for which device. I don't believe this information is available now.

Anyway, work in progress, pardon our dust.

comment:4 by axeld, 16 years ago

Component: PreferencesApplications/Devices
Owner: changed from axeld to nobody

I would say it should be called "Devices" and be put under "Applications" instead of "Preferences", as it doesn't change any preferences; configuring devices is only interesting for ISA, and since that is, well, completely obsolete, I don't see any value in creating a GUI for this - text mode configuration will have to be enough, if you want that pain.

comment:5 by karmak, 16 years ago

Cc: olive@… added

comment:6 by PieterPanman, 16 years ago

Ah well, real life caught up with me and I'm fairly occupied with studying. I am working on this application a little bit at a time, when I have more, I'll show progress here.

by PieterPanman, 15 years ago

Attachment: connection_view.png added

Sort by connection

by PieterPanman, 15 years ago

Attachment: category_view.png added

Sort by category

comment:7 by PieterPanman, 15 years ago

Yeah, I'm still alive :) Attached two screenshots to keep you in the loop. I've implemented both basic "sort by" modes, so you can now sort either by connection or by category. The display of the data will be done in a nicer looking way (either using the GridLayout, or a ColumnListView ala sounds preferences).

I cleaned up the code a bit and it's now using the layout manager properly. After I've finished my todo list of basic Device functionality (and added USB support) I'll offer it to be included in the haiku tree, if it is deemed good enough. Then I'm sure it can be improved more with some changes to the actual Device Manager (for example, automatically refresh on hw changes, showing drivers used, device paths published etc). For those of you interested, the source and executable are here: (only for haiku) http://www.panman.eu/haiku/devices.zip

comment:8 by stippi, 15 years ago

I've tried it and I think it's really nice already! How about we include this as it is and you continue to work on it? Something not being 100% finished has never been a reason to exclude it from Haiku, has it? :-)

Now I am going to have a look at the source... you did follow the guides lines closely, did you?

comment:9 by PieterPanman, 15 years ago

You can look, but I didn't particularly follow the style guidelines yet, just some common sense stuff. Keep in mind it is a WIP. I will clean it up soon, but if you see any glaring error, feel free to point it out. If you do look at it, I was wondering why the bottom scrollbar always has a small drag button. I would expect it to grow as you make the ScrollView bigger. I have to say I'm really liking the layout manager, but we're severely lacking documentation for it. How about adding doxygen to it?

comment:10 by stippi, 15 years ago

The code looks pretty good, but it could definitely follow our style guide yet more closely. It would be great if you could read the style guide again and adjust a few aspects of the code accordingly. It's just that we are trying hard to have everything in the repo be consistent, especially when checking in new code. Thanks a lot for your work, it's very much appreciated, I wanted to be able to use such an app very much, and your plans for it (especially the reporting features, according to the docs) are also very nice!

As for your question, the BOutlineListview and BScrollView do have layout friendly constructors, I saw you don't use them, but maybe the problem you saw has another reason.

comment:11 by PieterPanman, 15 years ago

Thanks for your feedback. I understand and I'll apply it more thoroughly. Will also try the layout friendly constructors, see if that helps. FYI, I have a todo list on top op Devices.cpp.

comment:12 by PieterPanman, 15 years ago

That should have been Device.cpp. Btw, you can access it on my svn. Compiling is a little tricky as you need to have a built haiku tree for the PCI dev id header file. Will be solved as soon as I integrate it into Haiku's tree and jam.

co svn://svn.panman.eu/devicemanager/trunk devices

comment:13 by leavengood, 15 years ago

This looks pretty cool. Pieter I urge you to fix up the code to match to our coding guidelines and get it in Haiku's SVN repo ASAP. This way we other developers can test it out, evaluate the code more easily, and maybe even help you out on it. I know it can be scary to "release your baby" to the world, but that is the best way to make sure it gets tested and improved.

comment:14 by PieterPanman, 15 years ago

Version: R1/pre-alpha1R1/Development

You are right, I've been busy and distracted with fun alpha stuff... Yesterday I have been working on cleaning up the code some, and formatting the properties in a bcolumnlistview. I will create a patch in the coming week to get this puppy committed. Then I can update it with patches as I go along improving it.

comment:15 by Meanwhile, 15 years ago

Will the patch deal with the double usage of the word 'by', if I may ask?

(Just removing all the instances of 'by' from the drop-down list would fix it... but you could of course also leave the drop-down list's content as it is now, and merely change 'Order by:' into 'Order:')

comment:16 by PieterPanman, 15 years ago

Good catch, that's double indeed, will fix it, thanks.

comment:17 by PieterPanman, 15 years ago

After a week of fun coding, I'm now presenting the information in a nicer view (Grid layout of StringViews), fixed some memory leaks, added about window, added menu bar etc. Last todos:

  • clean up code according to style guidelines
  • Return proper Device and DevicePCI values
  • Fix last memory leak I think is still present
  • 'Release' first basic version

I'm not sure I have time this week, but I just wanted to let you know the status. Latest version is at http://www.panman.eu/haiku/Devices.zip code is still at svn://svn.panman.eu/devicemanager/trunk (for review only, needs modifications to get it to compile in the haiku tree)

comment:18 by axeld, 15 years ago

Can you provide a patch to trunk so that we can put this in the repository? Shouldn't hurt, at least.

comment:19 by PieterPanman, 15 years ago

Sure, it is pretty much ready for inclusion with the Haiku tree. One thing, I am also referring to the generated pci.ids header from the old Devices Preference. Since it doesn't seem logical to have this coupled to an application at all, maybe such header files can be placed in a better location so all applications that require such headers can get them from a logical place. A bit like an device_enumeration directory in the source? These refer to the enumeration data:

Anyway, working on a patch now.

comment:20 by PieterPanman, 15 years ago

Patch attached. Note that it already adds it to the image and it creates a link to it. You can revert that, if you wish. Looking forward to feedback. I'm aware that it doesn't yet fully follow the style guidelines, I'll fix that soon, but now I have to get back to my study.

comment:21 by stippi, 15 years ago

Owner: changed from nobody to stippi
Status: newassigned

I got this to build properly. Shall I go ahead and commit? (Without first fixing all coding style issues. That can be subject of another patch... :-)

One question: Basic Info and Bus seem to be the same view, the column list view on the last page seems to contain the very same info again. Shall I remove the tabs and just leave the column list view? This seems to be easiest to read. One could also group the information, if that is somehow possible.

comment:22 by PieterPanman, 15 years ago

Thanks for looking at it. Another patch is coming up, probably next week though.

Regarding the tabs, those are the last points on my list. Also check out the design document... I want the basic info to contain only basic information (name, manufacturer, driver and possibly paths published). The bus tab will contain information specific to PCI/USB/Bluetooth devices, depending on which type of device it is, and the detailed tab contains all attributes. I just haven't finished that yet, is not much work. For later: The bus specific tab can for example get all the USB details that lsusb gets, presented in a pretty tree. If you like, you can leave it out of the HaikuImage, but commit it the source, then I can provide a new patch. I'd rather not work out of two repositories.

comment:23 by PieterPanman, 15 years ago

I can work on it for a bit tonight (amsterdam time), fixing the last bits and supply an updated patch to commit it to the tree. Or you can commit this now and I'll supply a smaller patch to update the tree. Just let me know which route you prefer, so we can prevent doing double work.

Thanks!

comment:24 by PieterPanman, 15 years ago

Ok never mind :)

I'm working on cleaning up the patch now, expect a better full patch soon.

comment:25 by PieterPanman, 15 years ago

I've created a new patch with cleaned up sources.

  • I've tried to stick to the conventions, if I missed something, please shout.
  • Reworked the tab content. I hope this version shows more clearly the meaning of the different tabs and their content. (even the bus tab name changes when you select a different device)
  • I've reused the icon of the old devices preflet. I'm crediting the authors of both listdev and the old devices preflet, as I've used a bit of both. Hope that's ok this way.

by PieterPanman, 15 years ago

Attachment: devices.patch added

new patch with cleaned up sources

comment:26 by PieterPanman, 15 years ago

Sorry, I really should hit the preview button first next time, wiki formatting... Let's try that again:

I've created a new patch with cleaned up sources.

  • I've tried to stick to the conventions, if I missed something, please shout.
  • Reworked the tab content. I hope this version shows more clearly the meaning of the different tabs and their content. (even the bus tab name changes when you select a different device)
  • I've reused the icon of the old devices preflet. I'm crediting the authors of both listdev and the old devices preflet, as I've used a bit of both. Hope that's ok this way.

comment:27 by PieterPanman, 15 years ago

Happy Begeistered guys... Hope you're having fun! I'm still looking forward to feedback on the patch, whenever you got time.

comment:28 by PieterPanman, 15 years ago

Thanks for committing it Stephan! I've reviewed your changes, I will try to keep those style things in mind.

Just a question though, doesn't this break the build, as some jamfiles still refer to the old devices preference directory? For example, these jam files: http://haiku.it.su.se:8180/source/search?q=%22%3Csrc!preferences!devices%3E%22&defs=&refs=&path=&hist=

comment:30 by PieterPanman, 15 years ago

This can probably be closed as it is included now. Problems can be new tickets. I am currently busy with my master's thesis, and have no time. Hopefully in May I can work on issues reported and improvements I had in mind.

comment:31 by axeld, 15 years ago

Resolution: fixed
Status: in-progressclosed

Good luck with your thesis, then!

Note: See TracTickets for help on using tickets.