From: <mik...@us...> - 2008-08-20 21:10:15
|
Revision: 873 http://omc.svn.sourceforge.net/omc/?rev=873&view=rev Author: mike-brasher Date: 2008-08-20 21:10:23 +0000 (Wed, 20 Aug 2008) Log Message: ----------- Implemented 2 providers: Linux_FanNumericSensor & Linux_FanAssociatedSensor. Modified Paths: -------------- cmpiprofiles/sblim-cmpi-fan_profile/trunk/mof/linux-fan-profile.mof cmpiprofiles/sblim-cmpi-fan_profile/trunk/mof/linux-fan-profile.reg cmpiprofiles/sblim-cmpi-fan_profile/trunk/mof/linux-fan-profile.registration cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/Makefile.am cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/Resource.c cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/Resource.h cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/linux-fan-profile.kon Added Paths: ----------- cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/AssociatedSensor.h cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/AssociatedSensorProvider.c cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/CIM_AssociatedSensor.h cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/CIM_NumericSensor.h cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/CIM_Sensor.h cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/NumericSensor.h cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/NumericSensorProvider.c Modified: cmpiprofiles/sblim-cmpi-fan_profile/trunk/mof/linux-fan-profile.mof =================================================================== --- cmpiprofiles/sblim-cmpi-fan_profile/trunk/mof/linux-fan-profile.mof 2008-08-19 23:49:21 UTC (rev 872) +++ cmpiprofiles/sblim-cmpi-fan_profile/trunk/mof/linux-fan-profile.mof 2008-08-20 21:10:23 UTC (rev 873) @@ -164,6 +164,22 @@ [Key] Linux_FanRedundancySet REF OwnedElement; }; +// =========================================================================== +// Linux_FanNumericSensor +// =========================================================================== +class Linux_FanNumericSensor : CIM_NumericSensor +{ +}; + +// =========================================================================== +// Linux_AssociatedSensor +// =========================================================================== +class Linux_FanAssociatedSensor : CIM_AssociatedSensor +{ + Linux_FanNumericSensor REF Antecedent; + Linux_Fan REF Dependent; +}; + // ================================================================== // end of file // ================================================================== Modified: cmpiprofiles/sblim-cmpi-fan_profile/trunk/mof/linux-fan-profile.reg =================================================================== --- cmpiprofiles/sblim-cmpi-fan_profile/trunk/mof/linux-fan-profile.reg 2008-08-19 23:49:21 UTC (rev 872) +++ cmpiprofiles/sblim-cmpi-fan_profile/trunk/mof/linux-fan-profile.reg 2008-08-20 21:10:23 UTC (rev 873) @@ -1,3 +1,9 @@ +[Linux_FanAssociatedSensor] + provider: Linux_FanAssociatedSensor + location: linux_fanprovider + type: instance association + namespace: root/cimv2 +# [Linux_FanElementConformsToProfile] provider: Linux_FanElementConformsToProfile location: linux_fanprovider @@ -28,6 +34,12 @@ type: instance association namespace: root/cimv2 # +[Linux_FanNumericSensor] + provider: Linux_FanNumericSensor + location: linux_fanprovider + type: instance method + namespace: root/cimv2 +# [Linux_FanOwningCollectionElement] provider: Linux_FanOwningCollectionElement location: linux_fanprovider Modified: cmpiprofiles/sblim-cmpi-fan_profile/trunk/mof/linux-fan-profile.registration =================================================================== --- cmpiprofiles/sblim-cmpi-fan_profile/trunk/mof/linux-fan-profile.registration 2008-08-19 23:49:21 UTC (rev 872) +++ cmpiprofiles/sblim-cmpi-fan_profile/trunk/mof/linux-fan-profile.registration 2008-08-20 21:10:23 UTC (rev 873) @@ -1,3 +1,4 @@ +Linux_FanAssociatedSensor root/cimv2 Linux_FanAssociatedSensor linux_fanprovider instance association Linux_FanElementConformsToProfile root/cimv2\ root/interop Linux_FanElementConformsToProfile linux_fanprovider instance association Linux_Fan root/cimv2 Linux_Fan linux_fanprovider instance method Linux_FanHostedCollection root/cimv2 Linux_FanHostedCollection linux_fanprovider instance association @@ -3,4 +4,5 @@ Linux_FanIsSpare root/cimv2 Linux_FanIsSpare linux_fanprovider instance association Linux_FanMemberOfCollection root/cimv2 Linux_FanMemberOfCollection linux_fanprovider instance association +Linux_FanNumericSensor root/cimv2 Linux_FanNumericSensor linux_fanprovider instance method Linux_FanOwningCollectionElement root/cimv2 Linux_FanOwningCollectionElement linux_fanprovider instance association Linux_FanRedundancySet root/cimv2 Linux_FanRedundancySet linux_fanprovider instance method Added: cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/AssociatedSensor.h =================================================================== --- cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/AssociatedSensor.h (rev 0) +++ cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/AssociatedSensor.h 2008-08-20 21:10:23 UTC (rev 873) @@ -0,0 +1,388 @@ +/* +**============================================================================== +** +** CAUTION: This file generated by KonkretCMPI. Please do not edit. +** +**============================================================================== +*/ + +#ifndef _konkrete_AssociatedSensor_h +#define _konkrete_AssociatedSensor_h + +#include <konkret/konkret.h> +#include "NumericSensor.h" +#include "Fan.h" + +/* +**============================================================================== +** +** struct AssociatedSensorRef +** +**============================================================================== +*/ + +/* classname=Linux_FanAssociatedSensor */ +typedef struct _AssociatedSensorRef +{ + KBase __base; + /* CIM_Dependency features */ + const KRef Antecedent; /* NumericSensor */ + const KRef Dependent; /* Fan */ + /* CIM_AssociatedSensor features */ + /* Linux_FanAssociatedSensor features */ +} +AssociatedSensorRef; + +static const unsigned char __AssociatedSensorRef_sig[] = +{ + 0x19,0x4c,0x69,0x6e,0x75,0x78,0x5f,0x46,0x61,0x6e,0x41,0x73,0x73,0x6f,0x63, + 0x69,0x61,0x74,0x65,0x64,0x53,0x65,0x6e,0x73,0x6f,0x72,0x00,0x02,0x4e,0x0a, + 0x41,0x6e,0x74,0x65,0x63,0x65,0x64,0x65,0x6e,0x74,0x00,0x4e,0x09,0x44,0x65, + 0x70,0x65,0x6e,0x64,0x65,0x6e,0x74,0x00, +}; + +KINLINE void AssociatedSensorRef_Init( + AssociatedSensorRef* self, + const CMPIBroker* cb, + const char* ns) +{ + const unsigned char* sig = __AssociatedSensorRef_sig; + KBase_Init(&self->__base, cb, sizeof(*self), sig, ns); + ((KRef*)&self->Antecedent)->__sig = __NumericSensor_sig; + ((KRef*)&self->Dependent)->__sig = __Fan_sig; +} + +KINLINE CMPIStatus AssociatedSensorRef_InitFromInstance( + AssociatedSensorRef* self, + const CMPIBroker* cb, + const CMPIInstance* x) +{ + AssociatedSensorRef_Init(self, cb, NULL); + return KBase_FromInstance(&self->__base, x); +} + +KINLINE CMPIStatus AssociatedSensorRef_InitFromObjectPath( + AssociatedSensorRef* self, + const CMPIBroker* cb, + const CMPIObjectPath* x) +{ + AssociatedSensorRef_Init(self, cb, NULL); + return KBase_FromObjectPath(&self->__base, x); +} + +KINLINE void AssociatedSensorRef_Print( + const AssociatedSensorRef* self, + FILE* os) +{ + KBase_Print(os, &self->__base, 'r'); +} + +KINLINE CMPIInstance* AssociatedSensorRef_ToInstance( + const AssociatedSensorRef* self, + CMPIStatus* status) +{ + return KBase_ToInstance(&self->__base, status); +} + +KINLINE CMPIObjectPath* AssociatedSensorRef_ToObjectPath( + const AssociatedSensorRef* self, + CMPIStatus* status) +{ + return KBase_ToObjectPath(&self->__base, status); +} + +KINLINE const char* AssociatedSensorRef_NameSpace( + AssociatedSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + return self->__base.ns ? KChars(self->__base.ns) : NULL; + return NULL; +} + +KINLINE void AssociatedSensorRef_SetObjectPath_Antecedent( + AssociatedSensorRef* self, + const CMPIObjectPath* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + KRef_SetObjectPath(field, x); + } +} + +KINLINE CMPIStatus AssociatedSensorRef_Set_Antecedent( + AssociatedSensorRef* self, + const NumericSensorRef* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + return KRef_Set(field, &x->__base); + } + CMReturn(CMPI_RC_ERR_FAILED); +} + +KINLINE void AssociatedSensorRef_Null_Antecedent( + AssociatedSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + KRef_Null(field); + } +} + +KINLINE void AssociatedSensorRef_Clr_Antecedent( + AssociatedSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + KRef_Clr(field); + } +} + +KINLINE void AssociatedSensorRef_SetObjectPath_Dependent( + AssociatedSensorRef* self, + const CMPIObjectPath* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + KRef_SetObjectPath(field, x); + } +} + +KINLINE CMPIStatus AssociatedSensorRef_Set_Dependent( + AssociatedSensorRef* self, + const FanRef* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + return KRef_Set(field, &x->__base); + } + CMReturn(CMPI_RC_ERR_FAILED); +} + +KINLINE void AssociatedSensorRef_Null_Dependent( + AssociatedSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + KRef_Null(field); + } +} + +KINLINE void AssociatedSensorRef_Clr_Dependent( + AssociatedSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + KRef_Clr(field); + } +} + +/* +**============================================================================== +** +** struct AssociatedSensor +** +**============================================================================== +*/ + +/* classname=Linux_FanAssociatedSensor */ +typedef struct _AssociatedSensor +{ + KBase __base; + /* CIM_Dependency features */ + const KRef Antecedent; /* NumericSensor */ + const KRef Dependent; /* Fan */ + /* CIM_AssociatedSensor features */ + /* Linux_FanAssociatedSensor features */ +} +AssociatedSensor; + +static const unsigned char __AssociatedSensor_sig[] = +{ + 0x19,0x4c,0x69,0x6e,0x75,0x78,0x5f,0x46,0x61,0x6e,0x41,0x73,0x73,0x6f,0x63, + 0x69,0x61,0x74,0x65,0x64,0x53,0x65,0x6e,0x73,0x6f,0x72,0x00,0x02,0x4e,0x0a, + 0x41,0x6e,0x74,0x65,0x63,0x65,0x64,0x65,0x6e,0x74,0x00,0x4e,0x09,0x44,0x65, + 0x70,0x65,0x6e,0x64,0x65,0x6e,0x74,0x00, +}; + +KINLINE void AssociatedSensor_Init( + AssociatedSensor* self, + const CMPIBroker* cb, + const char* ns) +{ + const unsigned char* sig = __AssociatedSensor_sig; + KBase_Init(&self->__base, cb, sizeof(*self), sig, ns); + ((KRef*)&self->Antecedent)->__sig = __NumericSensor_sig; + ((KRef*)&self->Dependent)->__sig = __Fan_sig; +} + +KINLINE CMPIStatus AssociatedSensor_InitFromInstance( + AssociatedSensor* self, + const CMPIBroker* cb, + const CMPIInstance* x) +{ + AssociatedSensor_Init(self, cb, NULL); + return KBase_FromInstance(&self->__base, x); +} + +KINLINE CMPIStatus AssociatedSensor_InitFromObjectPath( + AssociatedSensor* self, + const CMPIBroker* cb, + const CMPIObjectPath* x) +{ + AssociatedSensor_Init(self, cb, NULL); + return KBase_FromObjectPath(&self->__base, x); +} + +KINLINE void AssociatedSensor_Print( + const AssociatedSensor* self, + FILE* os) +{ + KBase_Print(os, &self->__base, 'i'); +} + +KINLINE CMPIInstance* AssociatedSensor_ToInstance( + const AssociatedSensor* self, + CMPIStatus* status) +{ + return KBase_ToInstance(&self->__base, status); +} + +KINLINE CMPIObjectPath* AssociatedSensor_ToObjectPath( + const AssociatedSensor* self, + CMPIStatus* status) +{ + return KBase_ToObjectPath(&self->__base, status); +} + +KINLINE const char* AssociatedSensor_NameSpace( + AssociatedSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + return self->__base.ns ? KChars(self->__base.ns) : NULL; + return NULL; +} + +KINLINE void AssociatedSensor_SetObjectPath_Antecedent( + AssociatedSensor* self, + const CMPIObjectPath* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + KRef_SetObjectPath(field, x); + } +} + +KINLINE CMPIStatus AssociatedSensor_Set_Antecedent( + AssociatedSensor* self, + const NumericSensorRef* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + return KRef_Set(field, &x->__base); + } + CMReturn(CMPI_RC_ERR_FAILED); +} + +KINLINE void AssociatedSensor_Null_Antecedent( + AssociatedSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + KRef_Null(field); + } +} + +KINLINE void AssociatedSensor_Clr_Antecedent( + AssociatedSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + KRef_Clr(field); + } +} + +KINLINE void AssociatedSensor_SetObjectPath_Dependent( + AssociatedSensor* self, + const CMPIObjectPath* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + KRef_SetObjectPath(field, x); + } +} + +KINLINE CMPIStatus AssociatedSensor_Set_Dependent( + AssociatedSensor* self, + const FanRef* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + return KRef_Set(field, &x->__base); + } + CMReturn(CMPI_RC_ERR_FAILED); +} + +KINLINE void AssociatedSensor_Null_Dependent( + AssociatedSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + KRef_Null(field); + } +} + +KINLINE void AssociatedSensor_Clr_Dependent( + AssociatedSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + KRef_Clr(field); + } +} + +/* +**============================================================================== +** +** AssociatedSensor methods +** +**============================================================================== +*/ + +KINLINE CMPIStatus AssociatedSensor_DispatchMethod( + const CMPIBroker* cb, + CMPIMethodMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* meth, + const CMPIArgs* in, + CMPIArgs* out) +{ + AssociatedSensorRef self; + + KReturnIf(AssociatedSensorRef_InitFromObjectPath(&self, cb, cop)); + + + KReturn(ERR_METHOD_NOT_FOUND); +} + +#define AssociatedSensor_ClassName "Linux_FanAssociatedSensor" + +#endif /* _konkrete_AssociatedSensor_h */ Added: cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/AssociatedSensorProvider.c =================================================================== --- cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/AssociatedSensorProvider.c (rev 0) +++ cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/AssociatedSensorProvider.c 2008-08-20 21:10:23 UTC (rev 873) @@ -0,0 +1,246 @@ +#include <konkret/konkret.h> +#include "AssociatedSensor.h" +#include "Resource.h" + +static const CMPIBroker* _cb; + +static void AssociatedSensorInitialize() +{ +} + +static CMPIStatus AssociatedSensorCleanup( + CMPIInstanceMI* mi, + const CMPIContext* cc, + CMPIBoolean term) +{ + CMReturn(CMPI_RC_OK); +} + +static CMPIStatus AssociatedSensorEnumInstanceNames( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop) +{ + return KDefaultEnumerateInstanceNames( + _cb, mi, cc, cr, cop); +} + +static CMPIStatus AssociatedSensorEnumInstances( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char** properties) +{ + const char* ns = KNameSpace(cop); + struct FanInfo* data; + size_t size; + size_t i; + + /* Get fan resource data */ + + if (GetFanInfo(&data, &size) != 0) + KReturn2(_cb, ERR_FAILED, "failed to access fan resources"); + + /* For each fan */ + + for (i = 0; i < size; i++) + { + AssociatedSensor x; + NumericSensorRef a; + FanRef d; + + /* AssociatedSensor.Antecedent */ + NumericSensorRef_Init(&a, _cb, ns); + NumericSensorRef_Set_SystemCreationClassName(&a, SysClassName().str); + NumericSensorRef_Set_SystemName(&a, SysName().str); + NumericSensorRef_Set_CreationClassName(&a, "Linux_FanNumericSensor"); + NumericSensorRef_Set_DeviceID(&a, data[i].deviceID); + + /* AssociatedSensor.Dependent */ + FanRef_Init(&d, _cb, ns); + FanRef_Set_SystemCreationClassName(&d, SysClassName().str); + FanRef_Set_SystemName(&d, SysName().str); + FanRef_Set_CreationClassName(&d, "Linux_Fan"); + FanRef_Set_DeviceID(&d, data[i].deviceID); + + /* AssociatedSensor */ + AssociatedSensor_Init(&x, _cb, ns); + AssociatedSensor_Set_Antecedent(&x, &a); + AssociatedSensor_Set_Dependent(&x, &d); + + KReturnInstance(cr, x); + } + + /* Free resource data */ + free(data); + + CMReturn(CMPI_RC_OK); +} + +static CMPIStatus AssociatedSensorGetInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char** properties) +{ + return KDefaultGetInstance( + _cb, mi, cc, cr, cop, properties); +} + +static CMPIStatus AssociatedSensorCreateInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const CMPIInstance* ci) +{ + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); +} + +static CMPIStatus AssociatedSensorModifyInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const CMPIInstance* ci, + const char**properties) +{ + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); +} + +static CMPIStatus AssociatedSensorDeleteInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop) +{ + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); +} + +static CMPIStatus AssociatedSensorExecQuery( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* lang, + const char* query) +{ + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); +} + +static CMPIStatus AssociatedSensorAssociationCleanup( + CMPIAssociationMI* mi, + const CMPIContext* cc, + CMPIBoolean term) +{ + CMReturn(CMPI_RC_OK); +} + +static CMPIStatus AssociatedSensorAssociators( + CMPIAssociationMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* assocClass, + const char* resultClass, + const char* role, + const char* resultRole, + const char** properties) +{ + return KDefaultAssociators( + _cb, + mi, + cc, + cr, + cop, + AssociatedSensor_ClassName, + assocClass, + resultClass, + role, + resultRole, + properties); +} + +static CMPIStatus AssociatedSensorAssociatorNames( + CMPIAssociationMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* assocClass, + const char* resultClass, + const char* role, + const char* resultRole) +{ + return KDefaultAssociatorNames( + _cb, + mi, + cc, + cr, + cop, + AssociatedSensor_ClassName, + assocClass, + resultClass, + role, + resultRole); +} + +static CMPIStatus AssociatedSensorReferences( + CMPIAssociationMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* assocClass, + const char* role, + const char** properties) +{ + return KDefaultReferences( + _cb, + mi, + cc, + cr, + cop, + AssociatedSensor_ClassName, + assocClass, + role, + properties); +} + +static CMPIStatus AssociatedSensorReferenceNames( + CMPIAssociationMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* assocClass, + const char* role) +{ + return KDefaultReferenceNames( + _cb, + mi, + cc, + cr, + cop, + AssociatedSensor_ClassName, + assocClass, + role); +} + +CMInstanceMIStub( + AssociatedSensor, + Linux_FanAssociatedSensor, + _cb, + AssociatedSensorInitialize()) + +CMAssociationMIStub( + AssociatedSensor, + Linux_FanAssociatedSensor, + _cb, + AssociatedSensorInitialize()) + +KONKRET_REGISTRATION( + "root/cimv2", + "Linux_FanAssociatedSensor", + "Linux_FanAssociatedSensor", + "instance association"); Added: cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/CIM_AssociatedSensor.h =================================================================== --- cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/CIM_AssociatedSensor.h (rev 0) +++ cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/CIM_AssociatedSensor.h 2008-08-20 21:10:23 UTC (rev 873) @@ -0,0 +1,386 @@ +/* +**============================================================================== +** +** CAUTION: This file generated by KonkretCMPI. Please do not edit. +** +**============================================================================== +*/ + +#ifndef _konkrete_CIM_AssociatedSensor_h +#define _konkrete_CIM_AssociatedSensor_h + +#include <konkret/konkret.h> +#include "CIM_Sensor.h" +#include "CIM_ManagedSystemElement.h" + +/* +**============================================================================== +** +** struct CIM_AssociatedSensorRef +** +**============================================================================== +*/ + +/* classname=CIM_AssociatedSensor */ +typedef struct _CIM_AssociatedSensorRef +{ + KBase __base; + /* CIM_Dependency features */ + const KRef Antecedent; /* CIM_Sensor */ + const KRef Dependent; /* CIM_ManagedSystemElement */ + /* CIM_AssociatedSensor features */ +} +CIM_AssociatedSensorRef; + +static const unsigned char __CIM_AssociatedSensorRef_sig[] = +{ + 0x14,0x43,0x49,0x4d,0x5f,0x41,0x73,0x73,0x6f,0x63,0x69,0x61,0x74,0x65,0x64, + 0x53,0x65,0x6e,0x73,0x6f,0x72,0x00,0x02,0x4e,0x0a,0x41,0x6e,0x74,0x65,0x63, + 0x65,0x64,0x65,0x6e,0x74,0x00,0x4e,0x09,0x44,0x65,0x70,0x65,0x6e,0x64,0x65, + 0x6e,0x74,0x00, +}; + +KINLINE void CIM_AssociatedSensorRef_Init( + CIM_AssociatedSensorRef* self, + const CMPIBroker* cb, + const char* ns) +{ + const unsigned char* sig = __CIM_AssociatedSensorRef_sig; + KBase_Init(&self->__base, cb, sizeof(*self), sig, ns); + ((KRef*)&self->Antecedent)->__sig = __CIM_Sensor_sig; + ((KRef*)&self->Dependent)->__sig = __CIM_ManagedSystemElement_sig; +} + +KINLINE CMPIStatus CIM_AssociatedSensorRef_InitFromInstance( + CIM_AssociatedSensorRef* self, + const CMPIBroker* cb, + const CMPIInstance* x) +{ + CIM_AssociatedSensorRef_Init(self, cb, NULL); + return KBase_FromInstance(&self->__base, x); +} + +KINLINE CMPIStatus CIM_AssociatedSensorRef_InitFromObjectPath( + CIM_AssociatedSensorRef* self, + const CMPIBroker* cb, + const CMPIObjectPath* x) +{ + CIM_AssociatedSensorRef_Init(self, cb, NULL); + return KBase_FromObjectPath(&self->__base, x); +} + +KINLINE void CIM_AssociatedSensorRef_Print( + const CIM_AssociatedSensorRef* self, + FILE* os) +{ + KBase_Print(os, &self->__base, 'r'); +} + +KINLINE CMPIInstance* CIM_AssociatedSensorRef_ToInstance( + const CIM_AssociatedSensorRef* self, + CMPIStatus* status) +{ + return KBase_ToInstance(&self->__base, status); +} + +KINLINE CMPIObjectPath* CIM_AssociatedSensorRef_ToObjectPath( + const CIM_AssociatedSensorRef* self, + CMPIStatus* status) +{ + return KBase_ToObjectPath(&self->__base, status); +} + +KINLINE const char* CIM_AssociatedSensorRef_NameSpace( + CIM_AssociatedSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + return self->__base.ns ? KChars(self->__base.ns) : NULL; + return NULL; +} + +KINLINE void CIM_AssociatedSensorRef_SetObjectPath_Antecedent( + CIM_AssociatedSensorRef* self, + const CMPIObjectPath* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + KRef_SetObjectPath(field, x); + } +} + +KINLINE CMPIStatus CIM_AssociatedSensorRef_Set_Antecedent( + CIM_AssociatedSensorRef* self, + const CIM_SensorRef* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + return KRef_Set(field, &x->__base); + } + CMReturn(CMPI_RC_ERR_FAILED); +} + +KINLINE void CIM_AssociatedSensorRef_Null_Antecedent( + CIM_AssociatedSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + KRef_Null(field); + } +} + +KINLINE void CIM_AssociatedSensorRef_Clr_Antecedent( + CIM_AssociatedSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + KRef_Clr(field); + } +} + +KINLINE void CIM_AssociatedSensorRef_SetObjectPath_Dependent( + CIM_AssociatedSensorRef* self, + const CMPIObjectPath* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + KRef_SetObjectPath(field, x); + } +} + +KINLINE CMPIStatus CIM_AssociatedSensorRef_Set_Dependent( + CIM_AssociatedSensorRef* self, + const CIM_ManagedSystemElementRef* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + return KRef_Set(field, &x->__base); + } + CMReturn(CMPI_RC_ERR_FAILED); +} + +KINLINE void CIM_AssociatedSensorRef_Null_Dependent( + CIM_AssociatedSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + KRef_Null(field); + } +} + +KINLINE void CIM_AssociatedSensorRef_Clr_Dependent( + CIM_AssociatedSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + KRef_Clr(field); + } +} + +/* +**============================================================================== +** +** struct CIM_AssociatedSensor +** +**============================================================================== +*/ + +/* classname=CIM_AssociatedSensor */ +typedef struct _CIM_AssociatedSensor +{ + KBase __base; + /* CIM_Dependency features */ + const KRef Antecedent; /* CIM_Sensor */ + const KRef Dependent; /* CIM_ManagedSystemElement */ + /* CIM_AssociatedSensor features */ +} +CIM_AssociatedSensor; + +static const unsigned char __CIM_AssociatedSensor_sig[] = +{ + 0x14,0x43,0x49,0x4d,0x5f,0x41,0x73,0x73,0x6f,0x63,0x69,0x61,0x74,0x65,0x64, + 0x53,0x65,0x6e,0x73,0x6f,0x72,0x00,0x02,0x4e,0x0a,0x41,0x6e,0x74,0x65,0x63, + 0x65,0x64,0x65,0x6e,0x74,0x00,0x4e,0x09,0x44,0x65,0x70,0x65,0x6e,0x64,0x65, + 0x6e,0x74,0x00, +}; + +KINLINE void CIM_AssociatedSensor_Init( + CIM_AssociatedSensor* self, + const CMPIBroker* cb, + const char* ns) +{ + const unsigned char* sig = __CIM_AssociatedSensor_sig; + KBase_Init(&self->__base, cb, sizeof(*self), sig, ns); + ((KRef*)&self->Antecedent)->__sig = __CIM_Sensor_sig; + ((KRef*)&self->Dependent)->__sig = __CIM_ManagedSystemElement_sig; +} + +KINLINE CMPIStatus CIM_AssociatedSensor_InitFromInstance( + CIM_AssociatedSensor* self, + const CMPIBroker* cb, + const CMPIInstance* x) +{ + CIM_AssociatedSensor_Init(self, cb, NULL); + return KBase_FromInstance(&self->__base, x); +} + +KINLINE CMPIStatus CIM_AssociatedSensor_InitFromObjectPath( + CIM_AssociatedSensor* self, + const CMPIBroker* cb, + const CMPIObjectPath* x) +{ + CIM_AssociatedSensor_Init(self, cb, NULL); + return KBase_FromObjectPath(&self->__base, x); +} + +KINLINE void CIM_AssociatedSensor_Print( + const CIM_AssociatedSensor* self, + FILE* os) +{ + KBase_Print(os, &self->__base, 'i'); +} + +KINLINE CMPIInstance* CIM_AssociatedSensor_ToInstance( + const CIM_AssociatedSensor* self, + CMPIStatus* status) +{ + return KBase_ToInstance(&self->__base, status); +} + +KINLINE CMPIObjectPath* CIM_AssociatedSensor_ToObjectPath( + const CIM_AssociatedSensor* self, + CMPIStatus* status) +{ + return KBase_ToObjectPath(&self->__base, status); +} + +KINLINE const char* CIM_AssociatedSensor_NameSpace( + CIM_AssociatedSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + return self->__base.ns ? KChars(self->__base.ns) : NULL; + return NULL; +} + +KINLINE void CIM_AssociatedSensor_SetObjectPath_Antecedent( + CIM_AssociatedSensor* self, + const CMPIObjectPath* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + KRef_SetObjectPath(field, x); + } +} + +KINLINE CMPIStatus CIM_AssociatedSensor_Set_Antecedent( + CIM_AssociatedSensor* self, + const CIM_SensorRef* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + return KRef_Set(field, &x->__base); + } + CMReturn(CMPI_RC_ERR_FAILED); +} + +KINLINE void CIM_AssociatedSensor_Null_Antecedent( + CIM_AssociatedSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + KRef_Null(field); + } +} + +KINLINE void CIM_AssociatedSensor_Clr_Antecedent( + CIM_AssociatedSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Antecedent; + KRef_Clr(field); + } +} + +KINLINE void CIM_AssociatedSensor_SetObjectPath_Dependent( + CIM_AssociatedSensor* self, + const CMPIObjectPath* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + KRef_SetObjectPath(field, x); + } +} + +KINLINE CMPIStatus CIM_AssociatedSensor_Set_Dependent( + CIM_AssociatedSensor* self, + const CIM_ManagedSystemElementRef* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + return KRef_Set(field, &x->__base); + } + CMReturn(CMPI_RC_ERR_FAILED); +} + +KINLINE void CIM_AssociatedSensor_Null_Dependent( + CIM_AssociatedSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + KRef_Null(field); + } +} + +KINLINE void CIM_AssociatedSensor_Clr_Dependent( + CIM_AssociatedSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KRef* field = (KRef*)&self->Dependent; + KRef_Clr(field); + } +} + +/* +**============================================================================== +** +** CIM_AssociatedSensor methods +** +**============================================================================== +*/ + +KINLINE CMPIStatus CIM_AssociatedSensor_DispatchMethod( + const CMPIBroker* cb, + CMPIMethodMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* meth, + const CMPIArgs* in, + CMPIArgs* out) +{ + CIM_AssociatedSensorRef self; + + KReturnIf(CIM_AssociatedSensorRef_InitFromObjectPath(&self, cb, cop)); + + + KReturn(ERR_METHOD_NOT_FOUND); +} + +#define CIM_AssociatedSensor_ClassName "CIM_AssociatedSensor" + +#endif /* _konkrete_CIM_AssociatedSensor_h */ Added: cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/CIM_NumericSensor.h =================================================================== --- cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/CIM_NumericSensor.h (rev 0) +++ cmpiprofiles/sblim-cmpi-fan_profile/trunk/src/CIM_NumericSensor.h 2008-08-20 21:10:23 UTC (rev 873) @@ -0,0 +1,6012 @@ +/* +**============================================================================== +** +** CAUTION: This file generated by KonkretCMPI. Please do not edit. +** +**============================================================================== +*/ + +#ifndef _konkrete_CIM_NumericSensor_h +#define _konkrete_CIM_NumericSensor_h + +#include <konkret/konkret.h> +#include "CIM_ConcreteJob.h" + +/* +**============================================================================== +** +** struct CIM_NumericSensorRef +** +**============================================================================== +*/ + +/* classname=CIM_NumericSensor */ +typedef struct _CIM_NumericSensorRef +{ + KBase __base; + /* CIM_ManagedElement features */ + /* CIM_ManagedSystemElement features */ + /* CIM_LogicalElement features */ + /* CIM_EnabledLogicalElement features */ + /* CIM_LogicalDevice features */ + const KString SystemCreationClassName; + const KString SystemName; + const KString CreationClassName; + const KString DeviceID; + /* CIM_Sensor features */ + /* CIM_NumericSensor features */ +} +CIM_NumericSensorRef; + +static const unsigned char __CIM_NumericSensorRef_sig[] = +{ + 0x11,0x43,0x49,0x4d,0x5f,0x4e,0x75,0x6d,0x65,0x72,0x69,0x63,0x53,0x65,0x6e, + 0x73,0x6f,0x72,0x00,0x04,0x4c,0x17,0x53,0x79,0x73,0x74,0x65,0x6d,0x43,0x72, + 0x65,0x61,0x74,0x69,0x6f,0x6e,0x43,0x6c,0x61,0x73,0x73,0x4e,0x61,0x6d,0x65, + 0x00,0x4c,0x0a,0x53,0x79,0x73,0x74,0x65,0x6d,0x4e,0x61,0x6d,0x65,0x00,0x4c, + 0x11,0x43,0x72,0x65,0x61,0x74,0x69,0x6f,0x6e,0x43,0x6c,0x61,0x73,0x73,0x4e, + 0x61,0x6d,0x65,0x00,0x4c,0x08,0x44,0x65,0x76,0x69,0x63,0x65,0x49,0x44,0x00, +}; + +KINLINE void CIM_NumericSensorRef_Init( + CIM_NumericSensorRef* self, + const CMPIBroker* cb, + const char* ns) +{ + const unsigned char* sig = __CIM_NumericSensorRef_sig; + KBase_Init(&self->__base, cb, sizeof(*self), sig, ns); +} + +KINLINE CMPIStatus CIM_NumericSensorRef_InitFromInstance( + CIM_NumericSensorRef* self, + const CMPIBroker* cb, + const CMPIInstance* x) +{ + CIM_NumericSensorRef_Init(self, cb, NULL); + return KBase_FromInstance(&self->__base, x); +} + +KINLINE CMPIStatus CIM_NumericSensorRef_InitFromObjectPath( + CIM_NumericSensorRef* self, + const CMPIBroker* cb, + const CMPIObjectPath* x) +{ + CIM_NumericSensorRef_Init(self, cb, NULL); + return KBase_FromObjectPath(&self->__base, x); +} + +KINLINE void CIM_NumericSensorRef_Print( + const CIM_NumericSensorRef* self, + FILE* os) +{ + KBase_Print(os, &self->__base, 'r'); +} + +KINLINE CMPIInstance* CIM_NumericSensorRef_ToInstance( + const CIM_NumericSensorRef* self, + CMPIStatus* status) +{ + return KBase_ToInstance(&self->__base, status); +} + +KINLINE CMPIObjectPath* CIM_NumericSensorRef_ToObjectPath( + const CIM_NumericSensorRef* self, + CMPIStatus* status) +{ + return KBase_ToObjectPath(&self->__base, status); +} + +KINLINE const char* CIM_NumericSensorRef_NameSpace( + CIM_NumericSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + return self->__base.ns ? KChars(self->__base.ns) : NULL; + return NULL; +} + +KINLINE void CIM_NumericSensorRef_SetString_SystemCreationClassName( + CIM_NumericSensorRef* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->SystemCreationClassName; + KString_SetString(field, x); + } +} + +KINLINE void CIM_NumericSensorRef_Set_SystemCreationClassName( + CIM_NumericSensorRef* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->SystemCreationClassName; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_NumericSensorRef_Null_SystemCreationClassName( + CIM_NumericSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->SystemCreationClassName; + KString_Null(field); + } +} + +KINLINE void CIM_NumericSensorRef_Clr_SystemCreationClassName( + CIM_NumericSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->SystemCreationClassName; + KString_Clr(field); + } +} + +KINLINE void CIM_NumericSensorRef_SetString_SystemName( + CIM_NumericSensorRef* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->SystemName; + KString_SetString(field, x); + } +} + +KINLINE void CIM_NumericSensorRef_Set_SystemName( + CIM_NumericSensorRef* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->SystemName; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_NumericSensorRef_Null_SystemName( + CIM_NumericSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->SystemName; + KString_Null(field); + } +} + +KINLINE void CIM_NumericSensorRef_Clr_SystemName( + CIM_NumericSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->SystemName; + KString_Clr(field); + } +} + +KINLINE void CIM_NumericSensorRef_SetString_CreationClassName( + CIM_NumericSensorRef* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->CreationClassName; + KString_SetString(field, x); + } +} + +KINLINE void CIM_NumericSensorRef_Set_CreationClassName( + CIM_NumericSensorRef* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->CreationClassName; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_NumericSensorRef_Null_CreationClassName( + CIM_NumericSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->CreationClassName; + KString_Null(field); + } +} + +KINLINE void CIM_NumericSensorRef_Clr_CreationClassName( + CIM_NumericSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->CreationClassName; + KString_Clr(field); + } +} + +KINLINE void CIM_NumericSensorRef_SetString_DeviceID( + CIM_NumericSensorRef* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->DeviceID; + KString_SetString(field, x); + } +} + +KINLINE void CIM_NumericSensorRef_Set_DeviceID( + CIM_NumericSensorRef* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->DeviceID; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_NumericSensorRef_Null_DeviceID( + CIM_NumericSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->DeviceID; + KString_Null(field); + } +} + +KINLINE void CIM_NumericSensorRef_Clr_DeviceID( + CIM_NumericSensorRef* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->DeviceID; + KString_Clr(field); + } +} + +/* +**============================================================================== +** +** struct CIM_NumericSensor +** +**============================================================================== +*/ + +/* classname=CIM_NumericSensor */ +typedef struct _CIM_NumericSensor +{ + KBase __base; + /* CIM_ManagedElement features */ + const KString Caption; + const KString Description; + const KString ElementName; + /* CIM_ManagedSystemElement features */ + const KDateTime InstallDate; + const KString Name; + const KUint16A OperationalStatus; + const KStringA StatusDescriptions; + const KString Status; + const KUint16 HealthState; + const KUint16 PrimaryStatus; + const KUint16 DetailedStatus; + const KUint16 OperatingStatus; + const KUint16 CommunicationStatus; + /* CIM_LogicalElement features */ + /* CIM_EnabledLogicalElement features */ + const KUint16 EnabledState; + const KString OtherEnabledState; + const KUint16 RequestedState; + const KUint16 EnabledDefault; + const KDateTime TimeOfLastStateChange; + const KUint16A AvailableRequestedStates; + const KUint16 TransitioningToState; + /* CIM_LogicalDevice features */ + const KString SystemCreationClassName; + const KString SystemName; + const KString CreationClassName; + const KString DeviceID; + const KBoolean PowerManagementSupported; + const KUint16A PowerManagementCapabilities; + const KUint16 Availability; + const KUint16 StatusInfo; + const KUint32 LastErrorCode; + const KString ErrorDescription; + const KBoolean ErrorCleared; + const KStringA OtherIdentifyingInfo; + const KUint64 PowerOnHours; + const KUint64 TotalPowerOnHours; + const KStringA IdentifyingDescriptions; + const KUint16A AdditionalAvailability; + const KUint64 MaxQuiesceTime; + const KUint16 LocationIndicator; + /* CIM_Sensor features */ + const KUint16 SensorType; + const KString OtherSensorTypeDescription; + const KStringA PossibleStates; + const KString CurrentState; + const KUint64 PollingInterval; + const KString SensorContext; + /* CIM_NumericSensor features */ + const KUint16 BaseUnits; + const KSint32 UnitModifier; + const KUint16 RateUnits; + const KSint32 CurrentReading; + const KSint32 NominalReading; + const KSint32 NormalMax; + const KSint32 NormalMin; + const KSint32 MaxReadable; + const KSint32 MinReadable; + const KUint32 Resolution; + const KSint32 Tolerance; + const KSint32 Accuracy; + const KBoolean IsLinear; + const KUint32 Hysteresis; + const KSint32 LowerThresholdNonCritical; + const KSint32 UpperThresholdNonCritical; + const KSint32 LowerThresholdCritical; + const KSint32 UpperThresholdCritical; + const KSint32 LowerThresholdFatal; + const KSint32 UpperThresholdFatal; + const KUint16A SupportedThresholds; + const KUint16A EnabledThresholds; + const KUint16A SettableThresholds; + const KUint32 ProgrammaticAccuracy; + const KString AccuracyUnits; + const KUint16 ValueFormulation; +} +CIM_NumericSensor; + +static const unsigned char __CIM_NumericSensor_sig[] = +{ + 0x11,0x43,0x49,0x4d,0x5f,0x4e,0x75,0x6d,0x65,0x72,0x69,0x63,0x53,0x65,0x6e, + 0x73,0x6f,0x72,0x00,0x46,0x0c,0x07,0x43,0x61,0x70,0x74,0x69,0x6f,0x6e,0x00, + 0x0c,0x0b,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x00,0x0c, + 0x0b,0x45,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x4e,0x61,0x6d,0x65,0x00,0x0d,0x0b, + 0x49,0x6e,0x73,0x74,0x61,0x6c,0x6c,0x44,0x61,0x74,0x65,0x00,0x0c,0x04,0x4e, + 0x61,0x6d,0x65,0x00,0x83,0x11,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e, + 0x61,0x6c,0x53,0x74,0x61,0x74,0x75,0x73,0x00,0x8c,0x12,0x53,0x74,0x61,0x74, + 0x75,0x73,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x73,0x00, + 0x0c,0x06,0x53,0x74,0x61,0x74,0x75,0x73,0x00,0x03,0x0b,0x48,0x65,0x61,0x6c, + 0x74,0x68,0x53,0x74,0x61,0x74,0x65,0x00,0x03,0x0d,0x50,0x72,0x69,0x6d,0x61, + 0x72,0x79,0x53,0x74,0x61,0x74,0x75,0x73,0x00,0x03,0x0e,0x44,0x65,0x74,0x61, + 0x69,0x6c,0x65,0x64,0x53,0x74,0x61,0x74,0x75,0x73,0x00,0x03,0x0f,0x4f,0x70, + 0x65,0x72,0x61,0x74,0x69,0x6e,0x67,0x53,0x74,0x61,0x74,0x75,0x73,0x00,0x03, + 0x13,0x43,0x6f,0x6d,0x6d,0x75,0x6e,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x53, + 0x74,0x61,0x74,0x75,0x73,0x00,0x03,0x0c,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64, + 0x53,0x74,0x61,0x74,0x65,0x00,0x0c,0x11,0x4f,0x74,0x68,0x65,0x72,0x45,0x6e, + 0x61,0x62,0x6c,0x65,0x64,0x53,0x74,0x61,0x74,0x65,0x00,0x03,0x0e,0x52,0x65, + 0x71,0x75,0x65,0x73,0x74,0x65,0x64,0x53,0x74,0x61,0x74,0x65,0x00,0x03,0x0e, + 0x45,0x6e,0x61,0x62,0x6c,0x65,0x64,0x44,0x65,0x66,0x61,0x75,0x6c,0x74,0x00, + 0x0d,0x15,0x54,0x69,0x6d,0x65,0x4f,0x66,0x4c,0x61,0x73,0x74,0x53,0x74,0x61, + 0x74,0x65,0x43,0x68,0x61,0x6e,0x67,0x65,0x00,0x83,0x18,0x41,0x76,0x61,0x69, + 0x6c,0x61,0x62,0x6c,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74,0x65,0x64,0x53, + 0x74,0x61,0x74,0x65,0x73,0x00,0x03,0x14,0x54,0x72,0x61,0x6e,0x73,0x69,0x74, + 0x69,0x6f,0x6e,0x69,0x6e,0x67,0x54,0x6f,0x53,0x74,0x61,0x74,0x65,0x00,0x4c, + 0x17,0x53,0x79,0x73,0x74,0x65,0x6d,0x43,0x72,0x65,0x61,0x74,0x69,0x6f,0x6e, + 0x43,0x6c,0x61,0x73,0x73,0x4e,0x61,0x6d,0x65,0x00,0x4c,0x0a,0x53,0x79,0x73, + 0x74,0x65,0x6d,0x4e,0x61,0x6d,0x65,0x00,0x4c,0x11,0x43,0x72,0x65,0x61,0x74, + 0x69,0x6f,0x6e,0x43,0x6c,0x61,0x73,0x73,0x4e,0x61,0x6d,0x65,0x00,0x4c,0x08, + 0x44,0x65,0x76,0x69,0x63,0x65,0x49,0x44,0x00,0x00,0x18,0x50,0x6f,0x77,0x65, + 0x72,0x4d,0x61,0x6e,0x61,0x67,0x65,0x6d,0x65,0x6e,0x74,0x53,0x75,0x70,0x70, + 0x6f,0x72,0x74,0x65,0x64,0x00,0x83,0x1b,0x50,0x6f,0x77,0x65,0x72,0x4d,0x61, + 0x6e,0x61,0x67,0x65,0x6d,0x65,0x6e,0x74,0x43,0x61,0x70,0x61,0x62,0x69,0x6c, + 0x69,0x74,0x69,0x65,0x73,0x00,0x03,0x0c,0x41,0x76,0x61,0x69,0x6c,0x61,0x62, + 0x69,0x6c,0x69,0x74,0x79,0x00,0x03,0x0a,0x53,0x74,0x61,0x74,0x75,0x73,0x49, + 0x6e,0x66,0x6f,0x00,0x05,0x0d,0x4c,0x61,0x73,0x74,0x45,0x72,0x72,0x6f,0x72, + 0x43,0x6f,0x64,0x65,0x00,0x0c,0x10,0x45,0x72,0x72,0x6f,0x72,0x44,0x65,0x73, + 0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x00,0x00,0x0c,0x45,0x72,0x72,0x6f, + 0x72,0x43,0x6c,0x65,0x61,0x72,0x65,0x64,0x00,0x8c,0x14,0x4f,0x74,0x68,0x65, + 0x72,0x49,0x64,0x65,0x6e,0x74,0x69,0x66,0x79,0x69,0x6e,0x67,0x49,0x6e,0x66, + 0x6f,0x00,0x07,0x0c,0x50,0x6f,0x77,0x65,0x72,0x4f,0x6e,0x48,0x6f,0x75,0x72, + 0x73,0x00,0x07,0x11,0x54,0x6f,0x74,0x61,0x6c,0x50,0x6f,0x77,0x65,0x72,0x4f, + 0x6e,0x48,0x6f,0x75,0x72,0x73,0x00,0x8c,0x17,0x49,0x64,0x65,0x6e,0x74,0x69, + 0x66,0x79,0x69,0x6e,0x67,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f, + 0x6e,0x73,0x00,0x83,0x16,0x41,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c, + 0x41,0x76,0x61,0x69,0x6c,0x61,0x62,0x69,0x6c,0x69,0x74,0x79,0x00,0x07,0x0e, + 0x4d,0x61,0x78,0x51,0x75,0x69,0x65,0x73,0x63,0x65,0x54,0x69,0x6d,0x65,0x00, + 0x03,0x11,0x4c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e,0x49,0x6e,0x64,0x69,0x63, + 0x61,0x74,0x6f,0x72,0x00,0x03,0x0a,0x53,0x65,0x6e,0x73,0x6f,0x72,0x54,0x79, + 0x70,0x65,0x00,0x0c,0x1a,0x4f,0x74,0x68,0x65,0x72,0x53,0x65,0x6e,0x73,0x6f, + 0x72,0x54,0x79,0x70,0x65,0x44,0x65,0x73,0x63,0x72,0x69,0x70,0x74,0x69,0x6f, + 0x6e,0x00,0x8c,0x0e,0x50,0x6f,0x73,0x73,0x69,0x62,0x6c,0x65,0x53,0x74,0x61, + 0x74,0x65,0x73,0x00,0x0c,0x0c,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x53,0x74, + 0x61,0x74,0x65,0x00,0x07,0x0f,0x50,0x6f,0x6c,0x6c,0x69,0x6e,0x67,0x49,0x6e, + 0x74,0x65,0x72,0x76,0x61,0x6c,0x00,0x0c,0x0d,0x53,0x65,0x6e,0x73,0x6f,0x72, + 0x43,0x6f,0x6e,0x74,0x65,0x78,0x74,0x00,0x03,0x09,0x42,0x61,0x73,0x65,0x55, + 0x6e,0x69,0x74,0x73,0x00,0x06,0x0c,0x55,0x6e,0x69,0x74,0x4d,0x6f,0x64,0x69, + 0x66,0x69,0x65,0x72,0x00,0x03,0x09,0x52,0x61,0x74,0x65,0x55,0x6e,0x69,0x74, + 0x73,0x00,0x06,0x0e,0x43,0x75,0x72,0x72,0x65,0x6e,0x74,0x52,0x65,0x61,0x64, + 0x69,0x6e,0x67,0x00,0x06,0x0e,0x4e,0x6f,0x6d,0x69,0x6e,0x61,0x6c,0x52,0x65, + 0x61,0x64,0x69,0x6e,0x67,0x00,0x06,0x09,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x4d, + 0x61,0x78,0x00,0x06,0x09,0x4e,0x6f,0x72,0x6d,0x61,0x6c,0x4d,0x69,0x6e,0x00, + 0x06,0x0b,0x4d,0x61,0x78,0x52,0x65,0x61,0x64,0x61,0x62,0x6c,0x65,0x00,0x06, + 0x0b,0x4d,0x69,0x6e,0x52,0x65,0x61,0x64,0x61,0x62,0x6c,0x65,0x00,0x05,0x0a, + 0x52,0x65,0x73,0x6f,0x6c,0x75,0x74,0x69,0x6f,0x6e,0x00,0x06,0x09,0x54,0x6f, + 0x6c,0x65,0x72,0x61,0x6e,0x63,0x65,0x00,0x06,0x08,0x41,0x63,0x63,0x75,0x72, + 0x61,0x63,0x79,0x00,0x00,0x08,0x49,0x73,0x4c,0x69,0x6e,0x65,0x61,0x72,0x00, + 0x05,0x0a,0x48,0x79,0x73,0x74,0x65,0x72,0x65,0x73,0x69,0x73,0x00,0x06,0x19, + 0x4c,0x6f,0x77,0x65,0x72,0x54,0x68,0x72,0x65,0x73,0x68,0x6f,0x6c,0x64,0x4e, + 0x6f,0x6e,0x43,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x00,0x06,0x19,0x55,0x70, + 0x70,0x65,0x72,0x54,0x68,0x72,0x65,0x73,0x68,0x6f,0x6c,0x64,0x4e,0x6f,0x6e, + 0x43,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x00,0x06,0x16,0x4c,0x6f,0x77,0x65, + 0x72,0x54,0x68,0x72,0x65,0x73,0x68,0x6f,0x6c,0x64,0x43,0x72,0x69,0x74,0x69, + 0x63,0x61,0x6c,0x00,0x06,0x16,0x55,0x70,0x70,0x65,0x72,0x54,0x68,0x72,0x65, + 0x73,0x68,0x6f,0x6c,0x64,0x43,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x00,0x06, + 0x13,0x4c,0x6f,0x77,0x65,0x72,0x54,0x68,0x72,0x65,0x73,0x68,0x6f,0x6c,0x64, + 0x46,0x61,0x74,0x61,0x6c,0x00,0x06,0x13,0x55,0x70,0x70,0x65,0x72,0x54,0x68, + 0x72,0x65,0x73,0x68,0x6f,0x6c,0x64,0x46,0x61,0x74,0x61,0x6c,0x00,0x83,0x13, + 0x53,0x75,0x70,0x70,0x6f,0x72,0x74,0x65,0x64,0x54,0x68,0x72,0x65,0x73,0x68, + 0x6f,0x6c,0x64,0x73,0x00,0x83,0x11,0x45,0x6e,0x61,0x62,0x6c,0x65,0x64,0x54, + 0x68,0x72,0x65,0x73,0x68,0x6f,0x6c,0x64,0x73,0x00,0x83,0x12,0x53,0x65,0x74, + 0x74,0x61,0x62,0x6c,0x65,0x54,0x68,0x72,0x65,0x73,0x68,0x6f,0x6c,0x64,0x73, + 0x00,0x05,0x14,0x50,0x72,0x6f,0x67,0x72,0x61,0x6d,0x6d,0x61,0x74,0x69,0x63, + 0x41,0x63,0x63,0x75,0x72,0x61,0x63,0x79,0x00,0x0c,0x0d,0x41,0x63,0x63,0x75, + 0x72,0x61,0x63,0x79,0x55,0x6e,0x69,0x74,0x73,0x00,0x03,0x10,0x56,0x61,0x6c, + 0x75,0x65,0x46,0x6f,0x72,0x6d,0x75,0x6c,0x61,0x74,0x69,0x6f,0x6e,0x00, +}; + +KINLINE void CIM_NumericSensor_Init( + CIM_NumericSensor* self, + const CMPIBroker* cb, + const char* ns) +{ + const unsigned char* sig = __CIM_NumericSensor_sig; + KBase_Init(&self->__base, cb, sizeof(*self), sig, ns); +} + +KINLINE CMPIStatus CIM_NumericSensor_InitFromInstance( + CIM_NumericSensor* self, + const CMPIBroker* cb, + const CMPIInstance* x) +{ + CIM_NumericSensor_Init(self, cb, NULL); + return KBase_FromInstance(&self->__base, x); +} + +KINLINE CMPIStatus CIM_NumericSensor_InitFromObjectPath( + CIM_NumericSensor* self, + const CMPIBroker* cb, + const CMPIObjectPath* x) +{ + CIM_NumericSensor_Init(self, cb, NULL); + return KBase_FromObjectPath(&self->__base, x); +} + +KINLINE void CIM_NumericSensor_Print( + const CIM_NumericSensor* self, + FILE* os) +{ + KBase_Print(os, &self->__base, 'i'); +} + +KINLINE CMPIInstance* CIM_NumericSensor_ToInstance( + const CIM_NumericSensor* self, + CMPIStatus* status) +{ + return KBase_ToInstance(&self->__base, status); +} + +KINLINE CMPIObjectPath* CIM_NumericSensor_ToObjectPath( + const CIM_NumericSensor* self, + CMPIStatus* status) +{ + return KBase_ToObjectPath(&self->__base, status); +} + +KINLINE const char* CIM_NumericSensor_NameSpace( + CIM_NumericSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + return self->__base.ns ? KChars(self->__base.ns) : NULL; + return NULL; +} + +KINLINE void CIM_NumericSensor_SetString_Caption( + CIM_NumericSensor* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Caption; + KString_SetString(field, x); + } +} + +KINLINE void CIM_NumericSensor_Set_Caption( + CIM_NumericSensor* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Caption; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_NumericSensor_Null_Caption( + CIM_NumericSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Caption; + KString_Null(field); + } +} + +KINLINE void CIM_NumericSensor_Clr_Caption( + CIM_NumericSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Caption; + KString_Clr(field); + } +} + +KINLINE void CIM_NumericSensor_SetString_Description( + CIM_NumericSensor* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Description; + KString_SetString(field, x); + } +} + +KINLINE void CIM_NumericSensor_Set_Description( + CIM_NumericSensor* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Description; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_NumericSensor_Null_Description( + CIM_NumericSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Description; + KString_Null(field); + } +} + +KINLINE void CIM_NumericSensor_Clr_Description( + CIM_NumericSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Description; + KString_Clr(field); + } +} + +KINLINE void CIM_NumericSensor_SetString_ElementName( + CIM_NumericSensor* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->ElementName; + KString_SetString(field, x); + } +} + +KINLINE void CIM_NumericSensor_Set_ElementName( + CIM_NumericSensor* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->ElementName; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_NumericSensor_Null_ElementName( + CIM_NumericSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->ElementName; + KString_Null(field); + } +} + +KINLINE void CIM_NumericSensor_Clr_ElementName( + CIM_NumericSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->ElementName; + KString_Clr(field); + } +} + +KINLINE void CIM_NumericSensor_Set_InstallDate( + CIM_NumericSensor* self, + CMPIDateTime* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->InstallDate; + KDateTime_Set(field, x); + } +} + +KINLINE void CIM_NumericSensor_Null_InstallDate( + CIM_NumericSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->InstallDate; + KDateTime_Null(field); + } +} + +KINLINE void CIM_NumericSensor_Clr_InstallDate( + CIM_NumericSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KDateTime* field = (KDateTime*)&self->InstallDate; + KDateTime_Clr(field); + } +} + +KINLINE void CIM_NumericSensor_SetString_Name( + CIM_NumericSensor* self, + CMPIString* x) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Name; + KString_SetString(field, x); + } +} + +KINLINE void CIM_NumericSensor_Set_Name( + CIM_NumericSensor* self, + const char* s) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Name; + KString_Set(field, self->__base.cb, s); + } +} + +KINLINE void CIM_NumericSensor_Null_Name( + CIM_NumericSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Name; + KString_Null(field); + } +} + +KINLINE void CIM_NumericSensor_Clr_Name( + CIM_NumericSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KString* field = (KString*)&self->Name; + KString_Clr(field); + } +} + +KINLINE CMPIBoolean CIM_NumericSensor_Init_OperationalStatus( + CIM_NumericSensor* self, + CMPICount count) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16A* field = (KUint16A*)&self->OperationalStatus; + return KUint16A_Init(field, self->__base.cb, count); + } + return 0; +} + +KINLINE void CIM_NumericSensor_InitNull_OperationalStatus( + CIM_NumericSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16A* field = (KUint16A*)&self->OperationalStatus; + KUint16A_InitNull(field); + } +} + +KINLINE CMPIBoolean CIM_NumericSensor_Set_OperationalStatus( + CIM_NumericSensor* self, + CMPICount i, + CMPIUint16 x) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16A* field = (KUint16A*)&self->OperationalStatus; + return KUint16A_Set(field, i, x); + } + return 0; +} + +KINLINE KUint16 CIM_NumericSensor_Get_OperationalStatus( + CIM_NumericSensor* self, + CMPICount i) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16A* field = (KUint16A*)&self->OperationalStatus; + return KUint16A_Get(field, i); + } + return KUint16A_Get(NULL, 0); +} + +KINLINE CMPIBoolean CIM_NumericSensor_Null_OperationalStatus( + CIM_NumericSensor* self, + CMPICount i) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16A* field = (KUint16A*)&self->OperationalStatus; + return KUint16A_Null(field, i); + } + return 0; +} + +KINLINE void CIM_NumericSensor_Clr_OperationalStatus( + CIM_NumericSensor* self) +{ + if (self && self->__base.magic == KMAGIC) + { + KUint16A* field = (KUint16A*)&self->OperationalStatus; + KUint16A_Clr(field); + } +} + +typedef enum _CIM_NumericSensor_OperationalStatus_Enum +{ + CIM_NumericSensor_OperationalStatus_Unknown = 0, + CIM_NumericSensor_OperationalStatus_Other = 1, + CIM_NumericSensor_OperationalStatus_OK = 2, + CIM_NumericSensor_OperationalStatus_Degraded = 3, + CIM_NumericSensor_OperationalStatus_Stressed = 4, + CIM_NumericSensor_OperationalStatus_Predictive_Failure = 5, + CIM_NumericSensor_OperationalStatus_Error = 6, + CIM_NumericSensor_OperationalStatus_Non_Recoverable_Error = 7, + CIM_NumericSensor_OperationalStatus_Starting = 8, + CIM_NumericSensor_OperationalStatus_Stopping = 9, + CIM_NumericSensor_OperationalStatus_Stopped = 10, + CIM_NumericSensor_OperationalStatus_In_Service = 11, + CIM_NumericSensor_OperationalStatus_No_Contact = 12, + CIM_NumericSensor_OperationalStatus_Lost_Communication = 13, + CIM_NumericSensor_OperationalStatus_Aborted = 14, + CIM_NumericSensor_OperationalStatus_Dormant = 15, + CIM_NumericSensor_OperationalStatus_Supporting_Entity_in_Error = 16, + CIM_NumericSensor_OperationalStatus_Completed = 17, + CIM_NumericSensor_OperationalStatus_Power_Mode = 18, + CIM_NumericSensor_OperationalStatus_DMTF_Reserved = 0, + CIM_NumericSensor_OperationalStatus_Vendor_Reserved = 0, +} +CIM_NumericSensor_OperationalStatus_Enum; + +/* "Unknown" */ +#define CIM_NumericSensor_Set_OperationalStatus_Unknown(SELF, INDEX)\ + CIM_NumericSensor_Set_OperationalStatus(SELF, INDEX, 0) + +/* "Other" */ +#define CIM_NumericSensor_Set_OperationalStatus_Other(SELF, INDEX)\ + CIM_NumericSensor_Set_OperationalStatus(SELF, INDEX, 1) + +/* "OK" */ +#define CIM_NumericSensor_Set_OperationalStatus_OK(SELF, INDEX)\ + CIM_NumericSensor_Set_OperationalStatus(SELF, INDEX, 2) + +/* "Degraded" */ +#define CIM_NumericSensor_Set_OperationalStatus_Degraded(SELF, INDEX)\ + CIM_NumericSensor_Set_OperationalStatus(SELF, INDEX, 3) + +/* "Stressed" */ +#define CIM_NumericSensor_Set_OperationalStatus_Stressed(SELF, INDEX)\ + CIM_NumericSensor_Set_OperationalStatus(SELF, INDEX, 4) + +/* "Predictive Failure" */ +#define CIM_NumericSensor_Set_OperationalStatus_Predictive_Failure(SELF, INDEX)\ + CIM_NumericSensor_Set_OperationalStatus(SELF, INDEX, 5) + +/* "Error" */ +#define CIM_NumericSensor_Set_OperationalStatus_Error(SELF, INDEX)\ + CIM_NumericSensor_Set_OperationalStatus(SELF, INDEX, 6) + +/* "Non-Recoverable Error" */ +#de... [truncated message content] |