Gilbert Carl Herschberger II wrote:
> IF a modem is connected to serial port 1, I could write this:
>
> device:modem://localhost/ports/serial/1?maxspeed=...
Actually, this could be even better... The above URI point to the serial
port, not the device *attached* to the serial port. Why not use this,
instead:
modem:device://localhost/ports/serial/1/attached?maxspeed=...
Take note of the alternating modem:device beginning of this URI...
> The device manager returns the raw device, and bnci converts it into
> the specified "jod.device.Modem" class.
If the JOS specific interpreter of these URI's is told that the "modem:"
protocol means "turn the object returned from device: into an object of
type jos.devices.Modem" then this would work.
Thus, for a VERY custom device, you could use this:
com.mycompany.devices.CardioPulseMeter:device://localhost/...
of you can set up and use custom drivers:
com.3com.modems.56KVoiceFaxModem:modem:device://localhost/...
What do you think?
> Since more types of devices than modems can be attached to the serial
> port, the device manager can only return the raw version of the
> device: the port itself.
That is only if you wish the URI to return a fully expressed device. You
may have defined protocols such as "modem:" that knows to convert the
device attached to the port into a modem object, and you may just have a
simple, raw device, which you can query, and then determine what it is.
But you should also have access to the port itself, independently. For
example, if I wish to set the maximum speed for the serial port, I have
to tell this to the serial port, *not* the attached device...
> To get at the raw serial port, you might use a URI like this:
>
> device:serial://localhost/ports/serial/1/?maxspeed=...
Once again, I think "serial:" should be *before* "device:" But anyway:
In this case, every "sub directory" of the URI will in reality also
signify a protocol. Such as:
com.custom.CustomModem:modem:serial:device://localhost/ports/serial/1/attached?maxspeed=...
> Starting with interfaces we have already named:
>
> ParallelPort
> SerialPort
> Modem
We can post a list of proposed device names, and have people comment on
device names which they don't like, while also adding their own proposed
device names. These device names should be as general as possible, and
should follow the typical class naming schemes we have accepted in JOS a
(or two?) year ago. Something like starting with a capital, using full
words, etc..
Things like:
Keyboard?keycount=104&functionkeys=true&layout=us-ascii
PointingDevice?commandcount=4
Mouse?buttoncount=3&wheel=true
ISDNAdapter?lines=2&dataline=true
EthernetAdapter?baud=100&encrypted=true
Monitor?toomanyparameters=very_true :)
etc..
An apparent issue is: do we add the word "Device" after these things?
> Like any smart factory, it must use a separate plug-in controller for
> each sub-scheme.
Apparently... Any piece of software must come in changeable modules. If
that cannot happen, it has the fate and performance of things like
Solaris, Windows, OS/2, etc... Look at Linux: everybody can put his
little piece inside, and thus everybody (almost, other story) is happy.
> For example, it seems to me that Modem has-a SerialPort. Or rather, a
> Modem has-a port. A port might be implemented as a real object.
The port is also on an I/O controller (which could very well be custom,
as most modern motherboards provide EPROM), which is on a PCI bus (or on
whatever bus Macs use), which is on the motherboard.
> public interface Modem {
> public Port getPort();
> public void setPort( Port v );
> }
What happens if the Modem is on a PCI slot? Maybe the modem should not
be responsible for knowing what port it's attached to, rather, the port
knowing what modem is attached to it?
--
"Learn from others' mistakes, for you won't live long
enough to make them all yourself..."
________________________________________________________________________
[EMAIL: mailto:[EMAIL PROTECTED]] [URL: http://www.outworld.org/people/al]
[TEL1: (30) +31 422392] [TEL2: (30) +31 428154] [CELL: (30) +937 110247]
[ADDRESS: 14 Argonafton St., Kalamaria, 551 31, Thessaloniki, Greece GR]
PLEASE DO NOT SEND ME ANY UNSOLICITED COMMERCIAL EMAIL [DSS: 0xDBEF8ECC]
_______________________________________________
Kernel maillist - [EMAIL PROTECTED]
http://jos.org/mailman/listinfo/kernel