-- ---------------------------------------------------------- --
-- MIB for Westermo DDM
-- ---------------------------------------------------------- --
WESTERMO-DDM-MIB DEFINITIONS ::= BEGIN

IMPORTS
    Integer32,
    OBJECT-TYPE,
    MODULE-IDENTITY
    FROM SNMPv2-SMI

    DisplayString
    FROM SNMPv2-TC

    InterfaceIndex
    FROM IF-MIB

    MODULE-COMPLIANCE,
    OBJECT-GROUP
    FROM SNMPv2-CONF

    common
    FROM WESTERMO-OID-MIB;

ddmMIB MODULE-IDENTITY
    LAST-UPDATED "201712050000Z"
    ORGANIZATION "Westermo Teleindustri AB"
    CONTACT-INFO
	"Copyright (c) 2017:
	Westermo Teleindustri AB
	640 40 Stora Sundby
	Sweden
	url: http://www.westermo.com

	Contact: support@westermo.se
	Description: Defines Westermo private DDM MIB-file."

    DESCRIPTION
	"This MIB module defines the Westermo private SFP DDM MIB."

    REVISION "201712050000Z"
    DESCRIPTION
	"First revision."

    ::= { common 2 }

-- ---------------------------------------------------------- --
-- subtrees in the WESTERMO-DDM-MIB
-- ---------------------------------------------------------- --

ddmObjects       OBJECT IDENTIFIER ::= { ddmMIB 1 }
ddmConformance   OBJECT IDENTIFIER ::= { ddmMIB 2 }

-- ---------------------------------------------------------- --
-- the ddmObjects subtree
-- ---------------------------------------------------------- --

ddmPortTable OBJECT-TYPE
    SYNTAX	SEQUENCE OF DdmPortEntry
    MAX-ACCESS	not-accessible
    STATUS	current
    DESCRIPTION
	"Table containing DDM diagnostics per DDM capable SFP."
    ::= { ddmObjects 1 }

ddmPortEntry OBJECT-TYPE
    SYNTAX	DdmPortEntry
    MAX-ACCESS	not-accessible
    STATUS	current
    DESCRIPTION
	"This row in the sfpDdmPortTable containing per port
	SFP DDM diagnostics."
    INDEX { ddmPortIfIndex }
    ::= { ddmPortTable 1 }

DdmPortEntry ::= SEQUENCE {
    ddmPortIfIndex	InterfaceIndex,
    ddmPortIfName	DisplayString,
    ddmPortVoltage	Integer32,
    ddmPortTemperature	Integer32,
    ddmPortBiasCurrent	Integer32,
    ddmPortTxPower	Integer32,
    ddmPortRxPower	Integer32
}

ddmPortIfIndex OBJECT-TYPE
    SYNTAX	InterfaceIndex
    MAX-ACCESS	not-accessible
    STATUS	current
    DESCRIPTION
	"This index maps to the port's ifIndex in the ifTable."
    ::= { ddmPortEntry 1 }

ddmPortIfName OBJECT-TYPE
    SYNTAX	DisplayString
    MAX-ACCESS	read-only
    STATUS	current
    DESCRIPTION
	"The system name of the port."
    ::= { ddmPortEntry 2 }

ddmPortVoltage OBJECT-TYPE
    SYNTAX	Integer32 (0..6550)
    MAX-ACCESS	read-only
    STATUS	current
    DESCRIPTION
	"The supply voltage of the SFP. The accuracy is better than +/-3 % and
	the total range of 0 - 6550 mV. The voltage is represented in mV."
    ::= { ddmPortEntry 3 }

ddmPortTemperature OBJECT-TYPE
    SYNTAX	Integer32 (-128..128)
    MAX-ACCESS	read-only
    STATUS	current
    DESCRIPTION
	"Temperature of the SFP. The temperature accuracy is better
	than 3 degrees Celsius and the total range of -128 degrees C
	to +128 degrees C."
    ::= { ddmPortEntry 4 }

ddmPortBiasCurrent OBJECT-TYPE
    SYNTAX	Integer32 (0..131)
    MAX-ACCESS	read-only
    STATUS	current
    DESCRIPTION
	"The transmit bias current. The accuracy is better than +/- 10 % and
	the total range of 0 - 131 mA. The current is represented in uA."
    ::= { ddmPortEntry 5 }

ddmPortTxPower OBJECT-TYPE
    SYNTAX	Integer32 (-4000..820)
    MAX-ACCESS	read-only
    STATUS	current
    DESCRIPTION
	"Transmit power of the laser. The accuracy is better than +/-3dB and
	the total range of -40 to +8.2 dBm ~(0 - 6.5535 mW).
	The power is represented in steps of 0.01 dBm."
    ::= { ddmPortEntry 6 }

ddmPortRxPower OBJECT-TYPE
    SYNTAX	Integer32 (-4000..820)
    MAX-ACCESS	read-only
    STATUS	current
    DESCRIPTION
	"Receiving power of the laser. The accuracy is better than +/-3dB and
	the total range of -40 to +8.2 dBm ~(0 - 6.5535 mW).
	The power is represented in steps of 0.01 dBm."
    ::= { ddmPortEntry 7 }

-- ---------------------------------------------------------- --
-- Conformance Information
-- ---------------------------------------------------------- --

ddmGroups        OBJECT IDENTIFIER ::= { ddmConformance 1 }
ddmCompliances   OBJECT IDENTIFIER ::= { ddmConformance 2 }

-- ---------------------------------------------------------- --
-- Units of conformance
-- ---------------------------------------------------------- --

ddmPortGroup OBJECT-GROUP
    OBJECTS {
	ddmPortIfName,
	ddmPortVoltage,
	ddmPortTemperature,
	ddmPortBiasCurrent,
	ddmPortTxPower,
	ddmPortRxPower
    }
    STATUS	current
    DESCRIPTION
	"Collection of DDM diagnostics per DDM capable SFP."
    ::= { ddmGroups 1 }

-- ---------------------------------------------------------- --
-- Compliance statements
-- ---------------------------------------------------------- --

ddmCompliance MODULE-COMPLIANCE
    STATUS	current
    DESCRIPTION
	"The compliance statement for SNMP entities that implement
	the Westermo DDM MIB."
    MODULE
	MANDATORY-GROUPS {
		ddmPortGroup
	}
    ::= { ddmCompliances 1 }

END
