EXAMPLE-MIB DEFINITIONS ::= BEGIN

------------------------------------------------------------------------
-- Example MIB for python-netsnmpagent
-- Copyright (c) 2012 Pieter Hollants <pieter@hollants.com>
-- Licensed under the GNU Public License (GPL) version 3
------------------------------------------------------------------------

-- Imports
IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
    Integer32, Unsigned32, Counter32, Counter64, TimeTicks, IpAddress,
    enterprises
        FROM SNMPv2-SMI
    TEXTUAL-CONVENTION, DisplayString
        FROM SNMPv2-TC
    MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
        FROM SNMPv2-CONF
    agentxObjects
        FROM AGENTX-MIB;

-- Description and update information                                                                                                            
exampleMIB MODULE-IDENTITY
    LAST-UPDATED "201211210000Z"
    ORGANIZATION "N/A"
    CONTACT-INFO
        "Editor:
        Pieter Hollants
        EMail: <pieter@hollants.com>"
    DESCRIPTION
        "Example MIB for python-netsnmpagent"

    REVISION    "201211210000Z"
    DESCRIPTION
        "An example MIB for python-netsnmpagent's example.py."

    ::= { agentxObjects 30187 }

-- Definition of a generic ExampleNotificationStatus type
ExampleNotificationStatus ::= TEXTUAL-CONVENTION
    STATUS current
    DESCRIPTION
        "Indicates the enabling or disabling of a particular class of
        notifications."
    SYNTAX INTEGER {
        disabled (0),   -- This class of notifications is disabled
        enabled  (1)    -- This class of notifications is enabled
}

-- Definition of MIB's root nodes

exampleMIBObjects         OBJECT IDENTIFIER ::= { exampleMIB 1 }
exampleMIBNotifications   OBJECT IDENTIFIER ::= { exampleMIB 2 }
exampleMIBConformance     OBJECT IDENTIFIER ::= { exampleMIB 3 }

exampleScalars            OBJECT IDENTIFIER ::= { exampleMIBObjects 1 }
exampleTables             OBJECT IDENTIFIER ::= { exampleMIBObjects 2 }

------------------------------------------------------------------------
-- Scalars
------------------------------------------------------------------------

exampleUnsigned OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "A read-write, unsigned, 32-bits integer value."
    ::= { exampleScalars 1 }

exampleUnsignedRO OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A read-only, unsigned, 32-bits integer value."
    ::= { exampleScalars 2 }

exampleInteger OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "A read-write, signed, 32-bits integer value."
    ::= { exampleScalars 3 }

exampleIntegerRO OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A read-only, signed, 32-bits integer value."
    ::= { exampleScalars 4 }

exampleCounter32 OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A read-only, unsigned, 32-bits counter value."
    ::= { exampleScalars 5 }

exampleCounter64 OBJECT-TYPE
    SYNTAX      Counter64
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A read-only, unsigned, 64-bits counter value."
    ::= { exampleScalars 6 }

exampleTimeTicks OBJECT-TYPE
    SYNTAX      TimeTicks
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "A read-only, unsigned, 32-bits TimeTicks value."
    ::= { exampleScalars 7 }

exampleIpAddress OBJECT-TYPE
    SYNTAX      IpAddress
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "A 32-bits IPv4 address."
    ::= { exampleScalars 8 }

ExampleOctetString ::= TEXTUAL-CONVENTION
    DISPLAY-HINT    "1024t"
    STATUS          current
    DESCRIPTION
        "An octet string containing characters in UTF-8 encoding."
    SYNTAX          OCTET STRING (SIZE (1..1024))

exampleOctetString OBJECT-TYPE
    SYNTAX      ExampleOctetString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "An UTF-8 encoded string value."
    ::= { exampleScalars 9 }

exampleDisplayString OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "An ASCII string value."
    ::= { exampleScalars 10 }

------------------------------------------------------------------------
-- Tables
------------------------------------------------------------------------

firstTableNumber OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of entries in firstTable."
    ::= { exampleTables 1 }

firstTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF FirstTableEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The first example table"
    ::= { exampleTables 2 }

FirstTableEntry ::=
    SEQUENCE {
        firstTableEntryIndex  DisplayString,
        firstTableEntryDesc   DisplayString,
        firstTableEntryValue  Integer32
    }

firstTableEntry OBJECT-TYPE
    SYNTAX      FirstTableEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A particular firstTable row."
    INDEX { firstTableEntryIndex }
    ::= { firstTable 1 }

