On 14 Jul 2011 at 10:17, Fulko Hew wrote:
> I think you have 3 choices: enumerations, integers the way you are suggesting, and a simple
> integer.
>
> Enumerations:
>
> volumeControl OBJECT-TYPE
> SYNTAX INTEGER {
> mute  (1),
> level-5  (2),
> level-10  (3),
> level-15  (4),
> ...
> level-1000 (201)
> }

This is a very LONG list... so we agree to discard this choice.


> Integers:
>
> But why use enumerations at all when it comes to having so many choices?
> Just leave it as a plain integer between 0 and 1000 (where zero is 'off'/'mute')
>
> You might ask about the 'step by 5' issue? I would simply put it into the definition
> that only multiples of 5 are allowed, and then optionally code the agent so that
> if an intermediate value was actually 'set', that it would be rounded up/down
> to a legal value.

Ok about the steps by 5 in the description, but how can I associate 'mute' label in the MIB?  Could you write a short object definition in SMIv2?  Should I write only 'mute' for 0, ignoring other allowable values up to 1000?


> Simple Integer:
>
> Why not just have SYNTAX INTEGER (0..100)?
> Why the complicated 0 to 1000 with steps of 5? and a special 'mute' indicator?
>
> Personally... I'd go with INTEGER (0..100).

'mute' is very nice for the user because he can use it without remembering the associated value (in this case is 0, but it could be another value).

Also the steps are important: the value represents a real volume gain in dB: 5=0.5dB, 10=1.0dB... 1000=100.0dB.  It would be nice if the user can set directly the gain and not just an index of a list.


 
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to