| // Copyright 2021 The Chromium OS Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // Code generated by protoc-gen-go. DO NOT EDIT. |
| // versions: |
| // protoc-gen-go v1.27.1 |
| // protoc v3.11.4 |
| // source: dutcontrol.proto |
| |
| package dutcontrol |
| |
| import ( |
| context "context" |
| grpc "google.golang.org/grpc" |
| codes "google.golang.org/grpc/codes" |
| status "google.golang.org/grpc/status" |
| protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| reflect "reflect" |
| sync "sync" |
| ) |
| |
| const ( |
| // Verify that this generated code is sufficiently up-to-date. |
| _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| // Verify that runtime/protoimpl is sufficiently up-to-date. |
| _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| ) |
| |
| // CCD serial-like end points. |
| type CCDSerialEndPoint int32 |
| |
| const ( |
| CCDSerialEndPoint_UNKNOWN_SERIAL CCDSerialEndPoint = 0 |
| CCDSerialEndPoint_EC CCDSerialEndPoint = 1 |
| CCDSerialEndPoint_AP CCDSerialEndPoint = 2 |
| CCDSerialEndPoint_FPMCU CCDSerialEndPoint = 3 |
| CCDSerialEndPoint_GSC CCDSerialEndPoint = 4 |
| ) |
| |
| // Enum value maps for CCDSerialEndPoint. |
| var ( |
| CCDSerialEndPoint_name = map[int32]string{ |
| 0: "UNKNOWN_SERIAL", |
| 1: "EC", |
| 2: "AP", |
| 3: "FPMCU", |
| 4: "GSC", |
| } |
| CCDSerialEndPoint_value = map[string]int32{ |
| "UNKNOWN_SERIAL": 0, |
| "EC": 1, |
| "AP": 2, |
| "FPMCU": 3, |
| "GSC": 4, |
| } |
| ) |
| |
| func (x CCDSerialEndPoint) Enum() *CCDSerialEndPoint { |
| p := new(CCDSerialEndPoint) |
| *p = x |
| return p |
| } |
| |
| func (x CCDSerialEndPoint) String() string { |
| return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) |
| } |
| |
| func (CCDSerialEndPoint) Descriptor() protoreflect.EnumDescriptor { |
| return file_dutcontrol_proto_enumTypes[0].Descriptor() |
| } |
| |
| func (CCDSerialEndPoint) Type() protoreflect.EnumType { |
| return &file_dutcontrol_proto_enumTypes[0] |
| } |
| |
| func (x CCDSerialEndPoint) Number() protoreflect.EnumNumber { |
| return protoreflect.EnumNumber(x) |
| } |
| |
| // Deprecated: Use CCDSerialEndPoint.Descriptor instead. |
| func (CCDSerialEndPoint) EnumDescriptor() ([]byte, []int) { |
| return file_dutcontrol_proto_rawDescGZIP(), []int{0} |
| } |
| |
| type ConsoleOpenCCDSerial struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| Ep CCDSerialEndPoint `protobuf:"varint,1,opt,name=ep,proto3,enum=devboardservice.dutcontrol.CCDSerialEndPoint" json:"ep,omitempty"` |
| Baud int32 `protobuf:"varint,2,opt,name=baud,proto3" json:"baud,omitempty"` |
| // Max length of data for each Recv. |
| DataLen int32 `protobuf:"varint,3,opt,name=data_len,json=dataLen,proto3" json:"data_len,omitempty"` |
| } |
| |
| func (x *ConsoleOpenCCDSerial) Reset() { |
| *x = ConsoleOpenCCDSerial{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_dutcontrol_proto_msgTypes[0] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *ConsoleOpenCCDSerial) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*ConsoleOpenCCDSerial) ProtoMessage() {} |
| |
| func (x *ConsoleOpenCCDSerial) ProtoReflect() protoreflect.Message { |
| mi := &file_dutcontrol_proto_msgTypes[0] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use ConsoleOpenCCDSerial.ProtoReflect.Descriptor instead. |
| func (*ConsoleOpenCCDSerial) Descriptor() ([]byte, []int) { |
| return file_dutcontrol_proto_rawDescGZIP(), []int{0} |
| } |
| |
| func (x *ConsoleOpenCCDSerial) GetEp() CCDSerialEndPoint { |
| if x != nil { |
| return x.Ep |
| } |
| return CCDSerialEndPoint_UNKNOWN_SERIAL |
| } |
| |
| func (x *ConsoleOpenCCDSerial) GetBaud() int32 { |
| if x != nil { |
| return x.Baud |
| } |
| return 0 |
| } |
| |
| func (x *ConsoleOpenCCDSerial) GetDataLen() int32 { |
| if x != nil { |
| return x.DataLen |
| } |
| return 0 |
| } |
| |
| // Through the OpenTitanTool. |
| type ConsoleOpenRawUART struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| Uart string `protobuf:"bytes,1,opt,name=uart,proto3" json:"uart,omitempty"` |
| Baud int32 `protobuf:"varint,2,opt,name=baud,proto3" json:"baud,omitempty"` |
| // Max length of data for each Recv. |
| DataLen int32 `protobuf:"varint,3,opt,name=data_len,json=dataLen,proto3" json:"data_len,omitempty"` |
| } |
| |
| func (x *ConsoleOpenRawUART) Reset() { |
| *x = ConsoleOpenRawUART{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_dutcontrol_proto_msgTypes[1] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *ConsoleOpenRawUART) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*ConsoleOpenRawUART) ProtoMessage() {} |
| |
| func (x *ConsoleOpenRawUART) ProtoReflect() protoreflect.Message { |
| mi := &file_dutcontrol_proto_msgTypes[1] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use ConsoleOpenRawUART.ProtoReflect.Descriptor instead. |
| func (*ConsoleOpenRawUART) Descriptor() ([]byte, []int) { |
| return file_dutcontrol_proto_rawDescGZIP(), []int{1} |
| } |
| |
| func (x *ConsoleOpenRawUART) GetUart() string { |
| if x != nil { |
| return x.Uart |
| } |
| return "" |
| } |
| |
| func (x *ConsoleOpenRawUART) GetBaud() int32 { |
| if x != nil { |
| return x.Baud |
| } |
| return 0 |
| } |
| |
| func (x *ConsoleOpenRawUART) GetDataLen() int32 { |
| if x != nil { |
| return x.DataLen |
| } |
| return 0 |
| } |
| |
| type ConsoleOpen struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| // Types that are assignable to Type: |
| // *ConsoleOpen_CcdSerial |
| // *ConsoleOpen_RawUart |
| Type isConsoleOpen_Type `protobuf_oneof:"type"` |
| } |
| |
| func (x *ConsoleOpen) Reset() { |
| *x = ConsoleOpen{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_dutcontrol_proto_msgTypes[2] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *ConsoleOpen) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*ConsoleOpen) ProtoMessage() {} |
| |
| func (x *ConsoleOpen) ProtoReflect() protoreflect.Message { |
| mi := &file_dutcontrol_proto_msgTypes[2] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use ConsoleOpen.ProtoReflect.Descriptor instead. |
| func (*ConsoleOpen) Descriptor() ([]byte, []int) { |
| return file_dutcontrol_proto_rawDescGZIP(), []int{2} |
| } |
| |
| func (m *ConsoleOpen) GetType() isConsoleOpen_Type { |
| if m != nil { |
| return m.Type |
| } |
| return nil |
| } |
| |
| func (x *ConsoleOpen) GetCcdSerial() *ConsoleOpenCCDSerial { |
| if x, ok := x.GetType().(*ConsoleOpen_CcdSerial); ok { |
| return x.CcdSerial |
| } |
| return nil |
| } |
| |
| func (x *ConsoleOpen) GetRawUart() *ConsoleOpenRawUART { |
| if x, ok := x.GetType().(*ConsoleOpen_RawUart); ok { |
| return x.RawUart |
| } |
| return nil |
| } |
| |
| type isConsoleOpen_Type interface { |
| isConsoleOpen_Type() |
| } |
| |
| type ConsoleOpen_CcdSerial struct { |
| CcdSerial *ConsoleOpenCCDSerial `protobuf:"bytes,1,opt,name=ccd_serial,json=ccdSerial,proto3,oneof"` |
| } |
| |
| type ConsoleOpen_RawUart struct { |
| RawUart *ConsoleOpenRawUART `protobuf:"bytes,2,opt,name=raw_uart,json=rawUart,proto3,oneof"` |
| } |
| |
| func (*ConsoleOpen_CcdSerial) isConsoleOpen_Type() {} |
| |
| func (*ConsoleOpen_RawUart) isConsoleOpen_Type() {} |
| |
| type ConsoleSerialWrite struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` |
| } |
| |
| func (x *ConsoleSerialWrite) Reset() { |
| *x = ConsoleSerialWrite{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_dutcontrol_proto_msgTypes[3] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *ConsoleSerialWrite) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*ConsoleSerialWrite) ProtoMessage() {} |
| |
| func (x *ConsoleSerialWrite) ProtoReflect() protoreflect.Message { |
| mi := &file_dutcontrol_proto_msgTypes[3] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use ConsoleSerialWrite.ProtoReflect.Descriptor instead. |
| func (*ConsoleSerialWrite) Descriptor() ([]byte, []int) { |
| return file_dutcontrol_proto_rawDescGZIP(), []int{3} |
| } |
| |
| func (x *ConsoleSerialWrite) GetData() []byte { |
| if x != nil { |
| return x.Data |
| } |
| return nil |
| } |
| |
| type ConsoleRequest struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| // Types that are assignable to Operation: |
| // *ConsoleRequest_Open |
| // *ConsoleRequest_SerialWrite |
| Operation isConsoleRequest_Operation `protobuf_oneof:"operation"` |
| } |
| |
| func (x *ConsoleRequest) Reset() { |
| *x = ConsoleRequest{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_dutcontrol_proto_msgTypes[4] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *ConsoleRequest) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*ConsoleRequest) ProtoMessage() {} |
| |
| func (x *ConsoleRequest) ProtoReflect() protoreflect.Message { |
| mi := &file_dutcontrol_proto_msgTypes[4] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use ConsoleRequest.ProtoReflect.Descriptor instead. |
| func (*ConsoleRequest) Descriptor() ([]byte, []int) { |
| return file_dutcontrol_proto_rawDescGZIP(), []int{4} |
| } |
| |
| func (m *ConsoleRequest) GetOperation() isConsoleRequest_Operation { |
| if m != nil { |
| return m.Operation |
| } |
| return nil |
| } |
| |
| func (x *ConsoleRequest) GetOpen() *ConsoleOpen { |
| if x, ok := x.GetOperation().(*ConsoleRequest_Open); ok { |
| return x.Open |
| } |
| return nil |
| } |
| |
| func (x *ConsoleRequest) GetSerialWrite() *ConsoleSerialWrite { |
| if x, ok := x.GetOperation().(*ConsoleRequest_SerialWrite); ok { |
| return x.SerialWrite |
| } |
| return nil |
| } |
| |
| type isConsoleRequest_Operation interface { |
| isConsoleRequest_Operation() |
| } |
| |
| type ConsoleRequest_Open struct { |
| Open *ConsoleOpen `protobuf:"bytes,1,opt,name=open,proto3,oneof"` |
| } |
| |
| type ConsoleRequest_SerialWrite struct { |
| SerialWrite *ConsoleSerialWrite `protobuf:"bytes,2,opt,name=serial_write,json=serialWrite,proto3,oneof"` |
| } |
| |
| func (*ConsoleRequest_Open) isConsoleRequest_Operation() {} |
| |
| func (*ConsoleRequest_SerialWrite) isConsoleRequest_Operation() {} |
| |
| type ConsoleOpenResult struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| Err string `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` |
| } |
| |
| func (x *ConsoleOpenResult) Reset() { |
| *x = ConsoleOpenResult{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_dutcontrol_proto_msgTypes[5] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *ConsoleOpenResult) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*ConsoleOpenResult) ProtoMessage() {} |
| |
| func (x *ConsoleOpenResult) ProtoReflect() protoreflect.Message { |
| mi := &file_dutcontrol_proto_msgTypes[5] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use ConsoleOpenResult.ProtoReflect.Descriptor instead. |
| func (*ConsoleOpenResult) Descriptor() ([]byte, []int) { |
| return file_dutcontrol_proto_rawDescGZIP(), []int{5} |
| } |
| |
| func (x *ConsoleOpenResult) GetErr() string { |
| if x != nil { |
| return x.Err |
| } |
| return "" |
| } |
| |
| // ConsoleSerialWriteResult will be sent in the same order as ConsoleSerialWrite was received. |
| type ConsoleSerialWriteResult struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| // Number of bytes successfully written. |
| N int32 `protobuf:"varint,1,opt,name=n,proto3" json:"n,omitempty"` |
| // Empty indicates no error and n == len(data). Non-empty does not imply n == 0. |
| Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` |
| } |
| |
| func (x *ConsoleSerialWriteResult) Reset() { |
| *x = ConsoleSerialWriteResult{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_dutcontrol_proto_msgTypes[6] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *ConsoleSerialWriteResult) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*ConsoleSerialWriteResult) ProtoMessage() {} |
| |
| func (x *ConsoleSerialWriteResult) ProtoReflect() protoreflect.Message { |
| mi := &file_dutcontrol_proto_msgTypes[6] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use ConsoleSerialWriteResult.ProtoReflect.Descriptor instead. |
| func (*ConsoleSerialWriteResult) Descriptor() ([]byte, []int) { |
| return file_dutcontrol_proto_rawDescGZIP(), []int{6} |
| } |
| |
| func (x *ConsoleSerialWriteResult) GetN() int32 { |
| if x != nil { |
| return x.N |
| } |
| return 0 |
| } |
| |
| func (x *ConsoleSerialWriteResult) GetErr() string { |
| if x != nil { |
| return x.Err |
| } |
| return "" |
| } |
| |
| // ConsoleSerialData messages will be stream from server to client. |
| type ConsoleSerialData struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| // Limited to data_len size in Open. |
| Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` |
| // Empty indicates no error. Non-empty does not imply zero data bytes. |
| Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` |
| } |
| |
| func (x *ConsoleSerialData) Reset() { |
| *x = ConsoleSerialData{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_dutcontrol_proto_msgTypes[7] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *ConsoleSerialData) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*ConsoleSerialData) ProtoMessage() {} |
| |
| func (x *ConsoleSerialData) ProtoReflect() protoreflect.Message { |
| mi := &file_dutcontrol_proto_msgTypes[7] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use ConsoleSerialData.ProtoReflect.Descriptor instead. |
| func (*ConsoleSerialData) Descriptor() ([]byte, []int) { |
| return file_dutcontrol_proto_rawDescGZIP(), []int{7} |
| } |
| |
| func (x *ConsoleSerialData) GetData() []byte { |
| if x != nil { |
| return x.Data |
| } |
| return nil |
| } |
| |
| func (x *ConsoleSerialData) GetErr() string { |
| if x != nil { |
| return x.Err |
| } |
| return "" |
| } |
| |
| type ConsoleResponse struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| // Types that are assignable to Type: |
| // *ConsoleResponse_Open |
| // *ConsoleResponse_SerialWrite |
| // *ConsoleResponse_SerialData |
| Type isConsoleResponse_Type `protobuf_oneof:"type"` |
| } |
| |
| func (x *ConsoleResponse) Reset() { |
| *x = ConsoleResponse{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_dutcontrol_proto_msgTypes[8] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *ConsoleResponse) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*ConsoleResponse) ProtoMessage() {} |
| |
| func (x *ConsoleResponse) ProtoReflect() protoreflect.Message { |
| mi := &file_dutcontrol_proto_msgTypes[8] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use ConsoleResponse.ProtoReflect.Descriptor instead. |
| func (*ConsoleResponse) Descriptor() ([]byte, []int) { |
| return file_dutcontrol_proto_rawDescGZIP(), []int{8} |
| } |
| |
| func (m *ConsoleResponse) GetType() isConsoleResponse_Type { |
| if m != nil { |
| return m.Type |
| } |
| return nil |
| } |
| |
| func (x *ConsoleResponse) GetOpen() *ConsoleOpenResult { |
| if x, ok := x.GetType().(*ConsoleResponse_Open); ok { |
| return x.Open |
| } |
| return nil |
| } |
| |
| func (x *ConsoleResponse) GetSerialWrite() *ConsoleSerialWriteResult { |
| if x, ok := x.GetType().(*ConsoleResponse_SerialWrite); ok { |
| return x.SerialWrite |
| } |
| return nil |
| } |
| |
| func (x *ConsoleResponse) GetSerialData() *ConsoleSerialData { |
| if x, ok := x.GetType().(*ConsoleResponse_SerialData); ok { |
| return x.SerialData |
| } |
| return nil |
| } |
| |
| type isConsoleResponse_Type interface { |
| isConsoleResponse_Type() |
| } |
| |
| type ConsoleResponse_Open struct { |
| Open *ConsoleOpenResult `protobuf:"bytes,1,opt,name=open,proto3,oneof"` |
| } |
| |
| type ConsoleResponse_SerialWrite struct { |
| SerialWrite *ConsoleSerialWriteResult `protobuf:"bytes,2,opt,name=serial_write,json=serialWrite,proto3,oneof"` |
| } |
| |
| type ConsoleResponse_SerialData struct { |
| SerialData *ConsoleSerialData `protobuf:"bytes,3,opt,name=serial_data,json=serialData,proto3,oneof"` |
| } |
| |
| func (*ConsoleResponse_Open) isConsoleResponse_Type() {} |
| |
| func (*ConsoleResponse_SerialWrite) isConsoleResponse_Type() {} |
| |
| func (*ConsoleResponse_SerialData) isConsoleResponse_Type() {} |
| |
| type CommandArg struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| // Types that are assignable to Type: |
| // *CommandArg_Plain |
| // *CommandArg_File |
| Type isCommandArg_Type `protobuf_oneof:"type"` |
| } |
| |
| func (x *CommandArg) Reset() { |
| *x = CommandArg{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_dutcontrol_proto_msgTypes[9] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *CommandArg) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*CommandArg) ProtoMessage() {} |
| |
| func (x *CommandArg) ProtoReflect() protoreflect.Message { |
| mi := &file_dutcontrol_proto_msgTypes[9] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use CommandArg.ProtoReflect.Descriptor instead. |
| func (*CommandArg) Descriptor() ([]byte, []int) { |
| return file_dutcontrol_proto_rawDescGZIP(), []int{9} |
| } |
| |
| func (m *CommandArg) GetType() isCommandArg_Type { |
| if m != nil { |
| return m.Type |
| } |
| return nil |
| } |
| |
| func (x *CommandArg) GetPlain() string { |
| if x, ok := x.GetType().(*CommandArg_Plain); ok { |
| return x.Plain |
| } |
| return "" |
| } |
| |
| func (x *CommandArg) GetFile() []byte { |
| if x, ok := x.GetType().(*CommandArg_File); ok { |
| return x.File |
| } |
| return nil |
| } |
| |
| type isCommandArg_Type interface { |
| isCommandArg_Type() |
| } |
| |
| type CommandArg_Plain struct { |
| // A literal such as "--flag" or "value". |
| Plain string `protobuf:"bytes,1,opt,name=plain,proto3,oneof"` |
| } |
| |
| type CommandArg_File struct { |
| // Bytes to be written to a temp file then presented as its name. |
| File []byte `protobuf:"bytes,2,opt,name=file,proto3,oneof"` |
| } |
| |
| func (*CommandArg_Plain) isCommandArg_Type() {} |
| |
| func (*CommandArg_File) isCommandArg_Type() {} |
| |
| // CommandRequest runs an OpenTitanTool command. |
| type CommandRequest struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| Command string `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"` |
| Args []*CommandArg `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"` |
| } |
| |
| func (x *CommandRequest) Reset() { |
| *x = CommandRequest{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_dutcontrol_proto_msgTypes[10] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *CommandRequest) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*CommandRequest) ProtoMessage() {} |
| |
| func (x *CommandRequest) ProtoReflect() protoreflect.Message { |
| mi := &file_dutcontrol_proto_msgTypes[10] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use CommandRequest.ProtoReflect.Descriptor instead. |
| func (*CommandRequest) Descriptor() ([]byte, []int) { |
| return file_dutcontrol_proto_rawDescGZIP(), []int{10} |
| } |
| |
| func (x *CommandRequest) GetCommand() string { |
| if x != nil { |
| return x.Command |
| } |
| return "" |
| } |
| |
| func (x *CommandRequest) GetArgs() []*CommandArg { |
| if x != nil { |
| return x.Args |
| } |
| return nil |
| } |
| |
| type CommandResponse struct { |
| state protoimpl.MessageState |
| sizeCache protoimpl.SizeCache |
| unknownFields protoimpl.UnknownFields |
| |
| Output []byte `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` |
| // Empty indicates no error (zero exit code). |
| Err string `protobuf:"bytes,2,opt,name=err,proto3" json:"err,omitempty"` |
| } |
| |
| func (x *CommandResponse) Reset() { |
| *x = CommandResponse{} |
| if protoimpl.UnsafeEnabled { |
| mi := &file_dutcontrol_proto_msgTypes[11] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| } |
| |
| func (x *CommandResponse) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*CommandResponse) ProtoMessage() {} |
| |
| func (x *CommandResponse) ProtoReflect() protoreflect.Message { |
| mi := &file_dutcontrol_proto_msgTypes[11] |
| if protoimpl.UnsafeEnabled && x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use CommandResponse.ProtoReflect.Descriptor instead. |
| func (*CommandResponse) Descriptor() ([]byte, []int) { |
| return file_dutcontrol_proto_rawDescGZIP(), []int{11} |
| } |
| |
| func (x *CommandResponse) GetOutput() []byte { |
| if x != nil { |
| return x.Output |
| } |
| return nil |
| } |
| |
| func (x *CommandResponse) GetErr() string { |
| if x != nil { |
| return x.Err |
| } |
| return "" |
| } |
| |
| var File_dutcontrol_proto protoreflect.FileDescriptor |
| |
| var file_dutcontrol_proto_rawDesc = []byte{ |
| 0x0a, 0x10, 0x64, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, |
| 0x74, 0x6f, 0x12, 0x1a, 0x64, 0x65, 0x76, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x65, 0x72, 0x76, |
| 0x69, 0x63, 0x65, 0x2e, 0x64, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x22, 0x84, |
| 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x43, |
| 0x44, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x12, 0x3d, 0x0a, 0x02, 0x65, 0x70, 0x18, 0x01, 0x20, |
| 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x64, 0x65, 0x76, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x65, |
| 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, |
| 0x2e, 0x43, 0x43, 0x44, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x69, |
| 0x6e, 0x74, 0x52, 0x02, 0x65, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x61, 0x75, 0x64, 0x18, 0x02, |
| 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x62, 0x61, 0x75, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x61, |
| 0x74, 0x61, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, 0x61, |
| 0x74, 0x61, 0x4c, 0x65, 0x6e, 0x22, 0x57, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, |
| 0x4f, 0x70, 0x65, 0x6e, 0x52, 0x61, 0x77, 0x55, 0x41, 0x52, 0x54, 0x12, 0x12, 0x0a, 0x04, 0x75, |
| 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x61, 0x72, 0x74, 0x12, |
| 0x12, 0x0a, 0x04, 0x62, 0x61, 0x75, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x62, |
| 0x61, 0x75, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x65, 0x6e, 0x18, |
| 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x64, 0x61, 0x74, 0x61, 0x4c, 0x65, 0x6e, 0x22, 0xb5, |
| 0x01, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x12, 0x51, |
| 0x0a, 0x0a, 0x63, 0x63, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, |
| 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x64, 0x65, 0x76, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x65, 0x72, |
| 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, |
| 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x43, 0x44, 0x53, 0x65, |
| 0x72, 0x69, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x09, 0x63, 0x63, 0x64, 0x53, 0x65, 0x72, 0x69, 0x61, |
| 0x6c, 0x12, 0x4b, 0x0a, 0x08, 0x72, 0x61, 0x77, 0x5f, 0x75, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, |
| 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x64, 0x65, 0x76, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x65, |
| 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, |
| 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x52, 0x61, 0x77, 0x55, |
| 0x41, 0x52, 0x54, 0x48, 0x00, 0x52, 0x07, 0x72, 0x61, 0x77, 0x55, 0x61, 0x72, 0x74, 0x42, 0x06, |
| 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x28, 0x0a, 0x12, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, |
| 0x65, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x12, 0x0a, 0x04, |
| 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, |
| 0x22, 0xb1, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, |
| 0x65, 0x73, 0x74, 0x12, 0x3d, 0x0a, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, |
| 0x0b, 0x32, 0x27, 0x2e, 0x64, 0x65, 0x76, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x65, 0x72, 0x76, |
| 0x69, 0x63, 0x65, 0x2e, 0x64, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, |
| 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x48, 0x00, 0x52, 0x04, 0x6f, 0x70, |
| 0x65, 0x6e, 0x12, 0x53, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x77, 0x72, 0x69, |
| 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x64, 0x65, 0x76, 0x62, 0x6f, |
| 0x61, 0x72, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x75, 0x74, 0x63, 0x6f, |
| 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x53, 0x65, 0x72, |
| 0x69, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x69, |
| 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, |
| 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x25, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x4f, |
| 0x70, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, |
| 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x3a, 0x0a, 0x18, 0x43, |
| 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, |
| 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0c, 0x0a, 0x01, 0x6e, 0x18, 0x01, 0x20, 0x01, |
| 0x28, 0x05, 0x52, 0x01, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, |
| 0x28, 0x09, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x39, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x73, 0x6f, |
| 0x6c, 0x65, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, |
| 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, |
| 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, |
| 0x72, 0x72, 0x22, 0x8b, 0x02, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, |
| 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x18, 0x01, |
| 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x65, 0x76, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, |
| 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, |
| 0x6c, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x4f, 0x70, 0x65, 0x6e, 0x52, 0x65, 0x73, |
| 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x04, 0x6f, 0x70, 0x65, 0x6e, 0x12, 0x59, 0x0a, 0x0c, 0x73, |
| 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, |
| 0x0b, 0x32, 0x34, 0x2e, 0x64, 0x65, 0x76, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x65, 0x72, 0x76, |
| 0x69, 0x63, 0x65, 0x2e, 0x64, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, |
| 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x57, 0x72, 0x69, 0x74, |
| 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x69, 0x61, |
| 0x6c, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x50, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, |
| 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x65, |
| 0x76, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x75, |
| 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, |
| 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x65, |
| 0x72, 0x69, 0x61, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, |
| 0x22, 0x42, 0x0a, 0x0a, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x41, 0x72, 0x67, 0x12, 0x16, |
| 0x0a, 0x05, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, |
| 0x05, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, |
| 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x42, 0x06, 0x0a, 0x04, |
| 0x74, 0x79, 0x70, 0x65, 0x22, 0x66, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, |
| 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, |
| 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, |
| 0x12, 0x3a, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, |
| 0x2e, 0x64, 0x65, 0x76, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, |
| 0x2e, 0x64, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, |
| 0x61, 0x6e, 0x64, 0x41, 0x72, 0x67, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x3b, 0x0a, 0x0f, |
| 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, |
| 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, |
| 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, |
| 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x65, 0x72, 0x72, 0x2a, 0x4b, 0x0a, 0x11, 0x43, 0x43, 0x44, |
| 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x45, 0x6e, 0x64, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x12, |
| 0x0a, 0x0e, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x45, 0x52, 0x49, 0x41, 0x4c, |
| 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x45, 0x43, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x41, 0x50, |
| 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x50, 0x4d, 0x43, 0x55, 0x10, 0x03, 0x12, 0x07, 0x0a, |
| 0x03, 0x47, 0x53, 0x43, 0x10, 0x04, 0x32, 0xd8, 0x01, 0x0a, 0x0a, 0x44, 0x75, 0x74, 0x43, 0x6f, |
| 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x66, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, |
| 0x12, 0x2a, 0x2e, 0x64, 0x65, 0x76, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, |
| 0x63, 0x65, 0x2e, 0x64, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, |
| 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, |
| 0x65, 0x76, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, |
| 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, |
| 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, 0x62, 0x0a, |
| 0x07, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x2a, 0x2e, 0x64, 0x65, 0x76, 0x62, 0x6f, |
| 0x61, 0x72, 0x64, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x75, 0x74, 0x63, 0x6f, |
| 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, |
| 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x64, 0x65, 0x76, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, |
| 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, |
| 0x6c, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, |
| 0x65, 0x42, 0x1c, 0x5a, 0x1a, 0x64, 0x65, 0x76, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x65, 0x72, |
| 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x75, 0x74, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x62, |
| 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| } |
| |
| var ( |
| file_dutcontrol_proto_rawDescOnce sync.Once |
| file_dutcontrol_proto_rawDescData = file_dutcontrol_proto_rawDesc |
| ) |
| |
| func file_dutcontrol_proto_rawDescGZIP() []byte { |
| file_dutcontrol_proto_rawDescOnce.Do(func() { |
| file_dutcontrol_proto_rawDescData = protoimpl.X.CompressGZIP(file_dutcontrol_proto_rawDescData) |
| }) |
| return file_dutcontrol_proto_rawDescData |
| } |
| |
| var file_dutcontrol_proto_enumTypes = make([]protoimpl.EnumInfo, 1) |
| var file_dutcontrol_proto_msgTypes = make([]protoimpl.MessageInfo, 12) |
| var file_dutcontrol_proto_goTypes = []interface{}{ |
| (CCDSerialEndPoint)(0), // 0: devboardservice.dutcontrol.CCDSerialEndPoint |
| (*ConsoleOpenCCDSerial)(nil), // 1: devboardservice.dutcontrol.ConsoleOpenCCDSerial |
| (*ConsoleOpenRawUART)(nil), // 2: devboardservice.dutcontrol.ConsoleOpenRawUART |
| (*ConsoleOpen)(nil), // 3: devboardservice.dutcontrol.ConsoleOpen |
| (*ConsoleSerialWrite)(nil), // 4: devboardservice.dutcontrol.ConsoleSerialWrite |
| (*ConsoleRequest)(nil), // 5: devboardservice.dutcontrol.ConsoleRequest |
| (*ConsoleOpenResult)(nil), // 6: devboardservice.dutcontrol.ConsoleOpenResult |
| (*ConsoleSerialWriteResult)(nil), // 7: devboardservice.dutcontrol.ConsoleSerialWriteResult |
| (*ConsoleSerialData)(nil), // 8: devboardservice.dutcontrol.ConsoleSerialData |
| (*ConsoleResponse)(nil), // 9: devboardservice.dutcontrol.ConsoleResponse |
| (*CommandArg)(nil), // 10: devboardservice.dutcontrol.CommandArg |
| (*CommandRequest)(nil), // 11: devboardservice.dutcontrol.CommandRequest |
| (*CommandResponse)(nil), // 12: devboardservice.dutcontrol.CommandResponse |
| } |
| var file_dutcontrol_proto_depIdxs = []int32{ |
| 0, // 0: devboardservice.dutcontrol.ConsoleOpenCCDSerial.ep:type_name -> devboardservice.dutcontrol.CCDSerialEndPoint |
| 1, // 1: devboardservice.dutcontrol.ConsoleOpen.ccd_serial:type_name -> devboardservice.dutcontrol.ConsoleOpenCCDSerial |
| 2, // 2: devboardservice.dutcontrol.ConsoleOpen.raw_uart:type_name -> devboardservice.dutcontrol.ConsoleOpenRawUART |
| 3, // 3: devboardservice.dutcontrol.ConsoleRequest.open:type_name -> devboardservice.dutcontrol.ConsoleOpen |
| 4, // 4: devboardservice.dutcontrol.ConsoleRequest.serial_write:type_name -> devboardservice.dutcontrol.ConsoleSerialWrite |
| 6, // 5: devboardservice.dutcontrol.ConsoleResponse.open:type_name -> devboardservice.dutcontrol.ConsoleOpenResult |
| 7, // 6: devboardservice.dutcontrol.ConsoleResponse.serial_write:type_name -> devboardservice.dutcontrol.ConsoleSerialWriteResult |
| 8, // 7: devboardservice.dutcontrol.ConsoleResponse.serial_data:type_name -> devboardservice.dutcontrol.ConsoleSerialData |
| 10, // 8: devboardservice.dutcontrol.CommandRequest.args:type_name -> devboardservice.dutcontrol.CommandArg |
| 5, // 9: devboardservice.dutcontrol.DutControl.Console:input_type -> devboardservice.dutcontrol.ConsoleRequest |
| 11, // 10: devboardservice.dutcontrol.DutControl.Command:input_type -> devboardservice.dutcontrol.CommandRequest |
| 9, // 11: devboardservice.dutcontrol.DutControl.Console:output_type -> devboardservice.dutcontrol.ConsoleResponse |
| 12, // 12: devboardservice.dutcontrol.DutControl.Command:output_type -> devboardservice.dutcontrol.CommandResponse |
| 11, // [11:13] is the sub-list for method output_type |
| 9, // [9:11] is the sub-list for method input_type |
| 9, // [9:9] is the sub-list for extension type_name |
| 9, // [9:9] is the sub-list for extension extendee |
| 0, // [0:9] is the sub-list for field type_name |
| } |
| |
| func init() { file_dutcontrol_proto_init() } |
| func file_dutcontrol_proto_init() { |
| if File_dutcontrol_proto != nil { |
| return |
| } |
| if !protoimpl.UnsafeEnabled { |
| file_dutcontrol_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*ConsoleOpenCCDSerial); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_dutcontrol_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*ConsoleOpenRawUART); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_dutcontrol_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*ConsoleOpen); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_dutcontrol_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*ConsoleSerialWrite); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_dutcontrol_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*ConsoleRequest); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_dutcontrol_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*ConsoleOpenResult); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_dutcontrol_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*ConsoleSerialWriteResult); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_dutcontrol_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*ConsoleSerialData); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_dutcontrol_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*ConsoleResponse); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_dutcontrol_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*CommandArg); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_dutcontrol_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*CommandRequest); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| file_dutcontrol_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { |
| switch v := v.(*CommandResponse); i { |
| case 0: |
| return &v.state |
| case 1: |
| return &v.sizeCache |
| case 2: |
| return &v.unknownFields |
| default: |
| return nil |
| } |
| } |
| } |
| file_dutcontrol_proto_msgTypes[2].OneofWrappers = []interface{}{ |
| (*ConsoleOpen_CcdSerial)(nil), |
| (*ConsoleOpen_RawUart)(nil), |
| } |
| file_dutcontrol_proto_msgTypes[4].OneofWrappers = []interface{}{ |
| (*ConsoleRequest_Open)(nil), |
| (*ConsoleRequest_SerialWrite)(nil), |
| } |
| file_dutcontrol_proto_msgTypes[8].OneofWrappers = []interface{}{ |
| (*ConsoleResponse_Open)(nil), |
| (*ConsoleResponse_SerialWrite)(nil), |
| (*ConsoleResponse_SerialData)(nil), |
| } |
| file_dutcontrol_proto_msgTypes[9].OneofWrappers = []interface{}{ |
| (*CommandArg_Plain)(nil), |
| (*CommandArg_File)(nil), |
| } |
| type x struct{} |
| out := protoimpl.TypeBuilder{ |
| File: protoimpl.DescBuilder{ |
| GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| RawDescriptor: file_dutcontrol_proto_rawDesc, |
| NumEnums: 1, |
| NumMessages: 12, |
| NumExtensions: 0, |
| NumServices: 1, |
| }, |
| GoTypes: file_dutcontrol_proto_goTypes, |
| DependencyIndexes: file_dutcontrol_proto_depIdxs, |
| EnumInfos: file_dutcontrol_proto_enumTypes, |
| MessageInfos: file_dutcontrol_proto_msgTypes, |
| }.Build() |
| File_dutcontrol_proto = out.File |
| file_dutcontrol_proto_rawDesc = nil |
| file_dutcontrol_proto_goTypes = nil |
| file_dutcontrol_proto_depIdxs = nil |
| } |
| |
| // Reference imports to suppress errors if they are not otherwise used. |
| var _ context.Context |
| var _ grpc.ClientConnInterface |
| |
| // This is a compile-time assertion to ensure that this generated file |
| // is compatible with the grpc package it is being compiled against. |
| const _ = grpc.SupportPackageIsVersion6 |
| |
| // DutControlClient is the client API for DutControl service. |
| // |
| // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| type DutControlClient interface { |
| // Console allows stream access to a serial interface. |
| Console(ctx context.Context, opts ...grpc.CallOption) (DutControl_ConsoleClient, error) |
| // Run a generic OpenTitanTool command. |
| Command(ctx context.Context, in *CommandRequest, opts ...grpc.CallOption) (*CommandResponse, error) |
| } |
| |
| type dutControlClient struct { |
| cc grpc.ClientConnInterface |
| } |
| |
| func NewDutControlClient(cc grpc.ClientConnInterface) DutControlClient { |
| return &dutControlClient{cc} |
| } |
| |
| func (c *dutControlClient) Console(ctx context.Context, opts ...grpc.CallOption) (DutControl_ConsoleClient, error) { |
| stream, err := c.cc.NewStream(ctx, &_DutControl_serviceDesc.Streams[0], "/devboardservice.dutcontrol.DutControl/Console", opts...) |
| if err != nil { |
| return nil, err |
| } |
| x := &dutControlConsoleClient{stream} |
| return x, nil |
| } |
| |
| type DutControl_ConsoleClient interface { |
| Send(*ConsoleRequest) error |
| Recv() (*ConsoleResponse, error) |
| grpc.ClientStream |
| } |
| |
| type dutControlConsoleClient struct { |
| grpc.ClientStream |
| } |
| |
| func (x *dutControlConsoleClient) Send(m *ConsoleRequest) error { |
| return x.ClientStream.SendMsg(m) |
| } |
| |
| func (x *dutControlConsoleClient) Recv() (*ConsoleResponse, error) { |
| m := new(ConsoleResponse) |
| if err := x.ClientStream.RecvMsg(m); err != nil { |
| return nil, err |
| } |
| return m, nil |
| } |
| |
| func (c *dutControlClient) Command(ctx context.Context, in *CommandRequest, opts ...grpc.CallOption) (*CommandResponse, error) { |
| out := new(CommandResponse) |
| err := c.cc.Invoke(ctx, "/devboardservice.dutcontrol.DutControl/Command", in, out, opts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| // DutControlServer is the server API for DutControl service. |
| type DutControlServer interface { |
| // Console allows stream access to a serial interface. |
| Console(DutControl_ConsoleServer) error |
| // Run a generic OpenTitanTool command. |
| Command(context.Context, *CommandRequest) (*CommandResponse, error) |
| } |
| |
| // UnimplementedDutControlServer can be embedded to have forward compatible implementations. |
| type UnimplementedDutControlServer struct { |
| } |
| |
| func (*UnimplementedDutControlServer) Console(DutControl_ConsoleServer) error { |
| return status.Errorf(codes.Unimplemented, "method Console not implemented") |
| } |
| func (*UnimplementedDutControlServer) Command(context.Context, *CommandRequest) (*CommandResponse, error) { |
| return nil, status.Errorf(codes.Unimplemented, "method Command not implemented") |
| } |
| |
| func RegisterDutControlServer(s *grpc.Server, srv DutControlServer) { |
| s.RegisterService(&_DutControl_serviceDesc, srv) |
| } |
| |
| func _DutControl_Console_Handler(srv interface{}, stream grpc.ServerStream) error { |
| return srv.(DutControlServer).Console(&dutControlConsoleServer{stream}) |
| } |
| |
| type DutControl_ConsoleServer interface { |
| Send(*ConsoleResponse) error |
| Recv() (*ConsoleRequest, error) |
| grpc.ServerStream |
| } |
| |
| type dutControlConsoleServer struct { |
| grpc.ServerStream |
| } |
| |
| func (x *dutControlConsoleServer) Send(m *ConsoleResponse) error { |
| return x.ServerStream.SendMsg(m) |
| } |
| |
| func (x *dutControlConsoleServer) Recv() (*ConsoleRequest, error) { |
| m := new(ConsoleRequest) |
| if err := x.ServerStream.RecvMsg(m); err != nil { |
| return nil, err |
| } |
| return m, nil |
| } |
| |
| func _DutControl_Command_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(CommandRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(DutControlServer).Command(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: "/devboardservice.dutcontrol.DutControl/Command", |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(DutControlServer).Command(ctx, req.(*CommandRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| var _DutControl_serviceDesc = grpc.ServiceDesc{ |
| ServiceName: "devboardservice.dutcontrol.DutControl", |
| HandlerType: (*DutControlServer)(nil), |
| Methods: []grpc.MethodDesc{ |
| { |
| MethodName: "Command", |
| Handler: _DutControl_Command_Handler, |
| }, |
| }, |
| Streams: []grpc.StreamDesc{ |
| { |
| StreamName: "Console", |
| Handler: _DutControl_Console_Handler, |
| ServerStreams: true, |
| ClientStreams: true, |
| }, |
| }, |
| Metadata: "dutcontrol.proto", |
| } |