# HILLAB Beam Stabilization System gRPC API Reference

## Table of Contents

## hillab_beam_stabilization_system.proto

Top

### AppInfoResponse

Response containing the app information.

Field | Type | Label | Description
version | string |  | Version of the app.

### BeamProfile

Represents the profile data of a beam at a specific index.

Field | Type | Label | Description
index | int32 |  | The index of the beam profile. 0 = (Near) Clip-level 1 = (Near) Target position X 2 = (Near) Target position Y 3 = (Near) Centroid X 4 = (Near) Centroid Y 5 = (Near) Error X 6 = (Near) Error Y 7 = (Near) Diameter 8 = (Near) D4 sigma (major-axis) 9 = (Near) D4 sigma (minor-axis) 10 = (Near) FWHM (major-axis) 11 = (Near) FWHM (minor-axis) 12 = (Near) 1e^2 (major-axis) 13 = (Near) 1e^2 (minor-axis) 14 = (Near) Ellipse 15 = (Near) Ellipticity 16 = (Near) Eccentricity 17 = (Near) Power 18 = (Near) Maximum power density 19 = (Near) Clip-level irradiation area 20 = (Near) Clip-level average power density 21 = (Near) Flatness 22 = (Near) Uniformity 23 = (Near) Plateau uniformity 24 = (Near) Cross-sectional area 25 = (Near) Peak 26 = (Near) Steepness 27 = (Far) Target position X 28 = (Far) Target position Y 29 = (Far) Centroid X 30 = (Far) Centroid Y 31 = (Far) Error X 32 = (Far) Error Y 33 = (Far) Peak
latest_value | double |  | The most recent value of the beam at this index.
average | double |  | The average value of the beam profile.
standard_deviation | double |  | The standard deviation of the beam profile values.

### BeamProfileStream

Represents a stream of beam profiles over time.

Field | Type | Label | Description
time | google.protobuf.Timestamp |  | The timestamp when the beam profile data is recorded.
beam_profiles | BeamProfile | repeated | A list of beam profiles recorded at the given timestamp.

### GetRequest

Request message for retrieving a value by key.

Field | Type | Label | Description
key | string |  | The key that identifies the value being retrieved.

### GetResponse

Response message for getting the value of a specified key.

Field | Type | Label | Description
key | string |  | The key for which the value is returned.
value | Value |  | The value corresponding to the key.
unit | string | optional | Optional unit for the value.
min_value | Value | optional | Optional minimum value that the key can hold.
max_value | Value | optional | Optional maximum value that the key can hold.

### ImageStreamServerRequest

Request to configure or control the image stream server.

Field | Type | Label | Description
running | bool | optional | Request to start or stop the stream. - true: Start the stream. - false: Stop the stream. If not provided, the `running` status will remain unchanged.
mtu | int32 | optional | Update the Maximum Transmission Unit (MTU) for RTP packets. Range: 512 to 1500 bytes. If not provided, the `mtu` status will remain unchanged.
downscale | int32 | optional | Update the downscaling factor for the streamed video resolution. The resolution is calculated as: `origin_size / pow(2, downscale)`. Range: 0 to 4. Example: - downscale=0 -> resolution = original_size. - downscale=1 -> resolution = original_size / 2. - downscale=2 -> resolution = original_size / 4. - downscale=3 -> resolution = original_size / 8. - downscale=4 -> resolution = original_size / 16. If not provided, the current `downscale` value will remain unchanged.
auto_running | bool | optional | Request to enable or disable automatic stream startup. - true: Enable automatic stream startup when camera streaming started. - false: Disable automatic stream startup. If not provided, the `auto_running` setting will remain unchanged.

### ImageStreamServerResponse

Response containing information about the image stream server.

Field | Type | Label | Description
ip | string |  | The IPv4 IP address of the server. (e.g., "192.168.1.1")
port | int32 |  | The port number used for the stream.
mtu | int32 |  | Maximum Transmission Unit (MTU) for RTP packets. Range: 512 to 1500 bytes.
downscale | int32 |  | Downscaling factor for the streamed video resolution. The resolution is calculated as: `origin_size / pow(2, downscale)`. Range: 0 to 4. Example: - downscale=0 -> resolution = original_size. - downscale=1 -> resolution = original_size / 2. - downscale=2 -> resolution = original_size / 4. - downscale=3 -> resolution = original_size / 8. - downscale=4 -> resolution = original_size / 16. If not provided, the current `downscale` value will remain unchanged.
running | bool |  | Indicates whether the stream is currently running.
auto_running | bool |  | Indicates whether the stream is configured to start automatically when camera streaming started.
sdp | string |  | The SDP (Session Description Protocol) string for the stream. Used for configuring media sessions.

### PresetListResponse

Response containing the list of all registered presets.

Field | Type | Label | Description
name_list | string | repeated | List of registered presets.

### PresetRequest

Request to load, save, add, or remove a specific preset by name.

Field | Type | Label | Description
name | string |  | The name of the preset. Must match a registered preset name for operations like "Load" or "Remove".

### PresetResponse

Response containing the name of the current loaded preset.

Field | Type | Label | Description
name | string |  | The name of the currently loaded preset.

### SetRequest

Request message for setting a specific value by key.

