alarmclock

package
v2.36.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

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

View Source
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.

func (*Response) JSON

func (r *Response) JSON() string

JSON marshals the type into JSON format.

func (*Response) YAML

func (r *Response) YAML() string

YAML marshals the type into YAML format.

type ReturnValue

type ReturnValue int

ReturnValue is a return code. 0 indicates success.

const (
	Success ReturnValue = iota
)

func (ReturnValue) String

func (r ReturnValue) String() string

String returns the string representation of the ReturnValue value.

type Service

type Service struct {
	base.WSManService[Response]
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL