Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 33 additions & 30 deletions protos/ni/panels/v1/panel_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ option ruby_package = "NI::Panels::V1";
service PanelService {
// 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. Only alphanumeric characters and underscores are allowed.
// - INVALID_ARGUMENT:
// - The panel identifier contains invalid characters.
// - The panel configuration has an invalid argument.
// - NOT_FOUND:
// - NOT_FOUND:
// - The panel configuration includes a file that was not found.
rpc StartPanel(StartPanelRequest) returns (StartPanelResponse);

// Stop a panel
// Status Codes for errors:
// - INVALID_ARGUMENT:
// - The panel identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
// - The panel identifier contains invalid characters.
rpc StopPanel(StopPanelRequest) returns (StopPanelResponse);

// Enumerate the panels available in the system, including information about the state of the panels and what values they have.
Expand All @@ -37,43 +37,43 @@ service PanelService {

// Get a value for a control on the panel
// Status Codes for errors:
// - INVALID_ARGUMENT:
// - The panel identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
// - The value identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
// - NOT_FOUND:
// - 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.
rpc GetValue(GetValueRequest) returns (GetValueResponse);

// Try to get a value for a control on the panel
// Status Codes for errors:
// - INVALID_ARGUMENT:
// - The panel identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
// - The value identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
// - INVALID_ARGUMENT:
// - The panel identifier contains invalid characters.
// - The value identifier contains invalid characters.
rpc TryGetValue(TryGetValueRequest) returns (TryGetValueResponse);

// Set a value for a control on the panel
// Status Codes for errors:
// - INVALID_ARGUMENT:
// - The panel identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
// - The value identifier contains invalid characters. Only alphanumeric characters and underscores are allowed.
// - INVALID_ARGUMENT:
// - The panel identifier contains invalid characters.
// - The value identifier contains invalid characters.
rpc SetValue(SetValueRequest) returns (SetValueResponse);
}

message StartPanelRequest {
// Unique ID of the panel
// Unique ID of the panel. Only alphanumeric characters and underscores are allowed.
string panel_id = 1;

// Configuration for the panel, packed as Any
// Configuration for the panel, packed as a google.protobuf.Any
google.protobuf.Any panel_configuration = 2;
}

message StartPanelResponse {
// Location of the panel
string panel_uri = 1;
// Location of the panel
string panel_url = 1;
}

message StopPanelRequest {
// Unique ID of the panel
// Unique ID of the panel. Only alphanumeric characters and underscores are allowed.
string panel_id = 1;

// Reset all storage associated with panel
Expand All @@ -91,7 +91,7 @@ message PanelInformation {
string panel_id = 1;

// Location of the panel
string panel_uri = 2;
string panel_url = 2;

// IDs of all of the values associated with the panel
repeated string value_ids = 3;
Expand All @@ -103,39 +103,42 @@ message EnumeratePanelsResponse {
}

message GetValueRequest {
// Unique ID of the panel
// Unique ID of the panel. Only alphanumeric characters and underscores are allowed.
string panel_id = 1;

// Unique ID of value
// Unique ID of value. Only alphanumeric characters and underscores are allowed.
string value_id = 2;
}

message GetValueResponse {
// The value
// The value, packed as a google.protobuf.Any.
// Only types from google/protobuf/wrappers.proto and the ni.protobuf.types package are allowed.
google.protobuf.Any value = 1;
}

message TryGetValueRequest {
// Unique ID of the panel
// Unique ID of the panel. Only alphanumeric characters and underscores are allowed.
string panel_id = 1;

// Unique ID of value
// Unique ID of value. Only alphanumeric characters and underscores are allowed.
string value_id = 2;
}

message TryGetValueResponse {
// The value, if it was found
optional google.protobuf.Any value = 1;
// The value (if it was found), packed as a google.protobuf.Any.
// Only types from google/protobuf/wrappers.proto and the ni.protobuf.types package are allowed.
google.protobuf.Any value = 1;
}

message SetValueRequest {
// Unique ID of the panel
// Unique ID of the panel. Only alphanumeric characters and underscores are allowed.
string panel_id = 1;

// Unique ID of the value
// Unique ID of the value. Only alphanumeric characters and underscores are allowed.
string value_id = 2;

// The value
// The value, packed as a google.protobuf.Any.
// Only types from google/protobuf/wrappers.proto and the ni.protobuf.types package are allowed.
google.protobuf.Any value = 3;

// Notify other clients of this new value
Expand Down
10 changes: 5 additions & 5 deletions protos/ni/panels/v1/streamlit_panel_configuration.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ option php_namespace = "NI\\Panels\\V1";
option ruby_package = "NI::Panels::V1";

// Pack this into PanelService.StartPanelRequest.panel_configuration to start a Streamlit panel.
message StreamlitPanelConfiguration
message StreamlitPanelConfiguration
{
// Absolute path of the streamlit script file on disk, or network path to the file. This must end in ".py".
string panel_script_path = 1;
// Location of the streamlit script file on disk, or network path to the file. This must end in ".py".
string panel_script_url = 1;

// Path to the python interpreter to use for running the streamlit script.
string python_path = 2;
// Location of the python interpreter to use for running the streamlit script.
string python_interpreter_url = 2;
}
16 changes: 8 additions & 8 deletions src/ni/panels/v1/panel_service_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

51 changes: 28 additions & 23 deletions src/ni/panels/v1/panel_service_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ class StartPanelRequest(google.protobuf.message.Message):
PANEL_ID_FIELD_NUMBER: builtins.int
PANEL_CONFIGURATION_FIELD_NUMBER: builtins.int
panel_id: builtins.str
"""Unique ID of the panel"""
"""Unique ID of the panel. Only alphanumeric characters and underscores are allowed."""
@property
def panel_configuration(self) -> google.protobuf.any_pb2.Any:
"""Configuration for the panel, packed as Any"""
"""Configuration for the panel, packed as a google.protobuf.Any"""

def __init__(
self,
Expand All @@ -40,15 +40,15 @@ global___StartPanelRequest = StartPanelRequest
class StartPanelResponse(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

PANEL_URI_FIELD_NUMBER: builtins.int
panel_uri: builtins.str
PANEL_URL_FIELD_NUMBER: builtins.int
panel_url: builtins.str
"""Location of the panel"""
def __init__(
self,
*,
panel_uri: builtins.str = ...,
panel_url: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["panel_uri", b"panel_uri"]) -> None: ...
def ClearField(self, field_name: typing.Literal["panel_url", b"panel_url"]) -> None: ...

global___StartPanelResponse = StartPanelResponse

Expand All @@ -59,7 +59,7 @@ class StopPanelRequest(google.protobuf.message.Message):
PANEL_ID_FIELD_NUMBER: builtins.int
RESET_FIELD_NUMBER: builtins.int
panel_id: builtins.str
"""Unique ID of the panel"""
"""Unique ID of the panel. Only alphanumeric characters and underscores are allowed."""
reset: builtins.bool
"""Reset all storage associated with panel"""
def __init__(
Expand Down Expand Up @@ -97,11 +97,11 @@ class PanelInformation(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

PANEL_ID_FIELD_NUMBER: builtins.int
PANEL_URI_FIELD_NUMBER: builtins.int
PANEL_URL_FIELD_NUMBER: builtins.int
VALUE_IDS_FIELD_NUMBER: builtins.int
panel_id: builtins.str
"""Unique ID of the panel"""
panel_uri: builtins.str
panel_url: builtins.str
"""Location of the panel"""
@property
def value_ids(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
Expand All @@ -111,10 +111,10 @@ class PanelInformation(google.protobuf.message.Message):
self,
*,
panel_id: builtins.str = ...,
panel_uri: builtins.str = ...,
panel_url: builtins.str = ...,
value_ids: collections.abc.Iterable[builtins.str] | None = ...,
) -> None: ...
def ClearField(self, field_name: typing.Literal["panel_id", b"panel_id", "panel_uri", b"panel_uri", "value_ids", b"value_ids"]) -> None: ...
def ClearField(self, field_name: typing.Literal["panel_id", b"panel_id", "panel_url", b"panel_url", "value_ids", b"value_ids"]) -> None: ...

global___PanelInformation = PanelInformation

Expand Down Expand Up @@ -143,9 +143,9 @@ class GetValueRequest(google.protobuf.message.Message):
PANEL_ID_FIELD_NUMBER: builtins.int
VALUE_ID_FIELD_NUMBER: builtins.int
panel_id: builtins.str
"""Unique ID of the panel"""
"""Unique ID of the panel. Only alphanumeric characters and underscores are allowed."""
value_id: builtins.str
"""Unique ID of value"""
"""Unique ID of value. Only alphanumeric characters and underscores are allowed."""
def __init__(
self,
*,
Expand All @@ -163,7 +163,9 @@ class GetValueResponse(google.protobuf.message.Message):
VALUE_FIELD_NUMBER: builtins.int
@property
def value(self) -> google.protobuf.any_pb2.Any:
"""The value"""
"""The value, packed as a google.protobuf.Any.
Only types from google/protobuf/wrappers.proto and the ni.protobuf.types package are allowed.
"""

def __init__(
self,
Expand All @@ -182,9 +184,9 @@ class TryGetValueRequest(google.protobuf.message.Message):
PANEL_ID_FIELD_NUMBER: builtins.int
VALUE_ID_FIELD_NUMBER: builtins.int
panel_id: builtins.str
"""Unique ID of the panel"""
"""Unique ID of the panel. Only alphanumeric characters and underscores are allowed."""
value_id: builtins.str
"""Unique ID of value"""
"""Unique ID of value. Only alphanumeric characters and underscores are allowed."""
def __init__(
self,
*,
Expand All @@ -202,16 +204,17 @@ class TryGetValueResponse(google.protobuf.message.Message):
VALUE_FIELD_NUMBER: builtins.int
@property
def value(self) -> google.protobuf.any_pb2.Any:
"""The value, if it was found"""
"""The value (if it was found), packed as a google.protobuf.Any.
Only types from google/protobuf/wrappers.proto and the ni.protobuf.types package are allowed.
"""

def __init__(
self,
*,
value: google.protobuf.any_pb2.Any | None = ...,
) -> None: ...
def HasField(self, field_name: typing.Literal["_value", b"_value", "value", b"value"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["_value", b"_value", "value", b"value"]) -> None: ...
def WhichOneof(self, oneof_group: typing.Literal["_value", b"_value"]) -> typing.Literal["value"] | None: ...
def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["value", b"value"]) -> None: ...

global___TryGetValueResponse = TryGetValueResponse

Expand All @@ -224,14 +227,16 @@ class SetValueRequest(google.protobuf.message.Message):
VALUE_FIELD_NUMBER: builtins.int
NOTIFY_FIELD_NUMBER: builtins.int
panel_id: builtins.str
"""Unique ID of the panel"""
"""Unique ID of the panel. Only alphanumeric characters and underscores are allowed."""
value_id: builtins.str
"""Unique ID of the value"""
"""Unique ID of the value. Only alphanumeric characters and underscores are allowed."""
notify: builtins.bool
"""Notify other clients of this new value"""
@property
def value(self) -> google.protobuf.any_pb2.Any:
"""The value"""
"""The value, packed as a google.protobuf.Any.
Only types from google/protobuf/wrappers.proto and the ni.protobuf.types package are allowed.
"""

def __init__(
self,
Expand Down
Loading
Loading