viam-sdk 0.47.0__py3-none-linux_armv7l.whl → 0.49.0__py3-none-linux_armv7l.whl
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.
Potentially problematic release.
This version of viam-sdk might be problematic. Click here for more details.
- viam/app/data_client.py +19 -3
- viam/components/arm/arm.py +1 -1
- viam/components/gripper/__init__.py +2 -0
- viam/components/gripper/client.py +25 -2
- viam/components/gripper/gripper.py +76 -1
- viam/components/gripper/service.py +32 -3
- viam/gen/app/datapipelines/v1/data_pipelines_grpc.py +1 -1
- viam/gen/app/datapipelines/v1/data_pipelines_pb2.py +42 -41
- viam/gen/app/datapipelines/v1/data_pipelines_pb2.pyi +40 -7
- viam/gen/app/v1/app_grpc.py +9 -1
- viam/gen/app/v1/app_pb2.py +523 -519
- viam/gen/app/v1/app_pb2.pyi +56 -6
- viam/gen/component/gripper/v1/gripper_grpc.py +18 -2
- viam/gen/component/gripper/v1/gripper_pb2.py +11 -3
- viam/gen/component/gripper/v1/gripper_pb2.pyi +43 -1
- viam/gen/provisioning/v1/provisioning_grpc.py +10 -2
- viam/gen/provisioning/v1/provisioning_pb2.py +29 -25
- viam/gen/provisioning/v1/provisioning_pb2.pyi +20 -2
- viam/module/module.py +43 -5
- viam/proto/app/__init__.py +4 -0
- viam/proto/component/gripper/__init__.py +4 -0
- viam/proto/provisioning/__init__.py +4 -0
- viam/rpc/server.py +24 -10
- viam/version_metadata.py +2 -2
- {viam_sdk-0.47.0.dist-info → viam_sdk-0.49.0.dist-info}/METADATA +1 -1
- {viam_sdk-0.47.0.dist-info → viam_sdk-0.49.0.dist-info}/RECORD +28 -28
- {viam_sdk-0.47.0.dist-info → viam_sdk-0.49.0.dist-info}/WHEEL +0 -0
- {viam_sdk-0.47.0.dist-info → viam_sdk-0.49.0.dist-info}/licenses/LICENSE +0 -0
viam/gen/app/v1/app_pb2.pyi
CHANGED
|
@@ -532,12 +532,14 @@ global___GetOrganizationResponse = GetOrganizationResponse
|
|
|
532
532
|
class GetOrganizationNamespaceAvailabilityRequest(google.protobuf.message.Message):
|
|
533
533
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
534
534
|
PUBLIC_NAMESPACE_FIELD_NUMBER: builtins.int
|
|
535
|
+
ORGANIZATION_ID_FIELD_NUMBER: builtins.int
|
|
535
536
|
public_namespace: builtins.str
|
|
537
|
+
organization_id: builtins.str
|
|
536
538
|
|
|
537
|
-
def __init__(self, *, public_namespace: builtins.str=...) -> None:
|
|
539
|
+
def __init__(self, *, public_namespace: builtins.str=..., organization_id: builtins.str=...) -> None:
|
|
538
540
|
...
|
|
539
541
|
|
|
540
|
-
def ClearField(self, field_name: typing.Literal['public_namespace', b'public_namespace']) -> None:
|
|
542
|
+
def ClearField(self, field_name: typing.Literal['organization_id', b'organization_id', 'public_namespace', b'public_namespace']) -> None:
|
|
541
543
|
...
|
|
542
544
|
global___GetOrganizationNamespaceAvailabilityRequest = GetOrganizationNamespaceAvailabilityRequest
|
|
543
545
|
|
|
@@ -886,13 +888,22 @@ class ResendOrganizationInviteRequest(google.protobuf.message.Message):
|
|
|
886
888
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
887
889
|
ORGANIZATION_ID_FIELD_NUMBER: builtins.int
|
|
888
890
|
EMAIL_FIELD_NUMBER: builtins.int
|
|
891
|
+
SEND_EMAIL_INVITE_FIELD_NUMBER: builtins.int
|
|
889
892
|
organization_id: builtins.str
|
|
890
893
|
email: builtins.str
|
|
894
|
+
send_email_invite: builtins.bool
|
|
895
|
+
'Set to true (the default) to send an email to the recipient of an invite. The user must accept the email to be added to the associated authorizations.\n When set to false, the user automatically receives the associated authorization on the next login of the user with the associated email address.\n '
|
|
891
896
|
|
|
892
|
-
def __init__(self, *, organization_id: builtins.str=..., email: builtins.str=...) -> None:
|
|
897
|
+
def __init__(self, *, organization_id: builtins.str=..., email: builtins.str=..., send_email_invite: builtins.bool | None=...) -> None:
|
|
893
898
|
...
|
|
894
899
|
|
|
895
|
-
def
|
|
900
|
+
def HasField(self, field_name: typing.Literal['_send_email_invite', b'_send_email_invite', 'send_email_invite', b'send_email_invite']) -> builtins.bool:
|
|
901
|
+
...
|
|
902
|
+
|
|
903
|
+
def ClearField(self, field_name: typing.Literal['_send_email_invite', b'_send_email_invite', 'email', b'email', 'organization_id', b'organization_id', 'send_email_invite', b'send_email_invite']) -> None:
|
|
904
|
+
...
|
|
905
|
+
|
|
906
|
+
def WhichOneof(self, oneof_group: typing.Literal['_send_email_invite', b'_send_email_invite']) -> typing.Literal['send_email_invite'] | None:
|
|
896
907
|
...
|
|
897
908
|
global___ResendOrganizationInviteRequest = ResendOrganizationInviteRequest
|
|
898
909
|
|
|
@@ -1869,6 +1880,40 @@ class GetRobotPartResponse(google.protobuf.message.Message):
|
|
|
1869
1880
|
...
|
|
1870
1881
|
global___GetRobotPartResponse = GetRobotPartResponse
|
|
1871
1882
|
|
|
1883
|
+
@typing.final
|
|
1884
|
+
class GetRobotPartByNameAndLocationRequest(google.protobuf.message.Message):
|
|
1885
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1886
|
+
NAME_FIELD_NUMBER: builtins.int
|
|
1887
|
+
LOCATION_ID_FIELD_NUMBER: builtins.int
|
|
1888
|
+
name: builtins.str
|
|
1889
|
+
location_id: builtins.str
|
|
1890
|
+
|
|
1891
|
+
def __init__(self, *, name: builtins.str=..., location_id: builtins.str=...) -> None:
|
|
1892
|
+
...
|
|
1893
|
+
|
|
1894
|
+
def ClearField(self, field_name: typing.Literal['location_id', b'location_id', 'name', b'name']) -> None:
|
|
1895
|
+
...
|
|
1896
|
+
global___GetRobotPartByNameAndLocationRequest = GetRobotPartByNameAndLocationRequest
|
|
1897
|
+
|
|
1898
|
+
@typing.final
|
|
1899
|
+
class GetRobotPartByNameAndLocationResponse(google.protobuf.message.Message):
|
|
1900
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
1901
|
+
PART_FIELD_NUMBER: builtins.int
|
|
1902
|
+
|
|
1903
|
+
@property
|
|
1904
|
+
def part(self) -> global___RobotPart:
|
|
1905
|
+
...
|
|
1906
|
+
|
|
1907
|
+
def __init__(self, *, part: global___RobotPart | None=...) -> None:
|
|
1908
|
+
...
|
|
1909
|
+
|
|
1910
|
+
def HasField(self, field_name: typing.Literal['part', b'part']) -> builtins.bool:
|
|
1911
|
+
...
|
|
1912
|
+
|
|
1913
|
+
def ClearField(self, field_name: typing.Literal['part', b'part']) -> None:
|
|
1914
|
+
...
|
|
1915
|
+
global___GetRobotPartByNameAndLocationResponse = GetRobotPartByNameAndLocationResponse
|
|
1916
|
+
|
|
1872
1917
|
@typing.final
|
|
1873
1918
|
class GetRobotPartLogsRequest(google.protobuf.message.Message):
|
|
1874
1919
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
@@ -2935,12 +2980,17 @@ global___ListMachineFragmentsResponse = ListMachineFragmentsResponse
|
|
|
2935
2980
|
class ListMachineSummariesRequest(google.protobuf.message.Message):
|
|
2936
2981
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
2937
2982
|
ORGANIZATION_ID_FIELD_NUMBER: builtins.int
|
|
2983
|
+
FRAGMENT_IDS_FIELD_NUMBER: builtins.int
|
|
2938
2984
|
organization_id: builtins.str
|
|
2939
2985
|
|
|
2940
|
-
|
|
2986
|
+
@property
|
|
2987
|
+
def fragment_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
2988
|
+
"""Optional list of fragment IDs to filter machines that use any of these fragments"""
|
|
2989
|
+
|
|
2990
|
+
def __init__(self, *, organization_id: builtins.str=..., fragment_ids: collections.abc.Iterable[builtins.str] | None=...) -> None:
|
|
2941
2991
|
...
|
|
2942
2992
|
|
|
2943
|
-
def ClearField(self, field_name: typing.Literal['organization_id', b'organization_id']) -> None:
|
|
2993
|
+
def ClearField(self, field_name: typing.Literal['fragment_ids', b'fragment_ids', 'organization_id', b'organization_id']) -> None:
|
|
2944
2994
|
...
|
|
2945
2995
|
global___ListMachineSummariesRequest = ListMachineSummariesRequest
|
|
2946
2996
|
|
|
@@ -28,6 +28,10 @@ class GripperServiceBase(abc.ABC):
|
|
|
28
28
|
async def IsMoving(self, stream: 'grpclib.server.Stream[component.gripper.v1.gripper_pb2.IsMovingRequest, component.gripper.v1.gripper_pb2.IsMovingResponse]') -> None:
|
|
29
29
|
pass
|
|
30
30
|
|
|
31
|
+
@abc.abstractmethod
|
|
32
|
+
async def IsHoldingSomething(self, stream: 'grpclib.server.Stream[component.gripper.v1.gripper_pb2.IsHoldingSomethingRequest, component.gripper.v1.gripper_pb2.IsHoldingSomethingResponse]') -> None:
|
|
33
|
+
pass
|
|
34
|
+
|
|
31
35
|
@abc.abstractmethod
|
|
32
36
|
async def DoCommand(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]') -> None:
|
|
33
37
|
pass
|
|
@@ -36,8 +40,12 @@ class GripperServiceBase(abc.ABC):
|
|
|
36
40
|
async def GetGeometries(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]') -> None:
|
|
37
41
|
pass
|
|
38
42
|
|
|
43
|
+
@abc.abstractmethod
|
|
44
|
+
async def GetKinematics(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.GetKinematicsRequest, common.v1.common_pb2.GetKinematicsResponse]') -> None:
|
|
45
|
+
pass
|
|
46
|
+
|
|
39
47
|
def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
|
|
40
|
-
return {'/viam.component.gripper.v1.GripperService/Open': grpclib.const.Handler(self.Open, grpclib.const.Cardinality.UNARY_UNARY, component.gripper.v1.gripper_pb2.OpenRequest, component.gripper.v1.gripper_pb2.OpenResponse), '/viam.component.gripper.v1.GripperService/Grab': grpclib.const.Handler(self.Grab, grpclib.const.Cardinality.UNARY_UNARY, component.gripper.v1.gripper_pb2.GrabRequest, component.gripper.v1.gripper_pb2.GrabResponse), '/viam.component.gripper.v1.GripperService/Stop': grpclib.const.Handler(self.Stop, grpclib.const.Cardinality.UNARY_UNARY, component.gripper.v1.gripper_pb2.StopRequest, component.gripper.v1.gripper_pb2.StopResponse), '/viam.component.gripper.v1.GripperService/IsMoving': grpclib.const.Handler(self.IsMoving, grpclib.const.Cardinality.UNARY_UNARY, component.gripper.v1.gripper_pb2.IsMovingRequest, component.gripper.v1.gripper_pb2.IsMovingResponse), '/viam.component.gripper.v1.GripperService/DoCommand': grpclib.const.Handler(self.DoCommand, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse), '/viam.component.gripper.v1.GripperService/GetGeometries': grpclib.const.Handler(self.GetGeometries, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse)}
|
|
48
|
+
return {'/viam.component.gripper.v1.GripperService/Open': grpclib.const.Handler(self.Open, grpclib.const.Cardinality.UNARY_UNARY, component.gripper.v1.gripper_pb2.OpenRequest, component.gripper.v1.gripper_pb2.OpenResponse), '/viam.component.gripper.v1.GripperService/Grab': grpclib.const.Handler(self.Grab, grpclib.const.Cardinality.UNARY_UNARY, component.gripper.v1.gripper_pb2.GrabRequest, component.gripper.v1.gripper_pb2.GrabResponse), '/viam.component.gripper.v1.GripperService/Stop': grpclib.const.Handler(self.Stop, grpclib.const.Cardinality.UNARY_UNARY, component.gripper.v1.gripper_pb2.StopRequest, component.gripper.v1.gripper_pb2.StopResponse), '/viam.component.gripper.v1.GripperService/IsMoving': grpclib.const.Handler(self.IsMoving, grpclib.const.Cardinality.UNARY_UNARY, component.gripper.v1.gripper_pb2.IsMovingRequest, component.gripper.v1.gripper_pb2.IsMovingResponse), '/viam.component.gripper.v1.GripperService/IsHoldingSomething': grpclib.const.Handler(self.IsHoldingSomething, grpclib.const.Cardinality.UNARY_UNARY, component.gripper.v1.gripper_pb2.IsHoldingSomethingRequest, component.gripper.v1.gripper_pb2.IsHoldingSomethingResponse), '/viam.component.gripper.v1.GripperService/DoCommand': grpclib.const.Handler(self.DoCommand, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse), '/viam.component.gripper.v1.GripperService/GetGeometries': grpclib.const.Handler(self.GetGeometries, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse), '/viam.component.gripper.v1.GripperService/GetKinematics': grpclib.const.Handler(self.GetKinematics, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.GetKinematicsRequest, common.v1.common_pb2.GetKinematicsResponse)}
|
|
41
49
|
|
|
42
50
|
class UnimplementedGripperServiceBase(GripperServiceBase):
|
|
43
51
|
|
|
@@ -53,12 +61,18 @@ class UnimplementedGripperServiceBase(GripperServiceBase):
|
|
|
53
61
|
async def IsMoving(self, stream: 'grpclib.server.Stream[component.gripper.v1.gripper_pb2.IsMovingRequest, component.gripper.v1.gripper_pb2.IsMovingResponse]') -> None:
|
|
54
62
|
raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
|
55
63
|
|
|
64
|
+
async def IsHoldingSomething(self, stream: 'grpclib.server.Stream[component.gripper.v1.gripper_pb2.IsHoldingSomethingRequest, component.gripper.v1.gripper_pb2.IsHoldingSomethingResponse]') -> None:
|
|
65
|
+
raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
|
66
|
+
|
|
56
67
|
async def DoCommand(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]') -> None:
|
|
57
68
|
raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
|
58
69
|
|
|
59
70
|
async def GetGeometries(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse]') -> None:
|
|
60
71
|
raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
|
61
72
|
|
|
73
|
+
async def GetKinematics(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.GetKinematicsRequest, common.v1.common_pb2.GetKinematicsResponse]') -> None:
|
|
74
|
+
raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
|
75
|
+
|
|
62
76
|
class GripperServiceStub:
|
|
63
77
|
|
|
64
78
|
def __init__(self, channel: grpclib.client.Channel) -> None:
|
|
@@ -66,5 +80,7 @@ class GripperServiceStub:
|
|
|
66
80
|
self.Grab = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gripper.v1.GripperService/Grab', component.gripper.v1.gripper_pb2.GrabRequest, component.gripper.v1.gripper_pb2.GrabResponse)
|
|
67
81
|
self.Stop = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gripper.v1.GripperService/Stop', component.gripper.v1.gripper_pb2.StopRequest, component.gripper.v1.gripper_pb2.StopResponse)
|
|
68
82
|
self.IsMoving = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gripper.v1.GripperService/IsMoving', component.gripper.v1.gripper_pb2.IsMovingRequest, component.gripper.v1.gripper_pb2.IsMovingResponse)
|
|
83
|
+
self.IsHoldingSomething = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gripper.v1.GripperService/IsHoldingSomething', component.gripper.v1.gripper_pb2.IsHoldingSomethingRequest, component.gripper.v1.gripper_pb2.IsHoldingSomethingResponse)
|
|
69
84
|
self.DoCommand = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gripper.v1.GripperService/DoCommand', common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse)
|
|
70
|
-
self.GetGeometries = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gripper.v1.GripperService/GetGeometries', common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse)
|
|
85
|
+
self.GetGeometries = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gripper.v1.GripperService/GetGeometries', common.v1.common_pb2.GetGeometriesRequest, common.v1.common_pb2.GetGeometriesResponse)
|
|
86
|
+
self.GetKinematics = grpclib.client.UnaryUnaryMethod(channel, '/viam.component.gripper.v1.GripperService/GetKinematics', common.v1.common_pb2.GetKinematicsRequest, common.v1.common_pb2.GetKinematicsResponse)
|
|
@@ -9,7 +9,7 @@ _sym_db = _symbol_database.Default()
|
|
|
9
9
|
from ....common.v1 import common_pb2 as common_dot_v1_dot_common__pb2
|
|
10
10
|
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
|
|
11
11
|
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
12
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n"component/gripper/v1/gripper.proto\x12\x19viam.component.gripper.v1\x1a\x16common/v1/common.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto"P\n\x0bOpenRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"\x0e\n\x0cOpenResponse"P\n\x0bGrabRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"W\n\x0cGrabResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"P\n\x0bStopRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"\x0e\n\x0cStopResponse"%\n\x0fIsMovingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"/\n\x10IsMovingResponse\x12\x1b\n\tis_moving\x18\x01 \x01(\x08R\
|
|
12
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n"component/gripper/v1/gripper.proto\x12\x19viam.component.gripper.v1\x1a\x16common/v1/common.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto"P\n\x0bOpenRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"\x0e\n\x0cOpenResponse"P\n\x0bGrabRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"W\n\x0cGrabResponse\x12\x18\n\x07success\x18\x01 \x01(\x08R\x07success\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"P\n\x0bStopRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"\x0e\n\x0cStopResponse"%\n\x0fIsMovingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name"/\n\x10IsMovingResponse\x12\x1b\n\tis_moving\x18\x01 \x01(\x08R\x08isMoving"^\n\x19IsHoldingSomethingRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"{\n\x1aIsHoldingSomethingResponse\x120\n\x14is_holding_something\x18\x01 \x01(\x08R\x12isHoldingSomething\x12+\n\x04meta\x18c \x01(\x0b2\x17.google.protobuf.StructR\x04meta2\xe8\t\n\x0eGripperService\x12\x8f\x01\n\x04Open\x12&.viam.component.gripper.v1.OpenRequest\x1a\'.viam.component.gripper.v1.OpenResponse"6\xa0\x92)\x01\x82\xd3\xe4\x93\x02,\x1a*/viam/api/v1/component/gripper/{name}/open\x12\x8f\x01\n\x04Grab\x12&.viam.component.gripper.v1.GrabRequest\x1a\'.viam.component.gripper.v1.GrabResponse"6\xa0\x92)\x01\x82\xd3\xe4\x93\x02,\x1a*/viam/api/v1/component/gripper/{name}/grab\x12\x8b\x01\n\x04Stop\x12&.viam.component.gripper.v1.StopRequest\x1a\'.viam.component.gripper.v1.StopResponse"2\x82\xd3\xe4\x93\x02,"*/viam/api/v1/component/gripper/{name}/stop\x12\x9c\x01\n\x08IsMoving\x12*.viam.component.gripper.v1.IsMovingRequest\x1a+.viam.component.gripper.v1.IsMovingResponse"7\x82\xd3\xe4\x93\x021\x12//viam/api/v1/component/gripper/{name}/is_moving\x12\xc5\x01\n\x12IsHoldingSomething\x124.viam.component.gripper.v1.IsHoldingSomethingRequest\x1a5.viam.component.gripper.v1.IsHoldingSomethingResponse"B\x82\xd3\xe4\x93\x02<\x12:/viam/api/v1/component/gripper/{name}/is_holding_something\x12\x8a\x01\n\tDoCommand\x12 .viam.common.v1.DoCommandRequest\x1a!.viam.common.v1.DoCommandResponse"8\x82\xd3\xe4\x93\x022"0/viam/api/v1/component/gripper/{name}/do_command\x12\x96\x01\n\rGetGeometries\x12$.viam.common.v1.GetGeometriesRequest\x1a%.viam.common.v1.GetGeometriesResponse"8\x82\xd3\xe4\x93\x022\x120/viam/api/v1/component/gripper/{name}/geometries\x12\x96\x01\n\rGetKinematics\x12$.viam.common.v1.GetKinematicsRequest\x1a%.viam.common.v1.GetKinematicsResponse"8\x82\xd3\xe4\x93\x022\x120/viam/api/v1/component/gripper/{name}/kinematicsBE\n\x1dcom.viam.component.gripper.v1Z$go.viam.com/api/component/gripper/v1b\x06proto3')
|
|
13
13
|
_globals = globals()
|
|
14
14
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
15
15
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'component.gripper.v1.gripper_pb2', _globals)
|
|
@@ -24,10 +24,14 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
24
24
|
_globals['_GRIPPERSERVICE'].methods_by_name['Stop']._serialized_options = b'\x82\xd3\xe4\x93\x02,"*/viam/api/v1/component/gripper/{name}/stop'
|
|
25
25
|
_globals['_GRIPPERSERVICE'].methods_by_name['IsMoving']._loaded_options = None
|
|
26
26
|
_globals['_GRIPPERSERVICE'].methods_by_name['IsMoving']._serialized_options = b'\x82\xd3\xe4\x93\x021\x12//viam/api/v1/component/gripper/{name}/is_moving'
|
|
27
|
+
_globals['_GRIPPERSERVICE'].methods_by_name['IsHoldingSomething']._loaded_options = None
|
|
28
|
+
_globals['_GRIPPERSERVICE'].methods_by_name['IsHoldingSomething']._serialized_options = b'\x82\xd3\xe4\x93\x02<\x12:/viam/api/v1/component/gripper/{name}/is_holding_something'
|
|
27
29
|
_globals['_GRIPPERSERVICE'].methods_by_name['DoCommand']._loaded_options = None
|
|
28
30
|
_globals['_GRIPPERSERVICE'].methods_by_name['DoCommand']._serialized_options = b'\x82\xd3\xe4\x93\x022"0/viam/api/v1/component/gripper/{name}/do_command'
|
|
29
31
|
_globals['_GRIPPERSERVICE'].methods_by_name['GetGeometries']._loaded_options = None
|
|
30
32
|
_globals['_GRIPPERSERVICE'].methods_by_name['GetGeometries']._serialized_options = b'\x82\xd3\xe4\x93\x022\x120/viam/api/v1/component/gripper/{name}/geometries'
|
|
33
|
+
_globals['_GRIPPERSERVICE'].methods_by_name['GetKinematics']._loaded_options = None
|
|
34
|
+
_globals['_GRIPPERSERVICE'].methods_by_name['GetKinematics']._serialized_options = b'\x82\xd3\xe4\x93\x022\x120/viam/api/v1/component/gripper/{name}/kinematics'
|
|
31
35
|
_globals['_OPENREQUEST']._serialized_start = 149
|
|
32
36
|
_globals['_OPENREQUEST']._serialized_end = 229
|
|
33
37
|
_globals['_OPENRESPONSE']._serialized_start = 231
|
|
@@ -44,5 +48,9 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
44
48
|
_globals['_ISMOVINGREQUEST']._serialized_end = 553
|
|
45
49
|
_globals['_ISMOVINGRESPONSE']._serialized_start = 555
|
|
46
50
|
_globals['_ISMOVINGRESPONSE']._serialized_end = 602
|
|
47
|
-
_globals['
|
|
48
|
-
_globals['
|
|
51
|
+
_globals['_ISHOLDINGSOMETHINGREQUEST']._serialized_start = 604
|
|
52
|
+
_globals['_ISHOLDINGSOMETHINGREQUEST']._serialized_end = 698
|
|
53
|
+
_globals['_ISHOLDINGSOMETHINGRESPONSE']._serialized_start = 700
|
|
54
|
+
_globals['_ISHOLDINGSOMETHINGRESPONSE']._serialized_end = 823
|
|
55
|
+
_globals['_GRIPPERSERVICE']._serialized_start = 826
|
|
56
|
+
_globals['_GRIPPERSERVICE']._serialized_end = 2082
|
|
@@ -134,4 +134,46 @@ class IsMovingResponse(google.protobuf.message.Message):
|
|
|
134
134
|
|
|
135
135
|
def ClearField(self, field_name: typing.Literal['is_moving', b'is_moving']) -> None:
|
|
136
136
|
...
|
|
137
|
-
global___IsMovingResponse = IsMovingResponse
|
|
137
|
+
global___IsMovingResponse = IsMovingResponse
|
|
138
|
+
|
|
139
|
+
@typing.final
|
|
140
|
+
class IsHoldingSomethingRequest(google.protobuf.message.Message):
|
|
141
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
142
|
+
NAME_FIELD_NUMBER: builtins.int
|
|
143
|
+
EXTRA_FIELD_NUMBER: builtins.int
|
|
144
|
+
name: builtins.str
|
|
145
|
+
|
|
146
|
+
@property
|
|
147
|
+
def extra(self) -> google.protobuf.struct_pb2.Struct:
|
|
148
|
+
...
|
|
149
|
+
|
|
150
|
+
def __init__(self, *, name: builtins.str=..., extra: google.protobuf.struct_pb2.Struct | None=...) -> None:
|
|
151
|
+
...
|
|
152
|
+
|
|
153
|
+
def HasField(self, field_name: typing.Literal['extra', b'extra']) -> builtins.bool:
|
|
154
|
+
...
|
|
155
|
+
|
|
156
|
+
def ClearField(self, field_name: typing.Literal['extra', b'extra', 'name', b'name']) -> None:
|
|
157
|
+
...
|
|
158
|
+
global___IsHoldingSomethingRequest = IsHoldingSomethingRequest
|
|
159
|
+
|
|
160
|
+
@typing.final
|
|
161
|
+
class IsHoldingSomethingResponse(google.protobuf.message.Message):
|
|
162
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
163
|
+
IS_HOLDING_SOMETHING_FIELD_NUMBER: builtins.int
|
|
164
|
+
META_FIELD_NUMBER: builtins.int
|
|
165
|
+
is_holding_something: builtins.bool
|
|
166
|
+
|
|
167
|
+
@property
|
|
168
|
+
def meta(self) -> google.protobuf.struct_pb2.Struct:
|
|
169
|
+
...
|
|
170
|
+
|
|
171
|
+
def __init__(self, *, is_holding_something: builtins.bool=..., meta: google.protobuf.struct_pb2.Struct | None=...) -> None:
|
|
172
|
+
...
|
|
173
|
+
|
|
174
|
+
def HasField(self, field_name: typing.Literal['meta', b'meta']) -> builtins.bool:
|
|
175
|
+
...
|
|
176
|
+
|
|
177
|
+
def ClearField(self, field_name: typing.Literal['is_holding_something', b'is_holding_something', 'meta', b'meta']) -> None:
|
|
178
|
+
...
|
|
179
|
+
global___IsHoldingSomethingResponse = IsHoldingSomethingResponse
|
|
@@ -25,8 +25,12 @@ class ProvisioningServiceBase(abc.ABC):
|
|
|
25
25
|
async def GetNetworkList(self, stream: 'grpclib.server.Stream[provisioning.v1.provisioning_pb2.GetNetworkListRequest, provisioning.v1.provisioning_pb2.GetNetworkListResponse]') -> None:
|
|
26
26
|
pass
|
|
27
27
|
|
|
28
|
+
@abc.abstractmethod
|
|
29
|
+
async def ExitProvisioning(self, stream: 'grpclib.server.Stream[provisioning.v1.provisioning_pb2.ExitProvisioningRequest, provisioning.v1.provisioning_pb2.ExitProvisioningResponse]') -> None:
|
|
30
|
+
pass
|
|
31
|
+
|
|
28
32
|
def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
|
|
29
|
-
return {'/viam.provisioning.v1.ProvisioningService/GetSmartMachineStatus': grpclib.const.Handler(self.GetSmartMachineStatus, grpclib.const.Cardinality.UNARY_UNARY, provisioning.v1.provisioning_pb2.GetSmartMachineStatusRequest, provisioning.v1.provisioning_pb2.GetSmartMachineStatusResponse), '/viam.provisioning.v1.ProvisioningService/SetNetworkCredentials': grpclib.const.Handler(self.SetNetworkCredentials, grpclib.const.Cardinality.UNARY_UNARY, provisioning.v1.provisioning_pb2.SetNetworkCredentialsRequest, provisioning.v1.provisioning_pb2.SetNetworkCredentialsResponse), '/viam.provisioning.v1.ProvisioningService/SetSmartMachineCredentials': grpclib.const.Handler(self.SetSmartMachineCredentials, grpclib.const.Cardinality.UNARY_UNARY, provisioning.v1.provisioning_pb2.SetSmartMachineCredentialsRequest, provisioning.v1.provisioning_pb2.SetSmartMachineCredentialsResponse), '/viam.provisioning.v1.ProvisioningService/GetNetworkList': grpclib.const.Handler(self.GetNetworkList, grpclib.const.Cardinality.UNARY_UNARY, provisioning.v1.provisioning_pb2.GetNetworkListRequest, provisioning.v1.provisioning_pb2.GetNetworkListResponse)}
|
|
33
|
+
return {'/viam.provisioning.v1.ProvisioningService/GetSmartMachineStatus': grpclib.const.Handler(self.GetSmartMachineStatus, grpclib.const.Cardinality.UNARY_UNARY, provisioning.v1.provisioning_pb2.GetSmartMachineStatusRequest, provisioning.v1.provisioning_pb2.GetSmartMachineStatusResponse), '/viam.provisioning.v1.ProvisioningService/SetNetworkCredentials': grpclib.const.Handler(self.SetNetworkCredentials, grpclib.const.Cardinality.UNARY_UNARY, provisioning.v1.provisioning_pb2.SetNetworkCredentialsRequest, provisioning.v1.provisioning_pb2.SetNetworkCredentialsResponse), '/viam.provisioning.v1.ProvisioningService/SetSmartMachineCredentials': grpclib.const.Handler(self.SetSmartMachineCredentials, grpclib.const.Cardinality.UNARY_UNARY, provisioning.v1.provisioning_pb2.SetSmartMachineCredentialsRequest, provisioning.v1.provisioning_pb2.SetSmartMachineCredentialsResponse), '/viam.provisioning.v1.ProvisioningService/GetNetworkList': grpclib.const.Handler(self.GetNetworkList, grpclib.const.Cardinality.UNARY_UNARY, provisioning.v1.provisioning_pb2.GetNetworkListRequest, provisioning.v1.provisioning_pb2.GetNetworkListResponse), '/viam.provisioning.v1.ProvisioningService/ExitProvisioning': grpclib.const.Handler(self.ExitProvisioning, grpclib.const.Cardinality.UNARY_UNARY, provisioning.v1.provisioning_pb2.ExitProvisioningRequest, provisioning.v1.provisioning_pb2.ExitProvisioningResponse)}
|
|
30
34
|
|
|
31
35
|
class UnimplementedProvisioningServiceBase(ProvisioningServiceBase):
|
|
32
36
|
|
|
@@ -42,10 +46,14 @@ class UnimplementedProvisioningServiceBase(ProvisioningServiceBase):
|
|
|
42
46
|
async def GetNetworkList(self, stream: 'grpclib.server.Stream[provisioning.v1.provisioning_pb2.GetNetworkListRequest, provisioning.v1.provisioning_pb2.GetNetworkListResponse]') -> None:
|
|
43
47
|
raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
|
44
48
|
|
|
49
|
+
async def ExitProvisioning(self, stream: 'grpclib.server.Stream[provisioning.v1.provisioning_pb2.ExitProvisioningRequest, provisioning.v1.provisioning_pb2.ExitProvisioningResponse]') -> None:
|
|
50
|
+
raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
|
|
51
|
+
|
|
45
52
|
class ProvisioningServiceStub:
|
|
46
53
|
|
|
47
54
|
def __init__(self, channel: grpclib.client.Channel) -> None:
|
|
48
55
|
self.GetSmartMachineStatus = grpclib.client.UnaryUnaryMethod(channel, '/viam.provisioning.v1.ProvisioningService/GetSmartMachineStatus', provisioning.v1.provisioning_pb2.GetSmartMachineStatusRequest, provisioning.v1.provisioning_pb2.GetSmartMachineStatusResponse)
|
|
49
56
|
self.SetNetworkCredentials = grpclib.client.UnaryUnaryMethod(channel, '/viam.provisioning.v1.ProvisioningService/SetNetworkCredentials', provisioning.v1.provisioning_pb2.SetNetworkCredentialsRequest, provisioning.v1.provisioning_pb2.SetNetworkCredentialsResponse)
|
|
50
57
|
self.SetSmartMachineCredentials = grpclib.client.UnaryUnaryMethod(channel, '/viam.provisioning.v1.ProvisioningService/SetSmartMachineCredentials', provisioning.v1.provisioning_pb2.SetSmartMachineCredentialsRequest, provisioning.v1.provisioning_pb2.SetSmartMachineCredentialsResponse)
|
|
51
|
-
self.GetNetworkList = grpclib.client.UnaryUnaryMethod(channel, '/viam.provisioning.v1.ProvisioningService/GetNetworkList', provisioning.v1.provisioning_pb2.GetNetworkListRequest, provisioning.v1.provisioning_pb2.GetNetworkListResponse)
|
|
58
|
+
self.GetNetworkList = grpclib.client.UnaryUnaryMethod(channel, '/viam.provisioning.v1.ProvisioningService/GetNetworkList', provisioning.v1.provisioning_pb2.GetNetworkListRequest, provisioning.v1.provisioning_pb2.GetNetworkListResponse)
|
|
59
|
+
self.ExitProvisioning = grpclib.client.UnaryUnaryMethod(channel, '/viam.provisioning.v1.ProvisioningService/ExitProvisioning', provisioning.v1.provisioning_pb2.ExitProvisioningRequest, provisioning.v1.provisioning_pb2.ExitProvisioningResponse)
|
|
@@ -6,34 +6,38 @@ from google.protobuf import symbol_database as _symbol_database
|
|
|
6
6
|
from google.protobuf.internal import builder as _builder
|
|
7
7
|
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 29, 2, '', 'provisioning/v1/provisioning.proto')
|
|
8
8
|
_sym_db = _symbol_database.Default()
|
|
9
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n"provisioning/v1/provisioning.proto\x12\x14viam.provisioning.v1"\x1e\n\x1cGetSmartMachineStatusRequest"\
|
|
9
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n"provisioning/v1/provisioning.proto\x12\x14viam.provisioning.v1"\x19\n\x17ExitProvisioningRequest"\x1a\n\x18ExitProvisioningResponse"\x1e\n\x1cGetSmartMachineStatusRequest"\xf0\x02\n\x1dGetSmartMachineStatusResponse\x12S\n\x11provisioning_info\x18\x01 \x01(\x0b2&.viam.provisioning.v1.ProvisioningInfoR\x10provisioningInfo\x12A\n\x1dhas_smart_machine_credentials\x18\x02 \x01(\x08R\x1ahasSmartMachineCredentials\x12\x1b\n\tis_online\x18\x03 \x01(\x08R\x08isOnline\x12]\n\x19latest_connection_attempt\x18\x04 \x01(\x0b2!.viam.provisioning.v1.NetworkInfoR\x17latestConnectionAttempt\x12\x16\n\x06errors\x18\x05 \x03(\tR\x06errors\x12#\n\ragent_version\x18\x06 \x01(\tR\x0cagentVersion"X\n\x1cSetNetworkCredentialsRequest\x12\x12\n\x04type\x18\x01 \x01(\tR\x04type\x12\x12\n\x04ssid\x18\x02 \x01(\tR\x04ssid\x12\x10\n\x03psk\x18\x03 \x01(\tR\x03psk"\x1f\n\x1dSetNetworkCredentialsResponse"\\\n!SetSmartMachineCredentialsRequest\x127\n\x05cloud\x18\x01 \x01(\x0b2!.viam.provisioning.v1.CloudConfigR\x05cloud"$\n"SetSmartMachineCredentialsResponse"\x17\n\x15GetNetworkListRequest"W\n\x16GetNetworkListResponse\x12=\n\x08networks\x18\x01 \x03(\x0b2!.viam.provisioning.v1.NetworkInfoR\x08networks"m\n\x10ProvisioningInfo\x12\x1f\n\x0bfragment_id\x18\x01 \x01(\tR\nfragmentId\x12\x14\n\x05model\x18\x02 \x01(\tR\x05model\x12"\n\x0cmanufacturer\x18\x03 \x01(\tR\x0cmanufacturer"\xa6\x01\n\x0bNetworkInfo\x12\x12\n\x04type\x18\x01 \x01(\tR\x04type\x12\x12\n\x04ssid\x18\x02 \x01(\tR\x04ssid\x12\x1a\n\x08security\x18\x03 \x01(\tR\x08security\x12\x16\n\x06signal\x18\x04 \x01(\x05R\x06signal\x12\x1c\n\tconnected\x18\x05 \x01(\x08R\tconnected\x12\x1d\n\nlast_error\x18\x06 \x01(\tR\tlastError"V\n\x0bCloudConfig\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n\x06secret\x18\x02 \x01(\tR\x06secret\x12\x1f\n\x0bapp_address\x18\x03 \x01(\tR\nappAddress2\x8d\x05\n\x13ProvisioningService\x12\x80\x01\n\x15GetSmartMachineStatus\x122.viam.provisioning.v1.GetSmartMachineStatusRequest\x1a3.viam.provisioning.v1.GetSmartMachineStatusResponse\x12\x80\x01\n\x15SetNetworkCredentials\x122.viam.provisioning.v1.SetNetworkCredentialsRequest\x1a3.viam.provisioning.v1.SetNetworkCredentialsResponse\x12\x8f\x01\n\x1aSetSmartMachineCredentials\x127.viam.provisioning.v1.SetSmartMachineCredentialsRequest\x1a8.viam.provisioning.v1.SetSmartMachineCredentialsResponse\x12k\n\x0eGetNetworkList\x12+.viam.provisioning.v1.GetNetworkListRequest\x1a,.viam.provisioning.v1.GetNetworkListResponse\x12q\n\x10ExitProvisioning\x12-.viam.provisioning.v1.ExitProvisioningRequest\x1a..viam.provisioning.v1.ExitProvisioningResponseB!Z\x1fgo.viam.com/api/provisioning/v1b\x06proto3')
|
|
10
10
|
_globals = globals()
|
|
11
11
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
12
12
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'provisioning.v1.provisioning_pb2', _globals)
|
|
13
13
|
if not _descriptor._USE_C_DESCRIPTORS:
|
|
14
14
|
_globals['DESCRIPTOR']._loaded_options = None
|
|
15
15
|
_globals['DESCRIPTOR']._serialized_options = b'Z\x1fgo.viam.com/api/provisioning/v1'
|
|
16
|
-
_globals['
|
|
17
|
-
_globals['
|
|
18
|
-
_globals['
|
|
19
|
-
_globals['
|
|
20
|
-
_globals['
|
|
21
|
-
_globals['
|
|
22
|
-
_globals['
|
|
23
|
-
_globals['
|
|
24
|
-
_globals['
|
|
25
|
-
_globals['
|
|
26
|
-
_globals['
|
|
27
|
-
_globals['
|
|
28
|
-
_globals['
|
|
29
|
-
_globals['
|
|
30
|
-
_globals['
|
|
31
|
-
_globals['
|
|
32
|
-
_globals['
|
|
33
|
-
_globals['
|
|
34
|
-
_globals['
|
|
35
|
-
_globals['
|
|
36
|
-
_globals['
|
|
37
|
-
_globals['
|
|
38
|
-
_globals['
|
|
39
|
-
_globals['
|
|
16
|
+
_globals['_EXITPROVISIONINGREQUEST']._serialized_start = 60
|
|
17
|
+
_globals['_EXITPROVISIONINGREQUEST']._serialized_end = 85
|
|
18
|
+
_globals['_EXITPROVISIONINGRESPONSE']._serialized_start = 87
|
|
19
|
+
_globals['_EXITPROVISIONINGRESPONSE']._serialized_end = 113
|
|
20
|
+
_globals['_GETSMARTMACHINESTATUSREQUEST']._serialized_start = 115
|
|
21
|
+
_globals['_GETSMARTMACHINESTATUSREQUEST']._serialized_end = 145
|
|
22
|
+
_globals['_GETSMARTMACHINESTATUSRESPONSE']._serialized_start = 148
|
|
23
|
+
_globals['_GETSMARTMACHINESTATUSRESPONSE']._serialized_end = 516
|
|
24
|
+
_globals['_SETNETWORKCREDENTIALSREQUEST']._serialized_start = 518
|
|
25
|
+
_globals['_SETNETWORKCREDENTIALSREQUEST']._serialized_end = 606
|
|
26
|
+
_globals['_SETNETWORKCREDENTIALSRESPONSE']._serialized_start = 608
|
|
27
|
+
_globals['_SETNETWORKCREDENTIALSRESPONSE']._serialized_end = 639
|
|
28
|
+
_globals['_SETSMARTMACHINECREDENTIALSREQUEST']._serialized_start = 641
|
|
29
|
+
_globals['_SETSMARTMACHINECREDENTIALSREQUEST']._serialized_end = 733
|
|
30
|
+
_globals['_SETSMARTMACHINECREDENTIALSRESPONSE']._serialized_start = 735
|
|
31
|
+
_globals['_SETSMARTMACHINECREDENTIALSRESPONSE']._serialized_end = 771
|
|
32
|
+
_globals['_GETNETWORKLISTREQUEST']._serialized_start = 773
|
|
33
|
+
_globals['_GETNETWORKLISTREQUEST']._serialized_end = 796
|
|
34
|
+
_globals['_GETNETWORKLISTRESPONSE']._serialized_start = 798
|
|
35
|
+
_globals['_GETNETWORKLISTRESPONSE']._serialized_end = 885
|
|
36
|
+
_globals['_PROVISIONINGINFO']._serialized_start = 887
|
|
37
|
+
_globals['_PROVISIONINGINFO']._serialized_end = 996
|
|
38
|
+
_globals['_NETWORKINFO']._serialized_start = 999
|
|
39
|
+
_globals['_NETWORKINFO']._serialized_end = 1165
|
|
40
|
+
_globals['_CLOUDCONFIG']._serialized_start = 1167
|
|
41
|
+
_globals['_CLOUDCONFIG']._serialized_end = 1253
|
|
42
|
+
_globals['_PROVISIONINGSERVICE']._serialized_start = 1256
|
|
43
|
+
_globals['_PROVISIONINGSERVICE']._serialized_end = 1909
|
|
@@ -10,6 +10,22 @@ import google.protobuf.message
|
|
|
10
10
|
import typing
|
|
11
11
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
|
12
12
|
|
|
13
|
+
@typing.final
|
|
14
|
+
class ExitProvisioningRequest(google.protobuf.message.Message):
|
|
15
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
16
|
+
|
|
17
|
+
def __init__(self) -> None:
|
|
18
|
+
...
|
|
19
|
+
global___ExitProvisioningRequest = ExitProvisioningRequest
|
|
20
|
+
|
|
21
|
+
@typing.final
|
|
22
|
+
class ExitProvisioningResponse(google.protobuf.message.Message):
|
|
23
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
24
|
+
|
|
25
|
+
def __init__(self) -> None:
|
|
26
|
+
...
|
|
27
|
+
global___ExitProvisioningResponse = ExitProvisioningResponse
|
|
28
|
+
|
|
13
29
|
@typing.final
|
|
14
30
|
class GetSmartMachineStatusRequest(google.protobuf.message.Message):
|
|
15
31
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
|
@@ -26,8 +42,10 @@ class GetSmartMachineStatusResponse(google.protobuf.message.Message):
|
|
|
26
42
|
IS_ONLINE_FIELD_NUMBER: builtins.int
|
|
27
43
|
LATEST_CONNECTION_ATTEMPT_FIELD_NUMBER: builtins.int
|
|
28
44
|
ERRORS_FIELD_NUMBER: builtins.int
|
|
45
|
+
AGENT_VERSION_FIELD_NUMBER: builtins.int
|
|
29
46
|
has_smart_machine_credentials: builtins.bool
|
|
30
47
|
is_online: builtins.bool
|
|
48
|
+
agent_version: builtins.str
|
|
31
49
|
|
|
32
50
|
@property
|
|
33
51
|
def provisioning_info(self) -> global___ProvisioningInfo:
|
|
@@ -41,13 +59,13 @@ class GetSmartMachineStatusResponse(google.protobuf.message.Message):
|
|
|
41
59
|
def errors(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
|
42
60
|
...
|
|
43
61
|
|
|
44
|
-
def __init__(self, *, provisioning_info: global___ProvisioningInfo | None=..., has_smart_machine_credentials: builtins.bool=..., is_online: builtins.bool=..., latest_connection_attempt: global___NetworkInfo | None=..., errors: collections.abc.Iterable[builtins.str] | None=...) -> None:
|
|
62
|
+
def __init__(self, *, provisioning_info: global___ProvisioningInfo | None=..., has_smart_machine_credentials: builtins.bool=..., is_online: builtins.bool=..., latest_connection_attempt: global___NetworkInfo | None=..., errors: collections.abc.Iterable[builtins.str] | None=..., agent_version: builtins.str=...) -> None:
|
|
45
63
|
...
|
|
46
64
|
|
|
47
65
|
def HasField(self, field_name: typing.Literal['latest_connection_attempt', b'latest_connection_attempt', 'provisioning_info', b'provisioning_info']) -> builtins.bool:
|
|
48
66
|
...
|
|
49
67
|
|
|
50
|
-
def ClearField(self, field_name: typing.Literal['errors', b'errors', 'has_smart_machine_credentials', b'has_smart_machine_credentials', 'is_online', b'is_online', 'latest_connection_attempt', b'latest_connection_attempt', 'provisioning_info', b'provisioning_info']) -> None:
|
|
68
|
+
def ClearField(self, field_name: typing.Literal['agent_version', b'agent_version', 'errors', b'errors', 'has_smart_machine_credentials', b'has_smart_machine_credentials', 'is_online', b'is_online', 'latest_connection_attempt', b'latest_connection_attempt', 'provisioning_info', b'provisioning_info']) -> None:
|
|
51
69
|
...
|
|
52
70
|
global___GetSmartMachineStatusResponse = GetSmartMachineStatusResponse
|
|
53
71
|
|
viam/module/module.py
CHANGED
|
@@ -32,9 +32,40 @@ from viam.resource.base import ResourceBase
|
|
|
32
32
|
from viam.resource.registry import Registry
|
|
33
33
|
from viam.resource.types import API, RESOURCE_TYPE_COMPONENT, RESOURCE_TYPE_SERVICE, Model, ResourceName, resource_name_from_string
|
|
34
34
|
from viam.robot.client import RobotClient
|
|
35
|
-
from viam.rpc.dial import DialOptions
|
|
35
|
+
from viam.rpc.dial import DialOptions, _host_port_from_url
|
|
36
36
|
from viam.rpc.server import Server
|
|
37
37
|
|
|
38
|
+
# These imports are required to register build-in resources with the registry
|
|
39
|
+
from ..components.arm import Arm # noqa: F401
|
|
40
|
+
from ..components.audio_input import AudioInput # noqa: F401
|
|
41
|
+
from ..components.base import Base # noqa: F401
|
|
42
|
+
from ..components.board import Board # noqa: F401
|
|
43
|
+
from ..components.button import Button # noqa: F401
|
|
44
|
+
from ..components.camera import Camera # noqa: F401
|
|
45
|
+
from ..components.encoder import Encoder # noqa: F401
|
|
46
|
+
from ..components.gantry import Gantry # noqa: F401
|
|
47
|
+
from ..components.generic import Generic as GenericComponent # noqa: F401
|
|
48
|
+
from ..components.gripper import Gripper # noqa: F401
|
|
49
|
+
from ..components.input import Controller # noqa: F401
|
|
50
|
+
from ..components.motor import Motor # noqa: F401
|
|
51
|
+
from ..components.movement_sensor import MovementSensor # noqa: F401
|
|
52
|
+
from ..components.pose_tracker import PoseTracker # noqa: F401
|
|
53
|
+
from ..components.power_sensor import PowerSensor # noqa: F401
|
|
54
|
+
from ..components.sensor import Sensor # noqa: F401
|
|
55
|
+
from ..components.servo import Servo # noqa: F401
|
|
56
|
+
from ..components.switch import Switch # noqa: F401
|
|
57
|
+
from ..services.discovery import Discovery # noqa: F401
|
|
58
|
+
from ..services.generic import Generic as GenericService # noqa: F401
|
|
59
|
+
from ..services.motion import Motion # noqa: F401
|
|
60
|
+
from ..services.navigation import Navigation # noqa: F401
|
|
61
|
+
from ..services.slam import SLAM # noqa: F401
|
|
62
|
+
from ..services.vision import Vision # noqa: F401
|
|
63
|
+
|
|
64
|
+
try:
|
|
65
|
+
from ..services.mlmodel import MLModel # noqa: F401
|
|
66
|
+
except ImportError:
|
|
67
|
+
pass
|
|
68
|
+
|
|
38
69
|
from .service import ModuleRPCService
|
|
39
70
|
from .types import Reconfigurable, Stoppable
|
|
40
71
|
|
|
@@ -46,7 +77,8 @@ def _parse_module_args() -> argparse.Namespace:
|
|
|
46
77
|
p = argparse.ArgumentParser(description="Start this viam python module")
|
|
47
78
|
p.add_argument("socket_path", help="path where this module will serve a unix socket")
|
|
48
79
|
p.add_argument("--log-level", type=lambda name: pylogging._nameToLevel[name.upper()], default=logging.INFO)
|
|
49
|
-
|
|
80
|
+
p.add_argument("--tcp-mode", action="store_true")
|
|
81
|
+
return p.parse_known_args()[0]
|
|
50
82
|
|
|
51
83
|
|
|
52
84
|
class Module:
|
|
@@ -55,6 +87,7 @@ class Module:
|
|
|
55
87
|
_ready: bool
|
|
56
88
|
_log_level: int
|
|
57
89
|
_lock: Lock
|
|
90
|
+
_tcp_mode: bool
|
|
58
91
|
parent: Optional[RobotClient] = None
|
|
59
92
|
server: Server
|
|
60
93
|
logger: pylogging.Logger
|
|
@@ -73,7 +106,7 @@ class Module:
|
|
|
73
106
|
Module: a new Module instance
|
|
74
107
|
"""
|
|
75
108
|
args = _parse_module_args()
|
|
76
|
-
return cls(args.socket_path, log_level=args.log_level)
|
|
109
|
+
return cls(args.socket_path, log_level=args.log_level, tcp_mode=args.tcp_mode)
|
|
77
110
|
|
|
78
111
|
@classmethod
|
|
79
112
|
async def run_with_models(cls, *models: ResourceBase):
|
|
@@ -105,7 +138,7 @@ class Module:
|
|
|
105
138
|
module.add_model_from_registry(*key.split("/")) # pyright: ignore [reportArgumentType]
|
|
106
139
|
await module.start()
|
|
107
140
|
|
|
108
|
-
def __init__(self, address: str, *, log_level: int = logging.INFO) -> None:
|
|
141
|
+
def __init__(self, address: str, *, log_level: int = logging.INFO, tcp_mode: bool = False) -> None:
|
|
109
142
|
# When a module is launched by viam-server, its stdout is not connected to a tty. In
|
|
110
143
|
# response, python disables line buffering, which prevents `print` statements from being
|
|
111
144
|
# immediately flushed to viam-server. This behavior can be confusing, interfere with
|
|
@@ -116,6 +149,7 @@ class Module:
|
|
|
116
149
|
if isinstance(sys.stderr, io.TextIOWrapper):
|
|
117
150
|
sys.stderr.reconfigure(line_buffering=True)
|
|
118
151
|
self._address = address
|
|
152
|
+
self._tcp_mode = tcp_mode
|
|
119
153
|
self.server = Server(resources=[], module_service=ModuleRPCService(self))
|
|
120
154
|
self._log_level = log_level
|
|
121
155
|
|
|
@@ -161,7 +195,11 @@ class Module:
|
|
|
161
195
|
async def start(self):
|
|
162
196
|
"""Start the module service and gRPC server"""
|
|
163
197
|
try:
|
|
164
|
-
|
|
198
|
+
if self._tcp_mode:
|
|
199
|
+
host, port = _host_port_from_url(self._address)
|
|
200
|
+
await self.server.serve(log_level=self._log_level, host=host, port=port)
|
|
201
|
+
else:
|
|
202
|
+
await self.server.serve(log_level=self._log_level, path=self._address)
|
|
165
203
|
finally:
|
|
166
204
|
await self.stop()
|
|
167
205
|
|
viam/proto/app/__init__.py
CHANGED
|
@@ -119,6 +119,8 @@ from ...gen.app.v1.app_pb2 import (
|
|
|
119
119
|
GetRobotAPIKeysResponse,
|
|
120
120
|
GetRobotMetadataRequest,
|
|
121
121
|
GetRobotMetadataResponse,
|
|
122
|
+
GetRobotPartByNameAndLocationRequest,
|
|
123
|
+
GetRobotPartByNameAndLocationResponse,
|
|
122
124
|
GetRobotPartHistoryRequest,
|
|
123
125
|
GetRobotPartHistoryResponse,
|
|
124
126
|
GetRobotPartLogsRequest,
|
|
@@ -394,6 +396,8 @@ __all__ = [
|
|
|
394
396
|
"GetRobotAPIKeysResponse",
|
|
395
397
|
"GetRobotMetadataRequest",
|
|
396
398
|
"GetRobotMetadataResponse",
|
|
399
|
+
"GetRobotPartByNameAndLocationRequest",
|
|
400
|
+
"GetRobotPartByNameAndLocationResponse",
|
|
397
401
|
"GetRobotPartHistoryRequest",
|
|
398
402
|
"GetRobotPartHistoryResponse",
|
|
399
403
|
"GetRobotPartLogsRequest",
|
|
@@ -7,6 +7,8 @@ from ....gen.component.gripper.v1.gripper_grpc import GripperServiceBase, Grippe
|
|
|
7
7
|
from ....gen.component.gripper.v1.gripper_pb2 import (
|
|
8
8
|
GrabRequest,
|
|
9
9
|
GrabResponse,
|
|
10
|
+
IsHoldingSomethingRequest,
|
|
11
|
+
IsHoldingSomethingResponse,
|
|
10
12
|
IsMovingRequest,
|
|
11
13
|
IsMovingResponse,
|
|
12
14
|
OpenRequest,
|
|
@@ -21,6 +23,8 @@ __all__ = [
|
|
|
21
23
|
"UnimplementedGripperServiceBase",
|
|
22
24
|
"GrabRequest",
|
|
23
25
|
"GrabResponse",
|
|
26
|
+
"IsHoldingSomethingRequest",
|
|
27
|
+
"IsHoldingSomethingResponse",
|
|
24
28
|
"IsMovingRequest",
|
|
25
29
|
"IsMovingResponse",
|
|
26
30
|
"OpenRequest",
|
|
@@ -6,6 +6,8 @@ Do not edit manually!
|
|
|
6
6
|
from ...gen.provisioning.v1.provisioning_grpc import ProvisioningServiceBase, ProvisioningServiceStub, UnimplementedProvisioningServiceBase
|
|
7
7
|
from ...gen.provisioning.v1.provisioning_pb2 import (
|
|
8
8
|
CloudConfig,
|
|
9
|
+
ExitProvisioningRequest,
|
|
10
|
+
ExitProvisioningResponse,
|
|
9
11
|
GetNetworkListRequest,
|
|
10
12
|
GetNetworkListResponse,
|
|
11
13
|
GetSmartMachineStatusRequest,
|
|
@@ -23,6 +25,8 @@ __all__ = [
|
|
|
23
25
|
"ProvisioningServiceStub",
|
|
24
26
|
"UnimplementedProvisioningServiceBase",
|
|
25
27
|
"CloudConfig",
|
|
28
|
+
"ExitProvisioningRequest",
|
|
29
|
+
"ExitProvisioningResponse",
|
|
26
30
|
"GetNetworkListRequest",
|
|
27
31
|
"GetNetworkListResponse",
|
|
28
32
|
"GetSmartMachineStatusRequest",
|
viam/rpc/server.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import sys
|
|
1
2
|
from typing import TYPE_CHECKING, Callable, List, Optional
|
|
2
3
|
|
|
3
4
|
from grpclib import GRPCError, Status
|
|
@@ -82,6 +83,24 @@ class Server(ResourceManager):
|
|
|
82
83
|
|
|
83
84
|
event.method_func = log_resource_name
|
|
84
85
|
|
|
86
|
+
async def _serve(
|
|
87
|
+
self,
|
|
88
|
+
host: Optional[str] = "localhost",
|
|
89
|
+
port: Optional[int] = 9090,
|
|
90
|
+
log_level: Optional[int] = logging.INFO,
|
|
91
|
+
*,
|
|
92
|
+
path: Optional[str] = None,
|
|
93
|
+
):
|
|
94
|
+
if path:
|
|
95
|
+
await self._server.start(path=path)
|
|
96
|
+
LOGGER.info(f"Serving on {path}")
|
|
97
|
+
else:
|
|
98
|
+
await self._server.start(host, port)
|
|
99
|
+
LOGGER.info(f"Serving on {host}:{port}")
|
|
100
|
+
await self._server.wait_closed()
|
|
101
|
+
await self.close()
|
|
102
|
+
LOGGER.debug("gRPC server closed")
|
|
103
|
+
|
|
85
104
|
async def serve(
|
|
86
105
|
self,
|
|
87
106
|
host: Optional[str] = "localhost",
|
|
@@ -105,16 +124,11 @@ class Server(ResourceManager):
|
|
|
105
124
|
logging.setLevel(log_level)
|
|
106
125
|
listen(self._server, RecvRequest, self._grpc_recvrequest_handler)
|
|
107
126
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
await self.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
await self._server.start(host, port)
|
|
114
|
-
LOGGER.info(f"Serving on {host}:{port}")
|
|
115
|
-
await self._server.wait_closed()
|
|
116
|
-
await self.close()
|
|
117
|
-
LOGGER.debug("gRPC server closed")
|
|
127
|
+
if sys.platform != "win32":
|
|
128
|
+
with graceful_exit([self._server]):
|
|
129
|
+
await self._serve(host=host, port=port, log_level=log_level, path=path)
|
|
130
|
+
else:
|
|
131
|
+
await self._serve(host=host, port=port, log_level=log_level, path=path)
|
|
118
132
|
|
|
119
133
|
@classmethod
|
|
120
134
|
async def create_and_serve(
|
viam/version_metadata.py
CHANGED