Documentation
¶
Overview ¶
Package power facilitates communication with Intel® AMT devices where a class derived from Service describes power management functionality, hosted on a System.
Whether this service might be used to affect the power state of a particular element is defined by the CIM_ServiceAvailable ToElement association.
Index ¶
- Constants
- type Body
- type ManagementService
- func (managementService ManagementService) Enumerate() (response Response, err error)
- func (managementService ManagementService) Get() (response Response, err error)
- func (managementService ManagementService) Pull(enumerationContext string) (response Response, err error)
- func (managementService ManagementService) RequestPowerStateChange(powerState PowerState) (response Response, err error)
- type PowerActionResponse
- type PowerManagementService
- type PowerState
- type PullResponse
- type Response
Constants ¶
const ( CIM_PowerManagementService string = "CIM_PowerManagementService" RequestPowerStateChange string = "RequestPowerStateChange" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Body ¶
type Body struct { XMLName xml.Name `xml:"Body"` RequestPowerStateChangeResponse PowerActionResponse `xml:"RequestPowerStateChange_OUTPUT"` GetResponse PowerManagementService EnumerateResponse common.EnumerateResponse PullResponse PullResponse }
Response Types
type ManagementService ¶
type ManagementService struct {
// contains filtered or unexported fields
}
func NewPowerManagementServiceWithClient ¶
func NewPowerManagementServiceWithClient(wsmanMessageCreator *message.WSManMessageCreator, client client.WSMan) ManagementService
NewPowerManagementService returns a new instance of the PowerManagementService struct.
func (ManagementService) Enumerate ¶
func (managementService ManagementService) Enumerate() (response Response, err error)
// Enumerate returns an enumeration context which is used in a subsequent Pull call
func (ManagementService) Get ¶
func (managementService ManagementService) Get() (response Response, err error)
Get retrieves the representation of the instance
func (ManagementService) Pull ¶
func (managementService ManagementService) Pull(enumerationContext string) (response Response, err error)
Pull returns the instances of this class. An enumeration context provided by the Enumerate call is used as input.
func (ManagementService) RequestPowerStateChange ¶
func (managementService ManagementService) RequestPowerStateChange(powerState PowerState) (response Response, err error)
RequestPowerStateChange defines the desired power state of the managed element, and when the element should be put into that state.
type PowerActionResponse ¶
type PowerActionResponse struct {
ReturnValue int `xml:"ReturnValue"`
}
Response Types
type PowerManagementService ¶
type PowerManagementService struct { XMLName xml.Name `xml:"CIM_PowerManagementService"` CreationClassName string `xml:"CreationClassName,omitempty"` // CreationClassName indicates the name of the class or the subclass that is used in the creation of an instance. ElementName string `xml:"ElementName,omitempty"` // A user-friendly name for the object. EnabledState int `xml:"EnabledState,omitempty"` // EnabledState is an integer enumeration that indicates the enabled and disabled states of an element. Name string `xml:"Name,omitempty"` // The Name property uniquely identifies the Service and provides an indication of the functionality that is managed. RequestedState int `xml:"RequestedState,omitempty"` // RequestedState is an integer enumeration that indicates the last requested or desired state for the element, irrespective of the mechanism through which it was requested. SystemCreationClassName string `xml:"SystemCreationClassName,omitempty"` // The CreationClassName of the scoping System. SystemName string `xml:"SystemName,omitempty"` // The Name of the scoping System. }
Response Types
type PowerState ¶
type PowerState int
const ( // Power On PowerOn PowerState = 2 // Verified Hardware Power On // Sleep - Light SleepLight PowerState = 3 // ? // Sleep - Deep SleepDeep PowerState = 4 // ? // Power Cycle (Off Soft) PowerCycleOffSoft PowerState = 6 // ? // Power Off - Hard PowerOffHard PowerState = 8 // Verfied Hardware Power Off // Hibernate Hibernate PowerState = 7 // ? // Power Off - Soft PowerOffSoft PowerState = 9 // ? // Power Cycle (Off Hard) PowerCycleOffHard PowerState = 5 // Verified Hardware Power Cycle (off then on) // Master Bus Reset MasterBusReset PowerState = 10 // Verified Hardware Reboot // Diagnostic Interrupt (NMI) DiagnosticInterruptNMI PowerState = 11 // ? // Power Off - Soft Graceful PowerOffSoftGraceful PowerState = 12 // ? // Power Off - Hard Graceful PowerOffHardGraceful PowerState = 13 // ? // Master Bus Reset Graceful MasterBusResetGraceful PowerState = 14 // ? // Power Cycle (Off - Soft Graceful) PowerCycleOffSoftGraceful PowerState = 15 // ? // Power Cycle (Off - Hard Graceful) PowerCycleOffHardGraceful PowerState = 16 // ? )
type PullResponse ¶
type PullResponse struct { XMLName xml.Name `xml:"PullResponse"` PowerManagementServiceItems []PowerManagementService `xml:"Items>CIM_PowerManagementService"` }
Response Types