xref: /illumos-gate/usr/src/uts/common/sys/sysevent/env.h (revision 8119dad84d6416f13557b0ba8e2aaf9064cbcfd3)
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 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 /*
35  * Event type EC_ENV/ESC_ENV_TEMP schema
36  *	Event Class	- EC_ENV
37  *	Event Sub-Class	- ESC_ENV_TEMP
38  *	Event Publisher	- SUNW:kern:[environmental monitor name]
39  *	Attribute Name	- ENV_VERSION
40  *	Attribute Type	- SE_DATA_TYPE_UINT32
41  *	Attribute Value	- [version of the schema]
42  *	Attribute Name	- ENV_FRU_ID
43  *	Attribute Type  - SE_DATA_TYPE_STRING
44  *	Attribute Value	- [Label identifying the FRU or SE_RESERVED_ATTR]
45  *	Attribute Name	- ENV_FRU_RESOURCE_ID
46  *	Attribute Type  - SE_DATA_TYPE_STRING
47  *	Attribute Value	- [Label identifying the Resource within the FRU or
48  *			  SE_RESERVED_ATTR]
49  *	Attribute Name	- ENV_FRU_DEVICE
50  *	Attribute Type  - SE_DATA_TYPE_STRING
51  *	Attribute Value	- ENV_RESERVED_ATTR
52  *	Attribute Name	- ENV_FRU_STATE
53  *	Attribute Type  - SE_DATA_TYPE_INT32
54  *	Attribute Value	- ENV_OK | ENV_WARNING | ENV_FAILED
55  *	Attribute Name	- ENV_MSG
56  *	Attribute Type	- SE_DATA_TYPE_STRING
57  *	Attribute Value	- [message passed by environmental monitor]
58  */
59 
60 #define	ENV_VERSION	"env_version"		/* version of the schema */
61 #define	ENV_FRU_ID	"env_fru_id"		/* PICL FRU name */
62 #define	ENV_FRU_RESOURCE_ID	"env_fru_resource_id"	/* FRU resource name */
63 #define	ENV_FRU_DEVICE	"env_fru_device_path"	/* Device path of sensor */
64 #define	ENV_FRU_STATE	"env_fru_state"		/* State of FRU */
65 #define	ENV_MSG		"env_msg"		/* environmental montitor msg */
66 #define	ENV_RESERVED_ATTR	""		/* Reserved attribute */
67 
68 /*
69  * Event type EC_ENV/ESC_ENV_POWER schema
70  *	Event Class	- EC_ENV
71  *	Event Sub-Class	- ESC_ENV_POWER
72  *	Event Publisher	- SUNW:kern:[environmental monitor name]
73  *	Attribute Name	- ENV_VERSION
74  *	Attribute Type	- SE_DATA_TYPE_UINT32
75  *	Attribute Value	- [version of the schema]
76  *	Attribute Name	- ENV_FRU_ID
77  *	Attribute Type  - SE_DATA_TYPE_STRING
78  *	Attribute Value	- [Label identifying the FRU or SE_RESERVED_ATTR]
79  *	Attribute Name	- ENV_FRU_RESOURCE_ID
80  *	Attribute Type  - SE_DATA_TYPE_STRING
81  *	Attribute Value	- [Label identifying the Resource within the FRU or
82  *			   SE_RESERVED_ATTR]
83  *	Attribute Name	- ENV_FRU_DEVICE
84  *	Attribute Type  - SE_DATA_TYPE_STRING
85  *	Attribute Value	- ENV_RESERVED_ATTR
86  *	Attribute Name	- ENV_FRU_STATE
87  *	Attribute Type  - SE_DATA_TYPE_INT32
88  *	Attribute Value	- ENV_OK | ENV_WARNING | ENV_FAILED
89  *	Attribute Name	- ENV_MSG
90  *	Attribute Type	- SE_DATA_TYPE_STRING
91  *	Attribute Value	- [message passed by environmental monitor]
92  *
93  *
94  *
95  * Event type EC_ENV/ESC_ENV_FAN event schema
96  *	Event Class	- EC_ENV
97  *	Event Sub-Class	- ESC_ENV_FAN
98  *	Event Publisher	- SUNW:kern:[environmental monitor name]
99  *	Attribute Name	- ENV_VERSION
100  *	Attribute Type	- SE_DATA_TYPE_UINT32
101  *	Attribute Value	- [version of the schema]
102  *	Attribute Name	- ENV_FRU_ID
103  *	Attribute Type  - SE_DATA_TYPE_STRING
104  *	Attribute Value	- [Label identifying the FRU or SE_RESERVED_ATTR]
105  *	Attribute Name	- ENV_FRU_RESOURCE_ID
106  *	Attribute Type  - SE_DATA_TYPE_STRING
107  *	Attribute Value	- [Label identifying the Resource within the FRU or
108  *			   SE_RESERVED_ATTR]
109  *	Attribute Name	- ENV_FRU_DEVICE
110  *	Attribute Type  - SE_DATA_TYPE_STRING
111  *	Attribute Value	- ENV_RESERVED_ATTR
112  *	Attribute Name	- ENV_FRU_STATE
113  *	Attribute Type  - SE_DATA_TYPE_INT32
114  *	Attribute Value	- ENV_OK | ENV_WARNING | ENV_FAILED
115  *	Attribute Name	- ENV_MSG
116  *	Attribute Type	- SE_DATA_TYPE_STRING
117  *	Attribute Value	- [message passed by environmental monitor]
118  */
119 
120 #define	ENV_OK		1
121 #define	ENV_WARNING	2
122 #define	ENV_FAILED	3
123 
124 /*
125  * Event type EC_ENV/ESC_ENV_LED event schema
126  *	Event Class	- EC_ENV
127  *	Event Sub-Class	- ESC_ENV_LED
128  *	Event Publisher	- SUNW:kern:[environmental monitor name]
129  *	Attribute Name	- ENV_VERSION
130  *	Attribute Type	- SE_DATA_TYPE_UINT32
131  *	Attribute Value	- [version of the schema]
132  *	Attribute Name	- ENV_FRU_ID
133  *	Attribute Type  - SE_DATA_TYPE_STRING
134  *	Attribute Value	- [Label identifying the FRU or SE_RESERVED_ATTR]
135  *	Attribute Name	- ENV_FRU_RESOURCE_ID
136  *	Attribute Type  - SE_DATA_TYPE_STRING
137  *	Attribute Value	- [Label identifying the Resource within the FRU or
138  *			   SE_RESERVED_ATTR]
139  *	Attribute Name	- ENV_FRU_DEVICE
140  *	Attribute Type  - SE_DATA_TYPE_STRING
141  *	Attribute Value - ENV_RESERVED_ATTR
142  *	Attribute Name  - ENV_LED_COLOR
143  *	Attribute Type  - SE_DATA_TYPE_STRING
144  *	Attribute Value	- ENV_RESERVED_ATTR
145  *	Attribute Name	- ENV_FRU_STATE
146  *	Attribute Type  - SE_DATA_TYPE_INT32
147  *	Attribute Value	- ENV_LED_ON | ENV_LED_OFF | ENV_LED_BLINKING |
148  *			  ENV_LED_FLASHING | ENV_LED_INACCESSIBLE |
149  *			  ENV_LED_STANDBY | ENV_LED_NOT_PRESENT
150  *	Attribute Name	- ENV_MSG
151  *	Attribute Type	- SE_DATA_TYPE_STRING
152  *	Attribute Value	- [message passed by environmental monitor]
153  */
154 
155 #define	ENV_LED_ON		1
156 #define	ENV_LED_OFF		2
157 #define	ENV_LED_BLINKING	3
158 #define	ENV_LED_FLASHING	4
159 #define	ENV_LED_INACCESSIBLE	5
160 #define	ENV_LED_STANDBY		6
161 #define	ENV_LED_NOT_PRESENT	7
162 
163 #ifdef	__cplusplus
164 }
165 #endif
166 
167 #endif /* _SYS_SYSEVENT_ENV_H */
168