Doubt with SEQUENCE

Felipe Augusto de Souza <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CANM38fQ9RDNYtURia_WQZRfYk7QMs8cG2S5pnxGZO1gys2_wsw@mail.gmail.com>
Hi everbody,

It is not a matter of net-snmp usage but I've googled and not found an
answer.

I have been defining a MIB to my application it has two data to be
exchanged:

currentControllerTime OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      mandatory
    DESCRIPTION
    ""
    ::= {Test 2 }

END

It is in net-snmp-examples and OK, it works well. My application respond to
a GET easily.

However, I have been trying to set a structure which is intended to be a
command with two paramaters (actually, two integers), but I always need to
be sent together.

I am trying to do like this:

Command ::= SEQUENCE {
commandNumber     Integer32,
secondsOfCommand  Integer32
}


imposeCommand OBJECT-TYPE
    SYNTAX      Command
    MAX-ACCESS  read-write
    STATUS      mandatory
    DESCRIPTION
    ""
    ::= {Test 1 }

It is not working.

Is it possible to set the variable secondsOfCommand by setting
imposeCommand.secondsOfCommand ? Will the commandNumber be a ".0" in the
OID tree and the secondsOfCommand a "1". (Seeing the example I need to
define each variable in imposeCommand with a ::= { Command 1} )

How I can make this variables be set together ? Only by defining a PDU
error in my application ?

Is Sequence only for define a row in a table ?

Best Regards,

Felipe Augusto de Souza

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.