dolos

package
v0.0.0-...-9994f1b Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package dolos is commands related to interacting with dolos, a virtual power source for DUT's.

Index

Constants

This section is empty.

Variables

View Source
var (
	ERROR_CODE_name = map[int32]string{
		0: "OK",
		1: "UNKNOWN_METHOD",
		2: "WRONG_ARGS",
		3: "INTERNAL",
		4: "UNEXPECTED",
		5: "NOT_FOUND",
	}
	ERROR_CODE_value = map[string]int32{
		"OK":             0,
		"UNKNOWN_METHOD": 1,
		"WRONG_ARGS":     2,
		"INTERNAL":       3,
		"UNEXPECTED":     4,
		"NOT_FOUND":      5,
	}
)

Enum value maps for ERROR_CODE.

View Source
var (
	DOLOS_STATUS_name = map[int32]string{
		0: "DOLOS_UNKNOWN",
		1: "DOLOS_NO_POWER_SUPPLIED",
		2: "DOLOS_OUTPUT_POWER_FAILED",
		3: "DOLOS_BMS_STATE_INVALID",
		4: "DOLOS_SMBUS_COMM_NOT_DETECTED",
		5: "DOLOS_EEPROM_FAILURE",
		6: "DOLOS_OK",
		7: "DOLOS_NO_COMMUNICATION",
		8: "DOLOS_NOT_PRESENT",
	}
	DOLOS_STATUS_value = map[string]int32{
		"DOLOS_UNKNOWN":                 0,
		"DOLOS_NO_POWER_SUPPLIED":       1,
		"DOLOS_OUTPUT_POWER_FAILED":     2,
		"DOLOS_BMS_STATE_INVALID":       3,
		"DOLOS_SMBUS_COMM_NOT_DETECTED": 4,
		"DOLOS_EEPROM_FAILURE":          5,
		"DOLOS_OK":                      6,
		"DOLOS_NO_COMMUNICATION":        7,
		"DOLOS_NOT_PRESENT":             8,
	}
)

Enum value maps for DOLOS_STATUS.

View Source
var File_go_chromium_org_infra_cros_recovery_internal_components_dolos_doloscmd_proto protoreflect.FileDescriptor

Functions

func DolosFindUart

func DolosFindUart(ctx context.Context, run components.Runner, dolosInfo *tlw.Dolos, timeout time.Duration) (string, error)

DolosFindUart Call doloscmd find-uartname on the host machine and parse the result text proto if received. Knowing the UART allows direct communication with the Dolos, otherwise it is necessary to search for the correct dolos with external serial number.

func DolosGetStatus

func DolosGetStatus(ctx context.Context, run components.Runner, dolosInfo *tlw.Dolos, timeout time.Duration) (string, error)

DolosGetStatus call doloscmd get-status and parse the results ( if received ) from the output text proto.

func DolosGetVersion

func DolosGetVersion(ctx context.Context, run components.Runner, dolosInfo *tlw.Dolos, timeout time.Duration) (string, error)

DolosGetVersion call doloscmd version and parse the results ( if received ) from the output text proto.

func DolosUpdateFirmware

func DolosUpdateFirmware(ctx context.Context, run components.Runner, dolosInfo *tlw.Dolos, timeout time.Duration) error

DolosUpdateFirmware - call doloscmd update-firmware on the host with the correct arguments to update the firmware to the version listed in UFS.

Types

type DOLOS_STATUS

type DOLOS_STATUS int32
const (
	DOLOS_STATUS_DOLOS_UNKNOWN                 DOLOS_STATUS = 0
	DOLOS_STATUS_DOLOS_NO_POWER_SUPPLIED       DOLOS_STATUS = 1
	DOLOS_STATUS_DOLOS_OUTPUT_POWER_FAILED     DOLOS_STATUS = 2
	DOLOS_STATUS_DOLOS_BMS_STATE_INVALID       DOLOS_STATUS = 3
	DOLOS_STATUS_DOLOS_SMBUS_COMM_NOT_DETECTED DOLOS_STATUS = 4
	DOLOS_STATUS_DOLOS_EEPROM_FAILURE          DOLOS_STATUS = 5
	DOLOS_STATUS_DOLOS_OK                      DOLOS_STATUS = 6
	DOLOS_STATUS_DOLOS_NO_COMMUNICATION        DOLOS_STATUS = 7
	DOLOS_STATUS_DOLOS_NOT_PRESENT             DOLOS_STATUS = 8
)

