@@ -35,6 +35,11 @@ def __init__(self, channel):
3535 request_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .GetValueRequest .SerializeToString ,
3636 response_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .GetValueResponse .FromString ,
3737 )
38+ self .TryGetValue = channel .unary_unary (
39+ '/ni.pythonpanel.v1.PythonPanelService/TryGetValue' ,
40+ request_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .TryGetValueRequest .SerializeToString ,
41+ response_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .TryGetValueResponse .FromString ,
42+ )
3843 self .SetValue = channel .unary_unary (
3944 '/ni.pythonpanel.v1.PythonPanelService/SetValue' ,
4045 request_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .SetValueRequest .SerializeToString ,
@@ -49,8 +54,12 @@ class PythonPanelServiceServicer(object):
4954 def StartPanel (self , request , context ):
5055 """Start a panel (or connect to if it has already been started)
5156 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
57+ - INVALID_ARGUMENT:
58+ - The panel script filename doesn't end in .py.
59+ - The panel identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
60+ - NOT_FOUND:
61+ - The panel script file was not found.
62+ - The python executable file was not found.
5463 """
5564 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
5665 context .set_details ('Method not implemented!' )
@@ -59,7 +68,8 @@ def StartPanel(self, request, context):
5968 def StopPanel (self , request , context ):
6069 """Stop a panel
6170 Status Codes for errors:
62- - INVALID_ARGUMENT: The specified identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
71+ - INVALID_ARGUMENT:
72+ - The panel identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
6373 """
6474 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
6575 context .set_details ('Method not implemented!' )
@@ -76,7 +86,22 @@ def EnumeratePanels(self, request, context):
7686 def GetValue (self , request , context ):
7787 """Get a value for a control on the panel
7888 Status Codes for errors:
79- - INVALID_ARGUMENT: The specified identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
89+ - INVALID_ARGUMENT:
90+ - The panel identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
91+ - The value identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
92+ - NOT_FOUND:
93+ - The value with the specified identifier was not found.
94+ """
95+ context .set_code (grpc .StatusCode .UNIMPLEMENTED )
96+ context .set_details ('Method not implemented!' )
97+ raise NotImplementedError ('Method not implemented!' )
98+
99+ def TryGetValue (self , request , context ):
100+ """Try to get a value for a control on the panel
101+ Status Codes for errors:
102+ - INVALID_ARGUMENT:
103+ - The panel identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
104+ - The value identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
80105 """
81106 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
82107 context .set_details ('Method not implemented!' )
@@ -85,7 +110,9 @@ def GetValue(self, request, context):
85110 def SetValue (self , request , context ):
86111 """Set a value for a control on the panel
87112 Status Codes for errors:
88- - INVALID_ARGUMENT: The specified identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
113+ - INVALID_ARGUMENT:
114+ - The panel identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
115+ - The value identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
89116 """
90117 context .set_code (grpc .StatusCode .UNIMPLEMENTED )
91118 context .set_details ('Method not implemented!' )
@@ -114,6 +141,11 @@ def add_PythonPanelServiceServicer_to_server(servicer, server):
114141 request_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .GetValueRequest .FromString ,
115142 response_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .GetValueResponse .SerializeToString ,
116143 ),
144+ 'TryGetValue' : grpc .unary_unary_rpc_method_handler (
145+ servicer .TryGetValue ,
146+ request_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .TryGetValueRequest .FromString ,
147+ response_serializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .TryGetValueResponse .SerializeToString ,
148+ ),
117149 'SetValue' : grpc .unary_unary_rpc_method_handler (
118150 servicer .SetValue ,
119151 request_deserializer = ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .SetValueRequest .FromString ,
@@ -198,6 +230,23 @@ def GetValue(request,
198230 options , channel_credentials ,
199231 insecure , call_credentials , compression , wait_for_ready , timeout , metadata )
200232
233+ @staticmethod
234+ def TryGetValue (request ,
235+ target ,
236+ options = (),
237+ channel_credentials = None ,
238+ call_credentials = None ,
239+ insecure = False ,
240+ compression = None ,
241+ wait_for_ready = None ,
242+ timeout = None ,
243+ metadata = None ):
244+ return grpc .experimental .unary_unary (request , target , '/ni.pythonpanel.v1.PythonPanelService/TryGetValue' ,
245+ ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .TryGetValueRequest .SerializeToString ,
246+ ni_dot_pythonpanel_dot_v1_dot_python__panel__service__pb2 .TryGetValueResponse .FromString ,
247+ options , channel_credentials ,
248+ insecure , call_credentials , compression , wait_for_ready , timeout , metadata )
249+
201250 @staticmethod
202251 def SetValue (request ,
203252 target ,
0 commit comments