Field | Type | Label | Description
key | string |  | The key that identifies the value being set.
value | Value |  | The value to be set for the specified key.

### SystemLogStream

Represents a system log entry in the system log stream.

Field | Type | Label | Description
time | google.protobuf.Timestamp |  | The timestamp when the log message was generated.
type | SystemLogType |  | The type of the log message (informational or error).
message | string |  | The content of the log message.

### Value

Represents a value that can hold different types.

Field | Type | Label | Description
bool_value | bool |  |
int_value | int32 |  |
float_value | float |  |
string_value | string |  |

### SystemLogType

Enum representing the type of a system log message.

Name | Number | Description
SYSTEMLOGTYPE_INFO | 0 | Informational log messages, such as system events or status updates.
SYSTEMLOGTYPE_ERROR | 1 | Error log messages, such as system failures or critical issues.

### BeamStabilizationSystem

BeamStabilizationSystem service that allows retrieving and setting beam profile data.

Method Name | Request Type | Response Type | Description
Get | GetRequest | GetResponse | Retrieves the value named given key. Returns: - Status "OK" for successful. - Status "FAILED_PRECONDITION" for failure since various reasons. See message for more detail. - Status "NOT_FOUND" for failure since given key is undefined. - Status "INTERNAL" for failure since system error.
Set | SetRequest | .google.protobuf.Empty | Modifies the value named given key. Returns: - Status "OK" for successful. - Status "FAILED_PRECONDITION" for failure since various reasons. See message for more detail. - Status "INVALID_ARGUMENT" for failure since various reasons. See message for more detail. - Status "NOT_FOUND" for failure since given key is undefined. - Status "INTERNAL" for failure since system error.
MonitorBeamProfile | .google.protobuf.Empty | BeamProfileStream stream | Retrieves the stream object for obtaining the beam profiles. When the near field profile is finished, the near field and far field profiles are streamed. Returns: - Status "OK" for successful.

### System

Method Name | Request Type | Response Type | Description
GetAppInfo | .google.protobuf.Empty | AppInfoResponse | Retrieves application information. Returns: - Status "OK" and response indicating the app information.
GetPresetList | .google.protobuf.Empty | PresetListResponse | Retrieves registered preset list. Returns: - Status "OK" and response indicating the preset name list.
GetCurrentPreset | .google.protobuf.Empty | PresetResponse | Retrieves the loaded preset. Returns: - Status "OK" and response indicating the loaded preset name.
LoadPreset | PresetRequest | .google.protobuf.Empty | Loads preset. All system properties are applied as loaded presets, but information of gRPC host and Image Stream hosts is not loaded. Returns: - Status "OK" for successful. - Status "FAILED_PRECONDITION" for failure since the preset name is not exist in registered preset list.
SavePreset | .google.protobuf.Empty | .google.protobuf.Empty | Saves preset. All system properties are saved in the current preset, including information of gRPC hosts and Image Stream hosts. Returns: - Status "OK" for successful saving the preset.
AddPreset | PresetRequest | .google.protobuf.Empty | Adds available preset. All system properties will be saved with new preset. This works like "Save as". If the preset already exist, the existing preset will be overwritten. Returns: - Status "OK" for successful.
RemovePreset | PresetRequest | .google.protobuf.Empty | Removes preset from the registered preset list. Returns: - Status "OK" for successful. - Status "FAILED_PRECONDITION" for failure since target preset is loaded or not exist in registered preset list.
GetNearFieldImageStreamServerInfo | .google.protobuf.Empty | ImageStreamServerResponse | Retrieves image stream server information for near field image. Returns: - Status "OK" and response indicating the image stream information.
GetFarFieldImageStreamServerInfo | .google.protobuf.Empty | ImageStreamServerResponse | Retrieves image stream server information for far field image. Returns: - Status "OK" and response indicating the image stream information.
SetNearFieldImageStreamServer | ImageStreamServerRequest | .google.protobuf.Empty | Starts/stops image stream server for near field image and/or modifies options. The server's URL (IP and Port) cannot be changed with gRPC. Note that the camera must be streaming to start the stream server. Returns: - Status "OK" for successful. - Status "INVALID ARGUMENT" for failure since some values are out of range. - Status "FAILED_PRECONDITION" for indicating that the stream cannot be started, or failure for changing some value since the server is running.
SetFarFieldImageStreamServer | ImageStreamServerRequest | .google.protobuf.Empty | Starts/stops image stream server for far field image and/or modifies options. The server's URL (IP and Port) cannot be changed with gRPC. Note that the camera must be streaming to start the stream server. Returns: - Status "OK" for successful. - Status "INVALID ARGUMENT" for failure since some values are out of range. - Status "FAILED_PRECONDITION" for indicating that the stream cannot be started, or failure for changing some value since the server is running.
MonitorSystemLog | .google.protobuf.Empty | SystemLogStream stream | Retrieves the stream object for obtaining the system log message. Returns: - Status "OK" for successful.

## Scalar Value Types

.proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby
double |  | double | double | float | float64 | double | float | Float
float |  | float | float | float | float32 | float | float | Float
int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required)
int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum
uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required)
uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required)
sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required)
sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum
fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required)
fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum
sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required)
sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum
bool |  | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass
string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8)
bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT)