1-- *****************************************************************
2-- DLINKSW-LED-MIB.mib : LED Mib
3--
4-- Copyright (c) 2013 D-Link Corporation, all rights reserved.
5--
6-- *****************************************************************
7DLINKSW-LED-MIB DEFINITIONS ::= BEGIN
8
9     IMPORTS
10        OBJECT-GROUP, MODULE-COMPLIANCE
11            FROM SNMPv2-CONF
12        MODULE-IDENTITY, OBJECT-TYPE
13            FROM SNMPv2-SMI
14        dlinkIndustrialCommon
15	          FROM DLINK-ID-REC-MIB;
16
17    dlinkSwLedMIB MODULE-IDENTITY
18        LAST-UPDATED "201309130000Z"
19        ORGANIZATION "D-Link Corp."
20        CONTACT-INFO
21                "        D-Link Corporation
22                 Postal: No. 289, Sinhu 3rd Rd., Neihu District,
23                         Taipei City 114, Taiwan, R.O.C
24                 Tel:     +886-2-66000123
25                 E-mail: tsd@dlink.com.tw
26                "
27        DESCRIPTION
28                "A MIB module for LED status.
29                "
30        REVISION "201309130000Z"
31        DESCRIPTION
32                 "Add 'LED off' state for stackingID(12) LED."
33
34        REVISION "201309060000Z"
35        DESCRIPTION
36                 "Initial version of this MIB module."
37        ::= { dlinkIndustrialCommon 163 }
38
39-- -----------------------------------------------------------------------------
40    dLedMIBNotifications OBJECT IDENTIFIER ::= { dlinkSwLedMIB 0 }
41    dLedMIBObjects       OBJECT IDENTIFIER ::= { dlinkSwLedMIB 1 }
42    dLedMIBConformance   OBJECT IDENTIFIER ::= { dlinkSwLedMIB 2 }
43
44--------------------------------------------------------------------------------
45
46    dLedInfoTable OBJECT-TYPE
47        SYNTAX          SEQUENCE OF DLedInfoEntry
48        MAX-ACCESS      not-accessible
49        STATUS          current
50        DESCRIPTION
51            "This table consists of a list of information of LEDs."
52        ::= { dLedMIBObjects 1 }
53
54    dLedInfoEntry OBJECT-TYPE
55        SYNTAX          DLedInfoEntry
56        MAX-ACCESS      not-accessible
57        STATUS          current
58        DESCRIPTION
59            "An entry contains information of one box."
60        INDEX {dLedBoxId}
61        ::= { dLedInfoTable 1 }
62
63    DLedInfoEntry ::=
64        SEQUENCE {
65		    dLedBoxId
66				INTEGER,
67		    dLedSysLedStatus
68				OCTET STRING,
69		    dLedIfLedStatus
70				OCTET STRING
71		 }
72
73    dLedBoxId OBJECT-TYPE
74        SYNTAX  INTEGER
75        MAX-ACCESS  not-accessible
76        STATUS      current
77        DESCRIPTION
78           "This variable uniquely identifies the box in the stack, module in a
79            rack and the value 1 MUST be used for non-modular devices."
80        ::= { dLedInfoEntry 1 }
81
82    dLedSysLedStatus OBJECT-TYPE
83        SYNTAX  OCTET STRING
84        MAX-ACCESS  read-only
85        STATUS  current
86        DESCRIPTION
87		"This object is a set of system LED indicators.
88		 Every type LED's format is as follow:
89         +-------------------------------------+
90         | LED  |  LED   |  Data  |...|  Data  |
91         | Type | Length |        |   |        |
92         +-------------------------------------+
93         1octet   1octet   3octet
94
95		LED Type(1 octet):
96	  		 rps(1) - indicates RPS LED,
97	  		 console(2) - indicates console LED,
98	  		 master(3) - indicates device role LED,
99	  		 sdCard(4) - indicates SD card LED,
100	  		 linkMode(5) - indicates link mode LED,
101	  		 poeMode(6) - indicates PoE mode LED,
102	  		 alarm(7) - indicates alarm LED,
103	  		 sysPower(8) - indicates system power LED,
104	  		 mgmtPort(9) - indicates management port LED,
105	   		 fan(10) - indicates device's fan LED,
106	   		 sioPort(11) - indicates SIO port LED,
107	   		 stackingID(12) - indicates stacking ID LED
108
109		LED Length(1 octet): indicates Data's length of a specified LED type in number of octets.
110
111		Data(3 octets): indicates LED status of specified LED type. Three consecutive octets are used
112				            to represent the information of one LED. If given LED type has more than one LEDs,
113				            there are multiple such triads in the data field.
114
115     		If LED Type is stackingID(12), below predefined values represent stacking ID LED's
116				status, with the most significant byte in the first octet.
117       				index         box id LED display
118        			 0x0     --     '0'
119        			 0x1     --     '1'
120        			 0x2     --     '2'
121        			 0x3     --     '3'
122        			 0x4     --     '4'
123        			 0x5     --     '5'
124        			 0x6     --     '6'
125        			 0x7     --     '7'
126        			 0x8     --     '8'
127        			 0x9     --     '9'
128        			 0xA     --     '10'
129        			 0xB     --     '11'
130        			 0xC     --     '12'
131        			 0xD     --     '13'
132        			 0xE     --     '14'
133					 0xF     --     '15'
134        			 0x10    --     '16'
135        			 0x11    --     '17'
136        			 0x12    --     '18'
137        			 0x13    --     '19'
138        			 0x100   --     'H'
139        			 0x101   --     'h'
140        			 0x102   --     'E'
141        			 0x103   --     'G'
142
143               0xfff   --     LED off state
144
145				Else these 3 octets shows LED's status value,format is as below:
146					+-------------------------+
147					| LED Instance  |  LED    |
148					| Index         |  Status |
149					+-------------------------+
150				  1 octet           2 octet
151
152				LED instance index(high octet) indicates the instance ID of specified LED type.
153				For example, if the LED type is fan(10), it is the fan ID.
154
155				LED status(low 2 octets) is the status of one LED. Its data format is as below:
156					+-----------------------+
157					| Color  | LED Lighting |
158					| Bits   | Mode         |
159					+-----------------------+
160				  15      4 3             0
161
162				Bit0 to bit3 indicates the mode of LED lighting.
163      				0x0 means this LED is not supported.
164            		0x1 means LED is off.
165           			0x2 means LED is fixed lighting.
166	   			    0x3 indicates LED is blinking.
167	    			0x4 indicates LED is alternating lighting between more than one color.
168				        Colors are determined by color bits.
169					0x5-0xF are reserved.
170
171				Bit4 to bit15 are color bits, they indicate the LED's specific color. If a
172				color bit is set, it stands for corresponding color. Only when LED lighting mode
173				is alternating lighting(low nibble is 0x4), multi-bit can be set.
174           			bit4 - green bit
175          			bit5 - amber bit
176            		bit6 - red bit
177					      bit7-bit15 are reserved.
178
179				If a LED instance consists of more LEDs, for example, if power source has separate input, state
180 				LEDs, there will be two LED data and their instance index is the same power ID. One LED data for the input LED,
181 				another for the state LED. The meaning of each LED data is device based.
182		      +---------------------------------------------------------------------------------------------+
183		      | sysPower(8) | 12 | power1 | LED    | power1 | LED    | power2 | LED    | power2 | LED    |...
184		      |             |    |        | Status |        | Status |        | Status |        | Status |
185		      +---------------------------------------------------------------------------------------------+
186				"
187
188        ::= { dLedInfoEntry 2 }
189
190    dLedIfLedStatus OBJECT-TYPE
191        SYNTAX  OCTET STRING
192        MAX-ACCESS  read-only
193        STATUS  current
194        DESCRIPTION
195		"This object is a set of ethernet port LED indicators. Format is as follow:
196		     +--------------------------------------------+
197		     | Total Port | Port1       |....| PortN      |
198		     | Number     | LED Status  |    | LED Status |
199		     +--------------------------------------------+
200         1octets        2octets
201
202         Total Port Number(1 octet): indicates the number of following port LED status.
203
204		     Port LED Status(2 octets): indicates one ethernet port LED's status, format is as below:
205         +-----------------------+
206         | Color  | LED lighting |
207         | bits   | mode         |
208         +-----------------------+
209         15      4 3             0
210
211			Bit0 to bit3 indicates the mode of LED lighting.
212      			 0x0 means this LED is not supported.
213            	 0x1 means LED is off.
214           		 0x2 means LED is fixed lighting.
215	   	         0x3 indicates LED is blinking.
216	    	     0x4 indicates LED is alternating lighting between more than one color.
217			         Colors are determined by color bits.
218            	 0x5-0xF are reserved.
219
220      Bit4 to bit15 are color bits,they indicate the LED's specific color. If a
221      color bit is set, it stands for corresponding color. Only when LED lighting mode
222      is alternating lighting(low nibble is 0x4), multi-bit can be set.
223               bit4 - green bit
224               bit5 - amber bit
225               bit6 - red bit
226           	   bit7-bit15 are reserved.
227
228      Each LED Status corresponds to one port, all ethernet port LEDs' status are arranged
229      from lowest number port to high.
230      "
231        ::= { dLedInfoEntry 3 }
232
233-- *****************************************************************************
234-- MIB Conformance statements
235-- *****************************************************************************
236    dLedMIBCompliances  OBJECT IDENTIFIER  ::= { dLedMIBConformance 1 }
237
238    dLedMIBGroups  OBJECT IDENTIFIER  ::= { dLedMIBConformance 2 }
239    dLedMIBCompliance MODULE-COMPLIANCE
240        STATUS          current
241        DESCRIPTION
242            "The compliance statement for entities which implement the
243             DLINKSW-LED-MIB."
244        MODULE          -- this module
245        MANDATORY-GROUPS {
246            dLedInfoGroup
247        }
248        ::= { dLedMIBCompliances 1 }
249
250    dLedInfoGroup OBJECT-GROUP
251        OBJECTS {
252             dLedSysLedStatus,
253             dLedIfLedStatus
254        }
255        STATUS current
256        DESCRIPTION
257            "A collection of objects to display the LED status."
258        ::= { dLedMIBGroups 1 }
259
260END