Documentation
¶
Overview ¶
Package sim implements DPE transport for the DPE software simulator
Index ¶
- Constants
- type DpeSimulator
- func (s *DpeSimulator) GetIsInitialized() bool
- func (s *DpeSimulator) GetLocality() uint32
- func (s *DpeSimulator) GetMaxTciNodes() uint32
- func (s *DpeSimulator) GetProfileMajorVersion() uint16
- func (s *DpeSimulator) GetProfileMinorVersion() uint16
- func (s *DpeSimulator) GetProfileVendorID() uint32
- func (s *DpeSimulator) GetProfileVendorSku() uint32
- func (s *DpeSimulator) GetSupport() *client.Support
- func (s *DpeSimulator) GetSupportedLocalities() []uint32
- func (s *DpeSimulator) HasLocalityControl() bool
- func (s *DpeSimulator) HasPowerControl() bool
- func (s *DpeSimulator) PowerOff() error
- func (s *DpeSimulator) PowerOn() error
- func (s *DpeSimulator) SendCmd(buf []byte) ([]byte, error)
- func (s *DpeSimulator) SetIsInitialized(isInitialized bool)
- func (s *DpeSimulator) SetLocality(locality uint32)
Constants ¶
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 ¶
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
NewSimulator creates a new DpeSimulator instance.
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) 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