Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

Commit 8d125e2

Browse files
Pyreach sync 20220322
1 parent 01a9e48 commit 8d125e2

36 files changed

+946
-2297
lines changed
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# -*- coding: utf-8 -*-
16+
# Generated by the protocol buffer compiler. DO NOT EDIT!
17+
# source: log_entry_id.proto
18+
19+
from google.protobuf import descriptor as _descriptor
20+
from google.protobuf import message as _message
21+
from google.protobuf import reflection as _reflection
22+
from google.protobuf import symbol_database as _symbol_database
23+
# @@protoc_insertion_point(imports)
24+
25+
_sym_db = _symbol_database.Default()
26+
27+
28+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
29+
30+
31+
DESCRIPTOR = _descriptor.FileDescriptor(
32+
name='log_entry_id.proto',
33+
package='robotics.logging',
34+
syntax='proto2',
35+
serialized_options=b'Z%project-reach/pkg/rc/logentryidprotos',
36+
create_key=_descriptor._internal_create_key,
37+
serialized_pb=b'\n\x12log_entry_id.proto\x12\x10robotics.logging\x1a\x1fgoogle/protobuf/timestamp.proto\"l\n\nLogEntryId\x12\x10\n\x08robot_id\x18\x01 \x01(\t\x12\x10\n\x08log_type\x18\x02 \x01(\t\x12-\n\ttimestamp\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0b\n\x03seq\x18\x04 \x01(\x04\x42\'Z%project-reach/pkg/rc/logentryidprotos'
38+
,
39+
dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,])
40+
41+
42+
43+
44+
_LOGENTRYID = _descriptor.Descriptor(
45+
name='LogEntryId',
46+
full_name='robotics.logging.LogEntryId',
47+
filename=None,
48+
file=DESCRIPTOR,
49+
containing_type=None,
50+
create_key=_descriptor._internal_create_key,
51+
fields=[
52+
_descriptor.FieldDescriptor(
53+
name='robot_id', full_name='robotics.logging.LogEntryId.robot_id', index=0,
54+
number=1, type=9, cpp_type=9, label=1,
55+
has_default_value=False, default_value=b"".decode('utf-8'),
56+
message_type=None, enum_type=None, containing_type=None,
57+
is_extension=False, extension_scope=None,
58+
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
59+
_descriptor.FieldDescriptor(
60+
name='log_type', full_name='robotics.logging.LogEntryId.log_type', index=1,
61+
number=2, type=9, cpp_type=9, label=1,
62+
has_default_value=False, default_value=b"".decode('utf-8'),
63+
message_type=None, enum_type=None, containing_type=None,
64+
is_extension=False, extension_scope=None,
65+
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
66+
_descriptor.FieldDescriptor(
67+
name='timestamp', full_name='robotics.logging.LogEntryId.timestamp', index=2,
68+
number=3, type=11, cpp_type=10, label=1,
69+
has_default_value=False, default_value=None,
70+
message_type=None, enum_type=None, containing_type=None,
71+
is_extension=False, extension_scope=None,
72+
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
73+
_descriptor.FieldDescriptor(
74+
name='seq', full_name='robotics.logging.LogEntryId.seq', index=3,
75+
number=4, type=4, cpp_type=4, label=1,
76+
has_default_value=False, default_value=0,
77+
message_type=None, enum_type=None, containing_type=None,
78+
is_extension=False, extension_scope=None,
79+
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
80+
],
81+
extensions=[
82+
],
83+
nested_types=[],
84+
enum_types=[
85+
],
86+
serialized_options=None,
87+
is_extendable=False,
88+
syntax='proto2',
89+
extension_ranges=[],
90+
oneofs=[
91+
],
92+
serialized_start=73,
93+
serialized_end=181,
94+
)
95+
96+
_LOGENTRYID.fields_by_name['timestamp'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
97+
DESCRIPTOR.message_types_by_name['LogEntryId'] = _LOGENTRYID
98+
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
99+
100+
LogEntryId = _reflection.GeneratedProtocolMessageType('LogEntryId', (_message.Message,), {
101+
'DESCRIPTOR' : _LOGENTRYID,
102+
'__module__' : 'log_entry_id_pb2'
103+
# @@protoc_insertion_point(class_scope:robotics.logging.LogEntryId)
104+
})
105+
_sym_db.RegisterMessage(LogEntryId)
106+
107+
108+
DESCRIPTOR._options = None
109+
# @@protoc_insertion_point(module_scope)
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""
16+
@generated by mypy-protobuf. Do not edit manually!
17+
isort:skip_file
18+
"""
19+
import builtins
20+
import google.protobuf.descriptor
21+
import google.protobuf.message
22+
import google.protobuf.timestamp_pb2
23+
import typing
24+
import typing_extensions
25+
26+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...
27+
28+
class LogEntryId(google.protobuf.message.Message):
29+
"""Globally unique ID of a data point in SSOT, used by both LogEntry and
30+
Session.
31+
"""
32+
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
33+
ROBOT_ID_FIELD_NUMBER: builtins.int
34+
LOG_TYPE_FIELD_NUMBER: builtins.int
35+
TIMESTAMP_FIELD_NUMBER: builtins.int
36+
SEQ_FIELD_NUMBER: builtins.int
37+
robot_id: typing.Text = ...
38+
"""Uniquely identifies robot it belongs to."""
39+
40+
log_type: typing.Text = ...
41+
"""Provided by robot, identifies stream this log entry belongs to.
42+
log_type should be in the form of $ssot_repository:$channel, indicating its
43+
permanent storage place in SSOT.
44+
Example: reach/logs:device-data
45+
"""
46+
47+
@property
48+
def timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
49+
"""An on-device timestamp provided by robot, we trust that robot has a
50+
reasonable clock that reports correct walltime and consistently ticks as it
51+
should be on earth, this "reasonable clock" is required even for
52+
simulation.
53+
54+
timestamps from the same (log_type, robot_id) channel should be based on
55+
same clock and comparable. Different log_types from the same robot_id may
56+
use a different time domain / clock so they're often close but not directly
57+
comparable. See domain_timestamps in LogEntry field for multi-domain
58+
alignment solutions.
59+
"""
60+
pass
61+
seq: builtins.int = ...
62+
"""Additional bit assigned by processing pipeline to ensure uniqueness.
63+
Serialize as a string for web clients; see go/jspb-options#jstype.
64+
"""
65+
66+
def __init__(self,
67+
*,
68+
robot_id : typing.Optional[typing.Text] = ...,
69+
log_type : typing.Optional[typing.Text] = ...,
70+
timestamp : typing.Optional[google.protobuf.timestamp_pb2.Timestamp] = ...,
71+
seq : typing.Optional[builtins.int] = ...,
72+
) -> None: ...
73+
def HasField(self, field_name: typing_extensions.Literal["log_type",b"log_type","robot_id",b"robot_id","seq",b"seq","timestamp",b"timestamp"]) -> builtins.bool: ...
74+
def ClearField(self, field_name: typing_extensions.Literal["log_type",b"log_type","robot_id",b"robot_id","seq",b"seq","timestamp",b"timestamp"]) -> None: ...
75+
global___LogEntryId = LogEntryId
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# -*- coding: utf-8 -*-
16+
# Generated by the protocol buffer compiler. DO NOT EDIT!
17+
# source: log_entry.proto
18+
19+
from google.protobuf import descriptor as _descriptor
20+
from google.protobuf import message as _message
21+
from google.protobuf import reflection as _reflection
22+
from google.protobuf import symbol_database as _symbol_database
23+
# @@protoc_insertion_point(imports)
24+
25+
_sym_db = _symbol_database.Default()
26+
27+
28+
import log_entry_id_pb2 as log__entry__id__pb2
29+
import log_entry_reach_pb2 as log__entry__reach__pb2
30+
31+
32+
DESCRIPTOR = _descriptor.FileDescriptor(
33+
name='log_entry.proto',
34+
package='robotics.logging',
35+
syntax='proto2',
36+
serialized_options=b'Z#project-reach/pkg/rc/logentryprotos',
37+
create_key=_descriptor._internal_create_key,
38+
serialized_pb=b'\n\x0flog_entry.proto\x12\x10robotics.logging\x1a\x12log_entry_id.proto\x1a\x15log_entry_reach.proto\"z\n\x08LogEntry\x12(\n\x02id\x18\x01 \x01(\x0b\x32\x1c.robotics.logging.LogEntryId\x12\x39\n\x05reach\x18\xe8\x07 \x01(\x0b\x32\'.robotics.logging.messages.ReachPayloadH\x00\x42\t\n\x07payloadB%Z#project-reach/pkg/rc/logentryprotos'
39+
,
40+
dependencies=[log__entry__id__pb2.DESCRIPTOR,log__entry__reach__pb2.DESCRIPTOR,])
41+
42+
43+
44+
45+
_LOGENTRY = _descriptor.Descriptor(
46+
name='LogEntry',
47+
full_name='robotics.logging.LogEntry',
48+
filename=None,
49+
file=DESCRIPTOR,
50+
containing_type=None,
51+
create_key=_descriptor._internal_create_key,
52+
fields=[
53+
_descriptor.FieldDescriptor(
54+
name='id', full_name='robotics.logging.LogEntry.id', index=0,
55+
number=1, type=11, cpp_type=10, label=1,
56+
has_default_value=False, default_value=None,
57+
message_type=None, enum_type=None, containing_type=None,
58+
is_extension=False, extension_scope=None,
59+
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
60+
_descriptor.FieldDescriptor(
61+
name='reach', full_name='robotics.logging.LogEntry.reach', index=1,
62+
number=1000, type=11, cpp_type=10, label=1,
63+
has_default_value=False, default_value=None,
64+
message_type=None, enum_type=None, containing_type=None,
65+
is_extension=False, extension_scope=None,
66+
serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
67+
],
68+
extensions=[
69+
],
70+
nested_types=[],
71+
enum_types=[
72+
],
73+
serialized_options=None,
74+
is_extendable=False,
75+
syntax='proto2',
76+
extension_ranges=[],
77+
oneofs=[
78+
_descriptor.OneofDescriptor(
79+
name='payload', full_name='robotics.logging.LogEntry.payload',
80+
index=0, containing_type=None,
81+
create_key=_descriptor._internal_create_key,
82+
fields=[]),
83+
],
84+
serialized_start=80,
85+
serialized_end=202,
86+
)
87+
88+
_LOGENTRY.fields_by_name['id'].message_type = log__entry__id__pb2._LOGENTRYID
89+
_LOGENTRY.fields_by_name['reach'].message_type = log__entry__reach__pb2._REACHPAYLOAD
90+
_LOGENTRY.oneofs_by_name['payload'].fields.append(
91+
_LOGENTRY.fields_by_name['reach'])
92+
_LOGENTRY.fields_by_name['reach'].containing_oneof = _LOGENTRY.oneofs_by_name['payload']
93+
DESCRIPTOR.message_types_by_name['LogEntry'] = _LOGENTRY
94+
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
95+
96+
LogEntry = _reflection.GeneratedProtocolMessageType('LogEntry', (_message.Message,), {
97+
'DESCRIPTOR' : _LOGENTRY,
98+
'__module__' : 'log_entry_pb2'
99+
# @@protoc_insertion_point(class_scope:robotics.logging.LogEntry)
100+
})
101+
_sym_db.RegisterMessage(LogEntry)
102+
103+
104+
DESCRIPTOR._options = None
105+
# @@protoc_insertion_point(module_scope)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
"""
16+
@generated by mypy-protobuf. Do not edit manually!
17+
isort:skip_file
18+
"""
19+
import builtins
20+
import google.protobuf.descriptor
21+
import google.protobuf.message
22+
import log_entry_id_pb2
23+
import log_entry_reach_pb2
24+
import typing
25+
import typing_extensions
26+
27+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...
28+
29+
class LogEntry(google.protobuf.message.Message):
30+
"""Processed result for single log event from robot."""
31+
DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
32+
ID_FIELD_NUMBER: builtins.int
33+
REACH_FIELD_NUMBER: builtins.int
34+
@property
35+
def id(self) -> log_entry_id_pb2.LogEntryId: ...
36+
@property
37+
def reach(self) -> log_entry_reach_pb2.ReachPayload: ...
38+
def __init__(self,
39+
*,
40+
id : typing.Optional[log_entry_id_pb2.LogEntryId] = ...,
41+
reach : typing.Optional[log_entry_reach_pb2.ReachPayload] = ...,
42+
) -> None: ...
43+
def HasField(self, field_name: typing_extensions.Literal["id",b"id","payload",b"payload","reach",b"reach"]) -> builtins.bool: ...
44+
def ClearField(self, field_name: typing_extensions.Literal["id",b"id","payload",b"payload","reach",b"reach"]) -> None: ...
45+
def WhichOneof(self, oneof_group: typing_extensions.Literal["payload",b"payload"]) -> typing.Optional[typing_extensions.Literal["reach"]]: ...
46+
global___LogEntry = LogEntry

0 commit comments

Comments
 (0)