xref: /titanic_50/usr/src/uts/common/sys/sysevent/env.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 2000-2002 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate #ifndef _SYS_SYSEVENT_ENV_H
28*7c478bd9Sstevel@tonic-gate #define	_SYS_SYSEVENT_ENV_H
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*7c478bd9Sstevel@tonic-gate 
32*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
33*7c478bd9Sstevel@tonic-gate extern "C" {
34*7c478bd9Sstevel@tonic-gate #endif
35*7c478bd9Sstevel@tonic-gate 
36*7c478bd9Sstevel@tonic-gate /*
37*7c478bd9Sstevel@tonic-gate  * Event type EC_ENV/ESC_ENV_TEMP schema
38*7c478bd9Sstevel@tonic-gate  *	Event Class	- EC_ENV
39*7c478bd9Sstevel@tonic-gate  *	Event Sub-Class	- ESC_ENV_TEMP
40*7c478bd9Sstevel@tonic-gate  *	Event Publisher	- SUNW:kern:[environmental monitor name]
41*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_VERSION
42*7c478bd9Sstevel@tonic-gate  *	Attribute Type	- SE_DATA_TYPE_UINT32
43*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [version of the schema]
44*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_ID
45*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
46*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [Label identifying the FRU or SE_RESERVED_ATTR]
47*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_RESOURCE_ID
48*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
49*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [Label identifying the Resource within the FRU or
50*7c478bd9Sstevel@tonic-gate  *			  SE_RESERVED_ATTR]
51*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_DEVICE
52*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
53*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- ENV_RESERVED_ATTR
54*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_STATE
55*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_INT32
56*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- ENV_OK | ENV_WARNING | ENV_FAILED
57*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_MSG
58*7c478bd9Sstevel@tonic-gate  *	Attribute Type	- SE_DATA_TYPE_STRING
59*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [message passed by environmental monitor]
60*7c478bd9Sstevel@tonic-gate  */
61*7c478bd9Sstevel@tonic-gate 
62*7c478bd9Sstevel@tonic-gate #define	ENV_VERSION	"env_version"		/* version of the schema */
63*7c478bd9Sstevel@tonic-gate #define	ENV_FRU_ID	"env_fru_id"		/* PICL FRU name */
64*7c478bd9Sstevel@tonic-gate #define	ENV_FRU_RESOURCE_ID	"env_fru_resource_id"	/* FRU resource name */
65*7c478bd9Sstevel@tonic-gate #define	ENV_FRU_DEVICE	"env_fru_device_path"	/* Device path of sensor */
66*7c478bd9Sstevel@tonic-gate #define	ENV_FRU_STATE	"env_fru_state"		/* State of FRU */
67*7c478bd9Sstevel@tonic-gate #define	ENV_MSG		"env_msg"		/* environmental montitor msg */
68*7c478bd9Sstevel@tonic-gate #define	ENV_RESERVED_ATTR	""		/* Reserved attribute */
69*7c478bd9Sstevel@tonic-gate 
70*7c478bd9Sstevel@tonic-gate /*
71*7c478bd9Sstevel@tonic-gate  * Event type EC_ENV/ESC_ENV_POWER schema
72*7c478bd9Sstevel@tonic-gate  *	Event Class	- EC_ENV
73*7c478bd9Sstevel@tonic-gate  *	Event Sub-Class	- ESC_ENV_POWER
74*7c478bd9Sstevel@tonic-gate  *	Event Publisher	- SUNW:kern:[environmental monitor name]
75*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_VERSION
76*7c478bd9Sstevel@tonic-gate  *	Attribute Type	- SE_DATA_TYPE_UINT32
77*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [version of the schema]
78*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_ID
79*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
80*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [Label identifying the FRU or SE_RESERVED_ATTR]
81*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_RESOURCE_ID
82*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
83*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [Label identifying the Resource within the FRU or
84*7c478bd9Sstevel@tonic-gate  *			   SE_RESERVED_ATTR]
85*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_DEVICE
86*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
87*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- ENV_RESERVED_ATTR
88*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_STATE
89*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_INT32
90*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- ENV_OK | ENV_WARNING | ENV_FAILED
91*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_MSG
92*7c478bd9Sstevel@tonic-gate  *	Attribute Type	- SE_DATA_TYPE_STRING
93*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [message passed by environmental monitor]
94*7c478bd9Sstevel@tonic-gate  *
95*7c478bd9Sstevel@tonic-gate  *
96*7c478bd9Sstevel@tonic-gate  *
97*7c478bd9Sstevel@tonic-gate  * Event type EC_ENV/ESC_ENV_FAN event schema
98*7c478bd9Sstevel@tonic-gate  *	Event Class	- EC_ENV
99*7c478bd9Sstevel@tonic-gate  *	Event Sub-Class	- ESC_ENV_FAN
100*7c478bd9Sstevel@tonic-gate  *	Event Publisher	- SUNW:kern:[environmental monitor name]
101*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_VERSION
102*7c478bd9Sstevel@tonic-gate  *	Attribute Type	- SE_DATA_TYPE_UINT32
103*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [version of the schema]
104*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_ID
105*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
106*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [Label identifying the FRU or SE_RESERVED_ATTR]
107*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_RESOURCE_ID
108*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
109*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [Label identifying the Resource within the FRU or
110*7c478bd9Sstevel@tonic-gate  *			   SE_RESERVED_ATTR]
111*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_DEVICE
112*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
113*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- ENV_RESERVED_ATTR
114*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_STATE
115*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_INT32
116*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- ENV_OK | ENV_WARNING | ENV_FAILED
117*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_MSG
118*7c478bd9Sstevel@tonic-gate  *	Attribute Type	- SE_DATA_TYPE_STRING
119*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [message passed by environmental monitor]
120*7c478bd9Sstevel@tonic-gate  */
121*7c478bd9Sstevel@tonic-gate 
122*7c478bd9Sstevel@tonic-gate #define	ENV_OK		1
123*7c478bd9Sstevel@tonic-gate #define	ENV_WARNING	2
124*7c478bd9Sstevel@tonic-gate #define	ENV_FAILED	3
125*7c478bd9Sstevel@tonic-gate 
126*7c478bd9Sstevel@tonic-gate /*
127*7c478bd9Sstevel@tonic-gate  * Event type EC_ENV/ESC_ENV_LED event schema
128*7c478bd9Sstevel@tonic-gate  *	Event Class	- EC_ENV
129*7c478bd9Sstevel@tonic-gate  *	Event Sub-Class	- ESC_ENV_LED
130*7c478bd9Sstevel@tonic-gate  *	Event Publisher	- SUNW:kern:[environmental monitor name]
131*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_VERSION
132*7c478bd9Sstevel@tonic-gate  *	Attribute Type	- SE_DATA_TYPE_UINT32
133*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [version of the schema]
134*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_ID
135*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
136*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [Label identifying the FRU or SE_RESERVED_ATTR]
137*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_RESOURCE_ID
138*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
139*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [Label identifying the Resource within the FRU or
140*7c478bd9Sstevel@tonic-gate  *			   SE_RESERVED_ATTR]
141*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_DEVICE
142*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
143*7c478bd9Sstevel@tonic-gate  *	Attribute Value - ENV_RESERVED_ATTR
144*7c478bd9Sstevel@tonic-gate  *	Attribute Name  - ENV_LED_COLOR
145*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_STRING
146*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- ENV_RESERVED_ATTR
147*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_FRU_STATE
148*7c478bd9Sstevel@tonic-gate  *	Attribute Type  - SE_DATA_TYPE_INT32
149*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- ENV_LED_ON | ENV_LED_OFF | ENV_LED_BLINKING |
150*7c478bd9Sstevel@tonic-gate  *			  ENV_LED_FLASHING | ENV_LED_INACCESSIBLE |
151*7c478bd9Sstevel@tonic-gate  *			  ENV_LED_STANDBY | ENV_LED_NOT_PRESENT
152*7c478bd9Sstevel@tonic-gate  *	Attribute Name	- ENV_MSG
153*7c478bd9Sstevel@tonic-gate  *	Attribute Type	- SE_DATA_TYPE_STRING
154*7c478bd9Sstevel@tonic-gate  *	Attribute Value	- [message passed by environmental monitor]
155*7c478bd9Sstevel@tonic-gate  */
156*7c478bd9Sstevel@tonic-gate 
157*7c478bd9Sstevel@tonic-gate #define	ENV_LED_ON		1
158*7c478bd9Sstevel@tonic-gate #define	ENV_LED_OFF		2
159*7c478bd9Sstevel@tonic-gate #define	ENV_LED_BLINKING	3
160*7c478bd9Sstevel@tonic-gate #define	ENV_LED_FLASHING	4
161*7c478bd9Sstevel@tonic-gate #define	ENV_LED_INACCESSIBLE	5
162*7c478bd9Sstevel@tonic-gate #define	ENV_LED_STANDBY		6
163*7c478bd9Sstevel@tonic-gate #define	ENV_LED_NOT_PRESENT	7
164*7c478bd9Sstevel@tonic-gate 
165*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
166*7c478bd9Sstevel@tonic-gate }
167*7c478bd9Sstevel@tonic-gate #endif
168*7c478bd9Sstevel@tonic-gate 
169*7c478bd9Sstevel@tonic-gate #endif /* _SYS_SYSEVENT_ENV_H */
170