On 7 Feb 2008 at 12:46, Dave Shield wrote:
> On 07/02/2008, Giuseppe Modugno <[EMAIL PROTECTED]> wrote:
> > Parameters for DVD records DVDREC2000 could be: record (on, off); time;
> > input
> > (front, rear); inputType (scart, composite,...);
> Presumably each individual DVD recorder can only have one instance
> of each of these elements? (Different recorders will presumably have
> different values)
Yes, of course.
> > a table with programs to record at a certain times; ...
> A distinct table for each recorder, I presume?
Sure.
> > Parameters for DVD players DVDPLA2000 could be: play (on, off); output
> > (front,
> > rear); videoOutput (composite, component, scart...)
> How much of this (if anything) is common between DVD recorders and
> DVD players?
Maybe some parameters are common, but it's not so important for our discussion.
> I'm assuming here that each player will have a single value for each of these
> settings (play, output, videoOutput, etc) This could be modelled using a
> simple
> table:
>
> dvdPlayerTable
> dvdPlayerEntry
> dvdPlayerIndex
> dvdPlayerStatus (on, off)
> dvdPlayerOutputLocation (front, rear)
> dvdPlayerOutputVType (composite, component, scart)
>
> Each individual player would be represented by one line in this table.
> If a box has several DVD players attached to it, then it would have
> multiple rows in the dvdPlayerTable. If it only comes with a single
> DVD player, then there would only be one row in the table. And if
> it doesn't have a DVD player at all, then this table would be empty.
Now I understand... your solution to my doubt is to use tables!
If I have devices named A, B, C, D and compose them in several ways, I can
create the following tables (suppose for the moment they haven't any common
parameters):
enterprises
mycompany
devATable
devAEntry
devAIndex
devA<param1>
devA<param2>
...
devBTable
devBEntry
devBIndex
devB<param1>
devB<param2>
...
devCTable
devCEntry
devCIndex
devC<param1>
devC<param2>
...
devDTable
devDEntry
devDIndex
devD<param1>
devD<param2>
...
In this way, it's the agent that says to the user how much devices and which
type of there are in the kit.
It's an elegant solution, I admit, but it's a bit confusing.
If I consider an agent inside each device, I would have a simple information
structure:
enterprises
mycompany
devA
devA<param1>
devA<param2>
...
devB
devB<param1>
devB<param2>
...
devC
devC<param1>
devC<param2>
...
devD
devD<param1>
devD<param2>
...
So the information database structure (and so the MIB associated to it) depends
on the "location" of the agent: if it's an "all devices agent" or a "single
device agent".
This is the paradox I can't simply accept.
> > a table with programs to record at a certain times;
> That would typically be handled by a "table-within-a-table" approach:
> dvdTimerTable
> dvdTimerEntry
> dvdTimerIndex
> dvdTimerStart
> dvdTimerFinish
>
> indexed by the pair (dvdRecorderIndex, dvdTimerIndex).
> Note that this would actually be defined as a completely
> separate table (not as a child of the main dvdRecorderTable).
> It's the use of a shared index object that sets it up as a
> table-within-a-table.
Ok
> In reality, you would need to think about:
> - all the "current settings" information that you might
> want to retrieve from these boxes
> (read-only columns in the table)
> - all the "control" operations that you might want
> to perform on these boxes, and the values these might accept
> (read-write/read-create columns)
Yes, I perfectly know what are the read-only and the read-write parameters to
insert in the structure. My question was how to organize and where to insert
these parameters in the main tree.
> All very hand-waving I know, but I hope this has been vaguely
> helpful.
Oh, sure. You are very effective when write something. My compliments and
thanks for your time and help.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders