device

package
v0.0.0-...-19f3ddf Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package device implements utilities to extract device information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Address

func Address(device *api.CrosTestRequest_Device) (string, error)

Address returns the address of a DUT. TODO: Remove this after no test drivers are using this.

func AppendChromeOsLabels

func AppendChromeOsLabels(dut *DutInfo) (map[string]string, []string, error)

AppendChromeOsLabels appends labels extracted from ChromeOS device.

func GenLabConfig

func GenLabConfig(primary *DutInfo, companions []*DutInfo, androidCompanion []*AndroidInfo) (*protocol.DUTLabConfig, error)

GenLabConfig gemerates DUT lab config proto.

Types

type AndroidInfo

type AndroidInfo struct {
	AssoicateAddr string      // A hostname of the device that the Android DUT is attached to.
	Serial        string      // A string created by adb to uniquely identify the device.
	ModelName     string      // The model name of the device.
	DUT           *labapi.Dut // The DUT topology.
}

AndroidInfo stores information of a Android device.

func FillAndroidInfo

func FillAndroidInfo(device *api.CrosTestRequest_Device) *AndroidInfo

FillAndroidInfo extracts Android information from a device.

type DutInfo

type DutInfo struct {
	Addr                string   // The address of the DUT.
	Role                string   // The role of the DUT.
	Servo               string   // The address of the servo.
	DutServer           string   // The address of the dutServer.
	LibsServer          string   // The address of the libsServer.
	ProvisionServer     string   // The address of the provision server
	DevboardServer      string   // The address of the devboard server.
	Board               string   // The board of the DUT
	Model               string   // The model of the DUT
	ServoHostname       string   // The hostname of the Servo paired with the DUT
	ServoPort           string   // The port of the Servo paired with the DUT
	ServoSerial         string   // The serial of the Servo paired with the DUT
	ChameleonAudio      bool     // If the DUT has a ChameleonAudio peripheral
	ChamelonPresent     bool     // If the DUT has a Chameleon peripheral
	ChamelonPeriphsList []string // The list of Chameleon peripherals
	AtrusAudio          bool     // If the DUT has a AtrusAudio label
	TouchMimo           bool     // If the DUT has a TouchMimo label
	CameraboxFacing     string   // The direction the camerabox is facing, ie "front" or "back"
	CableList           []string // The list of cables attached
	CarrierList         []string // the list of carriers
	HwIDList            []string // HwIDlist
	Sku                 string
	Phase               string
	BTPeers             int
	CacheServer         string
	HWID                string
	FrontendAddress     string
	PowerUnitHostName   string
	PowerUnitOutlet     string
	HydraHostName       string
	SimInfos            []string
	WifiSecretSsid      string
	WifiSecretSecurity  string
	WifiSecretPassword  string
	DUT                 *labapi.Dut
}

DutInfo stores information of a ChromeOS DUT.

func FillDUTInfo

func FillDUTInfo(device *api.CrosTestRequest_Device, role string) (*DutInfo, error)

FillDUTInfo extracts DUT information from a device.

Jump to

Keyboard shortcuts

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