Re: How to implement a very long enumerated variable

2011-07-19 Thread Robert Story
On Tue, 19 Jul 2011 12:18:02 +0200 Giuseppe wrote: GM> Now suppose the device is turned off and on again, and the user sends GET requests of mute and volumeLevel variables. Which value should the agent return for volumeLevel, if the value 30 wasn't permanently saved in a non-volatile memory? I

Re: How to implement a very long enumerated variable

2011-07-19 Thread Niels Baggesen
On Tue, Jul 19, 2011 at 12:18:02PM +0200, Giuseppe Modugno wrote: >"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> > http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> > > > Please disable HTML mails! /Niels -- Niels Baggesen - @home - Århus - Denmark - n...@user

Re: How to implement a very long enumerated variable

2011-07-19 Thread Dave Shield
My immediate reaction to this discussion is that the model is getting too complicated. I'd be inclined to implement this as a single integer value, with a range running from -1 to 1000 The description of the object would indicate the restriction on acceptable values, and any attempt to SET

Re: How to implement a very long enumerated variable

2011-07-19 Thread Giuseppe Modugno
On 18 Jul 2011 at 15:56, Robert Story wrote: > On Mon, 18 Jul 2011 10:28:58 +0200 Giuseppe wrote: > GM> What do you think?  Are my thoughts correct? > > You are correct, except for the part about needing non-volatile storage. If > you have non-volatile storage, you could

Re: How to implement a very long enumerated variable

2011-07-18 Thread Robert Story
On Mon, 18 Jul 2011 10:28:58 +0200 Giuseppe wrote: GM> The only possibility I see to implement two SNMP variables in the agent is to store the last volume level inside the agent before muting the amplifier: GM> GM> old_volume = volume_get(); GM> volume_set(-1); GM> GM> So when the amplifier

Re: How to implement a very long enumerated variable

2011-07-18 Thread Fulko Hew
On Mon, Jul 18, 2011 at 4:28 AM, Giuseppe Modugno wrote: > ** > On 15 Jul 2011 at 8:26, Fulko Hew wrote: > > On Fri, Jul 15, 2011 at 3:10 AM, Giuseppe Modugno > > wrote: > > > In this case, when the amplifier is muted, there's no idea > > > about the last gain level to restore w

Re: How to implement a very long enumerated variable

2011-07-18 Thread Giuseppe Modugno
On 15 Jul 2011 at 8:26, Fulko Hew wrote: > On Fri, Jul 15, 2011 at 3:10 AM, Giuseppe Modugno > wrote: > > 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 encod

Re: How to implement a very long enumerated variable

2011-07-15 Thread Fulko Hew
On Fri, Jul 15, 2011 at 3:10 AM, Giuseppe Modugno wrote: > ** > On 14 Jul 2011 at 14:38, Fulko Hew wrote: > > On Thu, Jul 14, 2011 at 1:56 PM, Robert Story > > wrote: > > Another option is to define a separate object for mute.. the > > atvantage being > > that they can unm

Re: How to implement a very long enumerated variable

2011-07-15 Thread Giuseppe Modugno
On 14 Jul 2011 at 14:38, Fulko Hew wrote: > On Thu, Jul 14, 2011 at 1:56 PM, Robert Story > 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 >

Re: How to implement a very long enumerated variable

2011-07-14 Thread Fulko Hew
On Thu, Jul 14, 2011 at 1:56 PM, Robert Story wrote: > On Thu, 14 Jul 2011 12:16:00 -0400 Fulko wrote: > FH> Ahh. 'Gain' is different than volume. Knowing that, I'd define it as > FH> below. > FH> I'd leave the concept of 'muted' as something that the management > system > FH> implements. Ie.

Re: How to implement a very long enumerated variable

2011-07-14 Thread Robert Story
On Thu, 14 Jul 2011 12:16:00 -0400 Fulko wrote: FH> Ahh. 'Gain' is different than volume. Knowing that, I'd define it as FH> below. FH> I'd leave the concept of 'muted' as something that the management system FH> implements. Ie. When the user selects 'muted' the NMS sends -1. If the FH> NMS re

Re: How to implement a very long enumerated variable

2011-07-14 Thread Fulko Hew
On Thu, Jul 14, 2011 at 11:33 AM, Giuseppe Modugno wrote: > ** > On 14 Jul 2011 at 10:17, Fulko Hew wrote: > ... snip ... > > 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? >

Re: How to implement a very long enumerated variable

2011-07-14 Thread Robert Story
On Thu, 14 Jul 2011 15:46:56 +0200 Giuseppe wrote: GM> > Simply define the special enums in the mib, and the text description can GM> > describe the 0-1000 by five restriction. GM> GM> Are you suggesting something similar? GM> GM> volumeControl OBJECT-TYPE GM> SYNTAX INTEGER{ mute

Re: How to implement a very long enumerated variable

2011-07-14 Thread Giuseppe Modugno
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

Re: How to implement a very long enumerated variable

2011-07-14 Thread Fulko Hew
On Thu, Jul 14, 2011 at 9:46 AM, Giuseppe Modugno wrote: > ** > On 14 Jul 2011 at 7:38, Robert Story wrote: > > On Thu, 14 Jul 2011 11:39:54 +0200 Giuseppe wrote: > > GM> I have to add a variable in a private MIB. This integer variable > represents an audio volume and it can assume values in

Re: How to implement a very long enumerated variable

2011-07-14 Thread Giuseppe Modugno
On 14 Jul 2011 at 7:38, Robert Story wrote: > On Thu, 14 Jul 2011 11:39:54 +0200 Giuseppe wrote: > GM> I have to add a variable in a private MIB. This integer variable represents an audio volume and it can assume values in the range 0..1000, by steps of 5: > GM> > GM>   0, 5,

Re: How to implement a very long enumerated variable

2011-07-14 Thread Robert Story
On Thu, 14 Jul 2011 11:39:54 +0200 Giuseppe wrote: GM> I have to add a variable in a private MIB. This integer variable represents an audio volume and it can assume values in the range 0..1000, by steps of 5: GM> GM> 0, 5, 10, 15, 20, ... 995, 1000 GM> GM> Moreover, it can assume another speci

How to implement a very long enumerated variable

2011-07-14 Thread Giuseppe Modugno
I have to add a variable in a private MIB. This integer variable represents an audio volume and it can assume values in the range 0..1000, by steps of 5:   0, 5, 10, 15, 20, ... 995, 1000 Moreover, it can assume another special meaning value that means Mute (for examp