On Fri, Jul 15, 2011 at 3:10 AM, Giuseppe Modugno
<[email protected]>wrote:

> **
>   On 14 Jul 2011 at 14:38, Fulko Hew wrote:
>   > On Thu, Jul 14, 2011 at 1:56 PM, Robert Story <[email protected]>
>   > wrote:
>   >     Another option is to define a separate object for mute.. the
>   >     atvantage being
>   >     that they can unmute and the gain will still be at it's previous
>   >     level..
>   >
>   > Excellent point, and great idea!
>   >
>   >
>   > gainControl OBJECT-TYPE
>   > SYNTAXINTEGER (0..1000)
>   > MAX-ACCESSread-write
>   > STATUScurrent
>   > DESCRIPTION"The 'gainControl' variable allows you to set the
>   > gain of the device between 0 and 100dB in units
>   > tenths of a dB (i.e. 111 == 11.1dB).
>   >           Note: Some systems may not allow that level of
>   >           granularity and may round off any actual value
>   >           provided. e.g. 0.5dB increments. In that case
>   > the variable when read, will indicate the actual
>   > value in operation, not the value requested.
>   >
>   > See also 'muteControl' for controlling the actual
>   >           output."
>   > UNITS"tenths of a dB"
>   > DEFVAL { -1 }
>   >
>   > ::= { parentNode 1 }
>   >
>   > muteControl OBJECT-TYPE
>   > SYNTAXINTEGER {
>   >    muted  (1),
>   > un-muted (2)
>   > }
>   > MAX-ACCESSread-write
>   > STATUScurrent
>   > DESCRIPTION"The 'muteControl' variable allows you to
>   > enable/disable the output independently of
>   > the value of 'gainControl'."
>   > DEFVAL { un-muted }
>   >
>   > ::= { parentNode 2 }
>
>
>    Thank you, Fulko and Robert, to give some answers for my questions.
>
>    I think this approach is the best among the others. In my case,
> unfortunately, I can't follow it, because of the device under control logic.
>

Just because the hardware works one way, doesn't mean you
can't 'present it' a different way. Sometimes this kind of alternate
thinking can future-proof your designs.

  It's an audio amplifier and implements a gain level control similar to a
> "rotary encoder" with a switch: you turn the encoder right and the gain
> increases; turn the encoder left and the gain decreases up to a minimum.
> Continue turning it left to close the switch and mute the amplifier.
>

So it really is a volume control.  So you can either use the original
suggestion, (with either zero or -1 implying mute),
Or you can still use the 2nd approach, and 'map' it onto your current
hardware.
(I.e When the volume control moves onto and away from zero, it affects
both the mute _and_ gain variables, and when moving around anywhere
_but_ zero, it only affects the gain variable.)

Your choice.

  In this case, when the amplifier is muted, there's no idea about the last
> gain level to restore when the switch is open again turning the encoder
> right.
>

Doesn't this imply that the variable(s) are/should-be 'read-only' for this
current hw?


>   I think the approach with two OIDs can be adapted to an amplifier with a
> rotary encoder for the gain level control and a *separate* switch for the
> mute.
>

If you think about it... it could apply to both hardware implementations.
------------------------------------------------------------------------------
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