Export (0) Print
Expand All

Sensor class

Represents a hardware device that measures the characteristics of a physical property, such as the temperature or voltage of a computer system. The SensorType property distinguishes between types of sensors. Each Sensor instance is a node that contains NumericSensor instances. For example, all of the voltage sensors represented by NumericSensor may be grouped under a Sensor instance for voltages.

The following syntax is simplified from Managed Object Format (MOF) code and includes all inherited properties. Properties and methods are in alphabetic order, not MOF order.

Syntax

[Provider("IPMIPrv"), Dynamic]class Sensor : CIM_Sensor
{
  string   Caption;
  string   Description;
  string   ElementName;
  datetime InstallDate;
  string   Name;
  uint16   OperationalStatus[];
  string   StatusDescriptions[];
  string   Status;
  uint16   HealthState;
  uint16   AdditionalAvailability[];
  uint16   Availability;
  string   CreationClassName;
  string   CurrentState;
  string   DeviceID;
  boolean  ErrorCleared;
  string   ErrorDescription;
  uint32   LastErrorCode;
  uint64   MaxQuiesceTime;
  string   OtherIdentifyingInfo[];
  string   OtherSensorTypeDescription;
  uint64   PollingInterval;
  string   PossibleStates[];
  uint16   PowerManagementCapabilities[];
  boolean  PowerManagementSupported;
  uint64   PowerOnHours;
  uint16   SensorType;
  uint16   StatusInfo[];
  string   SystemCreationClassName;
  string   SystemName;
  uint64   TotalPowerOnHours;
  uint16   EnabledState;
  string   OtherEnabledState;
  uint16   RequestedState;
  uint16   EnabledDefault;
  datetime TimeOfLastStateChange;
};

Members

The Sensor class has these types of members:

Methods

The Sensor class has these methods.

MethodDescription
EnableDevice

Note  This method is deprecated. Instead we recommend that you use the RequestStateChange method.

Enable or disables the sensor.

This method is inherited from CIM_LogicalDevice.

OnlineDevice

Note  This method is deprecated. Instead we recommend that you use the RequestStateChange method.

Brings the sensor online so it can accept requests, or offline so it can no longer accept requests.

This method is inherited from CIM_LogicalDevice.

QuiesceDevice

Note  This method is deprecated. Instead we recommend that you use the RequestStateChange method.

Temporarily suspends activity on the sensor, or re-enables the activity.

This method is inherited from CIM_LogicalDevice.

RequestStateChange

Initiates a requests to change the state of the sensor.

This method is inherited from CIM_EnabledLogicalElement.

Reset

Resets the sensor.

This method is inherited from CIM_LogicalDevice.

RestoreProperties

Note  This method is deprecated. Instead we recommend that you use the ApplyConfiguration property of the CIM_ConfigurationData class.

Restores a previous configuration and state of the sensor.

This method is inherited from CIM_LogicalDevice.

SaveProperties

Note  This method is deprecated. Instead we recommend that you use the ConfigurationInformation property of the CIM_ConfigurationData class.

Saves the configuration and state of the sensor.

This method is inherited from CIM_LogicalDevice.

SetPowerState

Note  This method is deprecated. Instead we recommend that you use the SetPowerState property of the CIM_PowerManagementService class.

Sets the power state of the sensor.

This method is inherited from CIM_LogicalDevice.

 

Properties

The Sensor class has these properties.

AdditionalAvailability
Data type: uint16 array
Access type: Read-only
Qualifiers: ModelCorrespondence (CIM_LogicalDevice.Availability)

An array that contains availability information about of the sensor, in addition to the that of theAvailability property. This property is inherited from CIM_LogicalDevice.

This property contains the following values:

ValueMeaning
1

Other

2

Unknown

3

Running/Full Power

4

Warning

5

In Test

6

Not Applicable

7

Power Off

8

Off Line

9

Off Duty

10

Degraded

11

Not Installed

12

Install Error

13

Power Save - Unknown

14

Power Save - Low Power Mode

15

Power Save - Standby

16

Power Cycle

17

Power Save - Warning

18

Paused

19

Not Ready

20

Not Configured

21

Quiesced

 

Availability
Data type: uint16
Access type: Read-only
Qualifiers: Deprecated (CIM_AssociatedPowerManagementService.PowerState, CIM_ManagedSystemElement.OperationalStatus, CIM_EnabledLogicalElement.EnabledState) , MappingStrings (MIF.DMTF|Operational State|006.5, MIB.IETF|HOST-RESOURCES-MIB.hrDeviceStatus, MIF.DMTF|Host Device|001.5) , ModelCorrespondence (CIM_LogicalDevice.AdditionalAvailability)

Note  This property is deprecated. Instead we recommend that you use the CIM_PowerManagementCapabilities class.

