Files
odroid-power-mate/example/powermate-console-frontend/pb/status.pb.go
2025-12-16 06:16:48 +09:00

546 lines
15 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.10
// protoc v3.21.12
// source: status.proto
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
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)
)
// Represents data for a single sensor channel
type SensorChannelData struct {
state protoimpl.MessageState `protogen:"open.v1"`
Voltage float32 `protobuf:"fixed32,1,opt,name=voltage,proto3" json:"voltage,omitempty"`
Current float32 `protobuf:"fixed32,2,opt,name=current,proto3" json:"current,omitempty"`
Power float32 `protobuf:"fixed32,3,opt,name=power,proto3" json:"power,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SensorChannelData) Reset() {
*x = SensorChannelData{}
mi := &file_status_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SensorChannelData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SensorChannelData) ProtoMessage() {}
func (x *SensorChannelData) ProtoReflect() protoreflect.Message {
mi := &file_status_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SensorChannelData.ProtoReflect.Descriptor instead.
func (*SensorChannelData) Descriptor() ([]byte, []int) {
return file_status_proto_rawDescGZIP(), []int{0}
}
func (x *SensorChannelData) GetVoltage() float32 {
if x != nil {
return x.Voltage
}
return 0
}
func (x *SensorChannelData) GetCurrent() float32 {
if x != nil {
return x.Current
}
return 0
}
func (x *SensorChannelData) GetPower() float32 {
if x != nil {
return x.Power
}
return 0
}
// Contains data for all sensor channels and system info
type SensorData struct {
state protoimpl.MessageState `protogen:"open.v1"`
Usb *SensorChannelData `protobuf:"bytes,1,opt,name=usb,proto3" json:"usb,omitempty"`
Main *SensorChannelData `protobuf:"bytes,2,opt,name=main,proto3" json:"main,omitempty"`
Vin *SensorChannelData `protobuf:"bytes,3,opt,name=vin,proto3" json:"vin,omitempty"`
TimestampMs uint64 `protobuf:"varint,4,opt,name=timestamp_ms,json=timestampMs,proto3" json:"timestamp_ms,omitempty"`
UptimeMs uint64 `protobuf:"varint,5,opt,name=uptime_ms,json=uptimeMs,proto3" json:"uptime_ms,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *SensorData) Reset() {
*x = SensorData{}
mi := &file_status_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *SensorData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SensorData) ProtoMessage() {}
func (x *SensorData) ProtoReflect() protoreflect.Message {
mi := &file_status_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SensorData.ProtoReflect.Descriptor instead.
func (*SensorData) Descriptor() ([]byte, []int) {
return file_status_proto_rawDescGZIP(), []int{1}
}
func (x *SensorData) GetUsb() *SensorChannelData {
if x != nil {
return x.Usb
}
return nil
}
func (x *SensorData) GetMain() *SensorChannelData {
if x != nil {
return x.Main
}
return nil
}
func (x *SensorData) GetVin() *SensorChannelData {
if x != nil {
return x.Vin
}
return nil
}
func (x *SensorData) GetTimestampMs() uint64 {
if x != nil {
return x.TimestampMs
}
return 0
}
func (x *SensorData) GetUptimeMs() uint64 {
if x != nil {
return x.UptimeMs
}
return 0
}
// Contains WiFi connection status
type WifiStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
Connected bool `protobuf:"varint,1,opt,name=connected,proto3" json:"connected,omitempty"`
Ssid string `protobuf:"bytes,2,opt,name=ssid,proto3" json:"ssid,omitempty"`
Rssi int32 `protobuf:"varint,3,opt,name=rssi,proto3" json:"rssi,omitempty"`
IpAddress string `protobuf:"bytes,4,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *WifiStatus) Reset() {
*x = WifiStatus{}
mi := &file_status_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *WifiStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WifiStatus) ProtoMessage() {}
func (x *WifiStatus) ProtoReflect() protoreflect.Message {
mi := &file_status_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WifiStatus.ProtoReflect.Descriptor instead.
func (*WifiStatus) Descriptor() ([]byte, []int) {
return file_status_proto_rawDescGZIP(), []int{2}
}
func (x *WifiStatus) GetConnected() bool {
if x != nil {
return x.Connected
}
return false
}
func (x *WifiStatus) GetSsid() string {
if x != nil {
return x.Ssid
}
return ""
}
func (x *WifiStatus) GetRssi() int32 {
if x != nil {
return x.Rssi
}
return 0
}
func (x *WifiStatus) GetIpAddress() string {
if x != nil {
return x.IpAddress
}
return ""
}
// Contains raw UART data
type UartData struct {
state protoimpl.MessageState `protogen:"open.v1"`
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *UartData) Reset() {
*x = UartData{}
mi := &file_status_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *UartData) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UartData) ProtoMessage() {}
func (x *UartData) ProtoReflect() protoreflect.Message {
mi := &file_status_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UartData.ProtoReflect.Descriptor instead.
func (*UartData) Descriptor() ([]byte, []int) {
return file_status_proto_rawDescGZIP(), []int{3}
}
func (x *UartData) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
// Contains load sw status
type LoadSwStatus struct {
state protoimpl.MessageState `protogen:"open.v1"`
Main bool `protobuf:"varint,1,opt,name=main,proto3" json:"main,omitempty"`
Usb bool `protobuf:"varint,2,opt,name=usb,proto3" json:"usb,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *LoadSwStatus) Reset() {
*x = LoadSwStatus{}
mi := &file_status_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *LoadSwStatus) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LoadSwStatus) ProtoMessage() {}
func (x *LoadSwStatus) ProtoReflect() protoreflect.Message {
mi := &file_status_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LoadSwStatus.ProtoReflect.Descriptor instead.
func (*LoadSwStatus) Descriptor() ([]byte, []int) {
return file_status_proto_rawDescGZIP(), []int{4}
}
func (x *LoadSwStatus) GetMain() bool {
if x != nil {
return x.Main
}
return false
}
func (x *LoadSwStatus) GetUsb() bool {
if x != nil {
return x.Usb
}
return false
}
// Top-level message for all websocket communication
type StatusMessage struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Types that are valid to be assigned to Payload:
//
// *StatusMessage_SensorData
// *StatusMessage_WifiStatus
// *StatusMessage_SwStatus
// *StatusMessage_UartData
Payload isStatusMessage_Payload `protobuf_oneof:"payload"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *StatusMessage) Reset() {
*x = StatusMessage{}
mi := &file_status_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *StatusMessage) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*StatusMessage) ProtoMessage() {}
func (x *StatusMessage) ProtoReflect() protoreflect.Message {
mi := &file_status_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use StatusMessage.ProtoReflect.Descriptor instead.
func (*StatusMessage) Descriptor() ([]byte, []int) {
return file_status_proto_rawDescGZIP(), []int{5}
}
func (x *StatusMessage) GetPayload() isStatusMessage_Payload {
if x != nil {
return x.Payload
}
return nil
}
func (x *StatusMessage) GetSensorData() *SensorData {
if x != nil {
if x, ok := x.Payload.(*StatusMessage_SensorData); ok {
return x.SensorData
}
}
return nil
}
func (x *StatusMessage) GetWifiStatus() *WifiStatus {
if x != nil {
if x, ok := x.Payload.(*StatusMessage_WifiStatus); ok {
return x.WifiStatus
}
}
return nil
}
func (x *StatusMessage) GetSwStatus() *LoadSwStatus {
if x != nil {
if x, ok := x.Payload.(*StatusMessage_SwStatus); ok {
return x.SwStatus
}
}
return nil
}
func (x *StatusMessage) GetUartData() *UartData {
if x != nil {
if x, ok := x.Payload.(*StatusMessage_UartData); ok {
return x.UartData
}
}
return nil
}
type isStatusMessage_Payload interface {
isStatusMessage_Payload()
}
type StatusMessage_SensorData struct {
SensorData *SensorData `protobuf:"bytes,1,opt,name=sensor_data,json=sensorData,proto3,oneof"`
}
type StatusMessage_WifiStatus struct {
WifiStatus *WifiStatus `protobuf:"bytes,2,opt,name=wifi_status,json=wifiStatus,proto3,oneof"`
}
type StatusMessage_SwStatus struct {
SwStatus *LoadSwStatus `protobuf:"bytes,3,opt,name=sw_status,json=swStatus,proto3,oneof"`
}
type StatusMessage_UartData struct {
UartData *UartData `protobuf:"bytes,4,opt,name=uart_data,json=uartData,proto3,oneof"`
}
func (*StatusMessage_SensorData) isStatusMessage_Payload() {}
func (*StatusMessage_WifiStatus) isStatusMessage_Payload() {}
func (*StatusMessage_SwStatus) isStatusMessage_Payload() {}
func (*StatusMessage_UartData) isStatusMessage_Payload() {}
var File_status_proto protoreflect.FileDescriptor
const file_status_proto_rawDesc = "" +
"\n" +
"\fstatus.proto\"]\n" +
"\x11SensorChannelData\x12\x18\n" +
"\avoltage\x18\x01 \x01(\x02R\avoltage\x12\x18\n" +
"\acurrent\x18\x02 \x01(\x02R\acurrent\x12\x14\n" +
"\x05power\x18\x03 \x01(\x02R\x05power\"\xc0\x01\n" +
"\n" +
"SensorData\x12$\n" +
"\x03usb\x18\x01 \x01(\v2\x12.SensorChannelDataR\x03usb\x12&\n" +
"\x04main\x18\x02 \x01(\v2\x12.SensorChannelDataR\x04main\x12$\n" +
"\x03vin\x18\x03 \x01(\v2\x12.SensorChannelDataR\x03vin\x12!\n" +
"\ftimestamp_ms\x18\x04 \x01(\x04R\vtimestampMs\x12\x1b\n" +
"\tuptime_ms\x18\x05 \x01(\x04R\buptimeMs\"q\n" +
"\n" +
"WifiStatus\x12\x1c\n" +
"\tconnected\x18\x01 \x01(\bR\tconnected\x12\x12\n" +
"\x04ssid\x18\x02 \x01(\tR\x04ssid\x12\x12\n" +
"\x04rssi\x18\x03 \x01(\x05R\x04rssi\x12\x1d\n" +
"\n" +
"ip_address\x18\x04 \x01(\tR\tipAddress\"\x1e\n" +
"\bUartData\x12\x12\n" +
"\x04data\x18\x01 \x01(\fR\x04data\"4\n" +
"\fLoadSwStatus\x12\x12\n" +
"\x04main\x18\x01 \x01(\bR\x04main\x12\x10\n" +
"\x03usb\x18\x02 \x01(\bR\x03usb\"\xd2\x01\n" +
"\rStatusMessage\x12.\n" +
"\vsensor_data\x18\x01 \x01(\v2\v.SensorDataH\x00R\n" +
"sensorData\x12.\n" +
"\vwifi_status\x18\x02 \x01(\v2\v.WifiStatusH\x00R\n" +
"wifiStatus\x12,\n" +
"\tsw_status\x18\x03 \x01(\v2\r.LoadSwStatusH\x00R\bswStatus\x12(\n" +
"\tuart_data\x18\x04 \x01(\v2\t.UartDataH\x00R\buartDataB\t\n" +
"\apayloadB\x0fZ\rodroid-tui/pbb\x06proto3"
var (
file_status_proto_rawDescOnce sync.Once
file_status_proto_rawDescData []byte
)
func file_status_proto_rawDescGZIP() []byte {
file_status_proto_rawDescOnce.Do(func() {
file_status_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_status_proto_rawDesc), len(file_status_proto_rawDesc)))
})
return file_status_proto_rawDescData
}
var file_status_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_status_proto_goTypes = []any{
(*SensorChannelData)(nil), // 0: SensorChannelData
(*SensorData)(nil), // 1: SensorData
(*WifiStatus)(nil), // 2: WifiStatus
(*UartData)(nil), // 3: UartData
(*LoadSwStatus)(nil), // 4: LoadSwStatus
(*StatusMessage)(nil), // 5: StatusMessage
}
var file_status_proto_depIdxs = []int32{
0, // 0: SensorData.usb:type_name -> SensorChannelData
0, // 1: SensorData.main:type_name -> SensorChannelData
0, // 2: SensorData.vin:type_name -> SensorChannelData
1, // 3: StatusMessage.sensor_data:type_name -> SensorData
2, // 4: StatusMessage.wifi_status:type_name -> WifiStatus
4, // 5: StatusMessage.sw_status:type_name -> LoadSwStatus
3, // 6: StatusMessage.uart_data:type_name -> UartData
7, // [7:7] is the sub-list for method output_type
7, // [7:7] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}
func init() { file_status_proto_init() }
func file_status_proto_init() {
if File_status_proto != nil {
return
}
file_status_proto_msgTypes[5].OneofWrappers = []any{
(*StatusMessage_SensorData)(nil),
(*StatusMessage_WifiStatus)(nil),
(*StatusMessage_SwStatus)(nil),
(*StatusMessage_UartData)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_status_proto_rawDesc), len(file_status_proto_rawDesc)),
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_status_proto_goTypes,
DependencyIndexes: file_status_proto_depIdxs,
MessageInfos: file_status_proto_msgTypes,
}.Build()
File_status_proto = out.File
file_status_proto_goTypes = nil
file_status_proto_depIdxs = nil
}