View Full Version : Serial plugin DUI: Style questions
Mark F
April 2nd, 2005, 03:19 PM
Before anyone asks, I have no style. :)
As you know, the Serial plugin supports many devices at the same time. If I want to make a configuration UI for each one, should the plugin add a configuration page to the tree for each one or should I have a single page where you go to choose which device you want to configure and switch to the device specific page from there?
Also, I think I should add a new node to the command tree for "Serial Commands" instead of adding the commands to an existing node. The full-blown DUI example doesn't add a new node, it adds commands to the Girder node. Should I add the Serial plugin commands to the Legacy node?
Is there a specific direction you'd like things to go? Or a style you'd like us to adopt so everything works the same way?
birty
April 2nd, 2005, 04:41 PM
i think that if you are going to add more than one item then you should definately add it to your own group rather than filling the girder group up with lots of items, i havent tested this but i think it may be possible to add a group inside the girder group which is another option you could use
Ron
April 2nd, 2005, 05:42 PM
As you know, the Serial plugin supports many devices at the same time. If I want to make a configuration UI for each one, should the plugin add a configuration page to the tree for each one or should I have a single page where you go to choose which device you want to configure and switch to the device specific page from there?
I was talking to Mike and here is what we think would be good (which might differ from what you think is good :-) )
Use the configuration pages, have 1 page hooked in by default, on that page you have a list of available comports (use lua here) with the device attached to it.
There would be 3 buttons on that page, 1 = Add Device, 2=Edit device, 3=delete device. These buttons would add or edit a device by replacing the current DUI Page, see ActionPage5_6Callback in main.cpp. That way you'd have a separate configuration page for each device.
Also, I think I should add a new node to the command tree for "Serial Commands" instead of adding the commands to an existing node. The full-blown DUI example doesn't add a new node, it adds commands to the Girder node. Should I add the Serial plugin commands to the Legacy node?[/code]
Look at the DUI.h There is a structure called "Groups[]", simply generate a GUID and choose a name and add it to that list, then use that one to hook your node into. You can even choose to hook into one of the existing nodes (though I would not do that).
[quote]Is there a specific direction you'd like things to go? Or a style you'd like us to adopt so everything works the same way?
|I think we are all trying to figure out what works here, I'd say if you have a ton of nodes that simply do not fit into the existing groups, add your own!
Promixis
April 2nd, 2005, 10:02 PM
I am thinking that the plugin page would list all the com ports in a list box. A com port would be selected and then linked to a device (as descirbed by a lua file)
ie...
COM1: Powerlinc
COM2: Not used
COM4: HAI Omni
The actually port config could reside entirely in the lua file as it would in most instances never change.
Each device may have some parameters to change... ie the callerid serial file would allow specification of the modem init string. So a device file could specify its own dui.
Is that what we talked about Ron? :lol:
Ron
April 2nd, 2005, 11:22 PM
Yeah, that's what I said, you are just trying to get a higher post count. :-)
Promixis
April 3rd, 2005, 07:20 AM
I already have that 8)
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.