Documentation ¶
Overview ¶
Package alarmclock facilitates communication with Intel® AMT devices to set an alarm time to turn the host computer system on. Setting an alarm time is done by calling "AddAlarm" method.
Index ¶
- Constants
- type AddAlarmOutput
- type AlarmClock
- type AlarmClockOccurrence
- type AlarmClockService
- type Body
- type PullResponse
- type Response
- type ReturnValue
- type Service
- func (acs Service) AddAlarm(alarmClockOccurrence AlarmClockOccurrence) (response Response, err error)
- func (acs Service) Enumerate() (response Response, err error)
- func (acs Service) Get() (response Response, err error)
- func (acs Service) Pull(enumerationContext string) (response Response, err error)
Constants ¶
const ( AMTAlarmClockService string = "AMT_AlarmClockService" AddAlarm string = "AddAlarm" )
INPUTS Constants.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddAlarmOutput ¶
type AddAlarmOutput struct { XMLName xml.Name `xml:"AddAlarm_OUTPUT"` AlarmClock AlarmClock // A reference to the created instance of IPS_AlarmClockOccurrence. ReturnValue ReturnValue // Return code. 0 indicates success }
OUTPUTS Response Types.
type AlarmClock ¶
type AlarmClock struct { // Reference address to the created instance of IPS_AlarmClockOccurrence. Address string ReferenceParameters models.ReferenceParameters_OUTPUT }
OUTPUTS Response Types.
type AlarmClockOccurrence ¶
type AlarmClockOccurrence struct { ElementName string `json:"ElementName"` // Elementname is a user-friendly name for the object InstanceID string `json:"InstanceID"` // InstanceID is the instance key, set by the caller of AMT_AlarmClockService.AddAlarm. StartTime time.Time `json:"StartTime"` // StartTime is the next time when the alarm is scheduled to be set. Interval int `json:"Interval"` // Interval between occurrences of the alarm (0 if the alarm is scheduled to run once). DeleteOnCompletion bool `json:"DeleteOnCompletion"` // DeleteOnComplete if set to TRUE, the instance will be deleted by the FW when the alarm is completed }
INPUTS AlarmClockOccurrence represents a single alarm clock setting.
type AlarmClockService ¶
type AlarmClockService struct { XMLName xml.Name `xml:"AMT_AlarmClockService"` Name string // The Name property uniquely identifies the Service and provides an indication of the functionality that is managed CreationClassName string // CreationClassName indicates the name of the class or the subclass that is used in the creation of an instance SystemName string // The Name of the scoping System. SystemCreationClassName string // The CreationClassName of the scoping System. ElementName string // A user-friendly name for the object NextAMTAlarmTime string // Specifies the next AMT alarm time AMTAlarmClockInterval string // Specifies the alarm time interval }
OUTPUTS Response Types.
type Body ¶
type Body struct { XMLName xml.Name `xml:"Body"` GetResponse AlarmClockService `xml:"AMT_AlarmClockService"` EnumerateResponse common.EnumerateResponse AddAlarmOutput AddAlarmOutput `xml:"AddAlarm_OUTPUT"` PullResponse PullResponse }
OUTPUTS Response Types.
type PullResponse ¶
type PullResponse struct { XMLName xml.Name `xml:"PullResponse"` AlarmClockServiceItems []AlarmClockService `xml:"Items>AMT_AlarmClockService"` }
OUTPUTS Response Types.
type Response ¶
type Response struct { *client.Message XMLName xml.Name `xml:"Envelope"` Header message.Header `xml:"Header"` Body Body `xml:"Body"` }
OUTPUTS Response Types.
type ReturnValue ¶ added in v2.2.4
type ReturnValue int
ReturnValue is a return code. 0 indicates success.
const (
Success ReturnValue = iota
)
func (ReturnValue) String ¶ added in v2.2.4
func (r ReturnValue) String() string
String returns the string representation of the ReturnValue value.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewServiceWithClient ¶
func NewServiceWithClient(wsmanMessageCreator *message.WSManMessageCreator, client client.WSMan) Service
NewServiceWithClient instantiates a new Alarm Clock service.
func (Service) AddAlarm ¶
func (acs Service) AddAlarm(alarmClockOccurrence AlarmClockOccurrence) (response Response, err error)
AddAlarm creates an alarm that would wake the system at a given time. The method receives as input an embedded instance of type IPS_AlarmClockOccurrence, with the following fields set: StartTime, Interval, InstanceID, DeleteOnCompletion. Upon success, the method creates an instance of IPS_AlarmClockOccurrence which is associated with AlarmClockService. The method would fail if 5 instances or more of IPS_AlarmClockOccurrence already exist in the system.
func (Service) Enumerate ¶
Enumerate returns an enumeration context which is used in a subsequent Pull call.