func (DOLOS_STATUS) Descriptor

func (DOLOS_STATUS) Enum

func (x DOLOS_STATUS) Enum() *DOLOS_STATUS

func (DOLOS_STATUS) EnumDescriptor deprecated

func (DOLOS_STATUS) EnumDescriptor() ([]byte, []int)

Deprecated: Use DOLOS_STATUS.Descriptor instead.

func (DOLOS_STATUS) Number

func (DOLOS_STATUS) String

func (x DOLOS_STATUS) String() string

func (DOLOS_STATUS) Type

type ERROR_CODE

type ERROR_CODE int32
const (
	ERROR_CODE_OK             ERROR_CODE = 0
	ERROR_CODE_UNKNOWN_METHOD ERROR_CODE = 1
	ERROR_CODE_WRONG_ARGS     ERROR_CODE = 2
	ERROR_CODE_INTERNAL       ERROR_CODE = 3
	ERROR_CODE_UNEXPECTED     ERROR_CODE = 4
	ERROR_CODE_NOT_FOUND      ERROR_CODE = 5
)

func (ERROR_CODE) Descriptor

func (ERROR_CODE) Descriptor() protoreflect.EnumDescriptor

func (ERROR_CODE) Enum

func (x ERROR_CODE) Enum() *ERROR_CODE

func (ERROR_CODE) EnumDescriptor deprecated

func (ERROR_CODE) EnumDescriptor() ([]byte, []int)

Deprecated: Use ERROR_CODE.Descriptor instead.

func (ERROR_CODE) Number

func (x ERROR_CODE) Number() protoreflect.EnumNumber

func (ERROR_CODE) String

func (x ERROR_CODE) String() string

func (ERROR_CODE) Type

type FindUartNameResponse

type FindUartNameResponse struct {
	Uartname string    `protobuf:"bytes,1,opt,name=uartname,proto3" json:"uartname,omitempty"`
	Response *Response `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*FindUartNameResponse) Descriptor deprecated

func (*FindUartNameResponse) Descriptor() ([]byte, []int)

Deprecated: Use FindUartNameResponse.ProtoReflect.Descriptor instead.

func (*FindUartNameResponse) GetResponse

func (x *FindUartNameResponse) GetResponse() *Response

func (*FindUartNameResponse) GetUartname

func (x *FindUartNameResponse) GetUartname() string

func (*FindUartNameResponse) ProtoMessage

func (*FindUartNameResponse) ProtoMessage()

func (*FindUartNameResponse) ProtoReflect

func (x *FindUartNameResponse) ProtoReflect() protoreflect.Message

func (*FindUartNameResponse) Reset

func (x *FindUartNameResponse) Reset()

func (*FindUartNameResponse) String

func (x *FindUartNameResponse) String() string

type FirmwareUpdateResponse

type FirmwareUpdateResponse struct {
	Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*FirmwareUpdateResponse) Descriptor deprecated

func (*FirmwareUpdateResponse) Descriptor() ([]byte, []int)

Deprecated: Use FirmwareUpdateResponse.ProtoReflect.Descriptor instead.

func (*FirmwareUpdateResponse) GetResponse

func (x *FirmwareUpdateResponse) GetResponse() *Response

func (*FirmwareUpdateResponse) ProtoMessage

func (*FirmwareUpdateResponse) ProtoMessage()

func (*FirmwareUpdateResponse) ProtoReflect

func (x *FirmwareUpdateResponse) ProtoReflect() protoreflect.Message

func (*FirmwareUpdateResponse) Reset

func (x *FirmwareUpdateResponse) Reset()

func (*FirmwareUpdateResponse) String

func (x *FirmwareUpdateResponse) String() string

type GenericResponse

type GenericResponse struct {
	Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*GenericResponse) Descriptor deprecated

func (*GenericResponse) Descriptor() ([]byte, []int)

Deprecated: Use GenericResponse.ProtoReflect.Descriptor instead.

func (*GenericResponse) GetResponse

func (x *GenericResponse) GetResponse() *Response

func (*GenericResponse) ProtoMessage

func (*GenericResponse) ProtoMessage()

func (*GenericResponse) ProtoReflect

func (x *GenericResponse) ProtoReflect() protoreflect.Message

func (*GenericResponse) Reset

func (x *GenericResponse) Reset()

func (*GenericResponse) String

func (x *GenericResponse) String() string

type GetRepairResponse

type GetRepairResponse struct {
	Response *Response `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRepairResponse) Descriptor deprecated

