psvc_objects_class.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1999-2001, 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _PSVC_OBJECTS_CLASS_H
#define _PSVC_OBJECTS_CLASS_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Platform Services Framework private definitions
*/
#include <pthread.h>
#define NAMELEN 32
#define PATHLEN 256
/* Logical device class */
typedef struct {
char state[32];
char previous_state[32];
char fault_id[32];
char label[32];
int32_t (*constructor)();
int32_t (*destructor)();
} EObj_t;
typedef struct {
typedef struct {
float temp_differential[PSVC_MAXERRORS];
} EFan_t;
typedef struct {
} ESystem_t;
typedef struct {
typedef struct {
typedef struct {
typedef struct {
} EGPIO8_t;
typedef struct {
char color[32];
char is_locator[8];
char locator_name[32];
} ELed_t;
typedef struct {
} EFanTach_t;
typedef struct {
char switch_state[32];
} ESwitch_t;
typedef struct {
} EKeySwitch_t;
typedef struct {
int32_t (*get_temperature)();
int32_t (*get_fanspeed)();
int32_t (*get_output)();
int32_t (*set_output)();
} EPhysDev_t;
typedef struct {
} ETable_t;
typedef struct {
char antecedent_id[NAMELEN];
char dependent_id[NAMELEN];
} EAssoc_t;
typedef struct {
} EAssocList_t;
/* structure for translating string to id */
typedef struct {
} EStringId_t;
typedef struct {
} EDevice_t;
/* translate name to object (or table) pointer */
typedef struct {
} ENamePtr_t;
typedef struct {
} ETable_Array;
#define PSVC_OBJ 0
#define PSVC_TBL 1
#define PSVC_MAX_TABLE_ARRAYS 10
typedef struct {
} EHdl_t;
/* String lookup table for attributes */
static char *attr_str_tab[] = {
"_class", /* 0 */
"Subclass", /* 1 */
"Presence", /* 2 */
"Previous-presence", /* 3 */
"State", /* 4 */
"Previous-state", /* 5 */
"Enabled", /* 6 */
"FaultInformation", /* 7 */
"Features", /* 8 */
"Label", /* 9 */
"Fruid", /* 10 */
"Instance", /* 11 */
"Led-color", /* 12 */
"Lo-warn", /* 13 */
"Lo-shut", /* 14 */
"Hi-warn", /* 15 */
"Hi-shut", /* 16 */
"Opt-temp", /* 17 */
"Hw-hi-shut", /* 18 */
"Hw-lo-shut", /* 19 */
"Setpoint", /* 20 */
"Hysteresis", /* 21 */
"Loopgain", /* 22 */
"Loopbias", /* 23 */
"Temp_differential", /* 24 */
"Temp_differential_index", /* 25 */
"Sensor-value", /* 26 */
"Gpio-value", /* 27 */
"#Bits", /* 28 */
"Control-value", /* 29 */
"Led-state", /* 30 */
"Switch-state", /* 31 */
"Probe-result", /* 32 */
"Table_value", /* 33 */
"Assoc_id", /* 34 */
"Assoc_matches", /* 35 */
"Addr-spec", /* 36 */
"Object-id", /* 37 */
"Led-lit-count", /* 38 */
"FRU-info", /* 39 */
"IsLocator", /* 40 */
"LocatorName" /* 41 */
};
int ATTR_STR_TAB_SIZE = sizeof (attr_str_tab) / sizeof (char *);
#ifdef __cplusplus
}
#endif
#endif /* _PSVC_OBJECTS_CLASS_H */