Contains the availability of the sensor. This property is inherited from CIM_LogicalDevice.

This property contains the following values:

ValueMeaning
1

Other

2

Unknown

3

Running/Full Power

4

Warning

5

In Test

6

Not Applicable

7

Power Off

8

Off Line

9

Off Duty

10

Degraded

11

Not Installed

12

Install Error

13

Power Save - Unknown

14

Power Save - Low Power Mode

15

Power Save - Standby

16

Power Cycle

17

Power Save - Warning

18

Paused

19

Not Ready

20

Not Configured

21

Quiesced

 

Caption
Data type: string
Access type: Read-only
Qualifiers: MaxLen ( 64 ) , Dynamic

A short description of the sensor that consists of a concatenation of the sensor type string and the device ID of the sensor. This property is inherited from CIM_ManagedElement.

Example: "Power Supply(52.0.32)"

This property is inherited from CIM_ManagedElement.

CreationClassName
Data type: string
Access type: Read-only
Qualifiers: Key, Dynamic, MaxLen ( 256 ) , Dynamic

The class type of the sensor.

Fixed value: "Sensor". This property is inherited from CIM_Sensor.

CurrentState
Data type: string
Access type: Read-only
Qualifiers: MaxLen (128)

Current state that is indicated by the sensor. The value must always come from PossibleStates. This property is inherited from CIM_Sensor.

Example: "OK"

Description
Data type: string
Access type: Read-only

A description of the sensor that consists of a concatenation of the following:

  • Sensor name
  • Sensor Device ID
  • Sensor Type string
  • Entity ID
  • Entity Instance

Example: "PwrSupply1Pres 0(52.0.32):Power Supply for Power supply 1"

This property is inherited from CIM_ManagedElement.

DeviceID
Data type: string
Access type: Read-only
Qualifiers: Key, MaxLen (64)

A concatenation of the following values:

  • Sensor Number
  • Sensor DeviceID
  • Sensor Type string
  • Owner LUN
  • Owner ID

This property is inherited from CIM_LogicalElement.

Example: "52.0.32"

ElementName
Data type: string
Access type: Read-only

The user-friendly name of the sensor, which consists of a concatenation of the sensor name (ID string in SDR type 1|2 table) and the sensor device ID.

Example: "PwrSupply1Pres 0(52.0.32)"

This property is inherited from CIM_ManagedElement.

EnabledDefault
Data type: uint16
Access type: Write-only

Indicates the default startup configuration for the EnabledState property.

Default value: "2". This property is inherited from CIM_EnabledLogicalElement.

This property contains one of the following values:

ValueMeaning
2

Enabled

3

Disabled

5

Not Applicable

6

Enabled but Offline

7

No Default

8

Quiesce

9–32767

DMTF Reserved

32768–65535

Vendor Reserved

 

EnabledState
Data type: uint16
Access type: Read-only
Qualifiers: ModelCorrespondence (CIM_EnabledLogicalElement.OtherEnabledState)

Indicates whether the sensor is enabled, or in a related state. Default value: "5" (not applicable).

This property is inherited from CIM_EnabledLogicalElement.

This property contains one of the following values:

ValueMeaning
0

Unknown

1

Other

2

Enabled

3

Disabled

4

Shutting Down

5

Not Applicable

6

Enabled but Offline

7

In Test

8

Deferred

9

Quiesce

10

Starting

11–32767

DMTF Reserved

32768–65535

Vendor Reserved

 

ErrorCleared
Data type: boolean
Access type: Read-only
Qualifiers: Deprecated (CIM_ManagedSystemElement.OperationalStatus)

Note  This property is deprecated. Instead we recommend that you use the OperationalStatus property from theCIM_ManagedSystemElement class.

Indicates whether an error reported by the LastErrorCode property is cleared. This property is inherited from CIM_LogicalDevice.

ErrorDescription
Data type: string
Access type: Read-only
Qualifiers: Deprecated (CIM_DeviceErrorData.ErrorDescription)

Note  This property is deprecated. Instead we recommend that you use the ErrorDescription property from theCIM_DeviceErrorData class.

A string that describes additional information about the error reported by the LastErrorCode property. This property is inherited from CIM_LogicalDevice.

HealthState
Data type: uint16
Access type: Read-only
Qualifiers: Experimental

Indicates the current health of the sensor.

This property is inherited from CIM_ManagedSystemElement.

This property contains one of the following values:

ValueMeaning
0

Unknown.

5

Ok

10

Degraded/Warning

15

Minor failure

20

Major failure

25

Critical failure

30

Non-recoverable error

31–32767

DMTF Reserved

32768–...

Vendor Specific

 

InstallDate
Data type: datetime
Access type: Read-only
Qualifiers: MappingStrings (MIF.DMTF|ComponentID|001.5)

