66
77
88class PythonPanelServiceStub (object ):
9- """Service interface for connecting to python panels
9+ """Service interface for interacting with python panels
1010 """
1111
1212 def __init__ (self , channel ):
@@ -15,15 +15,10 @@ def __init__(self, channel):
1515 Args:
1616 channel: A grpc.Channel.
1717 """
18- self .Connect = channel .unary_unary (
19- '/ni.pythonpanel.v1.PythonPanelService/Connect' ,
20- request_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .ConnectRequest .SerializeToString ,
21- response_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .ConnectResponse .FromString ,
22- )
23- self .Disconnect = channel .unary_unary (
24- '/ni.pythonpanel.v1.PythonPanelService/Disconnect' ,
25- request_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .DisconnectRequest .SerializeToString ,
26- response_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .DisconnectResponse .FromString ,
18+ self .OpenPanel = channel .unary_unary (
19+ '/ni.pythonpanel.v1.PythonPanelService/OpenPanel' ,
20+ request_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .OpenPanelRequest .SerializeToString ,
21+ response_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .OpenPanelResponse .FromString ,
2722 )
2823 self .GetValue = channel .unary_unary (
2924 '/ni.pythonpanel.v1.PythonPanelService/GetValue' ,
@@ -38,27 +33,18 @@ def __init__(self, channel):
3833
3934
4035class PythonPanelServiceServicer (object ):
41- """Service interface for connecting to python panels
36+ """Service interface for interacting with python panels
4237 """
4338
44- def Connect (self , request , context ):
45- """Connect to a panel and open it
39+ def OpenPanel (self , request , context ):
40+ """Open a panel
4641 Status Codes for errors:
4742 - NOT_FOUND: the file for the panel was not found
4843 """
4944 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
5045 context .set_details ('Method not implemented!' )
5146 raise NotImplementedError ('Method not implemented!' )
5247
53- def Disconnect (self , request , context ):
54- """Disconnect from a panel (does not close the panel)
55- Status Codes for errors:
56- - NOT_FOUND: the panel with the specified id was not found
57- """
58- context .set_code (grpc .StatusCode .UNIMPLEMENTED )
59- context .set_details ('Method not implemented!' )
60- raise NotImplementedError ('Method not implemented!' )
61-
6248 def GetValue (self , request , context ):
6349 """Get a value for a control on the panel
6450 Status Codes for errors:
@@ -80,15 +66,10 @@ def SetValue(self, request, context):
8066
8167def add_PythonPanelServiceServicer_to_server (servicer , server ):
8268 rpc_method_handlers = {
83- 'Connect' : grpc .unary_unary_rpc_method_handler (
84- servicer .Connect ,
85- request_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .ConnectRequest .FromString ,
86- response_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .ConnectResponse .SerializeToString ,
87- ),
88- 'Disconnect' : grpc .unary_unary_rpc_method_handler (
89- servicer .Disconnect ,
90- request_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .DisconnectRequest .FromString ,
91- response_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .DisconnectResponse .SerializeToString ,
69+ 'OpenPanel' : grpc .unary_unary_rpc_method_handler (
70+ servicer .OpenPanel ,
71+ request_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .OpenPanelRequest .FromString ,
72+ response_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .OpenPanelResponse .SerializeToString ,
9273 ),
9374 'GetValue' : grpc .unary_unary_rpc_method_handler (
9475 servicer .GetValue ,
@@ -108,28 +89,11 @@ def add_PythonPanelServiceServicer_to_server(servicer, server):
10889
10990 # This class is part of an EXPERIMENTAL API.
11091class PythonPanelService (object ):
111- """Service interface for connecting to python panels
92+ """Service interface for interacting with python panels
11293 """
11394
11495 @staticmethod
115- def Connect (request ,
116- target ,
117- options = (),
118- channel_credentials = None ,
119- call_credentials = None ,
120- insecure = False ,
121- compression = None ,
122- wait_for_ready = None ,
123- timeout = None ,
124- metadata = None ):
125- return grpc .experimental .unary_unary (request , target , '/ni.pythonpanel.v1.PythonPanelService/Connect' ,
126- ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .ConnectRequest .SerializeToString ,
127- ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .ConnectResponse .FromString ,
128- options , channel_credentials ,
129- insecure , call_credentials , compression , wait_for_ready , timeout , metadata )
130-
131- @staticmethod
132- def Disconnect (request ,
96+ def OpenPanel (request ,
13397 target ,
13498 options = (),
13599 channel_credentials = None ,
@@ -139,9 +103,9 @@ def Disconnect(request,
139103 wait_for_ready = None ,
140104 timeout = None ,
141105 metadata = None ):
142- return grpc .experimental .unary_unary (request , target , '/ni.pythonpanel.v1.PythonPanelService/Disconnect ' ,
143- ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .DisconnectRequest .SerializeToString ,
144- ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .DisconnectResponse .FromString ,
106+ return grpc .experimental .unary_unary (request , target , '/ni.pythonpanel.v1.PythonPanelService/OpenPanel ' ,
107+ ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .OpenPanelRequest .SerializeToString ,
108+ ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .OpenPanelResponse .FromString ,
145109 options , channel_credentials ,
146110 insecure , call_credentials , compression , wait_for_ready , timeout , metadata )
147111
0 commit comments