[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Design pattern



HI,

What do you yall think of the following design pattern found in the
the MEGACO MIB module.
 megacoMib MODULE-IDENTITY
       LAST-UPDATED   "200304181200Z"
       ORGANIZATION   "IETF"
       CONTACT-INFO
        "
        Postal:
        Bala Pitchandi
        UTStarcom Inc
        33 Wood Avenue South
        Iselin, NJ 08830

        Phone:
        +1 (732)452-4457

        Email:
        bs@utstar.com
        "

--- example starts here
medGwyLinkIdTable OBJECT-TYPE
       SYNTAX       SEQUENCE OF MedGwyLinkIdEntry
       MAX-ACCESS   not-accessible
       STATUS       current
       DESCRIPTION
        "This table contains a nextLinkId for each Gateway.
         It provides the manager with the nextLinkId for use
         in creating new Gateway Table Entries."
   ::= { medGwyConfiguration 1}

   medGwyLinkIdEntry OBJECT-TYPE
       SYNTAX       MedGwyLinkIdEntry
       MAX-ACCESS   not-accessible
       STATUS       current
       DESCRIPTION 
       "This table contains the NextLinkId for this Gateway
       and is indexed by mediaGatewayId."
       INDEX        { medGwyGatewayId }
   ::= { medGwyLinkIdTable 1 }

   MedGwyLinkIdEntry ::= SEQUENCE
   {
       medGwyNextLinkId                    TestAndIncr         -- rw
   }

   medGwyNextLinkId OBJECT-TYPE
       SYNTAX        TestAndIncr
       MAX-ACCESS    read-write
       STATUS        current
       DESCRIPTION
        "The Next Value for a MediaGateway LinkId.  Assists the
         manager in selecting a value for medGwyGatewayLinkId.
         Using the TestAndIncr syntax, A Manager will 'lock' this
         variable, ensuring single access."
   ::= { medGwyLinkIdEntry 1 }


Regards,
/david t. perkins