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