ni.panels.v1.panel_service_pb2_grpc
Attributes
Classes
A context object passed to method implementations. |
|
Service interface for interacting with NI panels |
|
Service interface for interacting with NI panels |
|
Service interface for interacting with NI panels |
Functions
|
Module Contents
- ni.panels.v1.panel_service_pb2_grpc._T
- class ni.panels.v1.panel_service_pb2_grpc._MaybeAsyncIterator
Bases:
collections.abc.AsyncIterator[_T],collections.abc.Iterator[_T]- __slots__ = ()
- abstractmethod __anext__()
- Async:
Return the next item or raise StopAsyncIteration when exhausted.
- __aiter__()
- classmethod __subclasshook__(C)
- __class_getitem__
- abstractmethod __next__()
Return the next item from the iterator. When exhausted, raise StopIteration
- __iter__()
- class ni.panels.v1.panel_service_pb2_grpc._ServicerContext
Bases:
grpc.ServicerContext,grpc.aio.ServicerContextA context object passed to method implementations.
- abstractmethod invocation_metadata()
Accesses the metadata sent by the client.
- Returns:
The invocation metadata.
- abstractmethod peer()
Identifies the peer that invoked the RPC being serviced.
- Returns:
A string identifying the peer that invoked the RPC being serviced. The string format is determined by gRPC runtime.
- abstractmethod peer_identities()
Gets one or more peer identity(s).
Equivalent to servicer_context.auth_context().get(servicer_context.peer_identity_key())
- Returns:
An iterable of the identities, or None if the call is not authenticated. Each identity is returned as a raw bytes type.
- abstractmethod peer_identity_key()
The auth property used to identify the peer.
For example, “x509_common_name” or “x509_subject_alternative_name” are used to identify an SSL peer.
- Returns:
The auth property (string) that indicates the peer identity, or None if the call is not authenticated.
- abstractmethod auth_context()
Gets the auth context for the call.
- Returns:
A map of strings to an iterable of bytes for each auth property.
- abstractmethod set_compression(compression)
Set the compression algorithm to be used for the entire call.
- Parameters:
compression – An element of grpc.Compression, e.g. grpc.Compression.Gzip.
- abstractmethod send_initial_metadata(initial_metadata)
Sends the initial metadata value to the client.
This method need not be called by implementations if they have no metadata to add to what the gRPC runtime will transmit.
- Parameters:
initial_metadata – The initial metadata.
- abstractmethod set_trailing_metadata(trailing_metadata)
Sets the trailing metadata for the RPC.
Sets the trailing metadata to be sent upon completion of the RPC.
If this method is invoked multiple times throughout the lifetime of an RPC, the value supplied in the final invocation will be the value sent over the wire.
This method need not be called by implementations if they have no metadata to add to what the gRPC runtime will transmit.
- Parameters:
trailing_metadata – The trailing metadata.
- abstractmethod trailing_metadata()
Access value to be used as trailing metadata upon RPC completion.
This is an EXPERIMENTAL API.
- Returns:
The trailing metadata for the RPC.
- abstractmethod abort(code, details)
Raises an exception to terminate the RPC with a non-OK status.
The code and details passed as arguments will supersede any existing ones.
- Parameters:
code – A StatusCode object to be sent to the client. It must not be StatusCode.OK.
details – A UTF-8-encodable string to be sent to the client upon termination of the RPC.
- Raises:
Exception – An exception is always raised to signal the abortion the RPC to the gRPC runtime.
- abstractmethod abort_with_status(status)
Raises an exception to terminate the RPC with a non-OK status.
The status passed as argument will supersede any existing status code, status message and trailing metadata.
This is an EXPERIMENTAL API.
- Parameters:
status – A grpc.Status object. The status code in it must not be StatusCode.OK.
- Raises:
Exception – An exception is always raised to signal the abortion the RPC to the gRPC runtime.
- abstractmethod set_code(code)
Sets the value to be used as status code upon RPC completion.
This method need not be called by method implementations if they wish the gRPC runtime to determine the status code of the RPC.
- Parameters:
code – A StatusCode object to be sent to the client.
- abstractmethod set_details(details)
Sets the value to be used as detail string upon RPC completion.
This method need not be called by method implementations if they have no details to transmit.
- Parameters:
details – A UTF-8-encodable string to be sent to the client upon termination of the RPC.
- abstractmethod code()
Accesses the value to be used as status code upon RPC completion.
This is an EXPERIMENTAL API.
- Returns:
The StatusCode value for the RPC.
- abstractmethod details()
Accesses the value to be used as detail string upon RPC completion.
This is an EXPERIMENTAL API.
- Returns:
The details string of the RPC.
- abstractmethod disable_next_message_compression()
Disables compression for the next response message.
This method will override any compression configuration set during server creation or set on the call.
- abstractmethod is_active()
Describes whether the RPC is active or has terminated.
- Returns:
True if RPC is active, False otherwise.
- Return type:
- abstractmethod time_remaining()
Describes the length of allowed time remaining for the RPC.
- Returns:
A nonnegative float indicating the length of allowed time in seconds remaining for the RPC to complete before it is considered to have timed out, or None if no deadline was specified for the RPC.
- abstractmethod cancel()
Cancels the RPC.
Idempotent and has no effect if the RPC has already terminated.
- abstractmethod add_callback(callback)
Registers a callback to be called on RPC termination.
- Parameters:
callback – A no-parameter callable to be called on RPC termination.
- Returns:
- True if the callback was added and will be called later; False if
the callback was not added and will not be called (because the RPC already terminated or some other reason).
- __slots__ = ()
- abstractmethod read()
- Async:
- Return type:
grpc.aio._typing.RequestType
Reads one message from the RPC.
Only one read operation is allowed simultaneously.
- Returns:
A response message of the RPC.
- Raises:
An RpcError exception if the read failed. –
- Return type:
grpc.aio._typing.RequestType
- abstractmethod write(message)
- Async:
- Parameters:
message (grpc.aio._typing.ResponseType)
- Return type:
None
Writes one message to the RPC.
Only one write operation is allowed simultaneously.
- Raises:
An RpcError exception if the write failed. –
- Parameters:
message (grpc.aio._typing.ResponseType)
- Return type:
None
- add_done_callback(callback)
Registers a callback to be called on RPC termination.
This is an EXPERIMENTAL API.
- Parameters:
callback (grpc.aio._typing.DoneCallbackType) – A callable object will be called with the servicer context object as its only argument.
- Return type:
None
- cancelled()
Return True if the RPC is cancelled.
The RPC is cancelled when the cancellation was requested with cancel().
This is an EXPERIMENTAL API.
- Returns:
A bool indicates whether the RPC is cancelled or not.
- Return type:
- done()
Return True if the RPC is done.
An RPC is done if the RPC is completed, cancelled or aborted.
This is an EXPERIMENTAL API.
- Returns:
A bool indicates if the RPC is done.
- Return type:
- _is_protocol = False
- classmethod __class_getitem__(params)
Parameterizes a generic class.
At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.
However, note that this method is also called when defining generic classes in the first place with class Foo(Generic[T]): ….
- classmethod __init_subclass__(*args, **kwargs)
- class ni.panels.v1.panel_service_pb2_grpc.PanelServiceStub(channel)[source]
Service interface for interacting with NI panels
- Parameters:
channel (Union[grpc.Channel, grpc.aio.Channel])
- __init__(channel)[source]
- Parameters:
channel (Union[grpc.Channel, grpc.aio.Channel])
- Return type:
None
- StartPanel: grpc.UnaryUnaryMultiCallable[ni.panels.v1.panel_service_pb2.StartPanelRequest, ni.panels.v1.panel_service_pb2.StartPanelResponse]
Start a panel using the provided configuration (or connect to if it has already been started) Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
The panel configuration has an invalid argument.
NOT_FOUND:
The panel configuration includes a file that was not found.
- StopPanel: grpc.UnaryUnaryMultiCallable[ni.panels.v1.panel_service_pb2.StopPanelRequest, ni.panels.v1.panel_service_pb2.StopPanelResponse]
Stop a panel Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
- EnumeratePanels: grpc.UnaryUnaryMultiCallable[ni.panels.v1.panel_service_pb2.EnumeratePanelsRequest, ni.panels.v1.panel_service_pb2.EnumeratePanelsResponse]
Enumerate the panels available in the system, including information about the state of the panels and what values they have. Status Codes for errors:
- GetValue: grpc.UnaryUnaryMultiCallable[ni.panels.v1.panel_service_pb2.GetValueRequest, ni.panels.v1.panel_service_pb2.GetValueResponse]
Get a value for a control on the panel Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
The value identifier contains invalid characters.
NOT_FOUND:
The value with the specified identifier was not found.
- TryGetValue: grpc.UnaryUnaryMultiCallable[ni.panels.v1.panel_service_pb2.TryGetValueRequest, ni.panels.v1.panel_service_pb2.TryGetValueResponse]
Try to get a value for a control on the panel Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
The value identifier contains invalid characters.
- SetValue: grpc.UnaryUnaryMultiCallable[ni.panels.v1.panel_service_pb2.SetValueRequest, ni.panels.v1.panel_service_pb2.SetValueResponse]
Set a value for a control on the panel Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
The value identifier contains invalid characters.
- class ni.panels.v1.panel_service_pb2_grpc.PanelServiceAsyncStub
Service interface for interacting with NI panels
- StartPanel: grpc.aio.UnaryUnaryMultiCallable[ni.panels.v1.panel_service_pb2.StartPanelRequest, ni.panels.v1.panel_service_pb2.StartPanelResponse]
Start a panel using the provided configuration (or connect to if it has already been started) Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
The panel configuration has an invalid argument.
NOT_FOUND:
The panel configuration includes a file that was not found.
- StopPanel: grpc.aio.UnaryUnaryMultiCallable[ni.panels.v1.panel_service_pb2.StopPanelRequest, ni.panels.v1.panel_service_pb2.StopPanelResponse]
Stop a panel Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
- EnumeratePanels: grpc.aio.UnaryUnaryMultiCallable[ni.panels.v1.panel_service_pb2.EnumeratePanelsRequest, ni.panels.v1.panel_service_pb2.EnumeratePanelsResponse]
Enumerate the panels available in the system, including information about the state of the panels and what values they have. Status Codes for errors:
- GetValue: grpc.aio.UnaryUnaryMultiCallable[ni.panels.v1.panel_service_pb2.GetValueRequest, ni.panels.v1.panel_service_pb2.GetValueResponse]
Get a value for a control on the panel Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
The value identifier contains invalid characters.
NOT_FOUND:
The value with the specified identifier was not found.
- TryGetValue: grpc.aio.UnaryUnaryMultiCallable[ni.panels.v1.panel_service_pb2.TryGetValueRequest, ni.panels.v1.panel_service_pb2.TryGetValueResponse]
Try to get a value for a control on the panel Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
The value identifier contains invalid characters.
- SetValue: grpc.aio.UnaryUnaryMultiCallable[ni.panels.v1.panel_service_pb2.SetValueRequest, ni.panels.v1.panel_service_pb2.SetValueResponse]
Set a value for a control on the panel Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
The value identifier contains invalid characters.
- class ni.panels.v1.panel_service_pb2_grpc.PanelServiceServicer[source]
Service interface for interacting with NI panels
- abstractmethod StartPanel(request, context)[source]
Start a panel using the provided configuration (or connect to if it has already been started) Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
The panel configuration has an invalid argument.
NOT_FOUND:
The panel configuration includes a file that was not found.
- Parameters:
context (_ServicerContext)
- Return type:
Union[ni.panels.v1.panel_service_pb2.StartPanelResponse, collections.abc.Awaitable[ni.panels.v1.panel_service_pb2.StartPanelResponse]]
- abstractmethod StopPanel(request, context)[source]
Stop a panel Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
- Parameters:
context (_ServicerContext)
- Return type:
Union[ni.panels.v1.panel_service_pb2.StopPanelResponse, collections.abc.Awaitable[ni.panels.v1.panel_service_pb2.StopPanelResponse]]
- abstractmethod EnumeratePanels(request, context)[source]
Enumerate the panels available in the system, including information about the state of the panels and what values they have. Status Codes for errors:
- Parameters:
request (ni.panels.v1.panel_service_pb2.EnumeratePanelsRequest)
context (_ServicerContext)
- Return type:
Union[ni.panels.v1.panel_service_pb2.EnumeratePanelsResponse, collections.abc.Awaitable[ni.panels.v1.panel_service_pb2.EnumeratePanelsResponse]]
- abstractmethod GetValue(request, context)[source]
Get a value for a control on the panel Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
The value identifier contains invalid characters.
NOT_FOUND:
The value with the specified identifier was not found.
- Parameters:
context (_ServicerContext)
- Return type:
Union[ni.panels.v1.panel_service_pb2.GetValueResponse, collections.abc.Awaitable[ni.panels.v1.panel_service_pb2.GetValueResponse]]
- abstractmethod TryGetValue(request, context)[source]
Try to get a value for a control on the panel Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
The value identifier contains invalid characters.
- Parameters:
context (_ServicerContext)
- Return type:
Union[ni.panels.v1.panel_service_pb2.TryGetValueResponse, collections.abc.Awaitable[ni.panels.v1.panel_service_pb2.TryGetValueResponse]]
- abstractmethod SetValue(request, context)[source]
Set a value for a control on the panel Status Codes for errors:
INVALID_ARGUMENT:
The panel identifier contains invalid characters.
The value identifier contains invalid characters.
- Parameters:
context (_ServicerContext)
- Return type:
Union[ni.panels.v1.panel_service_pb2.SetValueResponse, collections.abc.Awaitable[ni.panels.v1.panel_service_pb2.SetValueResponse]]
- ni.panels.v1.panel_service_pb2_grpc.add_PanelServiceServicer_to_server(servicer, server)[source]
- Parameters:
servicer (PanelServiceServicer)
server (Union[grpc.Server, grpc.aio.Server])
- Return type:
None