@@ -30,10 +30,10 @@ def __init__(self, channel):
3030 request_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .EnumeratePanelsRequest .SerializeToString ,
3131 response_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .EnumeratePanelsResponse .FromString ,
3232 )
33- self .GetValue = channel .unary_unary (
34- '/ni.pythonpanel.v1.PythonPanelService/GetValue ' ,
35- request_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .GetValueRequest .SerializeToString ,
36- response_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .GetValueResponse .FromString ,
33+ self .TryGetValue = channel .unary_unary (
34+ '/ni.pythonpanel.v1.PythonPanelService/TryGetValue ' ,
35+ request_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .TryGetValueRequest .SerializeToString ,
36+ response_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .TryGetValueResponse .FromString ,
3737 )
3838 self .SetValue = channel .unary_unary (
3939 '/ni.pythonpanel.v1.PythonPanelService/SetValue' ,
@@ -49,8 +49,12 @@ class PythonPanelServiceServicer(object):
4949 def StartPanel (self , request , context ):
5050 """Start a panel (or connect to if it has already been started)
5151 Status Codes for errors:
52- - INVALID_ARGUMENT: The specified identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
53- - NOT_FOUND: the file for the panel was not found
52+ - INVALID_ARGUMENT:
53+ - The panel script filename doesn't end in .py.
54+ - The panel identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
55+ - NOT_FOUND:
56+ - The panel script file was not found.
57+ - The python executable file was not found.
5458 """
5559 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
5660 context .set_details ('Method not implemented!' )
@@ -59,7 +63,8 @@ def StartPanel(self, request, context):
5963 def StopPanel (self , request , context ):
6064 """Stop a panel
6165 Status Codes for errors:
62- - INVALID_ARGUMENT: The specified identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
66+ - INVALID_ARGUMENT:
67+ - The panel identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
6368 """
6469 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
6570 context .set_details ('Method not implemented!' )
@@ -73,10 +78,12 @@ def EnumeratePanels(self, request, context):
7378 context .set_details ('Method not implemented!' )
7479 raise NotImplementedError ('Method not implemented!' )
7580
76- def GetValue (self , request , context ):
77- """Get a value for a control on the panel
81+ def TryGetValue (self , request , context ):
82+ """Try to get a value for a control on the panel
7883 Status Codes for errors:
79- - INVALID_ARGUMENT: The specified identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
84+ - INVALID_ARGUMENT:
85+ - The panel identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
86+ - The value identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
8087 """
8188 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
8289 context .set_details ('Method not implemented!' )
@@ -85,7 +92,9 @@ def GetValue(self, request, context):
8592 def SetValue (self , request , context ):
8693 """Set a value for a control on the panel
8794 Status Codes for errors:
88- - INVALID_ARGUMENT: The specified identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
95+ - INVALID_ARGUMENT:
96+ - The panel identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
97+ - The value identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
8998 """
9099 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
91100 context .set_details ('Method not implemented!' )
@@ -109,10 +118,10 @@ def add_PythonPanelServiceServicer_to_server(servicer, server):
109118 request_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .EnumeratePanelsRequest .FromString ,
110119 response_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .EnumeratePanelsResponse .SerializeToString ,
111120 ),
112- 'GetValue ' : grpc .unary_unary_rpc_method_handler (
113- servicer .GetValue ,
114- request_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .GetValueRequest .FromString ,
115- response_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .GetValueResponse .SerializeToString ,
121+ 'TryGetValue ' : grpc .unary_unary_rpc_method_handler (
122+ servicer .TryGetValue ,
123+ request_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .TryGetValueRequest .FromString ,
124+ response_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .TryGetValueResponse .SerializeToString ,
116125 ),
117126 'SetValue' : grpc .unary_unary_rpc_method_handler (
118127 servicer .SetValue ,
@@ -182,7 +191,7 @@ def EnumeratePanels(request,
182191 insecure , call_credentials , compression , wait_for_ready , timeout , metadata )
183192
184193 @staticmethod
185- def GetValue (request ,
194+ def TryGetValue (request ,
186195 target ,
187196 options = (),
188197 channel_credentials = None ,
@@ -192,9 +201,9 @@ def GetValue(request,
192201 wait_for_ready = None ,
193202 timeout = None ,
194203 metadata = None ):
195- return grpc .experimental .unary_unary (request , target , '/ni.pythonpanel.v1.PythonPanelService/GetValue ' ,
196- ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .GetValueRequest .SerializeToString ,
197- ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .GetValueResponse .FromString ,
204+ return grpc .experimental .unary_unary (request , target , '/ni.pythonpanel.v1.PythonPanelService/TryGetValue ' ,
205+ ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .TryGetValueRequest .SerializeToString ,
206+ ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .TryGetValueResponse .FromString ,
198207 options , channel_credentials ,
199208 insecure , call_credentials , compression , wait_for_ready , timeout , metadata )
200209
0 commit comments