physical

package
v2.16.5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package physical facilitates communications with Intel® AMT devices to get the PhysicalMemory as a subclass of CIM_Chip, representing low level memory devices - SIMMS, DIMMs, raw memory chips, etc.

Index

Constants

View Source
const (
	CIMPhysicalMemory  string = "CIM_PhysicalMemory"
	CIMPhysicalPackage string = "CIM_PhysicalPackage"
	ValueNotFound      string = "Value not found in map"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	XMLName           xml.Name `xml:"Body"`
	PullResponse      PullResponse
	EnumerateResponse common.EnumerateResponse
	MemoryResponse    PhysicalMemory
}

Response Types.

type Memory

type Memory struct {
	// contains filtered or unexported fields
}

func NewPhysicalMemoryWithClient

func NewPhysicalMemoryWithClient(wsmanMessageCreator *message.WSManMessageCreator, client client.WSMan) Memory

NewPhysicalMemory returns a new instance of the PhysicalMemory struct.

func (Memory) Enumerate

func (memory Memory) Enumerate() (response Response, err error)

Enumerate returns an enumeration context which is used in a subsequent Pull call.

func (Memory) Pull

func (memory Memory) 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.

type MemoryType

type MemoryType int

MemoryType is an enumeration that describes the type of memory.

const (
	MemoryTypeUnknown MemoryType = iota
	MemoryTypeOther
	MemoryTypeDRAM
	MemoryTypeSynchronousDRAM
	MemoryTypeCacheDRAM
	MemoryTypeEDO
	MemoryTypeEDRAM
	MemoryTypeVRAM
	MemoryTypeSRAM
	MemoryTypeRAM
	MemoryTypeROM
	MemoryTypeFlash
	MemoryTypeEEPROM
	MemoryTypeFEPROM
	MemoryTypeEPROM
	MemoryTypeCDRAM
	MemoryType3DRAM
	MemoryTypeSDRAM
	MemoryTypeSGRAM
	MemoryTypeRDRAM
	MemoryTypeDDR
	MemoryTypeDDR2
	MemoryTypeBRAM
	MemoryTypeFBDIMM
	MemoryTypeDDR3
	MemoryTypeFBD2
	MemoryTypeDDR4
	MemoryTypeLPDDR
	MemoryTypeLPDDR2
	MemoryTypeLPDDR3
	MemoryTypeLPDDR4
	MemoryTypeLogicalNonVolatileDevice
	MemoryTypeHBM
	MemoryTypeHBM2
	MemoryTypeDDR5
	MemoryTypeLPDDR5
	MemoryTypeHBM3
)

func (MemoryType) String added in v2.2.4

func (e MemoryType) String() string

String returns a human-readable string representation of the MemoryType enumeration.

type OperationalStatus added in v2.2.4

type OperationalStatus int

OperationalStatus indicates the current statuses of the element. Various operational statuses are defined.

const (
	OperationalStatusUnknown OperationalStatus = iota
	OperationalStatusOther
	OperationalStatusOK
	OperationalStatusDegraded
	OperationalStatusStressed
	OperationalStatusPredictiveFailure
	OperationalStatusError
	OperationalStatusNonRecoverableError
	OperationalStatusStarting
	OperationalStatusStopping
	OperationalStatusStopped
	OperationalStatusInService
	OperationalStatusNoContact
	OperationalStatusLostCommunication
	OperationalStatusAborted
	OperationalStatusDormant
	OperationalStatusSupportingEntityInError
	OperationalStatusCompleted
	OperationalStatusPowerMode
	OperationalStatusRelocating
)

func (OperationalStatus) String added in v2.2.4

func (e OperationalStatus) String() string

String returns a human-readable string representation of the OperationalStatus enumeration.

type Package

type Package struct {
	// contains filtered or unexported fields
}

func NewPhysicalPackageWithClient

func NewPhysicalPackageWithClient(wsmanMessageCreator *message.WSManMessageCreator, client client.WSMan) Package

NewPhysicalPackage returns a new instance of the PhysicalPackage struct.

func (Package) Enumerate

func (physicalPackage Package) Enumerate() (response Response, err error)

Enumerate returns an enumeration context which is used in a subsequent Pull call.

func (Package) Pull

func (physicalPackage Package) 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.

type PhysicalMemory

