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