sim

package module
v0.0.0-...-3d9092d Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package sim implements DPE transport for the DPE software simulator

Index

Constants

View Source
const (
	DPESimulatorAutoInitLocality    uint32 = 0
	DPESimulatorOtherLocality       uint32 = 0x4f544852
	DPESimulatorMaxTCINodes         uint32 = 24
	DPESimulatorMajorProfileVersion uint16 = client.CurrentProfileMajorVersion
	DPESimulatorMinorProfileVersion uint16 = client.CurrentProfileMinorVersion
	DPESimulatorVendorID            uint32 = 0
	DPESimulatorVendorSKU           uint32 = 0
)

Constants for configuring expected values from the DPE simulator

Variables

This section is empty.

Functions

This section is empty.

Types

type DpeSimulator

type DpeSimulator struct {
	client.Transport
	// contains filtered or unexported fields
}

DpeSimulator is a handle to a DPE simulator instance

DpeSimulator implements the client.Transport and verification.TestTarget interfaces.

func NewSimulator

func NewSimulator(exe string, support client.Support) DpeSimulator

func (*DpeSimulator) GetIsInitialized

func (s *DpeSimulator) GetIsInitialized() bool

GetIsInitialized gets whether DPE is initialized

func (*DpeSimulator) GetLocality

func (s *DpeSimulator) GetLocality() uint32

GetLocality gets the locality of the current caller

func (*DpeSimulator) GetMaxTciNodes

func (s *DpeSimulator) GetMaxTciNodes() uint32

GetMaxTciNodes gets the max number of TCI nodes the DPE supports

func (*DpeSimulator) GetProfileMajorVersion

func (s *DpeSimulator) GetProfileMajorVersion() uint16

GetProfileMajorVersion gets the major profile version supported by this DPE

func (*DpeSimulator) GetProfileMinorVersion

func (s *DpeSimulator) GetProfileMinorVersion() uint16

GetProfileMinorVersion gets the minor profile version supported by this DPE

func (*DpeSimulator) GetProfileVendorID

func (s *DpeSimulator) GetProfileVendorID() uint32

GetProfileVendorID gets the vendor ID of this DPE

func (*DpeSimulator) GetProfileVendorSku

func (s *DpeSimulator) GetProfileVendorSku() uint32

GetProfileVendorSku gets the vendor SKU of this DPE

func (*DpeSimulator) GetSupport

func (s *DpeSimulator) GetSupport() *client.Support

GetSupport gets supported DPE features from the simulator

func (*DpeSimulator) GetSupportedLocalities

func (s *DpeSimulator) GetSupportedLocalities() []uint32

GetSupportedLocalities gets the list of localities the simulator supports

func (*DpeSimulator) HasLocalityControl

func (s *DpeSimulator) HasLocalityControl() bool

HasLocalityControl returns whether the simulator can artificially set the locality of the caller. The simulator target can always control the locality.

func (*DpeSimulator) HasPowerControl

func (s *DpeSimulator) HasPowerControl() bool

HasPowerControl returns whether the simulator can be started and stopped.

func (*DpeSimulator) PowerOff

func (s *DpeSimulator) PowerOff() error

PowerOff kills the simulator in a way that it can cleanup before closing.

func (*DpeSimulator) PowerOn

func (s *DpeSimulator) PowerOn() error

PowerOn starts the simulator.

func (*DpeSimulator) SendCmd

func (s *DpeSimulator) SendCmd(buf []byte) ([]byte, error)

SendCmd sends a DPE command to the simulator

func (*DpeSimulator) SetIsInitialized

func (s *DpeSimulator) SetIsInitialized(isInitialized bool)

SetIsInitialized sets whether DPE is initialized

func (*DpeSimulator) SetLocality

func (s *DpeSimulator) SetLocality(locality uint32)

SetLocality sets the locality of this caller

Jump to

Keyboard shortcuts

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