Daemon API
The daemon exposes a single gRPC service: galois.edge.v1.EdgeDaemonService. Every wrapper — Python SDK, PyVISA backend, cloud control plane — is a client of this service. The proto schema is the canonical contract; this page is generated by hand from proto/edge/v1/edge.proto.
Service EdgeDaemonService
Section titled “Service EdgeDaemonService”| Method | Request | Response | Streaming |
|---|---|---|---|
SendCommand | SendCommandRequest | SendCommandResponse | unary |
StreamCommands | SendCommandRequest | SendCommandResponse | bidi |
ListInstruments | ListInstrumentsRequest | ListInstrumentsResponse | unary |
GetInstrument | GetInstrumentRequest | Instrument | unary |
ScanInstruments | ScanInstrumentsRequest | ScanInstrumentsResponse | unary |
GetCapabilities | GetCapabilitiesRequest | GetCapabilitiesResponse | unary |
ExecuteCommand | ExecuteCommandRequest | ExecuteCommandResponse | unary |
ExecuteSequence | ExecuteSequenceRequest | ExecuteSequenceResponse | unary |
StreamMeasurement | StreamMeasurementRequest | MeasurementDataPoint | server |
StopStream | StopStreamRequest | StopStreamResponse | unary |
GetStatus | GetStatusRequest | EdgeStatus | unary |
Ping | PingRequest | PingResponse | unary |
RegisterEdge | RegisterEdgeRequest | RegisterEdgeResponse | unary |
Heartbeat | HeartbeatRequest | HeartbeatResponse | unary |
GetWebcamSnapshot | GetWebcamSnapshotRequest | GetWebcamSnapshotResponse | unary |
ProxySDKCall | ProxySDKCallRequest | ProxySDKCallResponse | unary |
StartSweep | StartSweepRequest | StartSweepResponse | unary |
GetSweepStatus | GetSweepStatusRequest | SweepStatusResponse | unary |
StopSweep | StopSweepRequest | StopSweepResponse | unary |
DeployProfile | DeployProfileRequest | DeployProfileResponse | unary |
RemoveProfile | RemoveProfileRequest | RemoveProfileResponse | unary |
ListProfiles | ListProfilesRequest | ListProfilesResponse | unary |
ConnectModbusInstrument | ConnectModbusInstrumentRequest | ConnectModbusInstrumentResponse | unary |
DisconnectInstrument | DisconnectInstrumentRequest | DisconnectInstrumentResponse | unary |
ConnectionType
Section titled “ConnectionType”| Value | Number |
|---|---|
CONNECTION_TYPE_UNSPECIFIED | 0 |
CONNECTION_TYPE_GPIB | 1 |
CONNECTION_TYPE_USB | 2 |
CONNECTION_TYPE_LAN | 3 |
CONNECTION_TYPE_SERIAL | 4 |
ParameterType
Section titled “ParameterType”| Value | Number |
|---|---|
PARAMETER_TYPE_UNSPECIFIED | 0 |
PARAMETER_TYPE_STRING | 1 |
PARAMETER_TYPE_NUMBER | 2 |
PARAMETER_TYPE_BOOLEAN | 3 |
PARAMETER_TYPE_ENUM | 4 |
EdgeStatusCode
Section titled “EdgeStatusCode”| Value | Number |
|---|---|
EDGE_STATUS_CODE_UNSPECIFIED | 0 |
EDGE_STATUS_CODE_ONLINE | 1 |
EDGE_STATUS_CODE_OFFLINE | 2 |
EDGE_STATUS_CODE_DEGRADED | 3 |
Core messages
Section titled “Core messages”Instrument
Section titled “Instrument”| Field | Type | Notes |
|---|---|---|
id | string | Daemon-assigned identifier. |
address | string | VISA resource string. |
connection_type | ConnectionType | |
idn_string | string | Raw *IDN? response. |
manufacturer | string | Parsed from IDN. |
model | string | Parsed from IDN. |
serial_number | string | |
firmware | string | |
profile_name | string | YAML profile key, empty if no match. |
instrument_class | string | dmm, oscilloscope, sourcemeter, … |
is_connected | bool | False if discovery saw it but a session can’t open. |
capabilities | repeated CommandCapability |
CommandCapability
Section titled “CommandCapability”| Field | Type | Notes |
|---|---|---|
name | string | Profile command name. |
description | string | |
type | string | query, write, or property. |
parameters | repeated CommandParameter | |
returns_data | bool | True for queries. |
is_dangerous | bool | Surface a confirmation in UIs. |
return_type | string | float, string, int, array, binary, bool, vector. |
unit | string | |
is_streamable | bool | Eligible for StreamMeasurement. |
CommandParameter
Section titled “CommandParameter”| Field | Type | Notes |
|---|---|---|
name | string | |
description | string | |
type | ParameterType | |
required | bool | |
default_value | string | Stringified default. |
enum_values | repeated string | Populated when type == ENUM. |
unit | string |
SequenceCapability
Section titled “SequenceCapability”| Field | Type | Notes |
|---|---|---|
name | string | Sequence name from the profile. |
description | string | |
params | repeated string | Parameter names. Schema/units belong to the underlying step parameters. |
SCPI methods
Section titled “SCPI methods”SendCommand (unary)
Section titled “SendCommand (unary)”Send a raw SCPI string to a single instrument and return its response.
SendCommandRequest:
| Field | Type | Notes |
|---|---|---|
command_id | string | Caller-chosen identifier echoed back in the response. |
scpi_command | string | The SCPI string. |
instrument_id | string | Target instrument. |
timeout_ms | int32 | 0 = use the profile/settings default. |
SendCommandResponse:
| Field | Type | Notes |
|---|---|---|
command_id | string | |
response | string | Empty on writes. |
error | string | Non-empty on failure. |
status | string | completed or error. |
execution_time_ms | int64 |
StreamCommands (bidi)
Section titled “StreamCommands (bidi)”Bidirectional stream of SendCommandRequest / SendCommandResponse. Useful for high-throughput batches where round-trip latency dominates.
Discovery methods
Section titled “Discovery methods”ListInstruments (unary)
Section titled “ListInstruments (unary)”Returns every instrument currently known to the daemon.
ListInstrumentsRequest.filter (string, optional) is matched against instrument_class or status. ListInstrumentsResponse carries instruments and the daemon’s edge_id.
GetInstrument (unary)
Section titled “GetInstrument (unary)”Look up a single instrument by instrument_id. Returns the full Instrument (including capabilities).
ScanInstruments (unary)
Section titled “ScanInstruments (unary)”Triggers an immediate discovery sweep and returns instruments newly found this scan.
Profile methods
Section titled “Profile methods”GetCapabilities (unary)
Section titled “GetCapabilities (unary)”Returns InstrumentCapabilities per matched instrument. Filter by instrument_id or instrument_class. The response also carries the daemon’s edge_id alongside capabilities. Each entry carries:
| Field | Type | Notes |
|---|---|---|
instrument_id | string | |
has_profile | bool | False = raw SCPI only. |
profile_key | string | |
manufacturer, model, instrument_class | string | |
commands | repeated CommandCapability | |
sequences | repeated SequenceCapability | |
settings | map<string, string> | E.g. timeout_ms, opc_query. |
ExecuteCommand (unary)
Section titled “ExecuteCommand (unary)”Run a named command from a profile. Parameters are key/value strings; the daemon coerces and validates per the profile.
ExecuteCommandRequest:
| Field | Type | Notes |
|---|---|---|
command_id | string | |
instrument_id | string | |
command_name | string | Profile-defined name. |
parameters | map<string, string> | |
is_query | bool | For property commands: true = getter. |
timeout_ms | int32 |
ExecuteCommandResponse:
| Field | Type | Notes |
|---|---|---|
command_id | string | |
success | bool | |
data | string | Scalar result. |
error_message | string | |
execution_time_ms | int64 | |
scpi_command | string | The SCPI that was actually sent. |
vector_data | VectorData | Set when the return type is vector. |
ExecuteSequence (unary)
Section titled “ExecuteSequence (unary)”Runs a multi-step sequence (e.g. an IV sweep) defined in the profile. The daemon executes every step under the per-instrument lock; the network is unloaded for the duration of the run.
ExecuteSequenceRequest:
| Field | Type | Notes |
|---|---|---|
sequence_id | string | Caller-chosen identifier echoed in the response. |
instrument_id | string | |
sequence_name | string | |
parameters | map<string, string> | |
timeout_ms | int32 | Whole-sequence timeout. |
ExecuteSequenceResponse:
| Field | Type | Notes |
|---|---|---|
sequence_id | string | |
result | string | Captured value defined by the profile’s returns: field. |
error | string | |
status | string | completed or error. |
execution_time_ms | int64 | |
steps_executed | repeated string | SCPI commands actually sent, in order. |
Streaming
Section titled “Streaming”StreamMeasurement (server-streaming)
Section titled “StreamMeasurement (server-streaming)”Polls a profile command at a fixed cadence and emits a stream of MeasurementDataPoint.
StreamMeasurementRequest:
| Field | Type | Notes |
|---|---|---|
stream_id | string | Used by StopStream. |
instrument_id | string | |
command_name | string | Must be marked is_streamable in the profile. |
interval_ms | int32 | Minimum 100. |
timeout_ms | int32 | 0 = run until StopStream. |
parameters | map<string, string> | Optional. |
MeasurementDataPoint:
| Field | Type | Notes |
|---|---|---|
stream_id | string | |
value | double | Primary scalar. |
timestamp_ms | int64 | Unix ms. |
unit | string | |
error | string | |
status | string | ok, error, stopped. |
values | map<string, double> | Multi-value measurements. |
vector_data | VectorData | Waveform/curve data. |
VectorData
Section titled “VectorData”| Field | Type | Notes |
|---|---|---|
y_data | bytes | Raw binary samples. |
y_dtype | string | float32, int16, int8, … |
y_length | int32 | |
x_start | double | |
x_increment | double | |
x_unit | string | |
y_unit | string | |
x_name | string | |
y_scale | double | |
y_offset | double |
StopStream (unary)
Section titled “StopStream (unary)”Cancels an active stream by stream_id. Idempotent. StopStreamResponse returns a single success: bool.
Status & health
Section titled “Status & health”GetStatus (unary)
Section titled “GetStatus (unary)”Returns EdgeStatus:
| Field | Type | Notes |
|---|---|---|
edge_id | string | |
hostname | string | |
status | EdgeStatusCode | |
instrument_count | int32 | |
uptime_seconds | int64 | |
version | string | |
os_info | string | linux/amd64, windows/amd64, … |
cpu_usage | double | 0..1 |
memory_usage | double | 0..1 |
Ping (unary)
Section titled “Ping (unary)”Lightweight liveness check. Both request and response carry a google.protobuf.Timestamp for round-trip measurement.
Registration
Section titled “Registration”Used by the Go supervisor — not normally invoked by user clients.
RegisterEdge (unary)
Section titled “RegisterEdge (unary)”RegisterEdgeRequest carries edge_id, hostname, instruments, tailscale_ip, grpc_port, ws_port, and free-form metadata. RegisterEdgeResponse returns success, message, and assigned_edge_id.
Heartbeat (unary)
Section titled “Heartbeat (unary)”HeartbeatRequest carries edge_id, instrument_count, cpu_usage, memory_usage. HeartbeatResponse returns acknowledged, server_timestamp_ms (for clock sync), and a config_updates map of pending server-side config changes.
SDK relay
Section titled “SDK relay”ProxySDKCall (unary)
Section titled “ProxySDKCall (unary)”Forwards a vendor-SDK Python method call to the edge for instruments without a YAML profile.
ProxySDKCallRequest:
| Field | Type | Notes |
|---|---|---|
call_id | string | |
instrument_id | string | |
module | string | E.g. MultiPyVu. |
method | string | Method or obj.method path. |
args | repeated google.protobuf.Value | |
kwargs | map<string, google.protobuf.Value> | |
timeout_ms | int32 |
ProxySDKCallResponse:
| Field | Type | Notes |
|---|---|---|
call_id | string | |
success | bool | |
result | google.protobuf.Value | |
error_message | string | |
execution_time_ms | int64 |
Sweeps
Section titled “Sweeps”StartSweep (unary)
Section titled “StartSweep (unary)”Begins a long-running ramp on the edge. Continues even if the client drops.
StartSweepRequest:
| Field | Type | Notes |
|---|---|---|
instrument_id | string | |
command_name | string | The profile command to ramp. Commands marked requires_sweep in the profile must use this RPC instead of ExecuteCommand. |
target_value | double | |
sweep_rate | double | |
extra_parameters | map<string, string> |
StartSweepResponse returns sweep_id, accepted, and an optional error.
GetSweepStatus (unary)
Section titled “GetSweepStatus (unary)”Returns SweepStatusResponse with status (sweeping, completed, error, aborted), current_value, target_value, sweep_rate, and error.
StopSweep (unary)
Section titled “StopSweep (unary)”Aborts (StopSweepResponse.status == "stopped") or holds ("holding") the sweep.
Driver profile management
Section titled “Driver profile management”DeployProfile (unary)
Section titled “DeployProfile (unary)”Pushes a YAML profile to the daemon’s PROFILE_DIR. Re-loads it without restarting.
DeployProfileRequest:
| Field | Type | Notes |
|---|---|---|
profile_name | string | E.g. eurotherm_3504. |
profile_yaml | string | Full file content. |
protocol | string | "modbus", "hart", etc. |
DeployProfileResponse:
| Field | Type | Notes |
|---|---|---|
success | bool | |
error_message | string | |
register_count | int32 | Useful for Modbus/CAN — number of register entries the profile defines. |
RemoveProfile (unary)
Section titled “RemoveProfile (unary)”Removes a deployed profile by profile_name and protocol. RemoveProfileResponse returns success: bool and error_message: string.
ListProfiles (unary)
Section titled “ListProfiles (unary)”Returns every deployed profile as a DriverProfileSummary:
| Field | Type | Notes |
|---|---|---|
name, protocol, manufacturer, model, description | string | |
register_count | int32 | For Modbus/CAN profiles. |
active | bool | Currently mapped to a connected instrument. |
ConnectModbusInstrument (unary)
Section titled “ConnectModbusInstrument (unary)”Deploy a Modbus profile and open a connection in one call.
ConnectModbusInstrumentRequest:
| Field | Type | Notes |
|---|---|---|
profile_name | string | Use a previously deployed profile. |
profile_yaml | string | Or send the YAML inline. |
protocol | string | |
instrument_id | string | Caller-chosen ID. |
transport_uri | string | E.g. rtu:///dev/ttyUSB0 or tcp://192.168.1.10:502. |
slave_id | int32 |
ConnectModbusInstrumentResponse:
| Field | Type | Notes |
|---|---|---|
success | bool | |
error_message | string | |
instrument_id | string | Echoed back so callers can confirm the assigned ID. |
register_count | int32 | |
commands | repeated string | Names of the commands the deployed profile exposes — handy for telling the user what’s available without a follow-up GetCapabilities call. |
DisconnectInstrument (unary)
Section titled “DisconnectInstrument (unary)”Closes a protocol-driver instrument by instrument_id. DisconnectInstrumentResponse returns success: bool and error_message: string.
Utility
Section titled “Utility”GetWebcamSnapshot (unary)
Section titled “GetWebcamSnapshot (unary)”Fetches a JPEG from a LAN camera reachable from the edge. GetWebcamSnapshotRequest.camera_url is e.g. http://192.168.1.100/snapshot.cgi. GetWebcamSnapshotResponse carries image_data (bytes), timestamp_ms, content_type, and error.