firstTableEntryIndex OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The index column used to generate string indices into
        firstTable."
    ::= { firstTableEntry 1 }

firstTableEntryDesc OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A firstTableEntry's description."
    ::= { firstTableEntry 2 }

firstTableEntryValue OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A firstTableEntry's value."
    ::= { firstTableEntry 3 }

secondTableNumber OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of entries in secondTable."
    ::= { exampleTables 3 }

secondTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF SecondTableEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The first example table"
    ::= { exampleTables 4 }

SecondTableEntry ::=
    SEQUENCE {
        secondTableEntryIndex  Integer32,
        secondTableEntryDesc   DisplayString,
        secondTableEntryValue  Unsigned32
    }

secondTableEntry OBJECT-TYPE
    SYNTAX      SecondTableEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A particular secondTable row."
    INDEX { secondTableEntryIndex }
    ::= { secondTable 1 }

secondTableEntryIndex OBJECT-TYPE
    SYNTAX      Integer32 (0..2147483647)
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The index column used to generate numerical indices into
        secondTable."
    ::= { secondTableEntry 1 }

secondTableEntryDesc OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "An secondTableEntry's description."
    ::= { secondTableEntry 2 }

secondTableEntryValue OBJECT-TYPE
    SYNTAX      Unsigned32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "An secondTableEntry's value."
    ::= { secondTableEntry 3 }

------------------------------------------------------------------------
-- Notifications
------------------------------------------------------------------------

events      OBJECT IDENTIFIER ::= { exampleMIBNotifications 0 }
operation   OBJECT IDENTIFIER ::= { exampleMIBNotifications 1 }

exampleUnsignedROChange NOTIFICATION-TYPE
    OBJECTS {
        exampleUnsignedRO
    }
    STATUS  current
    DESCRIPTION
        "An exampleScalarsChange notification signifies that there has
        been a change to the value of exampleUnsignedRO."
    ::= { events 1 }

firstTableChange NOTIFICATION-TYPE
    OBJECTS {
        firstTableEntryDesc, firstTableEntryValue
    }
    STATUS  current
    DESCRIPTION
        "An firstTableChange notification signifies that there has
        been a change to an firstTableEntry."
    ::= { events 2 }

exampleUnsignedROChangeNotificationsEnabled OBJECT-TYPE
    SYNTAX      ExampleNotificationStatus
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Controls whether exampleUnsignedROChange notifications are
        enabled or disabled."
    ::= { operation 1 }

firstTableChangeNotificationsEnabled OBJECT-TYPE
    SYNTAX      ExampleNotificationStatus
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Controls whether firstTableChange notifications are
        enabled or disabled."
    ::= { operation 2 }

------------------------------------------------------------------------
-- Conformance
------------------------------------------------------------------------

exampleMIBGroups      OBJECT IDENTIFIER ::= { exampleMIBConformance 1 }
exampleMIBCompliances OBJECT IDENTIFIER ::= { exampleMIBConformance 2 }

exampleMIBScalarsGroup OBJECT-GROUP
    OBJECTS {
        exampleInteger, exampleIntegerRO,
        exampleUnsigned, exampleUnsignedRO,
        exampleCounter32, exampleCounter64,
        exampleTimeTicks,
        exampleIpAddress,
        exampleOctetString, exampleDisplayString,
        exampleUnsignedROChangeNotificationsEnabled
    }
    STATUS  current
    DESCRIPTION
        "A collection of objects related to exampleScalars."
    ::= { exampleMIBGroups 1 }

exampleMIBTablesGroup OBJECT-GROUP
    OBJECTS {
        firstTableNumber,
        firstTableEntryDesc, firstTableEntryValue,
        firstTableChangeNotificationsEnabled,
        secondTableNumber,
        secondTableEntryDesc, secondTableEntryValue
    }
    STATUS  current
    DESCRIPTION
        "A collection of objects related to exampleTables."
    ::= { exampleMIBGroups 2 }

exampleMIBScalarsNotificationsGroup NOTIFICATION-GROUP
    NOTIFICATIONS {
        exampleUnsignedROChange
    }
    STATUS  current
    DESCRIPTION
        "The notifications which indicate specific changes in
        exampleMIBScalars."
    ::= { exampleMIBGroups 3 }

exampleMIBTablesNotificationsGroup NOTIFICATION-GROUP
    NOTIFICATIONS {
        firstTableChange
    }
    STATUS  current
    DESCRIPTION
        "The notifications which indicate specific changes in
        exampleTables."
    ::= { exampleMIBGroups 4 }

END