The datetime value that indicates when the sensor was installed.

This property is inherited from CIM_ManagedSystemElement.

LastErrorCode
Data type: uint32
Access type: Read-only
Qualifiers: Deprecated (CIM_DeviceErrorData.LastErrorCode)

Note  This property is deprecated. Instead we recommend that you use the LastErrorCode property from theCIM_DeviceErrorData class.

The last error code reported by the sensor. This property is inherited from CIM_LogicalDevice.

MaxQuiesceTime
Data type: uint64
Access type: Read-only
Qualifiers: Deprecated (No value) , Units (MilliSeconds)

Note  This property is deprecated and should not be used.

The maximum time in milliseconds, that a device can remain in a temporarily disabled state (Availability and AdditionalAvailability properties set to "21" — quiesced ). A value of "0" indicates that the sensor can remain in a temporarily disabled state indefinitely.

This property is inherited from CIM_LogicalDevice.

Name
Data type: string
Access type: Read-only
Qualifiers: Key, MaxLen (1024)

The label of the sensor.

This property is inherited from CIM_ManagedSystemElement.

OperationalStatus
Data type: uint16 array
Access type: Read-only
Qualifiers: ArrayType (Indexed) , ModelCorrespondence (CIM_ManagedSystemElement.StatusDescriptions)

An array that contains the status of the sensor.

This property is inherited from CIM_ManagedSystemElement.

This property can contain the following values:

ValueMeaning
0

Unknown

1

Other

2

OK

3

Degraded

4

Stressed

5

Predictive Failure

6

Error

7

Non-Recoverable Error

8

Starting

9

Stopping

10

Stopped

11

In Service

12

No Contact

13

Lost Communication

14

Aborted

15

Dormant

16

Supporting Entity in Error

17

Completed

18

Power Mode

19

DMTF Reserved

20

Vendor Reserved

 

OtherEnabledState
Data type: string
Access type: Read-only
Qualifiers: ModelCorrespondence (CIM_EnabledLogicalElement.EnabledState)

Describes the value of the EnabledState property when it is set to "1" (other).

This property is inherited from CIM_EnabledLogicalElement.

OtherIdentifyingInfo
Data type: string array
Access type: Read-only
Qualifiers: ArrayType (Indexed) , MaxLen ( 256) , ModelCorrespondence (CIM_LogicalDevice.IdentifyingDescriptions)

Information that identifies the sensor, other than a DeviceID. This property is inherited from CIM_LogicalDevice.

OtherSensorTypeDescription
Data type: string
Access type: Read-only
Qualifiers: MaxLen ( 128) , ModelCorrespondence (CIM_Sensor.SensorType)

The sensor type when SensorType is set to 1, meaning "Other". This property is inherited from CIM_Sensor.

PollingInterval
Data type: uint64
Access type: Read-only
Qualifiers: Units (NanoSeconds)

The polling interval used by the sensor hardware to determine the current state of the sensor.

This property is inherited from CIM_Sensor.

PossibleStates
Data type: string array
Access type: Read-only
Qualifiers: MaxLen (128)

An array that contains the string outputs of the sensor. NumericSensor instances do not have a fixed table of possible states.

States are relative to where the CurrentReading value falls relative to the limit values defined by:

  • LowerThresholdNonCritical
  • LowerThresholdCritical
  • LowerThresholdFatal
  • UpperThresholdNonCritical
  • UpperThresholdCritical
  • UpperThresholdFatal

This property is inherited from CIM_Sensor.

Example: "at or below lower non-critical threshold"

PowerManagementCapabilities
Data type: uint16 array
Access type: Read-only
Qualifiers: Deprecated (CIM_PowerManagementCapabilities)

Note  This property is deprecated. Instead we recommend that you use the CIM_PowerManagementCapabilities class.

An array that contains the power management capabilities of the device. This property is inherited from CIM_LogicalDevice.

This array contains the following values:

ValueMeaning
0

Unknown

1

Not Supported

2

Disabled

3

Enabled

4

Power Saving Modes Entered Automatically

5

Configurable Power State

6

Power Cycling Supported

7

Timed Power On Supported

 

PowerManagementSupported
Data type: boolean
Access type: Read-only
Qualifiers: Deprecated (CIM_PowerManagementCapabilities)

Note  This property is deprecated. Instead we recommend that you use the CIM_PowerManagementCapabilities class.

Indicates that the Device can be power managed. This property is inherited from CIM_EnabledLogicalElement.

PowerOnHours
Data type: uint64
Access type: Read-only
Qualifiers: Units (Hours) , Counter, Deprecated (CIM_PoweredStatisticalData.PowerOnHours)