type PhysicalMemory struct {
	XMLName                    xml.Name            `xml:"CIM_PhysicalMemory"`
	PartNumber                 string              `xml:"PartNumber"`        // The part number assigned by the organization that is responsible for producing or manufacturing the PhysicalElement.
	SerialNumber               string              `xml:"SerialNumber"`      // A manufacturer-allocated number used to identify the Physical Element.
	Manufacturer               string              `xml:"Manufacturer"`      // The name of the organization responsible for producing the PhysicalElement. This organization might be the entity from whom the Element is purchased, but this is not necessarily true. The latter information is contained in the Vendor property of CIM_Product.
	ElementName                string              `xml:"ElementName"`       // 'ElementName' is constant. In CIM_Chip instances its value is set to 'Managed System Memory Chip'.
	CreationClassName          string              `xml:"CreationClassName"` // CreationClassName indicates the name of the class or the subclass used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and its subclasses to be uniquely identified.
	Tag                        string              `xml:"Tag"`               // An arbitrary string that uniquely identifies the Physical Element and serves as the key of the Element. The Tag property can contain information such as asset tag or serial number data. The key for PhysicalElement is placed very high in the object hierarchy in order to independently identify the hardware or entity, regardless of physical placement in or on Cabinets, Adapters, and so on. For example, a hotswappable or removable component can be taken from its containing (scoping) Package and be temporarily unused. The object still continues to exist and can even be inserted into a different scoping container. Therefore, the key for Physical Element is an arbitrary string and is defined independently of any placement or location-oriented hierarchy.
	OperationalStatus          []OperationalStatus `xml:"OperationalStatus"` // Indicates the current statuses of the element. Various operational statuses are defined.
	FormFactor                 int                 `xml:"FormFactor,omitempty"`
	MemoryType                 MemoryType          `xml:"MemoryType,omitempty"`                 // The type of PhysicalMemory. Synchronous DRAM is also known as SDRAM Cache DRAM is also known as CDRAM CDRAM is also known as Cache DRAM SDRAM is also known as Synchronous DRAM BRAM is also known as Block RAM
	Speed                      int                 `xml:"Speed,omitempty"`                      // The speed of the PhysicalMemory, in nanoseconds.
	Capacity                   int                 `xml:"Capacity,omitempty"`                   // The total capacity of this PhysicalMemory, in bytes.
	BankLabel                  string              `xml:"BankLabel,omitempty"`                  // A string identifying the physically labeled bank where the Memory is located - for example, 'Bank 0' or 'Bank A'.
	ConfiguredMemoryClockSpeed int                 `xml:"ConfiguredMemoryClockSpeed,omitempty"` // The configured clock speed (in MHz) of PhysicalMemory.
	IsSpeedInMhz               bool                `xml:"IsSpeedInMhz,omitempty"`               // The IsSpeedInMHz property is used to indicate if the Speed property or the MaxMemorySpeed contains the value of the memory speed. A value of TRUE shall indicate that the speed is represented by the MaxMemorySpeed property. A value of FALSE shall indicate that the speed is represented by the Speed property.
	MaxMemorySpeed             int                 `xml:"MaxMemorySpeed,omitempty"`             // The maximum speed (in MHz) of PhysicalMemory.
}

Response Types.

type PhysicalPackage added in v2.11.2

type PhysicalPackage struct {
	XMLName              xml.Name `xml:"CIM_PhysicalPackage"`
	CanBeFRUed           bool     `xml:"CanBeFRUed"`
	VendorEquipmentType  string   `xml:"VendorEquipmentType"`
	ManufactureDate      string   `xml:"ManufactureDate"`
	OtherIdentifyingInfo string   `xml:"OtherIdentifyingInfo"`
	SerialNumber         string   `xml:"SerialNumber"`
	SKU                  string   `xml:"SKU"`
	Model                string   `xml:"Model"`
	Manufacturer         string   `xml:"Manufacturer"`
	ElementName          string   `xml:"ElementName"`
	CreationClassName    string   `xml:"CreationClassName"`
	Tag                  string   `xml:"Tag"`
	OperationalStatus    []int    `xml:"OperationalStatus"`
	PackageType          int      `xml:"PackageType"`
}

Response Types.

type PullResponse

type PullResponse struct {
	XMLName xml.Name `xml:"PullResponse"`
	common.EnumerateResponse
	MemoryItems     []PhysicalMemory          `xml:"Items>CIM_PhysicalMemory"`
	Card            []card.PackageResponse    `xml:"Items>CIM_Card"`
	PhysicalPackage []PhysicalPackage         `xml:"Items>CIM_PhysicalPackage"`
	Chassis         []chassis.PackageResponse `xml:"Items>CIM_Chassis"`
	EndOfSequence   xml.Name                  `xml:"EndOfSequence"`
}

Response Types.

type Response

type Response struct {
	*client.Message
	XMLName xml.Name       `xml:"Envelope"`
	Header  message.Header `xml:"Header"`
	Body    Body           `xml:"Body"`
}

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.

Jump to

Keyboard shortcuts

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