func (*GetRepairResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetRepairResponse.ProtoReflect.Descriptor instead.

func (*GetRepairResponse) GetResponse

func (x *GetRepairResponse) GetResponse() *Response

func (*GetRepairResponse) ProtoMessage

func (*GetRepairResponse) ProtoMessage()

func (*GetRepairResponse) ProtoReflect

func (x *GetRepairResponse) ProtoReflect() protoreflect.Message

func (*GetRepairResponse) Reset

func (x *GetRepairResponse) Reset()

func (*GetRepairResponse) String

func (x *GetRepairResponse) String() string

type GetStatusResponse

type GetStatusResponse struct {
	Status   DOLOS_STATUS `protobuf:"varint,1,opt,name=status,proto3,enum=chromeos.recovery.DOLOS_STATUS" json:"status,omitempty"`
	Response *Response    `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*GetStatusResponse) Descriptor deprecated

func (*GetStatusResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetStatusResponse.ProtoReflect.Descriptor instead.

func (*GetStatusResponse) GetResponse

func (x *GetStatusResponse) GetResponse() *Response

func (*GetStatusResponse) GetStatus

func (x *GetStatusResponse) GetStatus() DOLOS_STATUS

func (*GetStatusResponse) ProtoMessage

func (*GetStatusResponse) ProtoMessage()

func (*GetStatusResponse) ProtoReflect

func (x *GetStatusResponse) ProtoReflect() protoreflect.Message

func (*GetStatusResponse) Reset

func (x *GetStatusResponse) Reset()

func (*GetStatusResponse) String

func (x *GetStatusResponse) String() string

type GetVersionResponse

type GetVersionResponse struct {
	Version  string    `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	Response *Response `protobuf:"bytes,2,opt,name=response,proto3" json:"response,omitempty"`
	// contains filtered or unexported fields
}

func (*GetVersionResponse) Descriptor deprecated

func (*GetVersionResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetVersionResponse.ProtoReflect.Descriptor instead.

func (*GetVersionResponse) GetResponse

func (x *GetVersionResponse) GetResponse() *Response

func (*GetVersionResponse) GetVersion

func (x *GetVersionResponse) GetVersion() string

func (*GetVersionResponse) ProtoMessage

func (*GetVersionResponse) ProtoMessage()

func (*GetVersionResponse) ProtoReflect

func (x *GetVersionResponse) ProtoReflect() protoreflect.Message

func (*GetVersionResponse) Reset

func (x *GetVersionResponse) Reset()

func (*GetVersionResponse) String

func (x *GetVersionResponse) String() string

type Response

type Response struct {
	Msg  string     `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Code ERROR_CODE `protobuf:"varint,3,opt,name=code,proto3,enum=chromeos.recovery.ERROR_CODE" json:"code,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetCode

func (x *Response) GetCode() ERROR_CODE

func (*Response) GetMsg

func (x *Response) GetMsg() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

Jump to

Keyboard shortcuts

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