Applies to: desktop apps only
Abstracts the concept of an element that is enabled and disabled, such as a logical device or a service access point.
The following syntax is simplified from Managed Object Format (MOF) code and includes all of the inherited properties.
Syntax
class CIM_EnabledLogicalElement : CIM_LogicalElement
{
uint16 EnabledState = 5;
string OtherEnabledState;
uint16 RequestedState = 12;
uint16 EnabledDefault = 2;
datetime TimeOfLastStateChange;
};
Members
The CIM_EnabledLogicalElement class has these types of members:
Methods
The CIM_EnabledLogicalElement class has these methods.
| Method | Description |
|---|---|
| RequestStateChange |
Requests that the state of the element be changed to the value specified in the RequestedState parameter. When the requested state change takes place, the enabled state and requested state of the element will be the same. Invoking the RequestStateChange method multiple times could result in earlier requests being overwritten or lost. If 0 is returned, then the task completed successfully and the use of CIM_ConcreteJob was not required. If 4096 (0x1000) is returned, then the task will take some time to complete, CIM_ConcreteJob will be created, and its reference returned in the output parameter Job. Any other return code indicates an error condition. |
Properties
The CIM_EnabledLogicalElement class has these properties.
- EnabledDefault
-
- Data type: uint16
- Access type: Write-only
An enumerated value indicating an administrator's default or startup configuration for the Enabled State of an element. By default, the element is "Enabled" (value=2).
- Enabled (2)
- Disabled (3)
- Not Applicable (5)
- Enabled but Offline (6)
- No Default (7)
- DMTF Reserved (8–32767)
- Vendor Reserved (32768–65535)
- EnabledState
-
- Data type: uint16
- Access type: Read-only
Indicates the enabled and disabled states of an element. It can also indicate the transitions between these requested states. For example, shutting down (value=4) and starting (value=10) are transient states between enabled and disabled.
- OtherEnabledState
-
- Data type: string
- Access type: Read-only
A string that describes the enabled or disabled state of the element when the EnabledState property is set to 1 ("Other"). This property must be set to null when EnabledState is any value other than 1.
- RequestedState
-
- Data type: uint16
- Access type: Read-only
RequestedState is an integer enumeration that indicates the last requested or desired state for the element. The actual state of the element is represented by EnabledState. This property is provided to compare the last requested and current enabled or disabled states. Note that when EnabledState is set to 5 ("Not Applicable"), then this property has no meaning. By default, the RequestedState of the element is 5 ("No Change"). Refer to the EnabledState property description for explanations of the values in the RequestedState enumeration. It should be noted that there are two new values in RequestedState that build on the statuses of EnabledState. These are "Reboot" (10) and "Reset" (11). Reboot refers to doing a "Shut Down" and then moving to an "Enabled" state. Reset indicates that the element is first "Disabled" and then "Enabled". The distinction between requesting "Shut Down" and "Disabled" should also be noted. Shut Down requests an orderly transition to the Disabled state, and might involve removing power, to completely erase any existing state. The Disabled state requests an immediate disabling of the element, such that it will not execute or accept any commands or processing requests. This property is set as the result of a method invocation (such as StartService or StopService on CIM_Service), or can be overridden and defined as WRITEable in a subclass. The method approach is considered superior to a WRITEable property, because it allows an explicit invocation of the operation and the return of a result code. A particular instance of CIM_EnabledLogicalElement might not support RequestStateChange. If this occurs, the value 12 ("Not Applicable") is used.
- Enabled (2)
- Disabled (3)
- Shut Down (4)
- No Change (5)
- Offline (6)
- Test (7)
- Deferred (8)
- Quiesce (9)
- Reboot (10)
- Reset (11)
- Not Applicable (12)
- DMTF Reserved (..)
- Vendor Reserved (32768–65535)
- TimeOfLastStateChange
-
- Data type: datetime
- Access type: Write-only
The date or time when the enabled state of the element last changed. If the state of the element has not changed and this property is populated, then it must be set to a 0 interval value. If a state change was requested, but rejected or not yet processed, the property must not be updated.
Requirements
|
Namespace |
\root\CIMV2 |
|---|
See also
Send comments about this topic to Microsoft
Build date: 3/9/2012