Note  This property is deprecated. Instead we recommend that you use the PowerOnHours property from theCIM_PoweredStatisticalData class.

The number of consecutive hours that the sensor has been powered, since its last power cycle. This property is inherited from CIM_LogicalDevice.

RequestedState
Data type: uint16
Access type: Read-only

Indicates the last requested state of the sensor. The actual state of the sensor is represented by the EnabledState property.

Default value: "12".

This property is inherited from CIM_EnabledLogicalElement.

This property contains one of the following values:

ValueMeaning
2

Enabled

3

Disabled

4

Shut Down

5

No Change

6

Offline

7

Test

8

Deferred

9

Quiesce

10

Reboot

11

Reset

12

Not Applicable

13–32767

DMTF Reserved

32768–65535

Vendor Reserved

 

SensorType
Data type: uint16
Access type: Read-only

The type of the sensor. If value is "Other", then the type is described in OtherSensorTypeDescription.

This property is inherited from CIM_Sensor.

The possible values for this property are as follows.

ValueMeaning
0 (0x0)

Unknown

1 (0x1)

Other

2 (0x2)

Temperature

3 (0x3)

Voltage

4 (0x4)

Current

5 (0x5)

Tachometer

Measures the speed or revolutions of a device such as a fan.

6 (0x6)

Counter

A general purpose sensor that measures some numeric property of a device. A counter value can be cleared, but it never decreases.

7 (0x7)

Switch

A switch sensor has states like Open/Close, On/Off, or Up/Down.

8 (0x8)

Lock

A Lock sensor has states of Locked/Unlocked.

9 (0x9)

Humidity

10 (0xA)

Smoke detection

11 (0xB)

Presence

Detects the presence of a physical entity.

 

Status
Data type: string
Access type: Read-only
Qualifiers: MaxLen (10) , Deprecated (CIM_ManagedSystemElement.OperationalStatus)

Note  This property is deprecated. Instead, use OperationalStatus.

The status of the sensor.

This property is inherited from CIM_ManagedSystemElement.

This property contains one of the following values:

ValueMeaning
OK

The sensor is functioning without errors.

Error

The sensor experienced an error.

Degraded

The sensor is functioning but some features are turned off.

Unknown

The status of the sensor is unknown.

Pred Fail

The sensor experienced a predictive failure.

Starting

The sensor is being started.

Stopping

The sensor is being shut down.

Service

The sensor is being serviced.

Stressed

The sensor is having performance issues.

NonRecover

The sensor has an error and cannot recover.

No Contact

There is no contact with the sensor.

Lost Comm

Communication with the sensor has been lost.

Stopped

The sensor is not running, however, it might be possible to restart the sensor.

 

StatusDescriptions
Data type: string array
Access type: Read-only
Qualifiers: ArrayType (Indexed) , ModelCorrespondence (CIM_ManagedSystemElement.OperationalStatus)

An array of strings that describe the details of the corresponding array values in the OperationalStatus property.

This property is inherited from CIM_ManagedSystemElement.

StatusInfo
Data type: uint16 array
Access type: Read-only
Qualifiers: Deprecated (CIM_PowerManagementCapabilities)

Note  This property is deprecated. Instead we recommend that you use the CIM_PowerManagementCapabilities class.

Indicates whether the sensor is enabled or in a related state. This property is inherited from CIM_LogicalDevice.

This property contains the following values:

ValueMeaning
1

Other

2

Unknown

3

Enabled

4

Disabled

5

Not Applicable

 

SystemCreationClassName
Data type: string
Access type: Read-only
Qualifiers: Key, MaxLen (256) , Propagated (CIM_System.CreationClassName)

The class type of the system that contains the sensor.

Fixed value: "ComputerSystem". This property is inherited from CIM_LogicalDevice.

SystemName
Data type: string
Access type: Read-only
Qualifiers: Key, MaxLen (256) , Propagated (CIM_System.Name)

The name of the system that contains the senor.

Fixed value: "IPMI Controller 32". This property is inherited from CIM_LogicalElement.

TimeOfLastStateChange
Data type: datetime
Access type: Read-only

The date and time of the last change to the value of the EnabledState property.

This property is inherited from CIM_EnabledLogicalElement.

TotalPowerOnHours
Data type: uint64
Access type: Read-only
Qualifiers: Units (Hours) , Counter, Deprecated (CIM_PoweredStatisticalData.TotalPowerOnHours)

Note  This property is deprecated. Instead we recommend that you use the PowerOnHours property from theCIM_PoweredStatisticalData class.

The total number of hours that the sensor has been powered. This property is inherited from CIM_LogicalDevice.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003 R2

Namespace

\root\hardware

MOF

IpmiPrv.mof

DLL

IpmiPrv.dll

See also

IPMI Provider

 

 

Show:
© 2014 Microsoft