powerpay-protos 0.3.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- powerpay_protos-0.3.7/PKG-INFO +17 -0
- powerpay_protos-0.3.7/README.md +1 -0
- powerpay_protos-0.3.7/powerpay_protos/__init__.py +0 -0
- powerpay_protos-0.3.7/powerpay_protos/device_pb2.py +65 -0
- powerpay_protos-0.3.7/powerpay_protos/device_pb2.pyi +128 -0
- powerpay_protos-0.3.7/powerpay_protos/device_pb2_grpc.py +275 -0
- powerpay_protos-0.3.7/powerpay_protos/integration_pb2.py +50 -0
- powerpay_protos-0.3.7/powerpay_protos/integration_pb2.pyi +70 -0
- powerpay_protos-0.3.7/powerpay_protos/integration_pb2_grpc.py +140 -0
- powerpay_protos-0.3.7/powerpay_protos/measurement_pb2.py +66 -0
- powerpay_protos-0.3.7/powerpay_protos/measurement_pb2.pyi +157 -0
- powerpay_protos-0.3.7/powerpay_protos/telemetry_pb2.py +40 -0
- powerpay_protos-0.3.7/powerpay_protos/telemetry_pb2.pyi +19 -0
- powerpay_protos-0.3.7/pyproject.toml +16 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: powerpay_protos
|
|
3
|
+
Version: 0.3.7
|
|
4
|
+
Summary: Compiled protobuf files for PowerPay
|
|
5
|
+
Author: Jørgen Rørvik
|
|
6
|
+
Author-email: 60797691+jorgror@users.noreply.github.com
|
|
7
|
+
Requires-Python: >=3.12,<4.0
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
12
|
+
Requires-Dist: grpcio (>=1.68.1,<2.0.0)
|
|
13
|
+
Requires-Dist: protobuf (>=5.28.1,<6.0.0)
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# PowerPay-protos
|
|
17
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# PowerPay-protos
|
|
File without changes
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: powerpay_protos/device.proto
|
|
5
|
+
# Protobuf Python Version: 5.28.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
5,
|
|
15
|
+
28,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'powerpay_protos/device.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
26
|
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
27
|
+
from powerpay_protos import integration_pb2 as powerpay__protos_dot_integration__pb2
|
|
28
|
+
from powerpay_protos import measurement_pb2 as powerpay__protos_dot_measurement__pb2
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cpowerpay_protos/device.proto\x12\x0fpowerpay.device\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a!powerpay_protos/integration.proto\x1a!powerpay_protos/measurement.proto\"\x8c\x01\n\x06\x44\x65vice\x12\x11\n\tnative_id\x18\x01 \x01(\t\x12?\n\x10integration_type\x18\x02 \x01(\x0e\x32%.powerpay.integration.IntegrationType\x12\x14\n\x0coutlet_index\x18\x03 \x01(\x05\x12\x18\n\x10integration_name\x18\x04 \x01(\t\"\xc6\x01\n\rDeviceRequest\x12\x36\n\x0bintegration\x18\x01 \x01(\x0b\x32!.powerpay.integration.Integration\x12\x11\n\tnative_id\x18\x02 \x01(\t\x12\x14\n\x0coutlet_index\x18\x03 \x01(\x05\x12\'\n\x06\x63onfig\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct\x12+\n\nproperties\x18\x05 \x01(\x0b\x32\x17.google.protobuf.Struct\"|\n\x0e\x44\x65viceResponse\x12\'\n\x06\x64\x65vice\x18\x01 \x01(\x0b\x32\x17.powerpay.device.Device\x12\x30\n\x06status\x18\x02 \x01(\x0e\x32 .powerpay.device.OperationStatus\x12\x0f\n\x07message\x18\x03 \x01(\t\"u\n\x14\x44\x65viceControlCommand\x12\x30\n\x04type\x18\x01 \x01(\x0e\x32\".powerpay.device.DeviceControlType\x12+\n\nproperties\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"~\n\x14\x44\x65viceControlRequest\x12.\n\x06\x64\x65vice\x18\x01 \x01(\x0b\x32\x1e.powerpay.device.DeviceRequest\x12\x36\n\x07\x63ommand\x18\x02 \x01(\x0b\x32%.powerpay.device.DeviceControlCommand\"[\n\x13\x43reateDeviceRequest\x12.\n\x06\x64\x65vice\x18\x01 \x01(\x0b\x32\x1e.powerpay.device.DeviceRequest\x12\x14\n\x0coutlet_count\x18\x02 \x01(\x05\"E\n\x13UpdateDeviceRequest\x12.\n\x06\x64\x65vice\x18\x01 \x01(\x0b\x32\x1e.powerpay.device.DeviceRequest\"E\n\x13\x44\x65leteDeviceRequest\x12.\n\x06\x64\x65vice\x18\x01 \x01(\x0b\x32\x1e.powerpay.device.DeviceRequest\"E\n\x13\x44\x65viceStatusRequest\x12.\n\x06\x64\x65vice\x18\x01 \x01(\x0b\x32\x1e.powerpay.device.DeviceRequest\"\x9a\x01\n\x14\x44\x65viceStatusResponse\x12\'\n\x06\x64\x65vice\x18\x01 \x01(\x0b\x32\x17.powerpay.device.Device\x12*\n\x05state\x18\x02 \x01(\x0b\x32\x1b.powerpay.measurement.State\x12-\n\tlast_seen\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp*\x87\x01\n\x0fOperationStatus\x12\x1e\n\x1aOPERATION_STATUS_UNDEFINED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\x0b\n\x07\x46\x41ILURE\x10\x02\x12\x0b\n\x07TIMEOUT\x10\x03\x12\r\n\tNOT_FOUND\x10\x04\x12\x11\n\rNOT_SUPPORTED\x10\x05\x12\x0b\n\x07INVALID\x10\x06*u\n\x11\x44\x65viceControlType\x12\x1c\n\x18\x44\x45VICE_CONTROL_UNDEFINED\x10\x00\x12\x0c\n\x08\x45NERGIZE\x10\x01\x12\x0f\n\x0b\x44\x45_ENERGIZE\x10\x02\x12\x0b\n\x07RESTART\x10\x03\x12\x16\n\x12READ_SERIAL_NUMBER\x10\x04\x32\xd7\x03\n\rDeviceService\x12Y\n\rControlDevice\x12%.powerpay.device.DeviceControlRequest\x1a\x1f.powerpay.device.DeviceResponse\"\x00\x12`\n\x0fGetDeviceStatus\x12$.powerpay.device.DeviceStatusRequest\x1a%.powerpay.device.DeviceStatusResponse\"\x00\x12W\n\x0c\x43reateDevice\x12$.powerpay.device.CreateDeviceRequest\x1a\x1f.powerpay.device.DeviceResponse\"\x00\x12W\n\x0cUpdateDevice\x12$.powerpay.device.UpdateDeviceRequest\x1a\x1f.powerpay.device.DeviceResponse\"\x00\x12W\n\x0c\x44\x65leteDevice\x12$.powerpay.device.DeleteDeviceRequest\x1a\x1f.powerpay.device.DeviceResponse\"\x00\x42\x06Z\x04./pbb\x06proto3')
|
|
32
|
+
|
|
33
|
+
_globals = globals()
|
|
34
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
35
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'powerpay_protos.device_pb2', _globals)
|
|
36
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
37
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
38
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\004./pb'
|
|
39
|
+
_globals['_OPERATIONSTATUS']._serialized_start=1363
|
|
40
|
+
_globals['_OPERATIONSTATUS']._serialized_end=1498
|
|
41
|
+
_globals['_DEVICECONTROLTYPE']._serialized_start=1500
|
|
42
|
+
_globals['_DEVICECONTROLTYPE']._serialized_end=1617
|
|
43
|
+
_globals['_DEVICE']._serialized_start=183
|
|
44
|
+
_globals['_DEVICE']._serialized_end=323
|
|
45
|
+
_globals['_DEVICEREQUEST']._serialized_start=326
|
|
46
|
+
_globals['_DEVICEREQUEST']._serialized_end=524
|
|
47
|
+
_globals['_DEVICERESPONSE']._serialized_start=526
|
|
48
|
+
_globals['_DEVICERESPONSE']._serialized_end=650
|
|
49
|
+
_globals['_DEVICECONTROLCOMMAND']._serialized_start=652
|
|
50
|
+
_globals['_DEVICECONTROLCOMMAND']._serialized_end=769
|
|
51
|
+
_globals['_DEVICECONTROLREQUEST']._serialized_start=771
|
|
52
|
+
_globals['_DEVICECONTROLREQUEST']._serialized_end=897
|
|
53
|
+
_globals['_CREATEDEVICEREQUEST']._serialized_start=899
|
|
54
|
+
_globals['_CREATEDEVICEREQUEST']._serialized_end=990
|
|
55
|
+
_globals['_UPDATEDEVICEREQUEST']._serialized_start=992
|
|
56
|
+
_globals['_UPDATEDEVICEREQUEST']._serialized_end=1061
|
|
57
|
+
_globals['_DELETEDEVICEREQUEST']._serialized_start=1063
|
|
58
|
+
_globals['_DELETEDEVICEREQUEST']._serialized_end=1132
|
|
59
|
+
_globals['_DEVICESTATUSREQUEST']._serialized_start=1134
|
|
60
|
+
_globals['_DEVICESTATUSREQUEST']._serialized_end=1203
|
|
61
|
+
_globals['_DEVICESTATUSRESPONSE']._serialized_start=1206
|
|
62
|
+
_globals['_DEVICESTATUSRESPONSE']._serialized_end=1360
|
|
63
|
+
_globals['_DEVICESERVICE']._serialized_start=1620
|
|
64
|
+
_globals['_DEVICESERVICE']._serialized_end=2091
|
|
65
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
from google.protobuf import struct_pb2 as _struct_pb2
|
|
2
|
+
from google.protobuf import timestamp_pb2 as _timestamp_pb2
|
|
3
|
+
from powerpay_protos import integration_pb2 as _integration_pb2
|
|
4
|
+
from powerpay_protos import measurement_pb2 as _measurement_pb2
|
|
5
|
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import message as _message
|
|
8
|
+
from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
9
|
+
|
|
10
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
11
|
+
|
|
12
|
+
class OperationStatus(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
13
|
+
__slots__ = ()
|
|
14
|
+
OPERATION_STATUS_UNDEFINED: _ClassVar[OperationStatus]
|
|
15
|
+
SUCCESS: _ClassVar[OperationStatus]
|
|
16
|
+
FAILURE: _ClassVar[OperationStatus]
|
|
17
|
+
TIMEOUT: _ClassVar[OperationStatus]
|
|
18
|
+
NOT_FOUND: _ClassVar[OperationStatus]
|
|
19
|
+
NOT_SUPPORTED: _ClassVar[OperationStatus]
|
|
20
|
+
INVALID: _ClassVar[OperationStatus]
|
|
21
|
+
|
|
22
|
+
class DeviceControlType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
23
|
+
__slots__ = ()
|
|
24
|
+
DEVICE_CONTROL_UNDEFINED: _ClassVar[DeviceControlType]
|
|
25
|
+
ENERGIZE: _ClassVar[DeviceControlType]
|
|
26
|
+
DE_ENERGIZE: _ClassVar[DeviceControlType]
|
|
27
|
+
RESTART: _ClassVar[DeviceControlType]
|
|
28
|
+
READ_SERIAL_NUMBER: _ClassVar[DeviceControlType]
|
|
29
|
+
OPERATION_STATUS_UNDEFINED: OperationStatus
|
|
30
|
+
SUCCESS: OperationStatus
|
|
31
|
+
FAILURE: OperationStatus
|
|
32
|
+
TIMEOUT: OperationStatus
|
|
33
|
+
NOT_FOUND: OperationStatus
|
|
34
|
+
NOT_SUPPORTED: OperationStatus
|
|
35
|
+
INVALID: OperationStatus
|
|
36
|
+
DEVICE_CONTROL_UNDEFINED: DeviceControlType
|
|
37
|
+
ENERGIZE: DeviceControlType
|
|
38
|
+
DE_ENERGIZE: DeviceControlType
|
|
39
|
+
RESTART: DeviceControlType
|
|
40
|
+
READ_SERIAL_NUMBER: DeviceControlType
|
|
41
|
+
|
|
42
|
+
class Device(_message.Message):
|
|
43
|
+
__slots__ = ("native_id", "integration_type", "outlet_index", "integration_name")
|
|
44
|
+
NATIVE_ID_FIELD_NUMBER: _ClassVar[int]
|
|
45
|
+
INTEGRATION_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
46
|
+
OUTLET_INDEX_FIELD_NUMBER: _ClassVar[int]
|
|
47
|
+
INTEGRATION_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
48
|
+
native_id: str
|
|
49
|
+
integration_type: _integration_pb2.IntegrationType
|
|
50
|
+
outlet_index: int
|
|
51
|
+
integration_name: str
|
|
52
|
+
def __init__(self, native_id: _Optional[str] = ..., integration_type: _Optional[_Union[_integration_pb2.IntegrationType, str]] = ..., outlet_index: _Optional[int] = ..., integration_name: _Optional[str] = ...) -> None: ...
|
|
53
|
+
|
|
54
|
+
class DeviceRequest(_message.Message):
|
|
55
|
+
__slots__ = ("integration", "native_id", "outlet_index", "config", "properties")
|
|
56
|
+
INTEGRATION_FIELD_NUMBER: _ClassVar[int]
|
|
57
|
+
NATIVE_ID_FIELD_NUMBER: _ClassVar[int]
|
|
58
|
+
OUTLET_INDEX_FIELD_NUMBER: _ClassVar[int]
|
|
59
|
+
CONFIG_FIELD_NUMBER: _ClassVar[int]
|
|
60
|
+
PROPERTIES_FIELD_NUMBER: _ClassVar[int]
|
|
61
|
+
integration: _integration_pb2.Integration
|
|
62
|
+
native_id: str
|
|
63
|
+
outlet_index: int
|
|
64
|
+
config: _struct_pb2.Struct
|
|
65
|
+
properties: _struct_pb2.Struct
|
|
66
|
+
def __init__(self, integration: _Optional[_Union[_integration_pb2.Integration, _Mapping]] = ..., native_id: _Optional[str] = ..., outlet_index: _Optional[int] = ..., config: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., properties: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
|
67
|
+
|
|
68
|
+
class DeviceResponse(_message.Message):
|
|
69
|
+
__slots__ = ("device", "status", "message")
|
|
70
|
+
DEVICE_FIELD_NUMBER: _ClassVar[int]
|
|
71
|
+
STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
72
|
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
|
73
|
+
device: Device
|
|
74
|
+
status: OperationStatus
|
|
75
|
+
message: str
|
|
76
|
+
def __init__(self, device: _Optional[_Union[Device, _Mapping]] = ..., status: _Optional[_Union[OperationStatus, str]] = ..., message: _Optional[str] = ...) -> None: ...
|
|
77
|
+
|
|
78
|
+
class DeviceControlCommand(_message.Message):
|
|
79
|
+
__slots__ = ("type", "properties")
|
|
80
|
+
TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
81
|
+
PROPERTIES_FIELD_NUMBER: _ClassVar[int]
|
|
82
|
+
type: DeviceControlType
|
|
83
|
+
properties: _struct_pb2.Struct
|
|
84
|
+
def __init__(self, type: _Optional[_Union[DeviceControlType, str]] = ..., properties: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
|
85
|
+
|
|
86
|
+
class DeviceControlRequest(_message.Message):
|
|
87
|
+
__slots__ = ("device", "command")
|
|
88
|
+
DEVICE_FIELD_NUMBER: _ClassVar[int]
|
|
89
|
+
COMMAND_FIELD_NUMBER: _ClassVar[int]
|
|
90
|
+
device: DeviceRequest
|
|
91
|
+
command: DeviceControlCommand
|
|
92
|
+
def __init__(self, device: _Optional[_Union[DeviceRequest, _Mapping]] = ..., command: _Optional[_Union[DeviceControlCommand, _Mapping]] = ...) -> None: ...
|
|
93
|
+
|
|
94
|
+
class CreateDeviceRequest(_message.Message):
|
|
95
|
+
__slots__ = ("device", "outlet_count")
|
|
96
|
+
DEVICE_FIELD_NUMBER: _ClassVar[int]
|
|
97
|
+
OUTLET_COUNT_FIELD_NUMBER: _ClassVar[int]
|
|
98
|
+
device: DeviceRequest
|
|
99
|
+
outlet_count: int
|
|
100
|
+
def __init__(self, device: _Optional[_Union[DeviceRequest, _Mapping]] = ..., outlet_count: _Optional[int] = ...) -> None: ...
|
|
101
|
+
|
|
102
|
+
class UpdateDeviceRequest(_message.Message):
|
|
103
|
+
__slots__ = ("device",)
|
|
104
|
+
DEVICE_FIELD_NUMBER: _ClassVar[int]
|
|
105
|
+
device: DeviceRequest
|
|
106
|
+
def __init__(self, device: _Optional[_Union[DeviceRequest, _Mapping]] = ...) -> None: ...
|
|
107
|
+
|
|
108
|
+
class DeleteDeviceRequest(_message.Message):
|
|
109
|
+
__slots__ = ("device",)
|
|
110
|
+
DEVICE_FIELD_NUMBER: _ClassVar[int]
|
|
111
|
+
device: DeviceRequest
|
|
112
|
+
def __init__(self, device: _Optional[_Union[DeviceRequest, _Mapping]] = ...) -> None: ...
|
|
113
|
+
|
|
114
|
+
class DeviceStatusRequest(_message.Message):
|
|
115
|
+
__slots__ = ("device",)
|
|
116
|
+
DEVICE_FIELD_NUMBER: _ClassVar[int]
|
|
117
|
+
device: DeviceRequest
|
|
118
|
+
def __init__(self, device: _Optional[_Union[DeviceRequest, _Mapping]] = ...) -> None: ...
|
|
119
|
+
|
|
120
|
+
class DeviceStatusResponse(_message.Message):
|
|
121
|
+
__slots__ = ("device", "state", "last_seen")
|
|
122
|
+
DEVICE_FIELD_NUMBER: _ClassVar[int]
|
|
123
|
+
STATE_FIELD_NUMBER: _ClassVar[int]
|
|
124
|
+
LAST_SEEN_FIELD_NUMBER: _ClassVar[int]
|
|
125
|
+
device: Device
|
|
126
|
+
state: _measurement_pb2.State
|
|
127
|
+
last_seen: _timestamp_pb2.Timestamp
|
|
128
|
+
def __init__(self, device: _Optional[_Union[Device, _Mapping]] = ..., state: _Optional[_Union[_measurement_pb2.State, _Mapping]] = ..., last_seen: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
from powerpay_protos import device_pb2 as powerpay__protos_dot_device__pb2
|
|
7
|
+
|
|
8
|
+
GRPC_GENERATED_VERSION = '1.68.1'
|
|
9
|
+
GRPC_VERSION = grpc.__version__
|
|
10
|
+
_version_not_supported = False
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
from grpc._utilities import first_version_is_lower
|
|
14
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
15
|
+
except ImportError:
|
|
16
|
+
_version_not_supported = True
|
|
17
|
+
|
|
18
|
+
if _version_not_supported:
|
|
19
|
+
raise RuntimeError(
|
|
20
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
21
|
+
+ f' but the generated code in powerpay_protos/device_pb2_grpc.py depends on'
|
|
22
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
23
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
24
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class DeviceServiceStub(object):
|
|
29
|
+
"""Missing associated documentation comment in .proto file."""
|
|
30
|
+
|
|
31
|
+
def __init__(self, channel):
|
|
32
|
+
"""Constructor.
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
channel: A grpc.Channel.
|
|
36
|
+
"""
|
|
37
|
+
self.ControlDevice = channel.unary_unary(
|
|
38
|
+
'/powerpay.device.DeviceService/ControlDevice',
|
|
39
|
+
request_serializer=powerpay__protos_dot_device__pb2.DeviceControlRequest.SerializeToString,
|
|
40
|
+
response_deserializer=powerpay__protos_dot_device__pb2.DeviceResponse.FromString,
|
|
41
|
+
_registered_method=True)
|
|
42
|
+
self.GetDeviceStatus = channel.unary_unary(
|
|
43
|
+
'/powerpay.device.DeviceService/GetDeviceStatus',
|
|
44
|
+
request_serializer=powerpay__protos_dot_device__pb2.DeviceStatusRequest.SerializeToString,
|
|
45
|
+
response_deserializer=powerpay__protos_dot_device__pb2.DeviceStatusResponse.FromString,
|
|
46
|
+
_registered_method=True)
|
|
47
|
+
self.CreateDevice = channel.unary_unary(
|
|
48
|
+
'/powerpay.device.DeviceService/CreateDevice',
|
|
49
|
+
request_serializer=powerpay__protos_dot_device__pb2.CreateDeviceRequest.SerializeToString,
|
|
50
|
+
response_deserializer=powerpay__protos_dot_device__pb2.DeviceResponse.FromString,
|
|
51
|
+
_registered_method=True)
|
|
52
|
+
self.UpdateDevice = channel.unary_unary(
|
|
53
|
+
'/powerpay.device.DeviceService/UpdateDevice',
|
|
54
|
+
request_serializer=powerpay__protos_dot_device__pb2.UpdateDeviceRequest.SerializeToString,
|
|
55
|
+
response_deserializer=powerpay__protos_dot_device__pb2.DeviceResponse.FromString,
|
|
56
|
+
_registered_method=True)
|
|
57
|
+
self.DeleteDevice = channel.unary_unary(
|
|
58
|
+
'/powerpay.device.DeviceService/DeleteDevice',
|
|
59
|
+
request_serializer=powerpay__protos_dot_device__pb2.DeleteDeviceRequest.SerializeToString,
|
|
60
|
+
response_deserializer=powerpay__protos_dot_device__pb2.DeviceResponse.FromString,
|
|
61
|
+
_registered_method=True)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class DeviceServiceServicer(object):
|
|
65
|
+
"""Missing associated documentation comment in .proto file."""
|
|
66
|
+
|
|
67
|
+
def ControlDevice(self, request, context):
|
|
68
|
+
"""Missing associated documentation comment in .proto file."""
|
|
69
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
70
|
+
context.set_details('Method not implemented!')
|
|
71
|
+
raise NotImplementedError('Method not implemented!')
|
|
72
|
+
|
|
73
|
+
def GetDeviceStatus(self, request, context):
|
|
74
|
+
"""Maby rename to GetDeviceState ?
|
|
75
|
+
"""
|
|
76
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
77
|
+
context.set_details('Method not implemented!')
|
|
78
|
+
raise NotImplementedError('Method not implemented!')
|
|
79
|
+
|
|
80
|
+
def CreateDevice(self, request, context):
|
|
81
|
+
"""Does get device make sense? What does Chirpstack or Easee know that the DB does not?
|
|
82
|
+
rpc GetDevice (GetDeviceRequest) returns (Device) {}
|
|
83
|
+
|
|
84
|
+
"""
|
|
85
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
86
|
+
context.set_details('Method not implemented!')
|
|
87
|
+
raise NotImplementedError('Method not implemented!')
|
|
88
|
+
|
|
89
|
+
def UpdateDevice(self, request, context):
|
|
90
|
+
"""What would we like to update in a integration?
|
|
91
|
+
"""
|
|
92
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
93
|
+
context.set_details('Method not implemented!')
|
|
94
|
+
raise NotImplementedError('Method not implemented!')
|
|
95
|
+
|
|
96
|
+
def DeleteDevice(self, request, context):
|
|
97
|
+
"""What does Delete mean in relation to a integration?
|
|
98
|
+
"""
|
|
99
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
100
|
+
context.set_details('Method not implemented!')
|
|
101
|
+
raise NotImplementedError('Method not implemented!')
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def add_DeviceServiceServicer_to_server(servicer, server):
|
|
105
|
+
rpc_method_handlers = {
|
|
106
|
+
'ControlDevice': grpc.unary_unary_rpc_method_handler(
|
|
107
|
+
servicer.ControlDevice,
|
|
108
|
+
request_deserializer=powerpay__protos_dot_device__pb2.DeviceControlRequest.FromString,
|
|
109
|
+
response_serializer=powerpay__protos_dot_device__pb2.DeviceResponse.SerializeToString,
|
|
110
|
+
),
|
|
111
|
+
'GetDeviceStatus': grpc.unary_unary_rpc_method_handler(
|
|
112
|
+
servicer.GetDeviceStatus,
|
|
113
|
+
request_deserializer=powerpay__protos_dot_device__pb2.DeviceStatusRequest.FromString,
|
|
114
|
+
response_serializer=powerpay__protos_dot_device__pb2.DeviceStatusResponse.SerializeToString,
|
|
115
|
+
),
|
|
116
|
+
'CreateDevice': grpc.unary_unary_rpc_method_handler(
|
|
117
|
+
servicer.CreateDevice,
|
|
118
|
+
request_deserializer=powerpay__protos_dot_device__pb2.CreateDeviceRequest.FromString,
|
|
119
|
+
response_serializer=powerpay__protos_dot_device__pb2.DeviceResponse.SerializeToString,
|
|
120
|
+
),
|
|
121
|
+
'UpdateDevice': grpc.unary_unary_rpc_method_handler(
|
|
122
|
+
servicer.UpdateDevice,
|
|
123
|
+
request_deserializer=powerpay__protos_dot_device__pb2.UpdateDeviceRequest.FromString,
|
|
124
|
+
response_serializer=powerpay__protos_dot_device__pb2.DeviceResponse.SerializeToString,
|
|
125
|
+
),
|
|
126
|
+
'DeleteDevice': grpc.unary_unary_rpc_method_handler(
|
|
127
|
+
servicer.DeleteDevice,
|
|
128
|
+
request_deserializer=powerpay__protos_dot_device__pb2.DeleteDeviceRequest.FromString,
|
|
129
|
+
response_serializer=powerpay__protos_dot_device__pb2.DeviceResponse.SerializeToString,
|
|
130
|
+
),
|
|
131
|
+
}
|
|
132
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
133
|
+
'powerpay.device.DeviceService', rpc_method_handlers)
|
|
134
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
135
|
+
server.add_registered_method_handlers('powerpay.device.DeviceService', rpc_method_handlers)
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
# This class is part of an EXPERIMENTAL API.
|
|
139
|
+
class DeviceService(object):
|
|
140
|
+
"""Missing associated documentation comment in .proto file."""
|
|
141
|
+
|
|
142
|
+
@staticmethod
|
|
143
|
+
def ControlDevice(request,
|
|
144
|
+
target,
|
|
145
|
+
options=(),
|
|
146
|
+
channel_credentials=None,
|
|
147
|
+
call_credentials=None,
|
|
148
|
+
insecure=False,
|
|
149
|
+
compression=None,
|
|
150
|
+
wait_for_ready=None,
|
|
151
|
+
timeout=None,
|
|
152
|
+
metadata=None):
|
|
153
|
+
return grpc.experimental.unary_unary(
|
|
154
|
+
request,
|
|
155
|
+
target,
|
|
156
|
+
'/powerpay.device.DeviceService/ControlDevice',
|
|
157
|
+
powerpay__protos_dot_device__pb2.DeviceControlRequest.SerializeToString,
|
|
158
|
+
powerpay__protos_dot_device__pb2.DeviceResponse.FromString,
|
|
159
|
+
options,
|
|
160
|
+
channel_credentials,
|
|
161
|
+
insecure,
|
|
162
|
+
call_credentials,
|
|
163
|
+
compression,
|
|
164
|
+
wait_for_ready,
|
|
165
|
+
timeout,
|
|
166
|
+
metadata,
|
|
167
|
+
_registered_method=True)
|
|
168
|
+
|
|
169
|
+
@staticmethod
|
|
170
|
+
def GetDeviceStatus(request,
|
|
171
|
+
target,
|
|
172
|
+
options=(),
|
|
173
|
+
channel_credentials=None,
|
|
174
|
+
call_credentials=None,
|
|
175
|
+
insecure=False,
|
|
176
|
+
compression=None,
|
|
177
|
+
wait_for_ready=None,
|
|
178
|
+
timeout=None,
|
|
179
|
+
metadata=None):
|
|
180
|
+
return grpc.experimental.unary_unary(
|
|
181
|
+
request,
|
|
182
|
+
target,
|
|
183
|
+
'/powerpay.device.DeviceService/GetDeviceStatus',
|
|
184
|
+
powerpay__protos_dot_device__pb2.DeviceStatusRequest.SerializeToString,
|
|
185
|
+
powerpay__protos_dot_device__pb2.DeviceStatusResponse.FromString,
|
|
186
|
+
options,
|
|
187
|
+
channel_credentials,
|
|
188
|
+
insecure,
|
|
189
|
+
call_credentials,
|
|
190
|
+
compression,
|
|
191
|
+
wait_for_ready,
|
|
192
|
+
timeout,
|
|
193
|
+
metadata,
|
|
194
|
+
_registered_method=True)
|
|
195
|
+
|
|
196
|
+
@staticmethod
|
|
197
|
+
def CreateDevice(request,
|
|
198
|
+
target,
|
|
199
|
+
options=(),
|
|
200
|
+
channel_credentials=None,
|
|
201
|
+
call_credentials=None,
|
|
202
|
+
insecure=False,
|
|
203
|
+
compression=None,
|
|
204
|
+
wait_for_ready=None,
|
|
205
|
+
timeout=None,
|
|
206
|
+
metadata=None):
|
|
207
|
+
return grpc.experimental.unary_unary(
|
|
208
|
+
request,
|
|
209
|
+
target,
|
|
210
|
+
'/powerpay.device.DeviceService/CreateDevice',
|
|
211
|
+
powerpay__protos_dot_device__pb2.CreateDeviceRequest.SerializeToString,
|
|
212
|
+
powerpay__protos_dot_device__pb2.DeviceResponse.FromString,
|
|
213
|
+
options,
|
|
214
|
+
channel_credentials,
|
|
215
|
+
insecure,
|
|
216
|
+
call_credentials,
|
|
217
|
+
compression,
|
|
218
|
+
wait_for_ready,
|
|
219
|
+
timeout,
|
|
220
|
+
metadata,
|
|
221
|
+
_registered_method=True)
|
|
222
|
+
|
|
223
|
+
@staticmethod
|
|
224
|
+
def UpdateDevice(request,
|
|
225
|
+
target,
|
|
226
|
+
options=(),
|
|
227
|
+
channel_credentials=None,
|
|
228
|
+
call_credentials=None,
|
|
229
|
+
insecure=False,
|
|
230
|
+
compression=None,
|
|
231
|
+
wait_for_ready=None,
|
|
232
|
+
timeout=None,
|
|
233
|
+
metadata=None):
|
|
234
|
+
return grpc.experimental.unary_unary(
|
|
235
|
+
request,
|
|
236
|
+
target,
|
|
237
|
+
'/powerpay.device.DeviceService/UpdateDevice',
|
|
238
|
+
powerpay__protos_dot_device__pb2.UpdateDeviceRequest.SerializeToString,
|
|
239
|
+
powerpay__protos_dot_device__pb2.DeviceResponse.FromString,
|
|
240
|
+
options,
|
|
241
|
+
channel_credentials,
|
|
242
|
+
insecure,
|
|
243
|
+
call_credentials,
|
|
244
|
+
compression,
|
|
245
|
+
wait_for_ready,
|
|
246
|
+
timeout,
|
|
247
|
+
metadata,
|
|
248
|
+
_registered_method=True)
|
|
249
|
+
|
|
250
|
+
@staticmethod
|
|
251
|
+
def DeleteDevice(request,
|
|
252
|
+
target,
|
|
253
|
+
options=(),
|
|
254
|
+
channel_credentials=None,
|
|
255
|
+
call_credentials=None,
|
|
256
|
+
insecure=False,
|
|
257
|
+
compression=None,
|
|
258
|
+
wait_for_ready=None,
|
|
259
|
+
timeout=None,
|
|
260
|
+
metadata=None):
|
|
261
|
+
return grpc.experimental.unary_unary(
|
|
262
|
+
request,
|
|
263
|
+
target,
|
|
264
|
+
'/powerpay.device.DeviceService/DeleteDevice',
|
|
265
|
+
powerpay__protos_dot_device__pb2.DeleteDeviceRequest.SerializeToString,
|
|
266
|
+
powerpay__protos_dot_device__pb2.DeviceResponse.FromString,
|
|
267
|
+
options,
|
|
268
|
+
channel_credentials,
|
|
269
|
+
insecure,
|
|
270
|
+
call_credentials,
|
|
271
|
+
compression,
|
|
272
|
+
wait_for_ready,
|
|
273
|
+
timeout,
|
|
274
|
+
metadata,
|
|
275
|
+
_registered_method=True)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: powerpay_protos/integration.proto
|
|
5
|
+
# Protobuf Python Version: 5.28.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
5,
|
|
15
|
+
28,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'powerpay_protos/integration.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!powerpay_protos/integration.proto\x12\x14powerpay.integration\x1a\x1cgoogle/protobuf/struct.proto\"]\n\x1aIntegrationTemplateRequest\x12?\n\x10integration_type\x18\x01 \x01(\x0e\x32%.powerpay.integration.IntegrationType\"\xc2\x01\n\x13IntegrationTemplate\x12\x38\n\x12integration_config\x18\x01 \x01(\x0b\x32\x1c.powerpay.integration.Schema\x12<\n\x16integration_properties\x18\x02 \x01(\x0b\x32\x1c.powerpay.integration.Schema\x12\x33\n\rdevice_config\x18\x03 \x01(\x0b\x32\x1c.powerpay.integration.Schema\"b\n\x06Schema\x12*\n\tui_schema\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12,\n\x0bjson_schema\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\"6\n\x13HealthCheckResponse\x12\x0e\n\x06status\x18\x01 \x01(\x08\x12\x0f\n\x07message\x18\x02 \x01(\t\"\xd6\x01\n\x0bIntegration\x12?\n\x10integration_type\x18\x01 \x01(\x0e\x32%.powerpay.integration.IntegrationType\x12\x18\n\x10integration_name\x18\x02 \x01(\t\x12\x33\n\x12integration_config\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x37\n\x16integration_properties\x18\x04 \x01(\x0b\x32\x17.google.protobuf.Struct*\x88\x01\n\x0fIntegrationType\x12\x1e\n\x1aINTEGRATION_TYPE_UNDEFINED\x10\x00\x12\x0e\n\nCHIRPSTACK\x10\x01\x12\t\n\x05\x45\x41SEE\x10\x02\x12\x0b\n\x07NETMORE\x10\x03\x12\x08\n\x04OCPP\x10\x04\x12\x08\n\x04MQTT\x10\x05\x12\r\n\tTHINGPARK\x10\x06\x12\n\n\x06RESIOT\x10\x07\x32\xec\x01\n\x12IntegrationService\x12]\n\x0bHealthCheck\x12!.powerpay.integration.Integration\x1a).powerpay.integration.HealthCheckResponse\"\x00\x12w\n\x16GetIntegrationTemplate\x12\x30.powerpay.integration.IntegrationTemplateRequest\x1a).powerpay.integration.IntegrationTemplate\"\x00\x42\x06Z\x04./pbb\x06proto3')
|
|
29
|
+
|
|
30
|
+
_globals = globals()
|
|
31
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
32
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'powerpay_protos.integration_pb2', _globals)
|
|
33
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
34
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
35
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\004./pb'
|
|
36
|
+
_globals['_INTEGRATIONTYPE']._serialized_start=755
|
|
37
|
+
_globals['_INTEGRATIONTYPE']._serialized_end=891
|
|
38
|
+
_globals['_INTEGRATIONTEMPLATEREQUEST']._serialized_start=89
|
|
39
|
+
_globals['_INTEGRATIONTEMPLATEREQUEST']._serialized_end=182
|
|
40
|
+
_globals['_INTEGRATIONTEMPLATE']._serialized_start=185
|
|
41
|
+
_globals['_INTEGRATIONTEMPLATE']._serialized_end=379
|
|
42
|
+
_globals['_SCHEMA']._serialized_start=381
|
|
43
|
+
_globals['_SCHEMA']._serialized_end=479
|
|
44
|
+
_globals['_HEALTHCHECKRESPONSE']._serialized_start=481
|
|
45
|
+
_globals['_HEALTHCHECKRESPONSE']._serialized_end=535
|
|
46
|
+
_globals['_INTEGRATION']._serialized_start=538
|
|
47
|
+
_globals['_INTEGRATION']._serialized_end=752
|
|
48
|
+
_globals['_INTEGRATIONSERVICE']._serialized_start=894
|
|
49
|
+
_globals['_INTEGRATIONSERVICE']._serialized_end=1130
|
|
50
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
from google.protobuf import struct_pb2 as _struct_pb2
|
|
2
|
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
3
|
+
from google.protobuf import descriptor as _descriptor
|
|
4
|
+
from google.protobuf import message as _message
|
|
5
|
+
from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
6
|
+
|
|
7
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
8
|
+
|
|
9
|
+
class IntegrationType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
10
|
+
__slots__ = ()
|
|
11
|
+
INTEGRATION_TYPE_UNDEFINED: _ClassVar[IntegrationType]
|
|
12
|
+
CHIRPSTACK: _ClassVar[IntegrationType]
|
|
13
|
+
EASEE: _ClassVar[IntegrationType]
|
|
14
|
+
NETMORE: _ClassVar[IntegrationType]
|
|
15
|
+
OCPP: _ClassVar[IntegrationType]
|
|
16
|
+
MQTT: _ClassVar[IntegrationType]
|
|
17
|
+
THINGPARK: _ClassVar[IntegrationType]
|
|
18
|
+
RESIOT: _ClassVar[IntegrationType]
|
|
19
|
+
INTEGRATION_TYPE_UNDEFINED: IntegrationType
|
|
20
|
+
CHIRPSTACK: IntegrationType
|
|
21
|
+
EASEE: IntegrationType
|
|
22
|
+
NETMORE: IntegrationType
|
|
23
|
+
OCPP: IntegrationType
|
|
24
|
+
MQTT: IntegrationType
|
|
25
|
+
THINGPARK: IntegrationType
|
|
26
|
+
RESIOT: IntegrationType
|
|
27
|
+
|
|
28
|
+
class IntegrationTemplateRequest(_message.Message):
|
|
29
|
+
__slots__ = ("integration_type",)
|
|
30
|
+
INTEGRATION_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
31
|
+
integration_type: IntegrationType
|
|
32
|
+
def __init__(self, integration_type: _Optional[_Union[IntegrationType, str]] = ...) -> None: ...
|
|
33
|
+
|
|
34
|
+
class IntegrationTemplate(_message.Message):
|
|
35
|
+
__slots__ = ("integration_config", "integration_properties", "device_config")
|
|
36
|
+
INTEGRATION_CONFIG_FIELD_NUMBER: _ClassVar[int]
|
|
37
|
+
INTEGRATION_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
|
|
38
|
+
DEVICE_CONFIG_FIELD_NUMBER: _ClassVar[int]
|
|
39
|
+
integration_config: Schema
|
|
40
|
+
integration_properties: Schema
|
|
41
|
+
device_config: Schema
|
|
42
|
+
def __init__(self, integration_config: _Optional[_Union[Schema, _Mapping]] = ..., integration_properties: _Optional[_Union[Schema, _Mapping]] = ..., device_config: _Optional[_Union[Schema, _Mapping]] = ...) -> None: ...
|
|
43
|
+
|
|
44
|
+
class Schema(_message.Message):
|
|
45
|
+
__slots__ = ("ui_schema", "json_schema")
|
|
46
|
+
UI_SCHEMA_FIELD_NUMBER: _ClassVar[int]
|
|
47
|
+
JSON_SCHEMA_FIELD_NUMBER: _ClassVar[int]
|
|
48
|
+
ui_schema: _struct_pb2.Struct
|
|
49
|
+
json_schema: _struct_pb2.Struct
|
|
50
|
+
def __init__(self, ui_schema: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., json_schema: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
|
51
|
+
|
|
52
|
+
class HealthCheckResponse(_message.Message):
|
|
53
|
+
__slots__ = ("status", "message")
|
|
54
|
+
STATUS_FIELD_NUMBER: _ClassVar[int]
|
|
55
|
+
MESSAGE_FIELD_NUMBER: _ClassVar[int]
|
|
56
|
+
status: bool
|
|
57
|
+
message: str
|
|
58
|
+
def __init__(self, status: bool = ..., message: _Optional[str] = ...) -> None: ...
|
|
59
|
+
|
|
60
|
+
class Integration(_message.Message):
|
|
61
|
+
__slots__ = ("integration_type", "integration_name", "integration_config", "integration_properties")
|
|
62
|
+
INTEGRATION_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
63
|
+
INTEGRATION_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
64
|
+
INTEGRATION_CONFIG_FIELD_NUMBER: _ClassVar[int]
|
|
65
|
+
INTEGRATION_PROPERTIES_FIELD_NUMBER: _ClassVar[int]
|
|
66
|
+
integration_type: IntegrationType
|
|
67
|
+
integration_name: str
|
|
68
|
+
integration_config: _struct_pb2.Struct
|
|
69
|
+
integration_properties: _struct_pb2.Struct
|
|
70
|
+
def __init__(self, integration_type: _Optional[_Union[IntegrationType, str]] = ..., integration_name: _Optional[str] = ..., integration_config: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ..., integration_properties: _Optional[_Union[_struct_pb2.Struct, _Mapping]] = ...) -> None: ...
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
from powerpay_protos import integration_pb2 as powerpay__protos_dot_integration__pb2
|
|
7
|
+
|
|
8
|
+
GRPC_GENERATED_VERSION = '1.68.1'
|
|
9
|
+
GRPC_VERSION = grpc.__version__
|
|
10
|
+
_version_not_supported = False
|
|
11
|
+
|
|
12
|
+
try:
|
|
13
|
+
from grpc._utilities import first_version_is_lower
|
|
14
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
15
|
+
except ImportError:
|
|
16
|
+
_version_not_supported = True
|
|
17
|
+
|
|
18
|
+
if _version_not_supported:
|
|
19
|
+
raise RuntimeError(
|
|
20
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
21
|
+
+ f' but the generated code in powerpay_protos/integration_pb2_grpc.py depends on'
|
|
22
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
23
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
24
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class IntegrationServiceStub(object):
|
|
29
|
+
"""Missing associated documentation comment in .proto file."""
|
|
30
|
+
|
|
31
|
+
def __init__(self, channel):
|
|
32
|
+
"""Constructor.
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
channel: A grpc.Channel.
|
|
36
|
+
"""
|
|
37
|
+
self.HealthCheck = channel.unary_unary(
|
|
38
|
+
'/powerpay.integration.IntegrationService/HealthCheck',
|
|
39
|
+
request_serializer=powerpay__protos_dot_integration__pb2.Integration.SerializeToString,
|
|
40
|
+
response_deserializer=powerpay__protos_dot_integration__pb2.HealthCheckResponse.FromString,
|
|
41
|
+
_registered_method=True)
|
|
42
|
+
self.GetIntegrationTemplate = channel.unary_unary(
|
|
43
|
+
'/powerpay.integration.IntegrationService/GetIntegrationTemplate',
|
|
44
|
+
request_serializer=powerpay__protos_dot_integration__pb2.IntegrationTemplateRequest.SerializeToString,
|
|
45
|
+
response_deserializer=powerpay__protos_dot_integration__pb2.IntegrationTemplate.FromString,
|
|
46
|
+
_registered_method=True)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class IntegrationServiceServicer(object):
|
|
50
|
+
"""Missing associated documentation comment in .proto file."""
|
|
51
|
+
|
|
52
|
+
def HealthCheck(self, request, context):
|
|
53
|
+
"""Missing associated documentation comment in .proto file."""
|
|
54
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
55
|
+
context.set_details('Method not implemented!')
|
|
56
|
+
raise NotImplementedError('Method not implemented!')
|
|
57
|
+
|
|
58
|
+
def GetIntegrationTemplate(self, request, context):
|
|
59
|
+
"""Missing associated documentation comment in .proto file."""
|
|
60
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
61
|
+
context.set_details('Method not implemented!')
|
|
62
|
+
raise NotImplementedError('Method not implemented!')
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def add_IntegrationServiceServicer_to_server(servicer, server):
|
|
66
|
+
rpc_method_handlers = {
|
|
67
|
+
'HealthCheck': grpc.unary_unary_rpc_method_handler(
|
|
68
|
+
servicer.HealthCheck,
|
|
69
|
+
request_deserializer=powerpay__protos_dot_integration__pb2.Integration.FromString,
|
|
70
|
+
response_serializer=powerpay__protos_dot_integration__pb2.HealthCheckResponse.SerializeToString,
|
|
71
|
+
),
|
|
72
|
+
'GetIntegrationTemplate': grpc.unary_unary_rpc_method_handler(
|
|
73
|
+
servicer.GetIntegrationTemplate,
|
|
74
|
+
request_deserializer=powerpay__protos_dot_integration__pb2.IntegrationTemplateRequest.FromString,
|
|
75
|
+
response_serializer=powerpay__protos_dot_integration__pb2.IntegrationTemplate.SerializeToString,
|
|
76
|
+
),
|
|
77
|
+
}
|
|
78
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
79
|
+
'powerpay.integration.IntegrationService', rpc_method_handlers)
|
|
80
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
81
|
+
server.add_registered_method_handlers('powerpay.integration.IntegrationService', rpc_method_handlers)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# This class is part of an EXPERIMENTAL API.
|
|
85
|
+
class IntegrationService(object):
|
|
86
|
+
"""Missing associated documentation comment in .proto file."""
|
|
87
|
+
|
|
88
|
+
@staticmethod
|
|
89
|
+
def HealthCheck(request,
|
|
90
|
+
target,
|
|
91
|
+
options=(),
|
|
92
|
+
channel_credentials=None,
|
|
93
|
+
call_credentials=None,
|
|
94
|
+
insecure=False,
|
|
95
|
+
compression=None,
|
|
96
|
+
wait_for_ready=None,
|
|
97
|
+
timeout=None,
|
|
98
|
+
metadata=None):
|
|
99
|
+
return grpc.experimental.unary_unary(
|
|
100
|
+
request,
|
|
101
|
+
target,
|
|
102
|
+
'/powerpay.integration.IntegrationService/HealthCheck',
|
|
103
|
+
powerpay__protos_dot_integration__pb2.Integration.SerializeToString,
|
|
104
|
+
powerpay__protos_dot_integration__pb2.HealthCheckResponse.FromString,
|
|
105
|
+
options,
|
|
106
|
+
channel_credentials,
|
|
107
|
+
insecure,
|
|
108
|
+
call_credentials,
|
|
109
|
+
compression,
|
|
110
|
+
wait_for_ready,
|
|
111
|
+
timeout,
|
|
112
|
+
metadata,
|
|
113
|
+
_registered_method=True)
|
|
114
|
+
|
|
115
|
+
@staticmethod
|
|
116
|
+
def GetIntegrationTemplate(request,
|
|
117
|
+
target,
|
|
118
|
+
options=(),
|
|
119
|
+
channel_credentials=None,
|
|
120
|
+
call_credentials=None,
|
|
121
|
+
insecure=False,
|
|
122
|
+
compression=None,
|
|
123
|
+
wait_for_ready=None,
|
|
124
|
+
timeout=None,
|
|
125
|
+
metadata=None):
|
|
126
|
+
return grpc.experimental.unary_unary(
|
|
127
|
+
request,
|
|
128
|
+
target,
|
|
129
|
+
'/powerpay.integration.IntegrationService/GetIntegrationTemplate',
|
|
130
|
+
powerpay__protos_dot_integration__pb2.IntegrationTemplateRequest.SerializeToString,
|
|
131
|
+
powerpay__protos_dot_integration__pb2.IntegrationTemplate.FromString,
|
|
132
|
+
options,
|
|
133
|
+
channel_credentials,
|
|
134
|
+
insecure,
|
|
135
|
+
call_credentials,
|
|
136
|
+
compression,
|
|
137
|
+
wait_for_ready,
|
|
138
|
+
timeout,
|
|
139
|
+
metadata,
|
|
140
|
+
_registered_method=True)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: powerpay_protos/measurement.proto
|
|
5
|
+
# Protobuf Python Version: 5.28.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
5,
|
|
15
|
+
28,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'powerpay_protos/measurement.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!powerpay_protos/measurement.proto\x12\x14powerpay.measurement\x1a\x1fgoogle/protobuf/timestamp.proto\"\xcb\x02\n\x0bMeasurement\x12.\n\x06\x65nergy\x18\x01 \x01(\x0b\x32\x1c.powerpay.measurement.EnergyH\x00\x12,\n\x05power\x18\x02 \x01(\x0b\x32\x1b.powerpay.measurement.PowerH\x00\x12,\n\x05state\x18\x03 \x01(\x0b\x32\x1b.powerpay.measurement.StateH\x00\x12\x30\n\x07session\x18\x04 \x01(\x0b\x32\x1d.powerpay.measurement.SessionH\x00\x12?\n\x0fsignal_strength\x18\x05 \x01(\x0b\x32$.powerpay.measurement.SignalStrengthH\x00\x12\x35\n\nrfid_event\x18\x06 \x01(\x0b\x32\x1f.powerpay.measurement.RFIDEventH\x00\x42\x06\n\x04type\"\xcc\x01\n\x06\x45nergy\x12\r\n\x05value\x18\x01 \x01(\x03\x12.\n\x04unit\x18\x02 \x01(\x0e\x32 .powerpay.measurement.EnergyUnit\x12\x35\n\x04type\x18\x03 \x01(\x0e\x32\'.powerpay.measurement.Energy.EnergyType\"L\n\nEnergyType\x12#\n\x1f\x45NERGY_MEASUREMENT_TYPE_NOT_SET\x10\x00\x12\x0c\n\x08LIFETIME\x10\x01\x12\x0b\n\x07SESSION\x10\x02\"E\n\x05Power\x12\r\n\x05value\x18\x01 \x01(\x01\x12-\n\x04unit\x18\x02 \x01(\x0e\x32\x1f.powerpay.measurement.PowerUnit\"\xa6\x03\n\x05State\x12=\n\tenergized\x18\x01 \x01(\x0e\x32*.powerpay.measurement.State.EnergizedState\x12\x37\n\x06online\x18\x02 \x01(\x0e\x32\'.powerpay.measurement.State.OnlineState\x12=\n\tconnected\x18\x03 \x01(\x0e\x32*.powerpay.measurement.State.ConnectedState\"P\n\x0e\x45nergizedState\x12\x1d\n\x19\x45NERGIZED_STATE_UNDEFINED\x10\x00\x12\r\n\tENERGIZED\x10\x01\x12\x10\n\x0c\x44\x45_ENERGIZED\x10\x02\"B\n\x0bOnlineState\x12\x1a\n\x16ONLINE_STATE_UNDEFINED\x10\x00\x12\n\n\x06ONLINE\x10\x01\x12\x0b\n\x07OFFLINE\x10\x02\"P\n\x0e\x43onnectedState\x12\x1d\n\x19\x43ONNECTED_STATE_UNDEFINED\x10\x00\x12\r\n\tCONNECTED\x10\x01\x12\x10\n\x0c\x44ISCONNECTED\x10\x02\"\x80\x02\n\x07Session\x12)\n\x05start\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x03\x65nd\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12=\n\x17session_consumed_energy\x18\x03 \x01(\x0b\x32\x1c.powerpay.measurement.Energy\x12\x31\n\x0bmeter_start\x18\x04 \x01(\x0b\x32\x1c.powerpay.measurement.Energy\x12/\n\tmeter_end\x18\x05 \x01(\x0b\x32\x1c.powerpay.measurement.Energy\"\x8c\x03\n\x0eSignalStrength\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x45\n\x04unit\x18\x02 \x01(\x0e\x32\x37.powerpay.measurement.SignalStrength.SignalStrengthUnit\x12\x42\n\nradio_type\x18\x03 \x01(\x0e\x32..powerpay.measurement.SignalStrength.RadioType\"\x8d\x01\n\x12SignalStrengthUnit\x12 \n\x1cSIGNAL_STRENGTH_UNIT_NOT_SET\x10\x00\x12\x15\n\x11\x44\x45\x43IBEL_MILLIWATT\x10\x01\x12&\n\"RECEIVED_SIGNAL_STRENGTH_INDICATOR\x10\x02\x12\x16\n\x12SIGNAL_NOISE_RATIO\x10\x03\"P\n\tRadioType\x12\x16\n\x12RADIO_TYPE_NOT_SET\x10\x00\x12\x0c\n\x08\x43\x45LLULAR\x10\x01\x12\x08\n\x04WIFI\x10\x02\x12\x08\n\x04LORA\x10\x03\x12\t\n\x05LOCAL\x10\x04\"\x18\n\tRFIDEvent\x12\x0b\n\x03uid\x18\x01 \x01(\x0c*\\\n\nEnergyUnit\x12\x17\n\x13\x45NERGY_UNIT_NOT_SET\x10\x00\x12\r\n\tWATT_HOUR\x10\x01\x12\x12\n\x0eKILO_WATT_HOUR\x10\x02\x12\x12\n\x0eMEGA_WATT_HOUR\x10\x03*K\n\tPowerUnit\x12\x16\n\x12POWER_UNIT_NOT_SET\x10\x00\x12\x08\n\x04WATT\x10\x01\x12\r\n\tKILO_WATT\x10\x02\x12\r\n\tMEGA_WATT\x10\x03\x42\x06Z\x04./pbb\x06proto3')
|
|
29
|
+
|
|
30
|
+
_globals = globals()
|
|
31
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
32
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'powerpay_protos.measurement_pb2', _globals)
|
|
33
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
34
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
35
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\004./pb'
|
|
36
|
+
_globals['_ENERGYUNIT']._serialized_start=1813
|
|
37
|
+
_globals['_ENERGYUNIT']._serialized_end=1905
|
|
38
|
+
_globals['_POWERUNIT']._serialized_start=1907
|
|
39
|
+
_globals['_POWERUNIT']._serialized_end=1982
|
|
40
|
+
_globals['_MEASUREMENT']._serialized_start=93
|
|
41
|
+
_globals['_MEASUREMENT']._serialized_end=424
|
|
42
|
+
_globals['_ENERGY']._serialized_start=427
|
|
43
|
+
_globals['_ENERGY']._serialized_end=631
|
|
44
|
+
_globals['_ENERGY_ENERGYTYPE']._serialized_start=555
|
|
45
|
+
_globals['_ENERGY_ENERGYTYPE']._serialized_end=631
|
|
46
|
+
_globals['_POWER']._serialized_start=633
|
|
47
|
+
_globals['_POWER']._serialized_end=702
|
|
48
|
+
_globals['_STATE']._serialized_start=705
|
|
49
|
+
_globals['_STATE']._serialized_end=1127
|
|
50
|
+
_globals['_STATE_ENERGIZEDSTATE']._serialized_start=897
|
|
51
|
+
_globals['_STATE_ENERGIZEDSTATE']._serialized_end=977
|
|
52
|
+
_globals['_STATE_ONLINESTATE']._serialized_start=979
|
|
53
|
+
_globals['_STATE_ONLINESTATE']._serialized_end=1045
|
|
54
|
+
_globals['_STATE_CONNECTEDSTATE']._serialized_start=1047
|
|
55
|
+
_globals['_STATE_CONNECTEDSTATE']._serialized_end=1127
|
|
56
|
+
_globals['_SESSION']._serialized_start=1130
|
|
57
|
+
_globals['_SESSION']._serialized_end=1386
|
|
58
|
+
_globals['_SIGNALSTRENGTH']._serialized_start=1389
|
|
59
|
+
_globals['_SIGNALSTRENGTH']._serialized_end=1785
|
|
60
|
+
_globals['_SIGNALSTRENGTH_SIGNALSTRENGTHUNIT']._serialized_start=1562
|
|
61
|
+
_globals['_SIGNALSTRENGTH_SIGNALSTRENGTHUNIT']._serialized_end=1703
|
|
62
|
+
_globals['_SIGNALSTRENGTH_RADIOTYPE']._serialized_start=1705
|
|
63
|
+
_globals['_SIGNALSTRENGTH_RADIOTYPE']._serialized_end=1785
|
|
64
|
+
_globals['_RFIDEVENT']._serialized_start=1787
|
|
65
|
+
_globals['_RFIDEVENT']._serialized_end=1811
|
|
66
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
from google.protobuf import timestamp_pb2 as _timestamp_pb2
|
|
2
|
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
3
|
+
from google.protobuf import descriptor as _descriptor
|
|
4
|
+
from google.protobuf import message as _message
|
|
5
|
+
from typing import ClassVar as _ClassVar, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
6
|
+
|
|
7
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
8
|
+
|
|
9
|
+
class EnergyUnit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
10
|
+
__slots__ = ()
|
|
11
|
+
ENERGY_UNIT_NOT_SET: _ClassVar[EnergyUnit]
|
|
12
|
+
WATT_HOUR: _ClassVar[EnergyUnit]
|
|
13
|
+
KILO_WATT_HOUR: _ClassVar[EnergyUnit]
|
|
14
|
+
MEGA_WATT_HOUR: _ClassVar[EnergyUnit]
|
|
15
|
+
|
|
16
|
+
class PowerUnit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
17
|
+
__slots__ = ()
|
|
18
|
+
POWER_UNIT_NOT_SET: _ClassVar[PowerUnit]
|
|
19
|
+
WATT: _ClassVar[PowerUnit]
|
|
20
|
+
KILO_WATT: _ClassVar[PowerUnit]
|
|
21
|
+
MEGA_WATT: _ClassVar[PowerUnit]
|
|
22
|
+
ENERGY_UNIT_NOT_SET: EnergyUnit
|
|
23
|
+
WATT_HOUR: EnergyUnit
|
|
24
|
+
KILO_WATT_HOUR: EnergyUnit
|
|
25
|
+
MEGA_WATT_HOUR: EnergyUnit
|
|
26
|
+
POWER_UNIT_NOT_SET: PowerUnit
|
|
27
|
+
WATT: PowerUnit
|
|
28
|
+
KILO_WATT: PowerUnit
|
|
29
|
+
MEGA_WATT: PowerUnit
|
|
30
|
+
|
|
31
|
+
class Measurement(_message.Message):
|
|
32
|
+
__slots__ = ("energy", "power", "state", "session", "signal_strength", "rfid_event")
|
|
33
|
+
ENERGY_FIELD_NUMBER: _ClassVar[int]
|
|
34
|
+
POWER_FIELD_NUMBER: _ClassVar[int]
|
|
35
|
+
STATE_FIELD_NUMBER: _ClassVar[int]
|
|
36
|
+
SESSION_FIELD_NUMBER: _ClassVar[int]
|
|
37
|
+
SIGNAL_STRENGTH_FIELD_NUMBER: _ClassVar[int]
|
|
38
|
+
RFID_EVENT_FIELD_NUMBER: _ClassVar[int]
|
|
39
|
+
energy: Energy
|
|
40
|
+
power: Power
|
|
41
|
+
state: State
|
|
42
|
+
session: Session
|
|
43
|
+
signal_strength: SignalStrength
|
|
44
|
+
rfid_event: RFIDEvent
|
|
45
|
+
def __init__(self, energy: _Optional[_Union[Energy, _Mapping]] = ..., power: _Optional[_Union[Power, _Mapping]] = ..., state: _Optional[_Union[State, _Mapping]] = ..., session: _Optional[_Union[Session, _Mapping]] = ..., signal_strength: _Optional[_Union[SignalStrength, _Mapping]] = ..., rfid_event: _Optional[_Union[RFIDEvent, _Mapping]] = ...) -> None: ...
|
|
46
|
+
|
|
47
|
+
class Energy(_message.Message):
|
|
48
|
+
__slots__ = ("value", "unit", "type")
|
|
49
|
+
class EnergyType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
50
|
+
__slots__ = ()
|
|
51
|
+
ENERGY_MEASUREMENT_TYPE_NOT_SET: _ClassVar[Energy.EnergyType]
|
|
52
|
+
LIFETIME: _ClassVar[Energy.EnergyType]
|
|
53
|
+
SESSION: _ClassVar[Energy.EnergyType]
|
|
54
|
+
ENERGY_MEASUREMENT_TYPE_NOT_SET: Energy.EnergyType
|
|
55
|
+
LIFETIME: Energy.EnergyType
|
|
56
|
+
SESSION: Energy.EnergyType
|
|
57
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
58
|
+
UNIT_FIELD_NUMBER: _ClassVar[int]
|
|
59
|
+
TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
60
|
+
value: int
|
|
61
|
+
unit: EnergyUnit
|
|
62
|
+
type: Energy.EnergyType
|
|
63
|
+
def __init__(self, value: _Optional[int] = ..., unit: _Optional[_Union[EnergyUnit, str]] = ..., type: _Optional[_Union[Energy.EnergyType, str]] = ...) -> None: ...
|
|
64
|
+
|
|
65
|
+
class Power(_message.Message):
|
|
66
|
+
__slots__ = ("value", "unit")
|
|
67
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
68
|
+
UNIT_FIELD_NUMBER: _ClassVar[int]
|
|
69
|
+
value: float
|
|
70
|
+
unit: PowerUnit
|
|
71
|
+
def __init__(self, value: _Optional[float] = ..., unit: _Optional[_Union[PowerUnit, str]] = ...) -> None: ...
|
|
72
|
+
|
|
73
|
+
class State(_message.Message):
|
|
74
|
+
__slots__ = ("energized", "online", "connected")
|
|
75
|
+
class EnergizedState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
76
|
+
__slots__ = ()
|
|
77
|
+
ENERGIZED_STATE_UNDEFINED: _ClassVar[State.EnergizedState]
|
|
78
|
+
ENERGIZED: _ClassVar[State.EnergizedState]
|
|
79
|
+
DE_ENERGIZED: _ClassVar[State.EnergizedState]
|
|
80
|
+
ENERGIZED_STATE_UNDEFINED: State.EnergizedState
|
|
81
|
+
ENERGIZED: State.EnergizedState
|
|
82
|
+
DE_ENERGIZED: State.EnergizedState
|
|
83
|
+
class OnlineState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
84
|
+
__slots__ = ()
|
|
85
|
+
ONLINE_STATE_UNDEFINED: _ClassVar[State.OnlineState]
|
|
86
|
+
ONLINE: _ClassVar[State.OnlineState]
|
|
87
|
+
OFFLINE: _ClassVar[State.OnlineState]
|
|
88
|
+
ONLINE_STATE_UNDEFINED: State.OnlineState
|
|
89
|
+
ONLINE: State.OnlineState
|
|
90
|
+
OFFLINE: State.OnlineState
|
|
91
|
+
class ConnectedState(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
92
|
+
__slots__ = ()
|
|
93
|
+
CONNECTED_STATE_UNDEFINED: _ClassVar[State.ConnectedState]
|
|
94
|
+
CONNECTED: _ClassVar[State.ConnectedState]
|
|
95
|
+
DISCONNECTED: _ClassVar[State.ConnectedState]
|
|
96
|
+
CONNECTED_STATE_UNDEFINED: State.ConnectedState
|
|
97
|
+
CONNECTED: State.ConnectedState
|
|
98
|
+
DISCONNECTED: State.ConnectedState
|
|
99
|
+
ENERGIZED_FIELD_NUMBER: _ClassVar[int]
|
|
100
|
+
ONLINE_FIELD_NUMBER: _ClassVar[int]
|
|
101
|
+
CONNECTED_FIELD_NUMBER: _ClassVar[int]
|
|
102
|
+
energized: State.EnergizedState
|
|
103
|
+
online: State.OnlineState
|
|
104
|
+
connected: State.ConnectedState
|
|
105
|
+
def __init__(self, energized: _Optional[_Union[State.EnergizedState, str]] = ..., online: _Optional[_Union[State.OnlineState, str]] = ..., connected: _Optional[_Union[State.ConnectedState, str]] = ...) -> None: ...
|
|
106
|
+
|
|
107
|
+
class Session(_message.Message):
|
|
108
|
+
__slots__ = ("start", "end", "session_consumed_energy", "meter_start", "meter_end")
|
|
109
|
+
START_FIELD_NUMBER: _ClassVar[int]
|
|
110
|
+
END_FIELD_NUMBER: _ClassVar[int]
|
|
111
|
+
SESSION_CONSUMED_ENERGY_FIELD_NUMBER: _ClassVar[int]
|
|
112
|
+
METER_START_FIELD_NUMBER: _ClassVar[int]
|
|
113
|
+
METER_END_FIELD_NUMBER: _ClassVar[int]
|
|
114
|
+
start: _timestamp_pb2.Timestamp
|
|
115
|
+
end: _timestamp_pb2.Timestamp
|
|
116
|
+
session_consumed_energy: Energy
|
|
117
|
+
meter_start: Energy
|
|
118
|
+
meter_end: Energy
|
|
119
|
+
def __init__(self, start: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., end: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., session_consumed_energy: _Optional[_Union[Energy, _Mapping]] = ..., meter_start: _Optional[_Union[Energy, _Mapping]] = ..., meter_end: _Optional[_Union[Energy, _Mapping]] = ...) -> None: ...
|
|
120
|
+
|
|
121
|
+
class SignalStrength(_message.Message):
|
|
122
|
+
__slots__ = ("value", "unit", "radio_type")
|
|
123
|
+
class SignalStrengthUnit(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
124
|
+
__slots__ = ()
|
|
125
|
+
SIGNAL_STRENGTH_UNIT_NOT_SET: _ClassVar[SignalStrength.SignalStrengthUnit]
|
|
126
|
+
DECIBEL_MILLIWATT: _ClassVar[SignalStrength.SignalStrengthUnit]
|
|
127
|
+
RECEIVED_SIGNAL_STRENGTH_INDICATOR: _ClassVar[SignalStrength.SignalStrengthUnit]
|
|
128
|
+
SIGNAL_NOISE_RATIO: _ClassVar[SignalStrength.SignalStrengthUnit]
|
|
129
|
+
SIGNAL_STRENGTH_UNIT_NOT_SET: SignalStrength.SignalStrengthUnit
|
|
130
|
+
DECIBEL_MILLIWATT: SignalStrength.SignalStrengthUnit
|
|
131
|
+
RECEIVED_SIGNAL_STRENGTH_INDICATOR: SignalStrength.SignalStrengthUnit
|
|
132
|
+
SIGNAL_NOISE_RATIO: SignalStrength.SignalStrengthUnit
|
|
133
|
+
class RadioType(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
134
|
+
__slots__ = ()
|
|
135
|
+
RADIO_TYPE_NOT_SET: _ClassVar[SignalStrength.RadioType]
|
|
136
|
+
CELLULAR: _ClassVar[SignalStrength.RadioType]
|
|
137
|
+
WIFI: _ClassVar[SignalStrength.RadioType]
|
|
138
|
+
LORA: _ClassVar[SignalStrength.RadioType]
|
|
139
|
+
LOCAL: _ClassVar[SignalStrength.RadioType]
|
|
140
|
+
RADIO_TYPE_NOT_SET: SignalStrength.RadioType
|
|
141
|
+
CELLULAR: SignalStrength.RadioType
|
|
142
|
+
WIFI: SignalStrength.RadioType
|
|
143
|
+
LORA: SignalStrength.RadioType
|
|
144
|
+
LOCAL: SignalStrength.RadioType
|
|
145
|
+
VALUE_FIELD_NUMBER: _ClassVar[int]
|
|
146
|
+
UNIT_FIELD_NUMBER: _ClassVar[int]
|
|
147
|
+
RADIO_TYPE_FIELD_NUMBER: _ClassVar[int]
|
|
148
|
+
value: float
|
|
149
|
+
unit: SignalStrength.SignalStrengthUnit
|
|
150
|
+
radio_type: SignalStrength.RadioType
|
|
151
|
+
def __init__(self, value: _Optional[float] = ..., unit: _Optional[_Union[SignalStrength.SignalStrengthUnit, str]] = ..., radio_type: _Optional[_Union[SignalStrength.RadioType, str]] = ...) -> None: ...
|
|
152
|
+
|
|
153
|
+
class RFIDEvent(_message.Message):
|
|
154
|
+
__slots__ = ("uid",)
|
|
155
|
+
UID_FIELD_NUMBER: _ClassVar[int]
|
|
156
|
+
uid: bytes
|
|
157
|
+
def __init__(self, uid: _Optional[bytes] = ...) -> None: ...
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: powerpay_protos/telemetry.proto
|
|
5
|
+
# Protobuf Python Version: 5.28.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
5,
|
|
15
|
+
28,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'powerpay_protos/telemetry.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
26
|
+
from powerpay_protos import measurement_pb2 as powerpay__protos_dot_measurement__pb2
|
|
27
|
+
from powerpay_protos import device_pb2 as powerpay__protos_dot_device__pb2
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fpowerpay_protos/telemetry.proto\x12\x12powerpay.telemetry\x1a\x1fgoogle/protobuf/timestamp.proto\x1a!powerpay_protos/measurement.proto\x1a\x1cpowerpay_protos/device.proto\"\x9b\x01\n\tTelemetry\x12-\n\ttimestamp\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\'\n\x06\x64\x65vice\x18\x02 \x01(\x0b\x32\x17.powerpay.device.Device\x12\x36\n\x0bmeasurement\x18\x03 \x03(\x0b\x32!.powerpay.measurement.MeasurementB\x06Z\x04./pbb\x06proto3')
|
|
31
|
+
|
|
32
|
+
_globals = globals()
|
|
33
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
34
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'powerpay_protos.telemetry_pb2', _globals)
|
|
35
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
36
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
37
|
+
_globals['DESCRIPTOR']._serialized_options = b'Z\004./pb'
|
|
38
|
+
_globals['_TELEMETRY']._serialized_start=154
|
|
39
|
+
_globals['_TELEMETRY']._serialized_end=309
|
|
40
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from google.protobuf import timestamp_pb2 as _timestamp_pb2
|
|
2
|
+
from powerpay_protos import measurement_pb2 as _measurement_pb2
|
|
3
|
+
from powerpay_protos import device_pb2 as _device_pb2
|
|
4
|
+
from google.protobuf.internal import containers as _containers
|
|
5
|
+
from google.protobuf import descriptor as _descriptor
|
|
6
|
+
from google.protobuf import message as _message
|
|
7
|
+
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
|
|
8
|
+
|
|
9
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
10
|
+
|
|
11
|
+
class Telemetry(_message.Message):
|
|
12
|
+
__slots__ = ("timestamp", "device", "measurement")
|
|
13
|
+
TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
|
|
14
|
+
DEVICE_FIELD_NUMBER: _ClassVar[int]
|
|
15
|
+
MEASUREMENT_FIELD_NUMBER: _ClassVar[int]
|
|
16
|
+
timestamp: _timestamp_pb2.Timestamp
|
|
17
|
+
device: _device_pb2.Device
|
|
18
|
+
measurement: _containers.RepeatedCompositeFieldContainer[_measurement_pb2.Measurement]
|
|
19
|
+
def __init__(self, timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ..., device: _Optional[_Union[_device_pb2.Device, _Mapping]] = ..., measurement: _Optional[_Iterable[_Union[_measurement_pb2.Measurement, _Mapping]]] = ...) -> None: ...
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[tool.poetry]
|
|
2
|
+
name = "powerpay_protos"
|
|
3
|
+
version = "0.3.7"
|
|
4
|
+
description = "Compiled protobuf files for PowerPay"
|
|
5
|
+
authors = ["Jørgen Rørvik <60797691+jorgror@users.noreply.github.com>"]
|
|
6
|
+
readme = "README.md"
|
|
7
|
+
|
|
8
|
+
[tool.poetry.dependencies]
|
|
9
|
+
python = "^3.12"
|
|
10
|
+
protobuf = "^5.28.1"
|
|
11
|
+
grpcio = "^1.68.1"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
[build-system]
|
|
15
|
+
requires = ["poetry-core"]
|
|
16
|
+
build-backend = "poetry.core.masonry.api"
|