Skip to content

Protobuf Reference

The following section is auto-generated from the Protobuf files listed in the Sonardyne API GitHub Repo.

Algorithms

AHRS Algorithm

AhrsAlgorithmCommandReset sonardyne/api/algorithms/ahrs_algorithm/ahrs_algorithm_command_reset.proto

AhrsAlgorithmCommandReset resets the specified AHRS algorithm to its initial state. Use this command when re-initialisation or recovery is required after configuration changes, sensor faults, or other state disruptions.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of an AHRS algorithm.

Example

Example code: ahrs_algorithm_command_reset.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.AhrsAlgorithmCommandReset()))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.AhrsAlgorithmCommandReset()))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.AhrsAlgorithmCommandReset()))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.command_service.SendCommandRequest",
            "command": {
                "@type": "type.googleapis.com/sonardyne.api.algorithms.ahrs_algorithm.AhrsAlgorithmCommandReset"
            }
        }
    ]
}, indent=4).encode())

AhrsAlgorithmConfiguration sonardyne/api/algorithms/ahrs_algorithm/ahrs_algorithm_configuration.proto

AhrsAlgorithmConfiguration provides coarse configuration parameters for an AHRS module. Used to supply approximate geographic context that can improve initialisation and algorithm performance.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier for this AHRS module instance.
coarse_position_latitude_radians double optional Approximate latitude of the device's position, in radians.
coarse_position_longitude_radians double optional Approximate longitude of the device's position, in radians.

Example

Example code: ahrs_algorithm_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.AhrsAlgorithmConfiguration(
        coarse_position_latitude_radians=0.1,
        coarse_position_longitude_radians=0.2
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.AhrsAlgorithmConfiguration(
        coarse_position_latitude_radians=0.1,
        coarse_position_longitude_radians=0.2
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.AhrsAlgorithmConfiguration(
        coarse_position_latitude_radians=0.1,
        coarse_position_longitude_radians=0.2
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.algorithms.ahrs_algorithm.AhrsAlgorithmConfiguration",
                "coarsePositionLatitudeRadians": 0.1,
                "coarsePositionLongitudeRadians": 0.2
            }
        }
    ]
}, indent=4).encode())

DVL Algorithm

AdcpVelocityLimit sonardyne/api/algorithms/dvl_algorithm/adcp_velocity_limit.proto

AdcpVelocityLimit defines the selectable velocity limit mode for an ADCP and lists all valid options supported by the device.

Field Type Label Description
value AdcpVelocityLimit.AdcpVelocityLimitEnum Selected velocity limit setting.
valid_values AdcpVelocityLimit.AdcpVelocityLimitEnum repeated All valid options for the velocity limit.

AdcpVelocityLimit.AdcpVelocityLimitEnum sonardyne/api/algorithms/dvl_algorithm/adcp_velocity_limit.proto

Name Number Description
ADCP_VELOCITY_LIMIT_ENUM_UNSPECIFIED 0 Unspecified velocity limit.
ADCP_VELOCITY_LIMIT_ENUM_STANDARD 1 Standard velocity limit.
ADCP_VELOCITY_LIMIT_ENUM_HIGH 2 High velocity limit.

DvlAdcpParameters sonardyne/api/algorithms/dvl_algorithm/dvl_adcp_parameters.proto

DvlAdcpParameters provides configuration for DVL and ADCP operation, including measurement cell settings, ping averaging, ADCP velocity limits, and DVL water track parameters.

Field Type Label Description
number_of_cells sonardyne.api.common.bounded_values.BoundedUInt32 optional Number of vertical measurement bins used in profiling.
preferred_cell_width_metres sonardyne.api.common.bounded_values.BoundedDouble optional Desired size of each measurement cell, in metres.
pings_to_average sonardyne.api.common.bounded_values.BoundedUInt32 optional Number of pings averaged to produce one velocity profile.
dvl_adcp_ping_ratio sonardyne.api.common.bounded_values.BoundedUInt32 optional Ratio of DVL to ADCP pings when both modes operate together.
velocity_limit AdcpVelocityLimit optional Velocity range setting for ADCP measurements.
water_track_parameters DvlWaterTrackParameters optional Water track parameters specific to the DVL.

DvlAlgorithmConfiguration sonardyne/api/algorithms/dvl_algorithm/dvl_algorithm_configuration.proto

DvlAlgorithmConfiguration provides configuration for a DVL algorithm, including update rate, Doppler mode, input trigger settings, and ADCP-related parameters.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier for this DVL algorithm instance.
dvl_rate DvlRate optional Maximum update rate of the DVL algorithm. Ignored if input trigger edge set to rising or falling.
dvl_mode DvlMode optional Operating mode of the DVL (e.g., DVL, ADCP, or combined).
input_trigger_parameters DvlInputTriggerParameters optional Input trigger configuration controlling measurement timing.
adcp_parameters DvlAdcpParameters optional ADCP-related parameters for ADCP or DVL+ADCP operation.

Example

Example code: dvl_algorithm_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.DvlAlgorithmConfiguration(
        dvl_rate=son.DvlRate(value=son.DvlRate.DvlRateEnum.DVL_RATE_ENUM_FIXED_5HZ),
        dvl_mode=son.DvlMode(value=son.DvlMode.DVL_MODE_ENUM_DVL),
        adcp_parameters=son.DvlAdcpParameters(
            number_of_cells=son.BoundedUInt32(value=100),
            preferred_cell_width_metres=son.BoundedDouble(value=0.1),
            pings_to_average=son.BoundedUInt32(value=10),
            dvl_adcp_ping_ratio=son.BoundedUInt32(value=10),
            velocity_limit=son.AdcpVelocityLimit(value=son.AdcpVelocityLimit.ADCP_VELOCITY_LIMIT_ENUM_STANDARD)
        ),
        input_trigger_parameters=son.DvlInputTriggerParameters(
            input_trigger_port=son.TriggerPortReference(set_uid=son.UniqueID(name="Trigger A1")),
            input_trigger_edge=son.TRIGGER_EDGE_RISING,
            input_trigger_delay_seconds=son.BoundedDouble(value=0.1)
        )
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.DvlAlgorithmConfiguration(
        dvl_rate=son.DvlRate(value=son.DvlRate.DvlRateEnum.DVL_RATE_ENUM_FIXED_5HZ),
        dvl_mode=son.DvlMode(value=son.DvlMode.DVL_MODE_ENUM_DVL),
        adcp_parameters=son.DvlAdcpParameters(
            number_of_cells=son.BoundedUInt32(value=100),
            preferred_cell_width_metres=son.BoundedDouble(value=0.1),
            pings_to_average=son.BoundedUInt32(value=10),
            dvl_adcp_ping_ratio=son.BoundedUInt32(value=10),
            velocity_limit=son.AdcpVelocityLimit(value=son.AdcpVelocityLimit.ADCP_VELOCITY_LIMIT_ENUM_STANDARD)
        ),
        input_trigger_parameters=son.DvlInputTriggerParameters(
            input_trigger_port=son.TriggerPortReference(set_uid=son.UniqueID(name="Trigger A1")),
            input_trigger_edge=son.TRIGGER_EDGE_RISING,
            input_trigger_delay_seconds=son.BoundedDouble(value=0.1)
        )
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.DvlAlgorithmConfiguration(
        dvl_rate=son.DvlRate(value=son.DvlRate.DvlRateEnum.DVL_RATE_ENUM_FIXED_5HZ),
        dvl_mode=son.DvlMode(value=son.DvlMode.DVL_MODE_ENUM_DVL),
        adcp_parameters=son.DvlAdcpParameters(
            number_of_cells=son.BoundedUInt32(value=100),
            preferred_cell_width_metres=son.BoundedDouble(value=0.1),
            pings_to_average=son.BoundedUInt32(value=10),
            dvl_adcp_ping_ratio=son.BoundedUInt32(value=10),
            velocity_limit=son.AdcpVelocityLimit(value=son.AdcpVelocityLimit.ADCP_VELOCITY_LIMIT_ENUM_STANDARD)
        ),
        input_trigger_parameters=son.DvlInputTriggerParameters(
            input_trigger_port=son.TriggerPortReference(set_uid=son.UniqueID(name="Trigger A1")),
            input_trigger_edge=son.TRIGGER_EDGE_RISING,
            input_trigger_delay_seconds=son.BoundedDouble(value=0.1)
        )
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.algorithms.dvl_algorithm.DvlAlgorithmConfiguration",
                "dvlRate": {
                    "value": "DVL_RATE_ENUM_FIXED_5HZ"
                },
                "dvlMode": {
                    "value": "DVL_MODE_ENUM_DVL"
                },
                "inputTriggerParameters": {
                    "inputTriggerPort": {
                        "setUid": {
                            "name": "Trigger A1"
                        }
                    },
                    "inputTriggerEdge": "TRIGGER_EDGE_RISING",
                    "inputTriggerDelaySeconds": {
                        "value": 0.1
                    }
                },
                "adcpParameters": {
                    "numberOfCells": {
                        "value": 100
                    },
                    "preferredCellWidthMetres": {
                        "value": 0.1
                    },
                    "pingsToAverage": {
                        "value": 10
                    },
                    "dvlAdcpPingRatio": {
                        "value": 10
                    },
                    "velocityLimit": {
                        "value": "ADCP_VELOCITY_LIMIT_ENUM_STANDARD"
                    }
                }
            }
        }
    ]
}, indent=4).encode())

DvlInputTriggerParameters sonardyne/api/algorithms/dvl_algorithm/dvl_input_trigger_parameters.proto

DvlInputTriggerParameters provides configuration for the input trigger controlling DVL acoustic transmissions, including the trigger port and any transmission delay.

Field Type Label Description
input_trigger_port sonardyne.api.common.ports.trigger_port.TriggerPortReference optional Port used to trigger the DVL's acoustic transmission.
input_trigger_edge sonardyne.api.common.ports.trigger_port.TriggerEdge optional Trigger edge to listen for.
input_trigger_delay_seconds sonardyne.api.common.bounded_values.BoundedDouble optional Delay (in seconds) before transmitting after a trigger pulse.

DvlMode sonardyne/api/algorithms/dvl_algorithm/dvl_mode.proto

DvlMode provides the configuration for the Doppler operating mode of the device.

Field Type Label Description
value DvlMode.DvlModeEnum Selected DVL operating mode.
valid_values DvlMode.DvlModeEnum repeated List of valid modes supported by the device or configuration.

DvlMode.DvlModeEnum sonardyne/api/algorithms/dvl_algorithm/dvl_mode.proto

Name Number Description
DVL_MODE_ENUM_UNSPECIFIED 0 Unspecified DVL mode.
DVL_MODE_ENUM_DVL 1 Standard DVL mode for velocity measurements.
DVL_MODE_ENUM_ADCP 2 Acoustic Doppler Current Profiler (ADCP) mode for water current profiling.
DVL_MODE_ENUM_DVL_ADCP 3 Combined DVL and ADCP operation mode.

DvlRate sonardyne/api/algorithms/dvl_algorithm/dvl_rate.proto

DvlRate provides configuration for the DVL update rate, including the selected scheduling rate and all supported rate options.

Field Type Label Description
value DvlRate.DvlRateEnum Selected DVL scheduling rate.
valid_values DvlRate.DvlRateEnum repeated List of all supported DVL rate options.

DvlRate.DvlRateEnum sonardyne/api/algorithms/dvl_algorithm/dvl_rate.proto

Name Number Description
DVL_RATE_ENUM_UNSPECIFIED 0 Unspecified DVL rate.
DVL_RATE_ENUM_MAX_RATE 1 Operate at the maximum supported update rate.
DVL_RATE_ENUM_FIXED_1HZ 2 Fixed 1 Hz update rate.
DVL_RATE_ENUM_FIXED_2HZ 3 Fixed 2 Hz update rate.
DVL_RATE_ENUM_FIXED_5HZ 4 Fixed 5 Hz update rate.
DVL_RATE_ENUM_FIXED_10HZ 5 Fixed 10 Hz update rate.
DVL_RATE_ENUM_FIXED_15HZ 6 Fixed 15 Hz update rate.
DVL_RATE_ENUM_FIXED_20HZ 7 Fixed 20 Hz update rate.

DvlWaterTrackParameters sonardyne/api/algorithms/dvl_algorithm/dvl_water_track_parameters.proto

DvlWaterTrackParameters provides configuration for DVL water tracking, including the starting depth of the water track and the number of measurement cells.

Field Type Label Description
start_depth_from_dvl_metres sonardyne.api.common.bounded_values.BoundedDouble optional Distance from the device at which the water tracking cell starts.
number_of_cells sonardyne.api.common.bounded_values.BoundedUInt32 optional Number of ADCP cells that water track data is collected from, starting in metres.

INS Algorithm

InsAlgorithmCommandReset sonardyne/api/algorithms/ins_algorithm/ins_algorithm_command_reset.proto

InsAlgorithmCommandReset provides a command to reset an INS algorithm, identified by its unique ID.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of an INS algorithm.

Example

Example code: ins_algorithm_command_reset.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.InsAlgorithmCommandReset()))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.InsAlgorithmCommandReset()))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.InsAlgorithmCommandReset()))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.command_service.SendCommandRequest",
            "command": {
                "@type": "type.googleapis.com/sonardyne.api.algorithms.ins_algorithm.InsAlgorithmCommandReset"
            }
        }
    ]
}, indent=4).encode())

InsAlgorithmConfiguration sonardyne/api/algorithms/ins_algorithm/ins_algorithm_configuration.proto

InsAlgorithmConfiguration provides configuration for an INS algorithm, including enabling or disabling aiding sources such as GNSS, SUSBL, and XPOS.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier for this INS algorithm instance.
is_gnss_enabled bool optional True if GNSS aiding is enabled in the INS.
is_susbl_enabled bool optional True if SUSBL aiding is enabled in the INS.
is_xpos_enabled bool optional True if XPOS aiding is enabled in the INS.

Example

Example code: ins_algorithm_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.InsAlgorithmConfiguration(
        is_gnss_enabled=True,
        is_xpos_enabled=False
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.InsAlgorithmConfiguration(
        is_gnss_enabled=True,
        is_xpos_enabled=False
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.InsAlgorithmConfiguration(
        is_gnss_enabled=True,
        is_xpos_enabled=False
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.algorithms.ins_algorithm.InsAlgorithmConfiguration",
                "isGnssEnabled": true,
                "isXposEnabled": false
            }
        }
    ]
}, indent=4).encode())

Common

Bounded Values

BoundedDouble sonardyne/api/common/bounded_values/bounded_double.proto

BoundedDouble represents a double-precision floating-point value with defined minimum and maximum bounds. The min and max fields are read-only and provide the allowed range for the value.

Field Type Label Description
value double Value.
min double Minimum value (read only).
max double Maximum value (read only).

BoundedFixed32 sonardyne/api/common/bounded_values/bounded_fixed32.proto

BoundedFixed32 represents a fixed32 value with defined minimum and maximum bounds. The min and max fields are read-only and provide the allowed range for the value.

Field Type Label Description
value fixed32 Value.
min fixed32 Minimum value (read only).
max fixed32 Maximum value (read only).

BoundedFixed64 sonardyne/api/common/bounded_values/bounded_fixed64.proto

BoundedFixed64 represents a fixed64 value with defined minimum and maximum bounds. The min and max fields are read-only and provide the allowed range for the value.

Field Type Label Description
value fixed64 Value.
min fixed64 Minimum value (read only).
max fixed64 Maximum value (read only).

BoundedFloat sonardyne/api/common/bounded_values/bounded_float.proto

BoundedFloat represents a single-precision floating-point value with defined minimum and maximum bounds. The min and max fields are read-only and provide the allowed range for the value.

Field Type Label Description
value float Value.
min float Minimum value (read only).
max float Maximum value (read only).

BoundedInt32 sonardyne/api/common/bounded_values/bounded_int32.proto

BoundedInt32 represents a 32-bit integer value with defined minimum and maximum bounds. The min and max fields are read-only and provide the allowed range for the value.

Field Type Label Description
value int32 Value.
min int32 Minimum value (read only).
max int32 Maximum value (read only).

BoundedInt64 sonardyne/api/common/bounded_values/bounded_int64.proto

BoundedInt64 represents a 64-bit integer value with defined minimum and maximum bounds. The min and max fields are read-only and provide the allowed range for the value.

Field Type Label Description
value int64 Value.
min int64 Minimum value (read only).
max int64 Maximum value (read only).

BoundedSFixed32 sonardyne/api/common/bounded_values/bounded_sfixed32.proto

BoundedSFixed32 represents a signed 32-bit fixed-point value with defined minimum and maximum bounds. The min and max fields are read-only and provide the allowed range for the value.

Field Type Label Description
value sfixed32 Value.
min sfixed32 Minimum value (read only).
max sfixed32 Maximum value (read only).

BoundedSFixed64 sonardyne/api/common/bounded_values/bounded_sfixed64.proto

BoundedSFixed64 represents a signed 64-bit fixed-point value with defined minimum and maximum bounds. The min and max fields are read-only and provide the allowed range for the value.

Field Type Label Description
value sfixed64 Value.
min sfixed64 Minimum value (read only).
max sfixed64 Maximum value (read only).

BoundedSInt32 sonardyne/api/common/bounded_values/bounded_sint32.proto

BoundedSInt32 represents a signed 32-bit integer value with defined minimum and maximum bounds. The min and max fields are read-only and provide the allowed range for the value.

Field Type Label Description
value sint32 Value.
min sint32 Minimum value (read only).
max sint32 Maximum value (read only).

BoundedSInt64 sonardyne/api/common/bounded_values/bounded_sint64.proto

BoundedSInt64 represents a signed 64-bit integer value with defined minimum and maximum bounds. The min and max fields are read-only and provide the allowed range for the value.

Field Type Label Description
value sint64 Value.
min sint64 Minimum value (read only).
max sint64 Maximum value (read only).

BoundedUInt32 sonardyne/api/common/bounded_values/bounded_uint32.proto

BoundedUInt32 represents an unsigned 32-bit integer value with defined minimum and maximum bounds. The min and max fields are read-only and provide the allowed range for the value.

Field Type Label Description
value uint32 Value.
min uint32 Minimum value (read only).
max uint32 Maximum value (read only).

BoundedUInt64 sonardyne/api/common/bounded_values/bounded_uint64.proto

BoundedUInt64 represents an unsigned 64-bit integer value with defined minimum and maximum bounds. The min and max fields are read-only and provide the allowed range for the value.

Field Type Label Description
value uint64 Value.
min uint64 Minimum value (read only).
max uint64 Maximum value (read only).

Data

DataDirection sonardyne/api/common/data/data_direction.proto

DataDirection enumerates the direction of data relative to a port or module. It indicates whether data is incoming, outgoing, or unspecified.

Name Number Description
DATA_DIRECTION_UNSPECIFIED 0 Unspecified direction.
DATA_DIRECTION_INPUT 1 Data is incoming to the system or module.
DATA_DIRECTION_OUTPUT 2 Data is outgoing from the system or module.

DataEncoding sonardyne/api/common/data/data_encoding.proto

DataEncoding represents a method of byte encoding.

Name Number Description
DATA_ENCODING_UNSPECIFIED 0 Port encoding unspecified.
DATA_ENCODING_NONE 1 No port encoding applied.
DATA_ENCODING_COBS 2 Consistent Overhead Byte Stuffing applied (COBS).

Envelope

RequestEnvelope sonardyne/api/common/envelope/request_envelope.proto

RequestEnvelope contains request messages. For each RequestEnvelope sent, a corresponding ResponseEnvelope will be returned. The corresponding ResponseEnvelope will contain an equal number of responses to the number of requests in the corresponding RequestEnvelope. These corresponding requests and responses will listed in the same order. Matching RequestEnvelope and ResponseEnvelope messages can be paired by their uid values.

Field Type Label Description
uid uint32 Unique identifier.
timestamp sonardyne.api.common.Timestamp Timestamp of the request.
requests google.protobuf.Any repeated Message ending in "Request".

ResponseEnvelope sonardyne/api/common/envelope/response_envelope.proto

ResponseEnvelope is returned as a response to sent RequestEnvelope messages. The ResponseEnvelope contains an equal number of responses to the number of requests in the corresponding RequestEnvelope. These corresponding requests and responses will listed in the same order. Matching RequestEnvelope and ResponseEnvelope messages can be paired by their uid values.

Field Type Label Description
uid uint32 Allows identification of the corresponding RequestEnvelope.
timestamp sonardyne.api.common.Timestamp Timestamp of the request.
responses google.protobuf.Any repeated Response messages.

Installation

LeverArms sonardyne/api/common/installation/lever_arms.proto

LeverArms defines offsets from the central reference point along the forward, starboard, and down axes. All values are expressed in metres.

Field Type Label Description
forward_metres double Lever arm offset along the forward axis in metres.
starboard_metres double Lever arm offset along the starboard axis in metres.
down_metres double Lever arm offset along the down axis in metres.

MountingAngles sonardyne/api/common/installation/mounting_angles.proto

MountingAngles defines the rotational offsets of a device relative to the vessel reference frame. All angles are in radians and follow a clockwise rotation convention about each axis (commonly known as right-hand rule). Rotation is applied using the Euler ZYX convention, where rotations are applied in the following order: 1. By the heading angle about the Z (or "down") axis of the reference frame. 2. By the pitch angle about the resulting Y (or "starboard") axis. 3. By the roll angle about the resulting X (or "forward") axis.

Field Type Label Description
roll_radians double Clockwise rotation angle around the forward axis in radians (+ve starboard down).
pitch_radians double Clockwise rotation angle around the starboard axis in radians (+ve pitch up).
heading_radians double Clockwise rotation angle around the down axis in radians.

MatchingCriteria sonardyne/api/common/matching_criteria.proto

MatchingCriteria allows messages to be matched and filtered based on their type name and unique ID.

Field Type Label Description
match_type_name_suffix string Matches against type names ending in this suffix.
exclude_type_name_suffixes string repeated Ignores type names ending in these suffixes.
match_uids UniqueID repeated Matches against any messages containing these uids.
exclude_uids UniqueID repeated Ignores messages containing these uids.

Maths

AngularVelocity sonardyne/api/common/maths/angular_velocity.proto

AngularVelocity represents rotational rates about each body axis. All values are expressed in radians per second. The angular velocities are measured in the body frame (intrinsic rotations) and follow the ZYX (Yaw-Pitch-Roll) Euler angle convention.

Field Type Label Description
alpha_radians_per_second double Roll rate around the X-axis in radians per second.
beta_radians_per_second double Pitch rate around the Y-axis in radians per second.
gamma_radians_per_second double Yaw rate around the Z-axis in radians per second.

Quaternion sonardyne/api/common/maths/quaternion.proto

Quaternion represents orientation using a four-component unit quaternion. The quaternion consists of one scalar component (w) and a three-component vector part (x, y, z), suitable for expressing 3D rotations without gimbal lock.

Field Type Label Description
w double Scalar component of the quaternion.
x double X component of the vector part.
y double Y component of the vector part.
z double Z component of the vector part.

Vector3d sonardyne/api/common/maths/vector_3d.proto

A three-element vector of doubles.

Field Type Label Description
x double optional X field of the vector.
y double optional Y field of the vector.
z double optional Z field of the vector.

GeographicCoordinates sonardyne/api/common/navigation/geographic_coordinates.proto

GeographicCoordinates represents a position on the Earth's surface. Both latitude and longitude are expressed in radians.

Field Type Label Description
latitude_radians double Latitude in radians.
longitude_radians double Longitude in radians.

HorizontalPositionErrorEllipse sonardyne/api/common/navigation/horizontal_position_error_ellipse.proto

HorizontalPositionErrorEllipse describes the 2D dispersion of a horizontal position estimate using an error ellipse aligned to major and minor axes. The ellipse orientation is expressed counter-clockwise from north.

Field Type Label Description
major_metres double 1σ of the position error in the direction of the major axis (north when orientation_radians=0).
minor_metres double 1σ of the position error in the direction of the minor axis (east when orientation_radians=0).
orientation_radians double Counter-clockwise angle between the major axis and north.

HorizontalResidual sonardyne/api/common/navigation/horizontal_residual.proto

Field Type Label Description
residual_latitude_radians double Residual latitude in radians.
residual_longitude_radians double Residual longitude in radians.

HorizontalVelocityErrorEllipse sonardyne/api/common/navigation/horizontal_velocity_error_ellipse.proto

HorizontalVelocityErrorEllipse describes the 2D dispersion of a horizontal velocity estimate using an error ellipse aligned to major and minor axes. The ellipse orientation is expressed counter-clockwise from north.

Field Type Label Description
major_metres_per_second double 1σ of the velocity error in the direction of the major axis (north when orientation_radians=0).
minor_metres_per_second double 1σ of the velocity error in the direction of the minor axis (east when orientation_radians=0).
orientation_radians double Counter-clockwise angle between the major axis and north.

NavigationData sonardyne/api/common/navigation/navigation_data.proto

NavigationData provides a complete snapshot of the navigation solution at a specific time, including position, velocity, orientation, and their associated uncertainties. It combines georeferenced coordinates, error metrics, kinematic quantities, and attitude information into a single structured dataset.

Field Type Label Description
time_of_validity sonardyne.api.common.Timestamp Timestamp when the navigation data is valid.
horizontal_position GeographicCoordinates Horizontal position of the measurement source as a set of geographic coordinates.
horizontal_position_error HorizontalPositionErrorEllipse Error of the horizontal position in metres.
depth_metres double Vertical position of the measurement source as metres of depth below the seabed.
depth_error_metres double 1σ of vertical position error in metres.
velocity NorthEastDownVelocity Velocity of the measurement source in metres per second.
horizontal_velocity_error HorizontalVelocityErrorEllipse Velocity error in metres per second.
vertical_velocity_error_metres_per_second double 1σ of vertical velocity error in metres per second.
orientation_roll_pitch_heading RollPitchHeading Orientation as roll, pitch and heading angles in radians.
orientation_quaternion sonardyne.api.common.maths.Quaternion Orientation as a quaternion.
heading_error_radians double 1σ of heading error in radians.
acceleration NorthEastDownAcceleration Kinematic acceleration in metres per second squared.
angular_velocity sonardyne.api.common.maths.AngularVelocity Angular velocity in radians per second.

NorthEastDownAcceleration sonardyne/api/common/navigation/north_east_down_acceleration.proto

NorthEastDownAcceleration represents linear acceleration resolved in the local North-East-Down (NED) coordinate frame. Each component specifies acceleration along one of the orthogonal NED axes.

Field Type Label Description
north_metres_per_second_squared double Acceleration along the North axis in metres per second squared.
east_metres_per_second_squared double Acceleration along the East axis in metres per second squared.
down_metres_per_second_squared double Acceleration along the Down axis in metres per second squared.

NorthEastDownVelocity sonardyne/api/common/navigation/north_east_down_velocity.proto

NorthEastDownVelocity represents linear velocity resolved in the local North-East-Down (NED) coordinate frame. Each component specifies velocity along one of the orthogonal NED axes.

Field Type Label Description
north_metres_per_second double Velocity along the North axis in metres per second.
east_metres_per_second double Velocity along the East axis in metres per second.
down_metres_per_second double Velocity along the Down axis in metres per second.

NorthEastDownVelocityUncertainty sonardyne/api/common/navigation/north_east_down_velocity_uncertainty.proto

NorthEastDownVelocityUncertainty represents the uncertainty of a velocity resolved in the local North-East-Down (NED) coordinate frame. Each component specifies velocity uncertainty along one of the orthogonal NED axes.

Field Type Label Description
north_uncertainty_metres_per_second double 1σ of velocity uncertainty along the North axis in metres per second.
east_uncertainty_metres_per_second double 1σ of velocity uncertainty along the East axis in metres per second.
down_uncertainty_metres_per_second double 1σ of velocity uncertainty along the down axis in metres per second.

RollPitchHeading sonardyne/api/common/navigation/roll_pitch_heading.proto

RollPitchHeading represents an orientation measurement using roll, pitch, and heading angles. All angles are expressed in radians.

Field Type Label Description
roll_radians double Roll measurement in radians.
pitch_radians double Pitch measurement in radians.
heading_radians double Heading measurement in radians.

Ports

DataPortComms sonardyne/api/common/ports/data_port_comms.proto

DataPortComms represents a communication event on a data port. It includes the unique ID of the port, the timestamp of the event, the direction of the data relative to the port, and the data payload.

Field Type Label Description
uid sonardyne.api.common.UniqueID Id of the port to which the data originated or is destined.
timestamp sonardyne.api.common.Timestamp Timestamp when the data was received.
data_direction sonardyne.api.common.data.DataDirection Direction of the data relative to the port (Input for data received by the port, Output for data to be sent by the port).
data bytes Data payload.

DataPortReference sonardyne/api/common/ports/data_port_reference.proto

DataPortReference defines a reference to a data port, allowing selection from various types of ports using multiple options. The reference can select no port, a specific port by UniqueId, or any available port of a given type (Ethernet, Serial, or External Control). Read-only fields provide the actual referenced port information, if available.

Field Type Label Description
set_none bool Select no DataPortConfiguration.
set_uid sonardyne.api.common.UniqueID Select an EthernetPort, SerialPort, or ExternalControlPort by unique ID.
set_any_ethernet_port bool Select any available Ethernet Port.
set_any_serial_port bool Select any available Serial Port.
set_any_external_control_port bool Select any available External Control Port.
readonly_uid sonardyne.api.common.UniqueID optional Optional read-only unique ID of a set EthernetPort, SerialPort, or ExternalControlPort.
readonly_none_set bool If true, no data port set.
readonly_ethernet_port_reference ethernet_port.EthernetPort Contains the referenced EthernetPort (readonly).
readonly_serial_port_reference serial_port.SerialPort Contains the referenced SerialPort (readonly).
readonly_external_control_port_reference external_control_port.ExternalControlPort Contains the referenced ExternalControlPort (readonly).

Ethernet Port

EthernetPort sonardyne/api/common/ports/ethernet_port/ethernet_port.proto

EthernetPort defines the configuration of a single Ethernet port on the instrument. It includes a unique identifier, the source port number, a flag indicating whether COBS framing is enabled, and the port type, which can be a TCP server, TCP client, or UDP socket.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the ethernet port. These are unique and assigned by the system.
source_port uint32 Source port number for the ethernet port.
data_encoding sonardyne.api.common.data.DataEncoding Data encoding on this port, where inputs are decoded and outputs are encoded.
tcp_server TcpServerParameters TCP server parameters - present if the port is configured as a TCP server.
tcp_client TcpClientParameters TCP client parameters - present if the port is configured as a TCP client.
udp_socket UdpSocketParameters UDP socket parameters - present if the port is configured as a UDP socket.

EthernetPortReference sonardyne/api/common/ports/ethernet_port/ethernet_port_reference.proto

EthernetPortReference defines a reference to an Ethernet port using one of several selection options. It can select any port (lowest UniqueId), no port, or a specific port by its unique ID. The readonly_reference field contains the actual referenced EthernetPort, if available.

Field Type Label Description
set_any bool Select any EthernetPort (selects lowest uid).
set_none bool Select no EthernetPort.
set_uid sonardyne.api.common.UniqueID Select EthernetPort by uid.
readonly_none_set bool If true, no ethernet port set.
readonly_ethernet_port_reference EthernetPort Contains the referenced EthernetPort.

TcpClientParameters sonardyne/api/common/ports/ethernet_port/tcp_client_parameters.proto

TcpClientParameters defines the configuration for a TCP client port. It includes the IP address of the TCP server to which the client will connect.

Field Type Label Description
server_ip_address string IP address of the TCP server to connect to.

TcpServerParameters sonardyne/api/common/ports/ethernet_port/tcp_server_parameters.proto

TcpServerParameters defines the configuration for a TCP server port. It specifies the maximum number of simultaneous client connections allowed.

UdpSocketParameters sonardyne/api/common/ports/ethernet_port/udp_socket_parameters.proto

UdpSocketParameters defines the configuration for a UDP socket port. It specifies the destination IP address to which UDP packets will be sent.

Field Type Label Description
destination_ip_address string Destination IP address for the UDP socket.

External Control Port

ExternalControlPort sonardyne/api/common/ports/external_control_port/external_control_port.proto

ExternalControlPort defines a single external control port on the instrument. It includes a unique identifier assigned by the system.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the external control port. These are unique and assigned by the system.

Power Pass Port

PowerPassPort sonardyne/api/common/ports/power_pass_port/power_pass_port.proto

PowerPassPort defines a single power pass port on the instrument. It includes a unique identifier assigned by the system and the current state of the port (enabled, disabled, or tripped).

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the power pass port. These are unique and assigned by the system.
power_pass_state PowerPassPort.PowerPassState State of the power pass port (enabled, disabled or tripped).

PowerPassPort.PowerPassState sonardyne/api/common/ports/power_pass_port/power_pass_port.proto

PowerPassPort.PowerPassState enumerates the possible states of a power pass port. It indicates whether the port is enabled, disabled, tripped, or unspecified.

Name Number Description
POWER_PASS_STATE_UNSPECIFIED 0 Unspecified power pass state.
POWER_PASS_STATE_TRIPPED 1 Power pass port is tripped. Remove and reapply power to reset.
POWER_PASS_STATE_ENABLED 2 Power pass port is enabled.
POWER_PASS_STATE_DISABLED 3 Power pass port is disabled.

Serial Port

SerialPort sonardyne/api/common/ports/serial_port/serial_port.proto

SerialPort represents a physical serial port on the device.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the serial port. These are unique and assigned by the system.
baud_rate SerialPort.BaudRate Baud rate of the serial port.
data_encoding sonardyne.api.common.data.DataEncoding Data encoding on this port, where inputs are decoded and outputs are encoded.

SerialPort.BaudRate sonardyne/api/common/ports/serial_port/serial_port.proto

SerialPort.BaudRate enumerates the serial communication baud rates. It specifies the speed at which data is transmitted over a serial port.

Name Number Description
BAUD_RATE_UNSPECIFIED 0 Unspecified Baud rate.
BAUD_RATE_4800 1 4800 Baud.
BAUD_RATE_9600 2 9600 Baud.
BAUD_RATE_19200 3 19200 Baud.
BAUD_RATE_38400 4 38400 Baud.
BAUD_RATE_57600 5 57600 Baud.
BAUD_RATE_115200 6 115200 Baud.
BAUD_RATE_230400 7 230400 Baud.
BAUD_RATE_460800 8 460800 Baud.
BAUD_RATE_921600 9 921600 Baud.
BAUD_RATE_1000000 10 1000000 Baud.

SerialPortReference sonardyne/api/common/ports/serial_port/serial_port_reference.proto

SerialPortReference defines a reference to a serial port using one of several selection options. It can select any port (lowest UniqueId), no port, or a specific port by its unique ID. The readonly_reference field contains the actual referenced SerialPort, if available.

Field Type Label Description
set_any bool Select any SerialPort (selects lowest uid).
set_none bool Select no SerialPort.
set_uid sonardyne.api.common.UniqueID Select SerialPort by uid.
readonly_none_set bool If true, no SerialPort set.
readonly_serial_port_reference SerialPort Contains the referenced SerialPort.

Trigger Port

TriggerEdge sonardyne/api/common/ports/trigger_port/trigger_edge.proto

TriggerEdge enumerates the types of signal edges that can trigger an event. It indicates whether the trigger occurs on a rising edge, falling edge, both edges, or is unspecified.

Name Number Description
TRIGGER_EDGE_UNSPECIFIED 0 Unspecified trigger edge.
TRIGGER_EDGE_NONE 1 No trigger edge.
TRIGGER_EDGE_RISING 2 Rising trigger edge.
TRIGGER_EDGE_FALLING 3 Falling trigger edge.
TRIGGER_EDGE_BOTH 4 Rising and falling trigger edge.

TriggerPortComms sonardyne/api/common/ports/trigger_port/trigger_port_comms.proto

TriggerPortComms represents a communication event on a trigger port. It includes the unique ID of the port, the timestamp of the event, the direction of the trigger relative to the port, and the type of trigger edge.

Field Type Label Description
uid sonardyne.api.common.UniqueID Uid of the trigger port.
timestamp sonardyne.api.common.Timestamp Timestamp when the trigger event occurred.
data_direction sonardyne.api.common.data.DataDirection Direction of the trigger event relative to the port (Input for trigger events received by the port, Output for trigger events sent by the port).
trigger_edge TriggerEdge Trigger edge type (rising, falling, both).

TriggerPortObservation sonardyne/api/common/ports/trigger_port/trigger_port_observation.proto

TriggerPortObservation represents an observation of a trigger port event. It includes the unique ID of the port, the timestamp of the event, and the type of trigger edge that occurred.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the trigger port.
timestamp sonardyne.api.common.Timestamp Timestamp when the trigger event occurred.
trigger_edge TriggerEdge Trigger edge type (rising, falling, both).

TriggerPort sonardyne/api/common/ports/trigger_port/trigger_port.proto

TriggerPort defines a single trigger port on the instrument. It includes a unique identifier. Rising and falling trigger edges may be specified in messages containing a TriggerPortReference. This allows one trigger to cause different actions on rising and falling edges.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the trigger port.

TriggerPortReference sonardyne/api/common/ports/trigger_port/trigger_port_reference.proto

TriggerPortReference defines a reference to a trigger port using one of several selection options. It can select any available port (lowest UniqueId), no port, or a specific port by its unique ID. The readonly_reference field contains the actual referenced TriggerPort, if available.

Field Type Label Description
set_any bool Select any available TriggerPort (selects lowest uid).
set_none bool Select no TriggerPort.
set_uid sonardyne.api.common.UniqueID Select TriggerPort by a specific uid.
readonly_none_set bool If true, no TriggerPort set.
readonly_trigger_port_reference TriggerPort Contains the referenced TriggerPort.

Remote Points

RemotePoint sonardyne/api/common/remote_points/remote_point.proto

RemotePoint represents a remote reference point on the vessel. It includes a unique identifier and the lever arms from the vessel's central reference point to this remote point.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the remote point.
lever_arms sonardyne.api.common.installation.LeverArms Lever arms from the vessel central reference point to the remote point.

RemotePointReference sonardyne/api/common/remote_points/remote_point_reference.proto

RemotePointReference defines a reference to a remote point using one of several selection options. It can select any available remote point (lowest UniqueId), the Common Reference Point (CRP), or a specific remote point by its unique ID. The readonly_reference field contains the actual referenced RemotePoint, if available.

Field Type Label Description
set_crp bool Select Common Reference Point.
set_any_remote_point bool Select any available RemotePoint (selects lowest uid).
set_uid sonardyne.api.common.UniqueID Select RemotePoint by a specific uid.
readonly_uid sonardyne.api.common.UniqueID optional Optional read-only unique ID of a a RemotePoint.
readonly_crp_set bool If true, no PpsTimeSourceConfiguration set.
readonly_remote_point_reference RemotePoint Contains the referenced RemotePoint.

RemotePointsList sonardyne/api/common/remote_points/remote_points_list.proto

RemotePointsList represents a collection of remote reference points on the vessel. Each entry in the list is a RemotePoint, providing unique identification and lever arms.

Field Type Label Description
remote_points RemotePoint repeated Reference points on the vessel.

Result sonardyne/api/common/result.proto

Result represents the outcome of an operation, including its status and an optional descriptive message. The Outcome enum specifies whether the operation succeeded, failed, was invalid, or restricted.

Field Type Label Description
success Result.Outcome Indicates success or failure. True for success, otherwise False.
message string optional Description of the operations result.

Result.Outcome sonardyne/api/common/result.proto

Name Number Description
OUTCOME_UNSPECIFIED 0 Unspecified result outcome.
OUTCOME_SUCCESS 1 Operation has succeeded.
OUTCOME_FAILURE 2 Operation has failed.
OUTCOME_INVALID 3 Operation has been given invalid parameters.
OUTCOME_RESTRICTED 4 Operation is not allowed - client does not have permission, or instrument is not in the correct mode.

Telegrams

GgaTelegram sonardyne/api/common/telegrams/gga_telegram.proto

GgaTelegram represents a GNSS-derived position fix at a specific time. Includes latitude, longitude, altitude, geoid separation, and fix quality metrics.

Field Type Label Description
time_of_validity sonardyne.api.common.Timestamp Timestamp when the GNSS data is valid.
latitude_radians double Latitude in radians.
longitude_radians double Longitude in radians.
altitude_metres double Altitude above mean sea level in metres.
geoid_separation_metres double Geoid separation in metres.
hdop double Horizontal dilution of precision.
age_seconds double Age of differential correction in seconds.
number_of_satellites uint32 Number of satellites used in the solution.
reference_station_id uint32 ID of the reference station for differential corrections.
fix_quality GgaTelegram.FixQuality Quality of the GGA data.

GgaTelegram.FixQuality sonardyne/api/common/telegrams/gga_telegram.proto

GgaTelegram.FixQuality indicates the quality, accuracy, or reliability of data in the GgaTelegram based on the type of technique or signal used to derive the location.

Name Number Description
FIX_QUALITY_UNSPECIFIED 0 Unspecified fix quality.
FIX_QUALITY_FIX_NOT_VALID 1 Fix not valid.
FIX_QUALITY_GNSS_FIX 2 Standard GNSS fix.
FIX_QUALITY_DIFFERENTIAL_GNSS_FIX 3 Differential GNSS fix.
FIX_QUALITY_NOT_APPLICABLE 4 Fix quality not applicable.
FIX_QUALITY_RTK_FIXED 5 RTK fixed solution.
FIX_QUALITY_RTK_FLOAT 6 RTK float solution.
FIX_QUALITY_INS_DEAD_RECKONING 7 INS dead reckoning solution.

GstTelegram sonardyne/api/common/telegrams/gst_telegram.proto

GstTelegram represents the uncertainty associated with GNSS measurements, including RMS pseudorange residuals, horizontal position error ellipse, and 1σ uncertainties for latitude, longitude, and altitude.

Field Type Label Description
time_of_validity sonardyne.api.common.Timestamp Timestamp when the GST data is valid.
pseudorange_residuals_rms double RMS of pseudorange residuals; includes carrier phase residuals during RTK (float/fixed) processing.
horizontal_position_error_ellipse sonardyne.api.common.navigation.HorizontalPositionErrorEllipse Horizontal position error ellipse.
latitude_uncertainty_metres double 1σ of uncertainty in latitude, in metres.
longitude_uncertainty_metres double 1σ of uncertainty in longitude, in metres.
altitude_uncertainty_metres double 1σ of uncertainty in altitude, in metres.

PsimssbTelegram sonardyne/api/common/telegrams/psimssb_telegram.proto

PsimssbTelegram represents a measurement from a Short Baseline (SUSBL) acoustic positioning system. It includes the position, orientation, depth, and any additional information from the transponder. The coordinates, orientation, and additional info fields are interpreted according to the specified coordinate system and SUSBL configuration.

Field Type Label Description
time_of_validity sonardyne.api.common.Timestamp Time at which the SUSBL data is valid.
coordinate_type PsimssbTelegram.PsimssbCoordinateSystem Coordinate system used for the position.
x_coordinate double X coordinate in metres or radians (matching NMEA standard).
y_coordinate double Y coordinate in metres or radians (matching NMEA standard).
transponder_code uint32 Code identifying the transponder.
is_valid bool True if the measurement is valid.
orientation_type PsimssbTelegram.PsimssbOrientation Orientation reference type.
error_code string Error code associated with the measurement.
software_filter PsimssbTelegram.PsimssbSoftwareFilter Type of software filtering applied.
depth_metres double Depth in metres.
position_uncertainty_metres double 1σ of position uncertainty in metres.
additional_info_type PsimssbTelegram.PsimssbAdditionalInfo Type of additional info.
additional_info_value_1 double First value for additional info.
additional_info_value_2 double Second value for additional info.

PsimssbTelegram.PsimssbAdditionalInfo sonardyne/api/common/telegrams/psimssb_telegram.proto

PsimssbTelegram.PsimssbAdditionalInfo represents the type of supplementary information available from a SUSBL (Short Baseline) measurement, such as compass, inclinometer, depth, or timing data from the transponder.

Name Number Description
PSIMSSB_ADDITIONAL_INFO_UNSPECIFIED 0 Unspecified additional info.
PSIMSSB_ADDITIONAL_INFO_NONE 1 No additional info.
PSIMSSB_ADDITIONAL_INFO_COMPASS 2 Compass heading info.
PSIMSSB_ADDITIONAL_INFO_INCLINOMETER 3 Inclinometer info.
PSIMSSB_ADDITIONAL_INFO_DEPTH 4 Depth info.
PSIMSSB_ADDITIONAL_INFO_TIME_FROM_TRANSPONDER 5 Time from transponder.

PsimssbTelegram.PsimssbCoordinateSystem sonardyne/api/common/telegrams/psimssb_telegram.proto

PsimssbTelegram.PsimssbCoordinateSystem represents the coordinate system used for PSIMSSB (Short Baseline) measurements. It can be Cartesian, Polar, UTM, or expressed in radians, depending on the measurement context.

Name Number Description
PSIMSSB_COORDINATE_SYSTEM_UNSPECIFIED 0 Unspecified coordinate system.
PSIMSSB_COORDINATE_SYSTEM_UNKNOWN 1 Unknown coordinate system.
PSIMSSB_COORDINATE_SYSTEM_CARTESIAN 2 Cartesian coordinates.
PSIMSSB_COORDINATE_SYSTEM_POLAR 3 Polar coordinates.
PSIMSSB_COORDINATE_SYSTEM_UTM 4 UTM coordinates.
PSIMSSB_COORDINATE_SYSTEM_RADIANS 5 Coordinates in radians.

PsimssbTelegram.PsimssbOrientation sonardyne/api/common/telegrams/psimssb_telegram.proto

PsimssbTelegram.PsimssbOrientation enumerates the reference frame used for the orientation of a PSIMSSB measurement. It indicates whether the reported orientation is relative to the vessel, true north, east, or unknown.

Name Number Description
PSIMSSB_ORIENTATION_UNSPECIFIED 0 Unspecified orientation.
PSIMSSB_ORIENTATION_UNKNOWN 1 Unknown orientation.
PSIMSSB_ORIENTATION_VESSEL_HEADING 2 Orientation relative to vessel heading.
PSIMSSB_ORIENTATION_NORTH 3 Orientation relative to north.
PSIMSSB_ORIENTATION_EAST 4 Orientation relative to east.

PsimssbTelegram.PsimssbSoftwareFilter sonardyne/api/common/telegrams/psimssb_telegram.proto

PsimssbTelegram.PsimssbSoftwareFilter specifies the type of software processing applied to PSIMSSB measurements. It indicates whether the values are raw, filtered, or predicted by the system.

Name Number Description
PSIMSSB_SOFTWARE_FILTER_UNSPECIFIED 0 Unspecified filter type.
PSIMSSB_SOFTWARE_FILTER_UNKNOWN 1 Unknown filter type.
PSIMSSB_SOFTWARE_FILTER_MEASURED 2 Measured values.
PSIMSSB_SOFTWARE_FILTER_FILTERED 3 Filtered values.
PSIMSSB_SOFTWARE_FILTER_PREDICTED 4 Predicted values.

Timestamp sonardyne/api/common/timestamp.proto

Timestamp represents a point in time with two different time bases: common_time_seconds indicates the absolute time since the UNIX epoch (01/01/1970) in seconds, including fractional seconds. instrument_time_seconds indicates the instrument's internal monotonic time in seconds, which increases monotonically.

Field Type Label Description
common_time_seconds double optional Time since the UNIX epoch (01/01/1970) in seconds and fractional seconds.
instrument_time_seconds double optional Monotonically increasing instrument time in seconds and fractional seconds.

UniqueID sonardyne/api/common/unique_id.proto

UniqueID represents a unique identifier for an entity, along with an optional human-readable name that can be populated in responses.

Field Type Label Description
value int64 Unique identifier.
name string Human-readable name populated in reply.

UserLevel sonardyne/api/common/user_level.proto

UserLevel enumerates the different user levels for a device. It defines the permissions and access capabilities associated with each level.

Name Number Description
USER_LEVEL_UNSPECIFIED 0 Unspecified user level.
USER_LEVEL_CUSTOMER 1 Customer user level.
USER_LEVEL_ENGINEERING 2 Engineering user level with enhanced access and capabilities.
USER_LEVEL_FACTORY 3 Factory user level with full access and capabilities.

Version

GetVersionRequest sonardyne/api/common/version/get_version_request.proto

GetVersionRequest is a request message used to retrieve the system or service version. The timestamp field indicates when the request was created.

Field Type Label Description
timestamp sonardyne.api.common.Timestamp Timestamp of the get version request.

GetVersionResponse sonardyne/api/common/version/get_version_response.proto

GetVersionResponse is the response message for a GetVersionRequest. It contains the timestamp when the response was generated and the version of the API supported by the device.

Field Type Label Description
timestamp sonardyne.api.common.Timestamp Timestamp of the response to the GetVersionRequest.
api_version Version Version of the API.

Version sonardyne/api/common/version/version.proto

Version represents a version number following the semantic versioning MAJOR.MINOR.PATCH format, with an optional build number for additional build-specific information.

Field Type Label Description
major uint32 MAJOR version incremented for incompatible changes that break existing clients.
minor uint32 MINOR version incremented for backward-compatible features or enhancements.
patch uint32 PATCH version incremented for backward-compatible bug fixes or patches.
build_number uint32 optional Optional build number incremented with each firmware build (for information only).

Modules

Battery Module

BatteryModuleConfiguration sonardyne/api/modules/battery_module/battery_module_configuration.proto

BatteryModuleConfiguration defines the configuration settings for a battery module. It includes a unique identifier for the physical installation and an optional flag indicating whether battery charging is allowed.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the physical installation parameters.
is_battery_charging_enabled bool optional When enabling battery charging is allowed.

Example

Example code: battery_module_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.BatteryModuleConfiguration(
        is_battery_charging_enabled=False
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.BatteryModuleConfiguration(
        is_battery_charging_enabled=False
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.BatteryModuleConfiguration(
        is_battery_charging_enabled=False
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.modules.battery_module.BatteryModuleConfiguration",
                "isBatteryChargingEnabled": false
            }
        }
    ]
}, indent=4).encode())

Device Installation Module

DeviceInstallationModuleConfiguration sonardyne/api/modules/device_installation_module/device_installation_module_configuration.proto

DeviceInstallationModuleConfiguration defines the physical installation parameters for a device module. It includes a unique identifier, optional lever arms relative to the vessel's central reference point, and optional mounting angles in the vessel frame.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the physical installation parameters.
lever_arms sonardyne.api.common.installation.LeverArms optional Lever arms from the vessel central reference point.
mounting_angles sonardyne.api.common.installation.MountingAngles optional Mounting angles in vessel frame.

Device Module

DeviceModuleCommandFactoryReset sonardyne/api/modules/device_module/device_module_command_factory_reset.proto

DeviceModuleCommandFactoryReset represents a command to perform a factory reset on a specific device module. The command targets the device identified by its unique ID.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the device.

Example

Example code: device_module_command_factory_reset.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.DeviceModuleCommandFactoryReset()))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.DeviceModuleCommandFactoryReset()))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.DeviceModuleCommandFactoryReset()))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.command_service.SendCommandRequest",
            "command": {
                "@type": "type.googleapis.com/sonardyne.api.modules.device_module.DeviceModuleCommandFactoryReset"
            }
        }
    ]
}, indent=4).encode())

DeviceModuleCommandShutdown sonardyne/api/modules/device_module/device_module_command_shutdown.proto

DeviceModuleCommandShutdown represents a command to shut down a specific device module. The command targets the device identified by its unique ID.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the device.

Example

Example code: device_module_command_shutdown.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.DeviceModuleCommandShutdown()))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.DeviceModuleCommandShutdown()))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.DeviceModuleCommandShutdown()))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.command_service.SendCommandRequest",
            "command": {
                "@type": "type.googleapis.com/sonardyne.api.modules.device_module.DeviceModuleCommandShutdown"
            }
        }
    ]
}, indent=4).encode())

DeviceModuleConfiguration sonardyne/api/modules/device_module/device_module_configuration.proto

DeviceModuleConfiguration defines the configuration for a device.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the device.
product_name string Name of the device.
serial_number string Serial number of the device.
firmware_version sonardyne.api.common.version.Version Firmware version of the device.
user_level sonardyne.api.common.UserLevel User level of the device.

External Logging Module

ExternalLoggingModuleConfiguration sonardyne/api/modules/external_logging_module/external_logging_module_configuration.proto

ExternalLoggingModuleConfiguration defines the configuration settings for an external logging module. It includes a unique identifier and an optional Ethernet logging port configuration. The Ethernet port can be cleared by setting ethernet_logging_port_unset to true, or configured using ethernet_logging_port.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the external logging module.
ethernet_logging_port_unset bool Set to true to clear ethernet_logging_port.
ethernet_logging_port sonardyne.api.common.ports.ethernet_port.EthernetPort Logging port. To stop external logging, set ethernet_logging_port to true.

Example

Example code: external_logging_module_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.ExternalLoggingModuleConfiguration(
        ethernet_logging_port=son.EthernetPort(
            source_port=8105,
            tcp_server=son.TcpServerParameters()
        )
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.ExternalLoggingModuleConfiguration(
        ethernet_logging_port=son.EthernetPort(
            source_port=8105,
            tcp_server=son.TcpServerParameters()
        )
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.ExternalLoggingModuleConfiguration(
        ethernet_logging_port=son.EthernetPort(
            source_port=8105,
            tcp_server=son.TcpServerParameters()
        )
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.modules.external_logging_module.ExternalLoggingModuleConfiguration",
                "ethernetLoggingPort": {
                    "sourcePort": 8105,
                    "tcpServer": {}
                }
            }
        }
    ]
}, indent=4).encode())

NavigationModuleObservation sonardyne/api/modules/navigation_module/navigation_module_observation.proto

NavigationModuleObservation represents an observation from the navigation module. It contains a multitude of navigation data including position, orientation, velocity, and acceleration with associated errors. The navigation data in this observation is in earth frame and is valid for the measurement source.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the navigation module.
remote_point_uid sonardyne.api.common.UniqueID Unique ID of the remote point at which the navigation data is valid.
navigation_data sonardyne.api.common.navigation.NavigationData optional Navigation data from the module.

Example

Example code: navigation_module_observation.py

import sonardyne_api as son
import time

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(
            observation_subscriptions=[
                son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="NavigationModuleObservation"))
            ]
        )
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
                print(time.time())
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(
            observation_subscriptions=[
                son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="NavigationModuleObservation"))
            ]
        )
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
                print(time.time())
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(
            observation_subscriptions=[
                son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="NavigationModuleObservation"))
            ]
        )
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
                print(time.time())
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationSubscriptionRequest",
                    "observationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "NavigationModuleObservation"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

Network Module

IPAddressList sonardyne/api/modules/network_module/ip_address_list.proto

IPAddressList represents a list of IP addresses.

Field Type Label Description
ip_addresses string repeated List of IP addresses.

NetworkModuleConfiguration sonardyne/api/modules/network_module/network_module_configuration.proto

NetworkModuleConfiguration defines the configuration settings for a network module. It includes a unique identifier, optional IP configuration fields, and a flag indicating whether DHCP is enabled.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the network module.
ip_address_list IPAddressList optional IP addresses on the network interface.
subnet_mask string optional Subnet mask of the network interface.
gateway_ip string optional Gateway IP address of the network interface.
dhcp_enabled bool optional Whether DHCP is enabled for the network interface.

Example

Example code: network_module_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.NetworkModuleConfiguration(
        subnet_mask="255.255.255.0",
        ip_address_list=son.IPAddressList(ip_addresses=["192.168.179.56"]),
        gateway_ip="192.168.179.1",
        dhcp_enabled=False
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.NetworkModuleConfiguration(
        subnet_mask="255.255.255.0",
        ip_address_list=son.IPAddressList(ip_addresses=["192.168.179.56"]),
        gateway_ip="192.168.179.1",
        dhcp_enabled=False
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.NetworkModuleConfiguration(
        subnet_mask="255.255.255.0",
        ip_address_list=son.IPAddressList(ip_addresses=["192.168.179.56"]),
        gateway_ip="192.168.179.1",
        dhcp_enabled=False
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.modules.network_module.NetworkModuleConfiguration",
                "ipAddressList": {
                    "ipAddresses": [
                        "192.168.179.56"
                    ]
                },
                "subnetMask": "255.255.255.0",
                "gatewayIp": "192.168.179.1",
                "dhcpEnabled": false
            }
        }
    ]
}, indent=4).encode())

Output Message Module

OutputMessageList sonardyne/api/modules/output_message_module/output_message_list.proto

OutputMessageList represents a collection of output messages. Each entry in output_messages contains a single output message.

Field Type Label Description
output_messages OutputMessage repeated List of output messages.

OutputMessageModuleCommandAddOutput sonardyne/api/modules/output_message_module/output_message_module_command_add_output.proto

OutputMessageModuleCommandAddOutput represents a command to add an output message. It includes the unique ID and the output message to be added.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the output message module configuration.
output_message OutputMessage Output message to add.

Example

Example code: output_message_module_command_add_output.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.OutputMessageModuleCommandAddOutput(
        output_message=
        son.OutputMessage(
            output_message_type=son.OutputMessageType.OUTPUT_MESSAGE_TYPE_GGA,
            rate_hz=20.0,
            remote_point=son.RemotePointReference(set_uid=son.UniqueID(name="Remote Point 3")),
            data_port_output=son.DataPortReference(set_any_ethernet_port=True)
        )
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.OutputMessageModuleCommandAddOutput(
        output_message=
        son.OutputMessage(
            output_message_type=son.OutputMessageType.OUTPUT_MESSAGE_TYPE_GGA,
            rate_hz=20.0,
            remote_point=son.RemotePointReference(set_uid=son.UniqueID(name="Remote Point 3")),
            data_port_output=son.DataPortReference(set_any_ethernet_port=True)
        )
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.OutputMessageModuleCommandAddOutput(
        output_message=
        son.OutputMessage(
            output_message_type=son.OutputMessageType.OUTPUT_MESSAGE_TYPE_GGA,
            rate_hz=20.0,
            remote_point=son.RemotePointReference(set_uid=son.UniqueID(name="Remote Point 3")),
            data_port_output=son.DataPortReference(set_any_ethernet_port=True)
        )
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.command_service.SendCommandRequest",
            "command": {
                "@type": "type.googleapis.com/sonardyne.api.modules.output_message_module.OutputMessageModuleCommandAddOutput",
                "outputMessage": {
                    "outputMessageType": "OUTPUT_MESSAGE_TYPE_GGA",
                    "dataPortOutput": {
                        "setAnyEthernetPort": true
                    },
                    "rateHz": 20.0,
                    "remotePoint": {
                        "setUid": {
                            "name": "Remote Point 3"
                        }
                    }
                }
            }
        }
    ]
}, indent=4).encode())

OutputMessageModuleCommandRemoveOutput sonardyne/api/modules/output_message_module/output_message_module_command_remove_output.proto

OutputMessageModuleCommandRemoveOutput represents a command to remove an output message from a specific output message module. It includes the unique ID and configuration and the output message to be removed.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the output message module configuration.
output_message OutputMessage Output message to remove.

Example

Example code: output_message_module_command_remove_output.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.OutputMessageModuleCommandRemoveOutput(
        output_message=
        son.OutputMessage(
            output_message_type=son.OutputMessageType.OUTPUT_MESSAGE_TYPE_GGA,
            rate_hz=10.0,
            remote_point=son.RemotePointReference(set_uid=son.UniqueID(name="Remote Point 2")),
            data_port_output=son.DataPortReference(set_any_ethernet_port=True)
        )
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.OutputMessageModuleCommandRemoveOutput(
        output_message=
        son.OutputMessage(
            output_message_type=son.OutputMessageType.OUTPUT_MESSAGE_TYPE_GGA,
            rate_hz=10.0,
            remote_point=son.RemotePointReference(set_uid=son.UniqueID(name="Remote Point 2")),
            data_port_output=son.DataPortReference(set_any_ethernet_port=True)
        )
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.send_command(son.OutputMessageModuleCommandRemoveOutput(
        output_message=
        son.OutputMessage(
            output_message_type=son.OutputMessageType.OUTPUT_MESSAGE_TYPE_GGA,
            rate_hz=10.0,
            remote_point=son.RemotePointReference(set_uid=son.UniqueID(name="Remote Point 2")),
            data_port_output=son.DataPortReference(set_any_ethernet_port=True)
        )
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.command_service.SendCommandRequest",
            "command": {
                "@type": "type.googleapis.com/sonardyne.api.modules.output_message_module.OutputMessageModuleCommandRemoveOutput",
                "outputMessage": {
                    "outputMessageType": "OUTPUT_MESSAGE_TYPE_GGA",
                    "dataPortOutput": {
                        "setAnyEthernetPort": true
                    },
                    "rateHz": 10.0,
                    "remotePoint": {
                        "setUid": {
                            "name": "Remote Point 2"
                        }
                    }
                }
            }
        }
    ]
}, indent=4).encode())

OutputMessageModuleConfiguration sonardyne/api/modules/output_message_module/output_message_module_configuration.proto

OutputMessageModuleConfiguration defines the configuration of an output message module. It includes a unique identifier, the types of messages the module supports, the supported output rates, and an optional list of configured output messages.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the output message module configuration.
output_message_list OutputMessageList optional List of configured output messages.
readonly_supported_output_messages SupportedOutputMessage repeated Supported output message types (read-only).
readonly_preset_rates_hz double repeated Supported output message rates (read-only).
readonly_max_combined_output_rate_hz double Supported maximum combined output rate.

Example

Example code: output_message_module_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.OutputMessageModuleConfiguration(
        output_message_list=son.OutputMessageList(
            output_messages=[
                son.OutputMessage(
                    output_message_type=son.OutputMessageType.OUTPUT_MESSAGE_TYPE_GGA,
                    rate_hz=10.0,
                    remote_point=son.RemotePointReference(set_uid=son.UniqueID(name="Remote Point 2")),
                    data_port_output=son.DataPortReference(set_any_ethernet_port=True)
                ),
                son.OutputMessage(
                    output_message_type=son.OutputMessageType.OUTPUT_MESSAGE_TYPE_LNAV,
                    rate_hz=5.0,
                    remote_point=son.RemotePointReference(set_uid=son.UniqueID(name="Common Reference Point")),
                    data_port_output=son.DataPortReference(set_any_ethernet_port=True)
                )
            ]
        )
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.OutputMessageModuleConfiguration(
        output_message_list=son.OutputMessageList(
            output_messages=[
                son.OutputMessage(
                    output_message_type=son.OutputMessageType.OUTPUT_MESSAGE_TYPE_GGA,
                    rate_hz=10.0,
                    remote_point=son.RemotePointReference(set_uid=son.UniqueID(name="Remote Point 2")),
                    data_port_output=son.DataPortReference(set_any_ethernet_port=True)
                ),
                son.OutputMessage(
                    output_message_type=son.OutputMessageType.OUTPUT_MESSAGE_TYPE_LNAV,
                    rate_hz=5.0,
                    remote_point=son.RemotePointReference(set_uid=son.UniqueID(name="Common Reference Point")),
                    data_port_output=son.DataPortReference(set_any_ethernet_port=True)
                )
            ]
        )
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.OutputMessageModuleConfiguration(
        output_message_list=son.OutputMessageList(
            output_messages=[
                son.OutputMessage(
                    output_message_type=son.OutputMessageType.OUTPUT_MESSAGE_TYPE_GGA,
                    rate_hz=10.0,
                    remote_point=son.RemotePointReference(set_uid=son.UniqueID(name="Remote Point 2")),
                    data_port_output=son.DataPortReference(set_any_ethernet_port=True)
                ),
                son.OutputMessage(
                    output_message_type=son.OutputMessageType.OUTPUT_MESSAGE_TYPE_LNAV,
                    rate_hz=5.0,
                    remote_point=son.RemotePointReference(set_uid=son.UniqueID(name="Common Reference Point")),
                    data_port_output=son.DataPortReference(set_any_ethernet_port=True)
                )
            ]
        )
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.modules.output_message_module.OutputMessageModuleConfiguration",
                "outputMessageList": {
                    "outputMessages": [
                        {
                            "outputMessageType": "OUTPUT_MESSAGE_TYPE_GGA",
                            "dataPortOutput": {
                                "setAnyEthernetPort": true
                            },
                            "rateHz": 10.0,
                            "remotePoint": {
                                "setUid": {
                                    "name": "Remote Point 2"
                                }
                            }
                        },
                        {
                            "outputMessageType": "OUTPUT_MESSAGE_TYPE_LNAV",
                            "dataPortOutput": {
                                "setAnyEthernetPort": true
                            },
                            "rateHz": 5.0,
                            "remotePoint": {
                                "setUid": {
                                    "name": "Common Reference Point"
                                }
                            }
                        }
                    ]
                }
            }
        }
    ]
}, indent=4).encode())

OutputMessage sonardyne/api/modules/output_message_module/output_message.proto

OutputMessage defines the configuration for a single output message from a module. It specifies the type of message, the output rate in Hz, the remote point reference where the data is valid, and the data port to which the message is sent.

Field Type Label Description
output_message_type OutputMessageType Type of message (e.g. GGA, LNAV, ZDA) to output.
data_port_output sonardyne.api.common.ports.DataPortReference Reference to a data port over which the data will be output.
rate_hz double optional Rate at which to output the message - may be unset for a message to be output at an "automatic" rate.
remote_point sonardyne.api.common.remote_points.RemotePointReference optional Reference to a remote point at which the data will be valid - may be unset for a non-positional message with e.g. ZDA.

OutputMessageType sonardyne/api/modules/output_message_module/output_message_type.proto

OutputMessageType enumerates the different types of output messages that can be produced by an output message module. The default value is unspecified if the field is not populated.

Name Number Description
OUTPUT_MESSAGE_TYPE_UNSPECIFIED 0 Unspecified output message type.
OUTPUT_MESSAGE_TYPE_HNAV 1 HNAV message type.
OUTPUT_MESSAGE_TYPE_SON2 2 SON2 message type.
OUTPUT_MESSAGE_TYPE_GGA 3 GGA message type.
OUTPUT_MESSAGE_TYPE_PSONNAV 4 PSONNAV message type.
OUTPUT_MESSAGE_TYPE_ZDA 5 ZDA message type.
OUTPUT_MESSAGE_TYPE_LNAV 6 LNAV message type.
OUTPUT_MESSAGE_TYPE_LNAVUTC 7 LNAVUTC message type.
OUTPUT_MESSAGE_TYPE_TSS1 8 TSS1 message type.
OUTPUT_MESSAGE_TYPE_TSS2 9 TSS2 message type.
OUTPUT_MESSAGE_TYPE_EM3000 10 EM3000 message type.
OUTPUT_MESSAGE_TYPE_HDT 11 HDT message type.
OUTPUT_MESSAGE_TYPE_PD4 12 PD4 message type.
OUTPUT_MESSAGE_TYPE_PD0 13 PD0 message type.
OUTPUT_MESSAGE_TYPE_PSONDIGI 14 PSONDIGI message type.
OUTPUT_MESSAGE_TYPE_KM_BINARY 15 KMBinary message type.
OUTPUT_MESSAGE_TYPE_GLL 16 GLL message type.
OUTPUT_MESSAGE_TYPE_XLHNAV 17 XLHNAV message type.
OUTPUT_MESSAGE_TYPE_SONDV 18 SONDV message type.

SupportedOutputMessage sonardyne/api/modules/output_message_module/supported_output_message.proto

SupportedOutputMessage defines the supported configurations for a single output message from a module. It specifies the type of message, the valid output rates in Hz, and if a remote point reference is valid for the type.

Field Type Label Description
output_message_type OutputMessageType Type of message (e.g. GGA, LNAV, ZDA) for which the output_rate_type and is_remote_point_applicable information is valid.
output_rate_type OutputRateType Represents the type of output rate which this output message permits.
is_remote_point_applicable bool If true, a remote point is applicable for this message. Otherwise, the message is not affected by the choice of remote point.

OutputRateType sonardyne/api/modules/output_message_module/supported_output_message.proto

OutputRateType represents the type of output rate which is valid for an output message type. For example, an output messages types may only be output at a system-defined rate.

Name Number Description
OUTPUT_RATE_TYPE_UNSPECIFIED 0 Unspecified output rate type.
OUTPUT_RATE_TYPE_SYSTEM_DEFINED 1 Signifies that a user-defined rate is not valid.
OUTPUT_RATE_TYPE_USER_SELECTED_PRESET 2 Signifies that choosing a preset rate to output at is valid.

PortLinkModuleConfiguration sonardyne/api/modules/port_link_module/port_link_module_configuration.proto

PortLinkModuleConfiguration allows the a serial port to be linked to an ethernet port through which communications can be passed in both directions.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the port link module.
ethernet_port_reference sonardyne.api.common.ports.ethernet_port.EthernetPortReference optional Ethernet port to link to the serial port in serial_port_reference.
serial_port_reference sonardyne.api.common.ports.serial_port.SerialPortReference optional Serial port to link to the ethernet port in ethernet_port_reference.

Remote Points Module

RemotePointsModuleConfiguration sonardyne/api/modules/remote_points_module/remote_points_module_configuration.proto

RemotePointsModuleConfiguration represents a list of remote points, with each one relating a physical point on the vessel.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the remote point module.
remote_points_list sonardyne.api.common.remote_points.RemotePointsList optional List of remote points configured within the remote point module.

Sprint Module

SprintModuleConfiguration sonardyne/api/modules/sprint_module/sprint_module_configuration.proto

SprintModuleConfiguration defines the configuration and status of the SPRINT module. It includes identifying information, firmware version, function and user levels, and flags indicating which operational features are enabled.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the SPRINT.
function_level SprintModuleConfiguration.SprintFunctionLevel Function level of the SPRINT.
has_onboard_logging_enabled bool Whether onboard logging is enabled for the SPRINT.
has_adcp_mode_enabled bool Whether Acoustic Doppler Current Profiler (ADCP) mode is enabled for the SPRINT.
has_dp_mode_enabled bool Whether Dynamic Positioning (DP) mode is enabled for the SPRINT.
has_lbl_range_aiding_enabled bool Whether Long Baseline (LBL) range aiding is enabled for the SPRINT.
has_xvel_aiding_enabled bool Whether External Velocity (XVEL) aiding is enabled for the SPRINT.

SprintModuleConfiguration.SprintFunctionLevel sonardyne/api/modules/sprint_module/sprint_module_configuration.proto

SprintModuleConfiguration.SprintFunctionLevel enumerates the different function levels available for Sprint navigation. It indicates the permissions or capabilities assigned to a particular user or system component.

Name Number Description
SPRINT_FUNCTION_LEVEL_UNSPECIFIED 0 Unspecified function level.
SPRINT_FUNCTION_LEVEL_GUIDANCE 1 Guidance function level - restricted relative to Navigator function level.
SPRINT_FUNCTION_LEVEL_NAVIGATOR 2 Navigator function level - provides full functionality.

Time Module

TimeModuleConfiguration sonardyne/api/modules/time_module/time_module_configuration.proto

TimeModuleConfiguration defines the configuration of a Time Module. It includes the unique ID of the module and optional references to the input time sources that the module uses.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the Time Module.
input_time_sources TimeSourceInputReferences optional References to time sources used by the Time Module.

Example

Example code: time_module_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.TimeModuleConfiguration(
        input_time_sources=son.TimeSourceInputReferences(
            input_ntp_time_source=son.NtpTimeSourceReference(set_uid=son.UniqueID(name="NTP Time Source")),
            input_zda_time_source=son.ZdaTimeSourceReference(set_none=True),
            input_pps_time_source=son.PpsTimeSourceReference(set_none=True)
        )
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.TimeModuleConfiguration(
        input_time_sources=son.TimeSourceInputReferences(
            input_ntp_time_source=son.NtpTimeSourceReference(set_uid=son.UniqueID(name="NTP Time Source")),
            input_zda_time_source=son.ZdaTimeSourceReference(set_none=True),
            input_pps_time_source=son.PpsTimeSourceReference(set_none=True)
        )
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.TimeModuleConfiguration(
        input_time_sources=son.TimeSourceInputReferences(
            input_ntp_time_source=son.NtpTimeSourceReference(set_uid=son.UniqueID(name="NTP Time Source")),
            input_zda_time_source=son.ZdaTimeSourceReference(set_none=True),
            input_pps_time_source=son.PpsTimeSourceReference(set_none=True)
        )
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.modules.time_module.TimeModuleConfiguration",
                "inputTimeSources": {
                    "inputZdaTimeSource": {
                        "setNone": true
                    },
                    "inputPpsTimeSource": {
                        "setNone": true
                    },
                    "inputNtpTimeSource": {
                        "setUid": {
                            "name": "NTP Time Source"
                        }
                    }
                }
            }
        }
    ]
}, indent=4).encode())

TimeModuleData sonardyne/api/modules/time_module/time_module_data.proto

TimeModuleData represents the current time information provided by a Time Module. It includes the timestamp, the origins of the reported time, the uncertainty of the time measurement, and the age of the reported time in seconds.

Field Type Label Description
time sonardyne.api.common.Timestamp Current time reported by the Time Module.
time_origins TimeModuleData.TimeOrigin repeated Origins of the reported time.
time_uncertainty_seconds double 1σ of uncertainty of the reported time in seconds.
age_seconds double Age of the reported time in seconds.

TimeModuleData.TimeOrigin sonardyne/api/modules/time_module/time_module_data.proto

TimeModuleData.TimeOrigin enumerates the possible sources of time for a Time Module. It indicates how the module's time was derived or synchronized.

Name Number Description
TIME_ORIGIN_UNSPECIFIED 0 Unspecified time origin (default when unpopulated).
TIME_ORIGIN_RTC 1 Real-Time Clock (RTC).
TIME_ORIGIN_NMEA 2 Time from NMEA messages.
TIME_ORIGIN_NMEA_AND_1PPS 3 Time from NMEA combined with 1PPS.
TIME_ORIGIN_1PPS 4 Time from 1 Pulse Per Second (1PPS).
TIME_ORIGIN_NTP 5 Network Time Protocol (NTP).
TIME_ORIGIN_PTP 6 Precision Time Protocol (PTP).
TIME_ORIGIN_MSYS 7 Internal MSys time source.

TimeModuleObservation sonardyne/api/modules/time_module/time_module_observation.proto

TimeModuleObservation represents an observation from a Time Module. It includes the unique ID of the module and the corresponding time data, which contains the current time, its sources, the associated uncertainty and the age of the observation.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of a time module.
time_module_data TimeModuleData Data from the time module including current time, its sources, uncertainty and age.

TimeSourceInputReferences sonardyne/api/modules/time_module/time_source_input_references.proto

TimeSourceInputReferences defines references to the input time sources used by a Time Module. It includes optional references for ZDA, PPS, and NTP time sources.

Field Type Label Description
input_zda_time_source sonardyne.api.sources.time_source.ZdaTimeSourceReference Reference to an input ZDA time source.
input_pps_time_source sonardyne.api.sources.time_source.PpsTimeSourceReference Reference to an input PPS time source.
input_ntp_time_source sonardyne.api.sources.time_source.NtpTimeSourceReference Reference to an input NTP time source.

Port Lists

Ethernet Port List

EthernetPortListCommandAddPort sonardyne/api/port_lists/ethernet_port_list/ethernet_port_list_command_add_port.proto

EthernetPortListCommandAddPort represents a command to add an Ethernet port to a specific Ethernet port list. It includes the unique ID of the list and the port to be added.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the ethernet port list.
ethernet_port sonardyne.api.common.ports.ethernet_port.EthernetPort Ethernet port to add.

EthernetPortListCommandRemovePort sonardyne/api/port_lists/ethernet_port_list/ethernet_port_list_command_remove_port.proto

EthernetPortListCommandRemovePort represents a command to remove an Ethernet port from a specific Ethernet port list. It includes the unique ID of the list and the unique ID of the port to be removed.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the ethernet port list.
uid_to_delete sonardyne.api.common.UniqueID Unique ID of the ethernet port to remove.
source_port_to_delete uint32 Source port of the ethernet port to remove.

EthernetPortListCommandUpdatePort sonardyne/api/port_lists/ethernet_port_list/ethernet_port_list_command_update_port.proto

EthernetPortListCommandUpdatePort represents a command to update an Ethernet port within a specific Ethernet port list. The port to update is identified by its unique ID within the EthernetPort message.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the ethernet port list.
ethernet_port sonardyne.api.common.ports.ethernet_port.EthernetPort Ethernet port to update, identified by setting the unique ID of the ethernet port).

EthernetPortListConfiguration sonardyne/api/port_lists/ethernet_port_list/ethernet_port_list_configuration.proto

EthernetPortListConfiguration defines the configuration of an Ethernet port list. It includes the unique ID of the list and the collection of configured Ethernet ports on the instrument.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the ethernet port list.
ethernet_ports sonardyne.api.common.ports.ethernet_port.EthernetPort repeated List of configured ethernet ports on the instrument.

External Control Port List

ExternalControlPortListCommandAddPort sonardyne/api/port_lists/external_control_port_list/external_control_port_list_command_add_port.proto

ExternalControlPortListCommandAddPort represents a command to add an external control port to a specific external control port list. It includes the unique ID of the list and the port to be added.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the external control port list.
external_control_port sonardyne.api.common.ports.external_control_port.ExternalControlPort External control port to add.

ExternalControlPortListCommandUpdatePort sonardyne/api/port_lists/external_control_port_list/external_control_port_list_command_update_port.proto

ExternalControlPortListCommandRemovePort represents a command to remove an external control port from a specific external control port list. It includes the unique ID of the list and the unique ID of the port to be removed.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the external control port list.
external_control_port sonardyne.api.common.ports.external_control_port.ExternalControlPort External control port to update, identified by setting the unique ID of the external_control port).

ExternalControlPortListConfiguration sonardyne/api/port_lists/external_control_port_list/external_control_port_list_configuration.proto

ExternalControlPortListConfiguration defines the configuration of an external control port list. It includes the unique ID of the list and the collection of configured external control ports on the instrument.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the external control port list.
external_control_ports sonardyne.api.common.ports.external_control_port.ExternalControlPort repeated List of configured external control ports on the instrument.

Power Pass Port List

PowerPassPortListCommandAddPort sonardyne/api/port_lists/power_pass_port_list/power_pass_port_list_command_add_port.proto

PowerPassPortListCommandAddPort represents a command to add a power pass port to a specific power pass port list. It includes the unique ID of the list and the port to be added.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the power pass port list.
power_pass_port sonardyne.api.common.ports.power_pass_port.PowerPassPort Power pass port to add.

PowerPassPortListCommandUpdatePort sonardyne/api/port_lists/power_pass_port_list/power_pass_port_list_command_update_port.proto

PowerPassPortListCommandUpdatePort represents a command to update a power pass port within a specific power pass port list. The port to update is identified by its unique ID within the PowerPassPort message.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the power pass port list.
power_pass_port sonardyne.api.common.ports.power_pass_port.PowerPassPort Power pass port to update, identified by setting the unique ID of the power pass port).

PowerPassPortListConfiguration sonardyne/api/port_lists/power_pass_port_list/power_pass_port_list_configuration.proto

PowerPassPortListConfiguration defines the configuration of a power pass port list. It includes the unique ID of the list and the collection of configured power pass ports on the instrument.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the power pass port list.
power_pass_ports sonardyne.api.common.ports.power_pass_port.PowerPassPort repeated List of configured power pass ports on the instrument.

Serial Port List

SerialPortListCommandAddPort sonardyne/api/port_lists/serial_port_list/serial_port_list_command_add_port.proto

SerialPortListCommandAddPort represents a command to add a serial port. It includes the unique ID of the list and the port to be added.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the serial port list.
serial_port sonardyne.api.common.ports.serial_port.SerialPort Serial port to add.

SerialPortListCommandUpdatePort sonardyne/api/port_lists/serial_port_list/serial_port_list_command_update_port.proto

SerialPortListCommandUpdatePort represents a command to update a serial port within a specific serial port list. The port to update is identified by its unique ID within the SerialPort message.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the serial port list.
serial_port sonardyne.api.common.ports.serial_port.SerialPort Serial port to update, identified by setting the unique ID of the serial port).

SerialPortListConfiguration sonardyne/api/port_lists/serial_port_list/serial_port_list_configuration.proto

SerialPortListConfiguration defines the configuration of a serial port list. It includes the unique ID of the list and the collection of configured serial ports on the instrument.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the serial port list.
serial_ports sonardyne.api.common.ports.serial_port.SerialPort repeated List of configured serial ports on the instrument.

Trigger Port List

TriggerPortListConfiguration sonardyne/api/port_lists/trigger_port_list/trigger_port_list_configuration.proto

TriggerPortListConfiguration defines the configuration of a trigger port list. It includes the unique ID of the list and the collection of configured trigger ports on the instrument.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the trigger port list.
trigger_ports sonardyne.api.common.ports.trigger_port.TriggerPort repeated List of configured trigger ports on the instrument.

Sensors

DVL Sensor

DvlSensorConfiguration sonardyne/api/sensors/dvl_sensor/dvl_sensor_configuration.proto

DvlSensorConfiguration represents the configuration parameters for a Doppler Velocity Log (DVL) sensor. It includes a unique identifier, physical installation details, beam parameters, and logging options.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the DVL sensor.
is_raw_logging_enabled bool optional Toggle raw DVL data logging.

Example

Example code: dvl_sensor_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.DvlSensorConfiguration(
        is_raw_logging_enabled=False
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.DvlSensorConfiguration(
        is_raw_logging_enabled=False
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.DvlSensorConfiguration(
        is_raw_logging_enabled=False
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.sensors.dvl_sensor.DvlSensorConfiguration",
                "isRawLoggingEnabled": false
            }
        }
    ]
}, indent=4).encode())

Pressure Sensor

PressureData sonardyne/api/sensors/pressure_sensor/pressure_data.proto

PressureData represents a single pressure measurement from a sensor. It includes the time when the measurement is valid and the pressure value in pascals.

Field Type Label Description
time_of_validity sonardyne.api.common.Timestamp Timestamp when the pressure measurement is valid.
pressure_pascals double Pressure value in pascals.

PressureSensorConfiguration sonardyne/api/sensors/pressure_sensor/pressure_sensor_configuration.proto

PressureSensorConfiguration represents the configuration parameters for a pressure sensor. It includes a unique identifier and, for internal use, lever arms from the instrument reference point.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the pressure sensor.

PressureSensorObservation sonardyne/api/sensors/pressure_sensor/pressure_sensor_observation.proto

PressureSensorObservation represents a single observation from a pressure sensor. It includes the unique identifier of the sensor and the corresponding pressure measurement data.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the pressure sensor.
pressure_data PressureData Pressure measurement data.

Temperature Sensor

TemperatureData sonardyne/api/sensors/temperature_sensor/temperature_data.proto

TemperatureData represents a single temperature measurement from a sensor. It includes the time when the measurement is valid and the temperature in degrees Celsius.

Field Type Label Description
time_of_validity sonardyne.api.common.Timestamp Timestamp when the temperature measurement is valid.
degrees_celsius double Temperature in degrees Celsius.

TemperatureSensorConfiguration sonardyne/api/sensors/temperature_sensor/temperature_sensor_configuration.proto

TemperatureSensorConfiguration represents the configuration parameters for a temperature sensor. It includes a unique identifier and an optional internal temperature offset in degrees Celsius.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the temperature sensor.

TemperatureSensorObservation sonardyne/api/sensors/temperature_sensor/temperature_sensor_observation.proto

TemperatureSensorObservation represents a single observation from a temperature sensor. It includes the unique identifier of the sensor and the corresponding temperature measurement data.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the temperature sensor.
temperature_data TemperatureData Temperature measurement data.

Services

Command Service

CommandService sonardyne/api/services/command_service/command_service.proto

CommandService provides RPC methods to interact with Sonardyne instruments. It supports querying API version, sending commands, listing available commands, and sending generic requests either synchronously or asynchronously.

Method Name Request Type Response Type Description
GetVersion sonardyne.api.common.version.GetVersionRequest sonardyne.api.common.version.GetVersionResponse Gets the version of the Sonardyne API.
SendCommand SendCommandRequest SendCommandResponse Sends an instrument command and returns the updated command, result, and timestamp.
SendRequest sonardyne.api.common.envelope.RequestEnvelope sonardyne.api.common.envelope.ResponseEnvelope Sends a generic request and returns the corresponding response.

Example

Example code: command_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.command_service.SendCommandRequest",
            "command": {
                "@type": "type.googleapis.com/sonardyne.api.algorithms.ins_algorithm.InsAlgorithmCommandReset"
            }
        }
    ]
}, indent=4).encode())

ListCommandsRequest sonardyne/api/services/command_service/list_commands_request.proto

ListCommandsRequest represents a request to retrieve the list of all available commands on the instrument. It includes a unique identifier to correlate with the corresponding response and a timestamp of the request.

Field Type Label Description
uid uint32 Allows identification of the corresponding ListGetCommandResponse.
timestamp sonardyne.api.common.Timestamp Timestamp of the request.

Example

Example code: command_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.command_service.SendCommandRequest",
            "command": {
                "@type": "type.googleapis.com/sonardyne.api.algorithms.ins_algorithm.InsAlgorithmCommandReset"
            }
        }
    ]
}, indent=4).encode())

ListCommandsResponse sonardyne/api/services/command_service/list_commands_response.proto

ListCommandsResponse represents the response to a ListCommandsRequest. It includes the request identifier for correlation, a timestamp, the list of available command types, and the result indicating whether the request was successful.

Field Type Label Description
uid uint32 Allows matching with the corresponding ListGetCommandRequest.
timestamp sonardyne.api.common.Timestamp Timestamp of the response.
command google.protobuf.Any repeated Acceptable command types.
result sonardyne.api.common.Result Success of the ListGetCommandRequest.

Example

Example code: command_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.command_service.SendCommandRequest",
            "command": {
                "@type": "type.googleapis.com/sonardyne.api.algorithms.ins_algorithm.InsAlgorithmCommandReset"
            }
        }
    ]
}, indent=4).encode())

SendCommandRequest sonardyne/api/services/command_service/send_command_request.proto

SendCommandRequest represents a request to send a specific command to an instrument. It includes a unique request identifier for correlating responses, a timestamp of the request, and the command message to be executed.

Field Type Label Description
request_uid uint32 Allows identification of the corresponding SendCommandResponse.
timestamp sonardyne.api.common.Timestamp Timestamp of the request.
command google.protobuf.Any Command message (a message ending in "Command").

Example

Example code: command_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.command_service.SendCommandRequest",
            "command": {
                "@type": "type.googleapis.com/sonardyne.api.algorithms.ins_algorithm.InsAlgorithmCommandReset"
            }
        }
    ]
}, indent=4).encode())

SendCommandResponse sonardyne/api/services/command_service/send_command_response.proto

SendCommandResponse represents the response to a SendCommandRequest. It includes the original request identifier for correlation, a timestamp of the response,and the result indicating whether the command was executed successfully.

Field Type Label Description
request_uid uint32 Allows matching with the corresponding SendCommandRequest.
timestamp sonardyne.api.common.Timestamp Timestamp of the response.
result sonardyne.api.common.Result Success of the SendCommandRequest.

Example

Example code: command_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    wrapper.send_command(son.InsAlgorithmCommandReset())
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.command_service.SendCommandRequest",
            "command": {
                "@type": "type.googleapis.com/sonardyne.api.algorithms.ins_algorithm.InsAlgorithmCommandReset"
            }
        }
    ]
}, indent=4).encode())

Comms Service

CommsEnvelope sonardyne/api/services/comms_service/comms_envelope.proto

CommsEnvelope is a container for one or more communication messages. It can hold any messages ending in 'Comms', 'CommsSubscriptionRequest', or 'CommsSubscriptionResponse'.

Field Type Label Description
comms_messages google.protobuf.Any repeated Any message ending in 'Comms', 'CommsSubscriptionRequest', or a 'CommsSubscriptionResponse'.

Example

Example code: comms_service.py

import sonardyne_api as son
import time
import random

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time
import random

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time
import random

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.comms_service.CommsEnvelope",
            "commsMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.comms_service.CommsSubscriptionRequest",
                    "commsSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchUids": [
                                    {
                                        "name": "TCP-8110"
                                    }
                                ]
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

CommsService sonardyne/api/services/comms_service/comms_service.proto

CommsService provides RPC methods for instrument communications. It supports retrieving the API version and streaming communication messages to and from the instrument, including subscribing to data port outputs.

Method Name Request Type Response Type Description
GetVersion sonardyne.api.common.version.GetVersionRequest sonardyne.api.common.version.GetVersionResponse Gets the version of the Sonardyne API.
CommsStream CommsEnvelope stream CommsEnvelope stream Publishes and receives communications. Use CommsSubscription to subscribe to data port outputs.

Example

Example code: comms_service.py

import sonardyne_api as son
import time
import random

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time
import random

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time
import random

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.comms_service.CommsEnvelope",
            "commsMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.comms_service.CommsSubscriptionRequest",
                    "commsSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchUids": [
                                    {
                                        "name": "TCP-8110"
                                    }
                                ]
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

CommsSubscription sonardyne/api/services/comms_service/comms_subscription.proto

CommsSubscription defines the criteria for subscribing to communication messages. It allows filtering messages by type name suffix and by unique identifiers, with support for both inclusion and exclusion rules.

Field Type Label Description
matching_criteria sonardyne.api.common.MatchingCriteria Matching criteria for which comms messages to subscribe to.

Example

Example code: comms_service.py

import sonardyne_api as son
import time
import random

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time
import random

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time
import random

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.comms_service.CommsEnvelope",
            "commsMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.comms_service.CommsSubscriptionRequest",
                    "commsSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchUids": [
                                    {
                                        "name": "TCP-8110"
                                    }
                                ]
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

CommsSubscriptionRequest sonardyne/api/services/comms_service/comms_subscription_request.proto

CommsSubscriptionRequest represents a request to subscribe to one or more communication messages. It includes a unique request identifier to correlate with the response, a timestamp of the request, and a list of communication subscriptions to initiate.

Field Type Label Description
request_uid uint32 Identifier to match the corresponding CommsSubscriptionResponse.
timestamp sonardyne.api.common.Timestamp Timestamp of the request.
comms_subscriptions CommsSubscription repeated List of communication subscriptions to request.

Example

Example code: comms_service.py

import sonardyne_api as son
import time
import random

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time
import random

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time
import random

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.comms_service.CommsEnvelope",
            "commsMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.comms_service.CommsSubscriptionRequest",
                    "commsSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchUids": [
                                    {
                                        "name": "TCP-8110"
                                    }
                                ]
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

CommsSubscriptionResponse sonardyne/api/services/comms_service/comms_subscription_response.proto

CommsSubscriptionResponse represents the response to a CommsSubscriptionRequest. It includes the original request identifier for correlation, a timestamp of the response, the result indicating success or failure, and the list of communication subscriptions returned.

Field Type Label Description
request_uid uint32 Matches the corresponding CommsSubscriptionRequest.
timestamp sonardyne.api.common.Timestamp Timestamp of the response.
result sonardyne.api.common.Result Indicates success or failure of the request.
comms_subscriptions CommsSubscription repeated List of communication subscriptions included in the response.

Example

Example code: comms_service.py

import sonardyne_api as son
import time
import random

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time
import random

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time
import random

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    comms_stream  = wrapper.open_comms_stream(
        son.CommsSubscriptionRequest(comms_subscriptions=[
            son.CommsSubscription(matching_criteria=son.MatchingCriteria(match_uids=[son.UniqueID(name="TCP-8110")]))
        ])
    )

    # write to stream
    print("\n(writing to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            comms_stream.send(
                son.DataPortComms(
                    uid=son.UniqueID(name="TCP-8110"),
                    data_direction=son.DataDirection.DATA_DIRECTION_OUTPUT,
                    data=f"Hello World! {random.randrange(100)}".encode()
                )
            )
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    print("\n(listening to comms stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in comms_stream.recv():
                print(type(message), message)
                print("(listening to comms stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.comms_service.CommsEnvelope",
            "commsMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.comms_service.CommsSubscriptionRequest",
                    "commsSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchUids": [
                                    {
                                        "name": "TCP-8110"
                                    }
                                ]
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

Configuration Service

ConfigurationEnvelope sonardyne/api/services/configuration_service/configuration_envelope.proto

ConfigurationEnvelope is used to encapsulate one or more configuration messages. It allows sending multiple configuration updates together and includes a timestamp indicating when the configurations were requested or applied.

Field Type Label Description
configuration_messages google.protobuf.Any repeated Configurations (messages ending in "Configuration").
timestamp sonardyne.api.common.Timestamp Timestamp of the request.

Example

Example code: configuration_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "Configuration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 2,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "SourceConfiguration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationEnvelope",
            "configurationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationSubscriptionRequest",
                    "configurationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "Configuration"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

ConfigurationService sonardyne/api/services/configuration_service/configuration_service.proto

ConfigurationService provides methods for managing and retrieving instrument configurations. It supports synchronous and asynchronous requests, as well as streaming of configuration updates.

Method Name Request Type Response Type Description
GetVersion sonardyne.api.common.version.GetVersionRequest sonardyne.api.common.version.GetVersionResponse Gets the version of the Sonardyne API.
SetConfiguration SetConfigurationRequest SetConfigurationResponse Sets a configuration.
GetConfiguration GetConfigurationRequest GetConfigurationResponse Gets one or more configurations based on matching criteria.
SendRequest sonardyne.api.common.envelope.RequestEnvelope sonardyne.api.common.envelope.ResponseEnvelope Sends one or more ConfigurationRequests.
ConfigurationStream ConfigurationEnvelope stream ConfigurationEnvelope stream Publishes all configuration changes; publishes all configurations on initial connection.

Example

Example code: configuration_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "Configuration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 2,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "SourceConfiguration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationEnvelope",
            "configurationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationSubscriptionRequest",
                    "configurationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "Configuration"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

ConfigurationSubscription sonardyne/api/services/configuration_service/configuration_subscription.proto

ConfigurationSubscription specifies criteria for subscribing to configuration messages. It allows filtering by message type name suffix and by unique identifiers (UIDs), supporting both inclusion (match) and exclusion rules.

Field Type Label Description
matching_criteria sonardyne.api.common.MatchingCriteria Matching criteria for which configuration messages to subscribe to.

Example

Example code: configuration_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "Configuration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 2,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "SourceConfiguration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationEnvelope",
            "configurationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationSubscriptionRequest",
                    "configurationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "Configuration"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

ConfigurationSubscriptionRequest sonardyne/api/services/configuration_service/configuration_subscription_request.proto

ConfigurationSubscriptionRequest represents a request to subscribe to a set of configurations. If several ConfigurationSubscriptionRequest messages are sent during a stream, each request will overwrite the last. An empty ConfigurationSubscriptionRequest can be sent to stop subscribing to any topics, effectively creating a one-way data input stream. Sending an empty ConfigurationSubscriptionRequest stops messages from being sent on the stream.

Field Type Label Description
request_uid uint32 Identifier to match the corresponding ConfigurationSubscriptionResponse.
timestamp sonardyne.api.common.Timestamp Timestamp of the request.
configuration_subscriptions ConfigurationSubscription repeated List of communication subscriptions to request.

Example

Example code: configuration_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "Configuration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 2,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "SourceConfiguration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationEnvelope",
            "configurationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationSubscriptionRequest",
                    "configurationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "Configuration"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

ConfigurationSubscriptionResponse sonardyne/api/services/configuration_service/configuration_subscription_response.proto

ConfigurationSubscriptionResponse is returned in response to a ConfigurationSubscriptionRequest. It indicates whether the requested configuration subscriptions were successfully applied on the ConfigurationStream. It provides a timestamp for the response, the result status, and a list of the configuration subscriptions currently active after processing the request.

Field Type Label Description
request_uid uint32 Matches the corresponding ConfigurationSubscriptionRequest.
timestamp sonardyne.api.common.Timestamp Timestamp of the response.
result sonardyne.api.common.Result Indicates success or failure of the request.
configuration_subscriptions ConfigurationSubscription repeated List of communication subscriptions included in the response.

Example

Example code: configuration_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "Configuration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 2,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "SourceConfiguration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationEnvelope",
            "configurationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationSubscriptionRequest",
                    "configurationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "Configuration"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

GetConfigurationRequest sonardyne/api/services/configuration_service/get_configuration_request.proto

GetConfigurationRequest is used to request one or more configurations from the instrument, either by UniqueId or by type name suffix.

Field Type Label Description
request_uid uint32 Allows identification of the corresponding GetConfigurationResponse.
timestamp sonardyne.api.common.Timestamp Timestamp of the request.
matching_criteria sonardyne.api.common.MatchingCriteria Matching criteria for which configurations to return.

Example

Example code: configuration_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "Configuration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 2,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "SourceConfiguration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationEnvelope",
            "configurationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationSubscriptionRequest",
                    "configurationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "Configuration"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

GetConfigurationResponse sonardyne/api/services/configuration_service/get_configuration_response.proto

GetConfigurationResponse is returned in response to a GetConfigurationRequest. It contains the requested configuration messages and the result of the request.

Field Type Label Description
request_uid uint32 Allows matching with the corresponding GetConfigurationRequest.
timestamp sonardyne.api.common.Timestamp Timestamp of the response.
configuration_messages google.protobuf.Any repeated Configurations found to match the request (messages ending in "Configuration").
result sonardyne.api.common.Result Success of the GetConfigurationRequest.

Example

Example code: configuration_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "Configuration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 2,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "SourceConfiguration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationEnvelope",
            "configurationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationSubscriptionRequest",
                    "configurationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "Configuration"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

SetConfigurationRequest sonardyne/api/services/configuration_service/set_configuration_request.proto

SetConfigurationRequest is used to send a configuration to the instrument.

Field Type Label Description
request_uid uint32 Allows identification of the corresponding SetConfigurationResponse.
timestamp sonardyne.api.common.Timestamp Timestamp of the request.
configuration google.protobuf.Any Configuration to set.

Example

Example code: configuration_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "Configuration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 2,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "SourceConfiguration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationEnvelope",
            "configurationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationSubscriptionRequest",
                    "configurationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "Configuration"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

SetConfigurationResponse sonardyne/api/services/configuration_service/set_configuration_response.proto

SetConfigurationResponse is returned in response to a SetConfigurationRequest.

Field Type Label Description
request_uid uint32 Allows matching with the corresponding SetConfigurationRequest.
timestamp sonardyne.api.common.Timestamp Timestamp of the response.
configuration google.protobuf.Any New configuration (messages ending in "Configuration") if successful.
result sonardyne.api.common.Result Success of the SetConfigurationRequest.

Example

Example code: configuration_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  

    print("all configurations:")
    configurations = wrapper.get_configurations("Configuration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    print("all configurations ending in SourceConfiguration:")
    configurations = wrapper.get_configurations("SourceConfiguration")
    for configuration in configurations:
        print(f"    • {type(configuration).__name__}")

    configuration_stream = wrapper.open_configuration_stream(
        son.ConfigurationSubscriptionRequest(configuration_subscriptions=[
            son.ConfigurationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="Configuration"))
        ])
    )
    print("\n(listening to configuration stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in configuration_stream.recv():
                print(type(message), message)
                print("(listening to configuration stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "Configuration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 2,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.GetConfigurationRequest",
            "matchingCriteria": {
                "matchTypeNameSuffix": "SourceConfiguration"
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationEnvelope",
            "configurationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.ConfigurationSubscriptionRequest",
                    "configurationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "Configuration"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

Observation Service

ObservationEnvelope sonardyne/api/services/observation_service/observation_envelope.proto

Envelope containing one or more observation messages from the instrument.

Field Type Label Description
observation_messages google.protobuf.Any repeated Any message ending in 'Observation' or a 'ObservationSubscriptionRequest'.

Example

Example code: observation_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationSubscriptionRequest",
                    "observationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "GnssSourceObservation"
                            }
                        },
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "XposSourceObservation"
                            }
                        },
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "SusblSourceObservation"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

ObservationService sonardyne/api/services/observation_service/observation_service.proto

Service for retrieving and streaming observation data from the instrument. Observations are typically data inputs and outputs to components (e.g., a pressure sensor observation).

Method Name Request Type Response Type Description
GetVersion sonardyne.api.common.version.GetVersionRequest sonardyne.api.common.version.GetVersionResponse Gets the version of the Sonardyne API.
ObservationStream ObservationEnvelope stream ObservationEnvelope stream Publishes and receives observation data via a bidirectional stream.

Example

Example code: observation_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationSubscriptionRequest",
                    "observationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "GnssSourceObservation"
                            }
                        },
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "XposSourceObservation"
                            }
                        },
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "SusblSourceObservation"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

ObservationSubscription sonardyne/api/services/observation_service/observation_subscription.proto

Specifies criteria for subscribing to observation messages on the ObservationStream. Allows filtering of observations based on message type suffixes and/or specific unique IDs. Can be used to include or exclude certain messages from the stream.

Field Type Label Description
matching_criteria sonardyne.api.common.MatchingCriteria Matching criteria for which observation messages to subscribe to.

Example

Example code: observation_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationSubscriptionRequest",
                    "observationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "GnssSourceObservation"
                            }
                        },
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "XposSourceObservation"
                            }
                        },
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "SusblSourceObservation"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

ObservationSubscriptionRequest sonardyne/api/services/observation_service/observation_subscription_request.proto

ObservationSubscriptionRequest represents a request to subscribe to a set of observations. Each new ObservationSubscriptionRequest overwrites the previous subscription set. Sending an empty ObservationSubscriptionRequest stops all subscriptions, effectively turning the stream into a one-way data input stream. Sending an empty ObservationSubscriptionRequest stops messages from being sent on the stream.

Field Type Label Description
request_uid uint32 Identifier to match the corresponding ObservationSubscriptionResponse.
timestamp sonardyne.api.common.Timestamp Timestamp of the request.
observation_subscriptions ObservationSubscription repeated List of observation subscriptions to request.

Example

Example code: observation_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationSubscriptionRequest",
                    "observationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "GnssSourceObservation"
                            }
                        },
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "XposSourceObservation"
                            }
                        },
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "SusblSourceObservation"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

ObservationSubscriptionResponse sonardyne/api/services/observation_service/observation_subscription_response.proto

ObservationSubscriptionResponse is returned in response to an ObservationSubscriptionRequest. It indicates whether the requested observation subscriptions were successfully applied on the ObservationStream. It provides a timestamp for the response, the result status, and a list of the observation subscriptions currently active after processing the request.

Field Type Label Description
request_uid uint32 Matches the corresponding ObservationSubscriptionRequest.
timestamp sonardyne.api.common.Timestamp Timestamp of the response.
result sonardyne.api.common.Result Indicates success or failure of the subscription request.
observation_subscriptions ObservationSubscription repeated List of observation subscriptions returned in the response.

Example

Example code: observation_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation")),
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation")),
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationSubscriptionRequest",
                    "observationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "GnssSourceObservation"
                            }
                        },
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "XposSourceObservation"
                            }
                        },
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "SusblSourceObservation"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

Sources

Depth Source

DepthData sonardyne/api/sources/depth_source/depth_data.proto

DepthData contains the measured depth at a specific time along with an estimate of the measurement uncertainty

Field Type Label Description
time_of_validity sonardyne.api.common.Timestamp Time at which the data is valid.
depth_metres double Measured depth in metres.
depth_uncertainty_metres double 1σ of uncertainty of the depth measurement in metres.

DepthDataSourceReference sonardyne/api/sources/depth_source/depth_data_reference.proto

DepthDataSourceReference allows selection of a depth data source from available instruments on the system, including pressure sensors, ports, or GNSS sources. The source can be selected specifically by UniqueId, or generally using "any available" options. Read-only references to the selected source configuration can also be retrieved.

Field Type Label Description
set_none bool Select no DepthDataSourceConfiguration.
set_uid sonardyne.api.common.UniqueID Select PressureSensorConfiguration, EthernetPort, SerialPort, or ExternalControlPort by unique ID.
set_any_pressure_sensor bool Select any available pressure sensor.
set_any_ethernet_port bool Select any available Ethernet port.
set_any_serial_port bool Select any available serial port.
set_any_external_control_port bool Select any available external control port.
set_any_gnss_source bool Select any available external control port.
readonly_uid sonardyne.api.common.UniqueID optional Optional read-only unique ID of a set PressureSensorConfiguration, EthernetPort, SerialPort, or ExternalControlPort.
readonly_none_set bool If true, no depth data source set.
readonly_pressure_sensor_reference sonardyne.api.sensors.pressure_sensor.PressureSensorConfiguration Read-only reference to a pressure sensor configuration.
readonly_ethernet_port_reference sonardyne.api.common.ports.ethernet_port.EthernetPort Read-only reference to an Ethernet port.
readonly_serial_port_reference sonardyne.api.common.ports.serial_port.SerialPort Read-only reference to a serial port.
readonly_external_control_port_reference sonardyne.api.common.ports.external_control_port.ExternalControlPort Read-only reference to an external control port.
readonly_gnss_source_reference sonardyne.api.sources.gnss_source.GnssSourceConfiguration Read-only reference to a GNSS source configuration.

DepthSourceConfiguration sonardyne/api/sources/depth_source/depth_source_configuration.proto

DepthSourceConfiguration represents the configuration of a depth source. It defines the unique identifier for the depth source, a reference to the input depth data source, and the lever arms from the vessel reference point.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the depth source.
input_depth_data_source_reference DepthDataSourceReference optional Reference to the input depth data source.
lever_arms sonardyne.api.common.installation.LeverArms optional Lever arms from the vessel reference point.

Example

Example code: depth_source_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.DepthSourceConfiguration(
        input_depth_data_source_reference=son.DepthDataSourceReference(
            set_uid=son.UniqueID(name="TCP-8110")
        ),
        lever_arms=son.LeverArms(forward_metres=1.5, starboard_metres=2, down_metres=3.2)
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.DepthSourceConfiguration(
        input_depth_data_source_reference=son.DepthDataSourceReference(
            set_uid=son.UniqueID(name="TCP-8110")
        ),
        lever_arms=son.LeverArms(forward_metres=1.5, starboard_metres=2, down_metres=3.2)
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.DepthSourceConfiguration(
        input_depth_data_source_reference=son.DepthDataSourceReference(
            set_uid=son.UniqueID(name="TCP-8110")
        ),
        lever_arms=son.LeverArms(forward_metres=1.5, starboard_metres=2, down_metres=3.2)
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.sources.depth_source.DepthSourceConfiguration",
                "inputDepthDataSourceReference": {
                    "setUid": {
                        "name": "TCP-8110"
                    }
                },
                "leverArms": {
                    "forwardMetres": 1.5,
                    "starboardMetres": 2.0,
                    "downMetres": 3.2
                }
            }
        }
    ]
}, indent=4).encode())

DepthSourceObservation sonardyne/api/sources/depth_source/depth_source_observation.proto

DepthSourceObservation contains the unique identifier of the depth source, the timestamp when the data was received (time of arrival), and the measured depth data.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the depth source.
time_of_arrival sonardyne.api.common.Timestamp optional Timestamp when the data was received; set if not provided.
depth_data DepthData Measured depth data.

GNSS Source

GnssHeightMode sonardyne/api/sources/gnss_source/gnss_height_mode.proto

GnssHeightMode specifies the reference surface used for GNSS height measurements. Heights from GNSS are measured relative to a chosen reference surface.

  • GEOIDAL: Heights are measured relative to the geoid (approximate mean sea level).
  • ELLIPSOIDAL: Heights are measured relative to the Earth's ellipsoid model.
Name Number Description
GNSS_HEIGHT_MODE_UNSPECIFIED 0 No reference surface specified.
GNSS_HEIGHT_MODE_GEOIDAL 1 Heights are geoid-referenced.
GNSS_HEIGHT_MODE_ELLIPSOIDAL 2 Heights are ellipsoid-referenced.

GnssSourceConfiguration sonardyne/api/sources/gnss_source/gnss_source_configuration.proto

GnssSourceConfiguration represents the configuration of a GNSS source. Includes data port reference, lever arms, uncertainty handling, and GNSS depth mode.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the GNSS source.
input_data_port sonardyne.api.common.ports.DataPortReference optional Reference to the input data port providing GNSS data.
lever_arms sonardyne.api.common.installation.LeverArms optional Lever arms from the vessel reference point.
fallback_horizontal_uncertainty_metres sonardyne.api.common.bounded_values.BoundedDouble optional 1σ of horizontal uncertainty applied to incoming GNSS measurements; ignored if 0.
scale_uncertainty sonardyne.api.common.bounded_values.BoundedDouble optional Scale factor applied to horizontal uncertainty from the GNSS receiver.
gnss_height_mode GnssHeightMode optional Height mode for the GNSS source.

Example

Example code: gnss_source_configuration.py

import sonardyne_api as son
import time

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.GnssSourceConfiguration(
        input_data_port=son.DataPortReference(
            set_uid=son.UniqueID(name="External Control")
        )
    )))
import sonardyne_api as son
import time

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.GnssSourceConfiguration(
        input_data_port=son.DataPortReference(
            set_uid=son.UniqueID(name="External Control")
        )
    )))
import sonardyne_api as son
import time

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.GnssSourceConfiguration(
        input_data_port=son.DataPortReference(
            set_uid=son.UniqueID(name="External Control")
        )
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.sources.gnss_source.GnssSourceConfiguration",
                "inputDataPort": {
                    "setUid": {
                        "name": "External Control"
                    }
                }
            }
        }
    ]
}, indent=4).encode())

GnssSourceObservation sonardyne/api/sources/gnss_source/gnss_source_observation.proto

GnssSourceObservation is data from a GNSS source, including position and optional uncertainty information. Contains the unique ID of the GNSS source and the timestamp of data arrival.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the GNSS source.
time_of_arrival sonardyne.api.common.Timestamp optional Timestamp when the data was received; set if not provided.
gga_telegram sonardyne.api.common.telegrams.GgaTelegram GGA message received by the GNSS source.
gst_telegram sonardyne.api.common.telegrams.GstTelegram GST message received by the GNSS source.

Example

Example code: gnss_source_observation.py

import sonardyne_api as son
import time

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation_stream.send(son.GnssSourceObservation(gga_telegram=son.GgaTelegram(
                time_of_validity=son.Timestamp(common_time_seconds=time.time()),
                latitude_radians=0.0,
                longitude_radians=0.0,
                altitude_metres=0.0,
                geoid_separation_metres=0.0,
                hdop=0.5,
                age_seconds=0.0,
                number_of_satellites=10,
                reference_station_id=None,
                fix_quality=son.GgaTelegram.FIX_QUALITY_GNSS_FIX
            )))
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation"))
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation_stream.send(son.GnssSourceObservation(gga_telegram=son.GgaTelegram(
                time_of_validity=son.Timestamp(common_time_seconds=time.time()),
                latitude_radians=0.0,
                longitude_radians=0.0,
                altitude_metres=0.0,
                geoid_separation_metres=0.0,
                hdop=0.5,
                age_seconds=0.0,
                number_of_satellites=10,
                reference_station_id=None,
                fix_quality=son.GgaTelegram.FIX_QUALITY_GNSS_FIX
            )))
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation"))
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation_stream.send(son.GnssSourceObservation(gga_telegram=son.GgaTelegram(
                time_of_validity=son.Timestamp(common_time_seconds=time.time()),
                latitude_radians=0.0,
                longitude_radians=0.0,
                altitude_metres=0.0,
                geoid_separation_metres=0.0,
                hdop=0.5,
                age_seconds=0.0,
                number_of_satellites=10,
                reference_station_id=None,
                fix_quality=son.GgaTelegram.FIX_QUALITY_GNSS_FIX
            )))
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="GnssSourceObservation"))
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.sources.gnss_source.GnssSourceObservation",
                    "ggaTelegram": {
                        "timeOfValidity": {
                            "commonTimeSeconds": 1772458213.2997377
                        },
                        "hdop": 0.5,
                        "numberOfSatellites": 10,
                        "fixQuality": "FIX_QUALITY_GNSS_FIX"
                    }
                }
            ]
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationSubscriptionRequest",
                    "observationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "GnssSourceObservation"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

Sound Velocity Source

SoundVelocityData sonardyne/api/sources/sound_velocity_source/sound_velocity_data.proto

SoundVelocityData represents a measurement of sound velocity at a specific time. This data can be sourced from a manual input, a salinity-based calculation, or a connected instrument, depending on the configuration of the sound velocity source.

Field Type Label Description
time_of_validity sonardyne.api.common.Timestamp Time at which the data is valid.
sound_velocity_meters_per_second double Measured sound velocity in metres per second.

SoundVelocityDataSourceReference sonardyne/api/sources/sound_velocity_source/sound_velocity_data_source_reference.proto

SoundVelocityDataSourceReference is the source of sound velocity data. The source can be one of a manual input, salinity-based calculation, or an instrument connected via Ethernet, Serial, or External Control Port. Provides read-only references to the selected source for verification or downstream use.

Field Type Label Description
set_uid sonardyne.api.common.UniqueID Select an EthernetPort, SerialPort, or ExternalControlPort by unique ID.
set_any_ethernet_port bool Select any available Ethernet port.
set_any_serial_port bool Select any available serial port.
set_any_external_control_port bool Select any available external control port.
set_manual_sound_velocity_metres_per_second double Sets the manual sound velocity value for use.
set_salinity_parts_per_thousand double Sets the salinity used in derived sound velocity calculations.
readonly_uid sonardyne.api.common.UniqueID optional Optional read-only unique ID of a set EthernetPort, SerialPort, or ExternalControlPort.
readonly_none_set bool If true, no PpsTimeSourceConfiguration set.
readonly_ethernet_port_reference sonardyne.api.common.ports.ethernet_port.EthernetPort Read-only reference to an Ethernet port.
readonly_serial_port_reference sonardyne.api.common.ports.serial_port.SerialPort Read-only reference to a serial port.
readonly_external_control_port_reference sonardyne.api.common.ports.external_control_port.ExternalControlPort Read-only reference to an external control port.
readonly_manual_sound_velocity_metres_per_second double Read-only set manual sound velocity.
readonly_salinity_parts_per_thousand double Read-only set salinity used in derived sound velocity calculations.

SoundVelocitySourceConfiguration sonardyne/api/sources/sound_velocity_source/sound_velocity_source_configuration.proto

SoundVelocitySourceConfiguration represents the configuration of a sound velocity source. It defines a unique identifier for the source and specifies the input source from which sound velocity data will be obtained, which could be a manual value, a salinity-based calculation, or a connected instrument.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the depth source.
input_sound_velocity_data_source_reference SoundVelocityDataSourceReference optional Reference to the input depth data source.

Example

Example code: sound_velocity_source_configuration.py

import sonardyne_api as son
import time
import random

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.SoundVelocitySourceConfiguration(
        input_sound_velocity_data_source_reference=son.SoundVelocityDataSourceReference(set_salinity_parts_per_thousand=100)))
    )
    print(wrapper.set_configuration(son.SoundVelocitySourceConfiguration(
        input_sound_velocity_data_source_reference=son.SoundVelocityDataSourceReference(set_manual_sound_velocity_metres_per_second=150)))
    )
    print(wrapper.set_configuration(son.SoundVelocitySourceConfiguration(
        input_sound_velocity_data_source_reference=son.SoundVelocityDataSourceReference(set_any_ethernet_port=True)))
    )
    print(wrapper.set_configuration(son.SoundVelocitySourceConfiguration(
        input_sound_velocity_data_source_reference=son.SoundVelocityDataSourceReference(set_any_external_control_port=True)))
    )
import sonardyne_api as son
import time
import random

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.SoundVelocitySourceConfiguration(
        input_sound_velocity_data_source_reference=son.SoundVelocityDataSourceReference(set_salinity_parts_per_thousand=100)))
    )
    print(wrapper.set_configuration(son.SoundVelocitySourceConfiguration(
        input_sound_velocity_data_source_reference=son.SoundVelocityDataSourceReference(set_manual_sound_velocity_metres_per_second=150)))
    )
    print(wrapper.set_configuration(son.SoundVelocitySourceConfiguration(
        input_sound_velocity_data_source_reference=son.SoundVelocityDataSourceReference(set_any_ethernet_port=True)))
    )
    print(wrapper.set_configuration(son.SoundVelocitySourceConfiguration(
        input_sound_velocity_data_source_reference=son.SoundVelocityDataSourceReference(set_any_external_control_port=True)))
    )
import sonardyne_api as son
import time
import random

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.SoundVelocitySourceConfiguration(
        input_sound_velocity_data_source_reference=son.SoundVelocityDataSourceReference(set_salinity_parts_per_thousand=100)))
    )
    print(wrapper.set_configuration(son.SoundVelocitySourceConfiguration(
        input_sound_velocity_data_source_reference=son.SoundVelocityDataSourceReference(set_manual_sound_velocity_metres_per_second=150)))
    )
    print(wrapper.set_configuration(son.SoundVelocitySourceConfiguration(
        input_sound_velocity_data_source_reference=son.SoundVelocityDataSourceReference(set_any_ethernet_port=True)))
    )
    print(wrapper.set_configuration(son.SoundVelocitySourceConfiguration(
        input_sound_velocity_data_source_reference=son.SoundVelocityDataSourceReference(set_any_external_control_port=True)))
    )
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.sources.sound_velocity_source.SoundVelocitySourceConfiguration",
                "inputSoundVelocityDataSourceReference": {
                    "setSalinityPartsPerThousand": 100.0
                }
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 2,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.sources.sound_velocity_source.SoundVelocitySourceConfiguration",
                "inputSoundVelocityDataSourceReference": {
                    "setManualSoundVelocityMetresPerSecond": 150.0
                }
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 3,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.sources.sound_velocity_source.SoundVelocitySourceConfiguration",
                "inputSoundVelocityDataSourceReference": {
                    "setAnyEthernetPort": true
                }
            }
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 4,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.sources.sound_velocity_source.SoundVelocitySourceConfiguration",
                "inputSoundVelocityDataSourceReference": {
                    "setAnyExternalControlPort": true
                }
            }
        }
    ]
}, indent=4).encode())

SoundVelocitySourceObservation sonardyne/api/sources/sound_velocity_source/sound_velocity_source_observation.proto

SoundVelocitySourceObservation represents a measurement of sound velocity from a configured source. It includes a unique identifier for the source, the timestamp when the data was received, and the actual measured sound velocity data.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the sound velocity source.
time_of_arrival sonardyne.api.common.Timestamp optional Timestamp when the data was received.
sound_velocity_data SoundVelocityData Measured sound velocity data.

Example

Example code: sound_velocity_source_observation.py

import sonardyne_api as son
import time
import random

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation = son.SoundVelocitySourceObservation(sound_velocity_data=son.SoundVelocityData(
                time_of_validity=son.Timestamp(common_time_seconds=time.time()),
                sound_velocity_meters_per_second=1500.0 + random.randrange(-500,500) * 0.01
            ))
            observation_stream.send(observation)
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SoundVelocitySourceObservation"))
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time
import random

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation = son.SoundVelocitySourceObservation(sound_velocity_data=son.SoundVelocityData(
                time_of_validity=son.Timestamp(common_time_seconds=time.time()),
                sound_velocity_meters_per_second=1500.0 + random.randrange(-500,500) * 0.01
            ))
            observation_stream.send(observation)
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SoundVelocitySourceObservation"))
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time
import random

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation = son.SoundVelocitySourceObservation(sound_velocity_data=son.SoundVelocityData(
                time_of_validity=son.Timestamp(common_time_seconds=time.time()),
                sound_velocity_meters_per_second=1500.0 + random.randrange(-500,500) * 0.01
            ))
            observation_stream.send(observation)
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SoundVelocitySourceObservation"))
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.sources.sound_velocity_source.SoundVelocitySourceObservation",
                    "soundVelocityData": {
                        "timeOfValidity": {
                            "commonTimeSeconds": 1772458214.2173042
                        },
                        "soundVelocityMetersPerSecond": 1503.64
                    }
                }
            ]
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationSubscriptionRequest",
                    "observationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "SoundVelocitySourceObservation"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

SUSBL Source

SusblSourceConfiguration sonardyne/api/sources/susbl_source/susbl_source_configuration.proto

SusblSourceConfiguration represents the configuration of a SUSBL (Short BaseLine) acoustic positioning source. It defines which input port provides SUSBL data, any lever arm offsets from the vessel reference point, scaling or fallback parameters for horizontal uncertainty, and optional beacon and latency settings.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the SUSBL source.
input_data_port sonardyne.api.common.ports.DataPortReference optional Reference to the input data port providing SUSBL data.
lever_arms sonardyne.api.common.installation.LeverArms optional Lever arms from the vessel reference point.
fallback_horizontal_uncertainty_metres sonardyne.api.common.bounded_values.BoundedDouble optional 1σ of horizontal uncertainty applied to incoming SUSBL measurements; ignored if 0.
scale_uncertainty sonardyne.api.common.bounded_values.BoundedDouble optional Scale factor applied to horizontal uncertainty from the SUSBL source.
beacon_id uint32 optional Beacon ID; ignored if 0.
latency_seconds sonardyne.api.common.bounded_values.BoundedDouble optional Latency of the source in seconds; ignored if 0.

Example

Example code: susbl_source_configuration.py

import sonardyne_api as son
import time

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.SusblSourceConfiguration(input_data_port=son.DataPortReference(set_uid=son.UniqueID(name="External Control")))))
import sonardyne_api as son
import time

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.SusblSourceConfiguration(input_data_port=son.DataPortReference(set_uid=son.UniqueID(name="External Control")))))
import sonardyne_api as son
import time

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.SusblSourceConfiguration(input_data_port=son.DataPortReference(set_uid=son.UniqueID(name="External Control")))))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.sources.susbl_source.SusblSourceConfiguration",
                "inputDataPort": {
                    "setUid": {
                        "name": "External Control"
                    }
                }
            }
        }
    ]
}, indent=4).encode())

SusblSourceObservation sonardyne/api/sources/susbl_source/susbl_source_observation.proto

SusblSourceObservation represents an observation from a SUSBL (Short BaseLine) source. It includes the unique identifier of the source, the timestamp when the data was received, and the measured SUSBL data such as position, orientation, and additional info.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the SUSBL source.
time_of_arrival sonardyne.api.common.Timestamp optional Timestamp when the data was received; set if not provided.
psimssb_telegram sonardyne.api.common.telegrams.PsimssbTelegram PSIMSSB message received by the SUSBL source.
gga_telegram sonardyne.api.common.telegrams.GgaTelegram GGA message received by the SUSBL source.

Example

Example code: susbl_source_observation.py

import sonardyne_api as son
import time

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation_stream.send(son.SusblSourceObservation(psimssb_telegram=son.PsimssbTelegram(
                time_of_validity=son.Timestamp(common_time_seconds=time.time()),
                coordinate_type=son.PsimssbTelegram.PSIMSSB_COORDINATE_SYSTEM_RADIANS,
                x_coordinate=0,
                y_coordinate=0,
                transponder_code=0,
                is_valid=True,
                orientation_type=son.PsimssbTelegram.PSIMSSB_ORIENTATION_NORTH,
                error_code="",
                software_filter=son.PsimssbTelegram.PSIMSSB_SOFTWARE_FILTER_UNKNOWN,
                depth_metres=0,
                position_uncertainty_metres=1
            )))
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation"))
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation_stream.send(son.SusblSourceObservation(psimssb_telegram=son.PsimssbTelegram(
                time_of_validity=son.Timestamp(common_time_seconds=time.time()),
                coordinate_type=son.PsimssbTelegram.PSIMSSB_COORDINATE_SYSTEM_RADIANS,
                x_coordinate=0,
                y_coordinate=0,
                transponder_code=0,
                is_valid=True,
                orientation_type=son.PsimssbTelegram.PSIMSSB_ORIENTATION_NORTH,
                error_code="",
                software_filter=son.PsimssbTelegram.PSIMSSB_SOFTWARE_FILTER_UNKNOWN,
                depth_metres=0,
                position_uncertainty_metres=1
            )))
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation"))
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation_stream.send(son.SusblSourceObservation(psimssb_telegram=son.PsimssbTelegram(
                time_of_validity=son.Timestamp(common_time_seconds=time.time()),
                coordinate_type=son.PsimssbTelegram.PSIMSSB_COORDINATE_SYSTEM_RADIANS,
                x_coordinate=0,
                y_coordinate=0,
                transponder_code=0,
                is_valid=True,
                orientation_type=son.PsimssbTelegram.PSIMSSB_ORIENTATION_NORTH,
                error_code="",
                software_filter=son.PsimssbTelegram.PSIMSSB_SOFTWARE_FILTER_UNKNOWN,
                depth_metres=0,
                position_uncertainty_metres=1
            )))
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="SusblSourceObservation"))
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.sources.susbl_source.SusblSourceObservation",
                    "psimssbTelegram": {
                        "timeOfValidity": {
                            "commonTimeSeconds": 1772458214.0693219
                        },
                        "coordinateType": "PSIMSSB_COORDINATE_SYSTEM_RADIANS",
                        "isValid": true,
                        "orientationType": "PSIMSSB_ORIENTATION_NORTH",
                        "softwareFilter": "PSIMSSB_SOFTWARE_FILTER_UNKNOWN",
                        "positionUncertaintyMetres": 1.0
                    }
                }
            ]
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationSubscriptionRequest",
                    "observationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "SusblSourceObservation"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

Time Source

NtpTimeSourceConfiguration sonardyne/api/sources/time_source/ntp_time_source_configuration.proto

NtpTimeSourceConfiguration represents the configuration for an NTP (Network Time Protocol) time source. It includes the unique identifier of the source and the IP address of the NTP server used for time synchronization.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the NTP time source.
ntp_server_ip_address string optional IP address of the NTP server.

Example

Example code: ntp_time_source_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.NtpTimeSourceConfiguration(ntp_server_ip_address="230.229.228.227")))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.NtpTimeSourceConfiguration(ntp_server_ip_address="230.229.228.227")))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.NtpTimeSourceConfiguration(ntp_server_ip_address="230.229.228.227")))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.sources.time_source.NtpTimeSourceConfiguration",
                "ntpServerIpAddress": "230.229.228.227"
            }
        }
    ]
}, indent=4).encode())

NtpTimeSourceReference sonardyne/api/sources/time_source/ntp_time_source_reference.proto

NtpTimeSourceReference represents a reference to a specific NTP time source configuration. It allows selecting a source by UniqueId, selecting any available source, or selecting none. The readonly_reference field contains the full configuration of the referenced NTP source.

Field Type Label Description
set_any bool Select any NtpTimeSourceConfiguration (selects lowest uid).
set_none bool Select no NtpTimeSourceConfiguration.
set_uid sonardyne.api.common.UniqueID Select NtpTimeSourceConfiguration by uid.
readonly_none_set bool If true, no NtpTimeSourceConfiguration source set.
readonly_ntp_time_source_reference NtpTimeSourceConfiguration Contains the referenced NtpTimeSourceConfiguration.

PpsTimeSourceConfiguration sonardyne/api/sources/time_source/pps_time_source_configuration.proto

PpsTimeSourceConfiguration represents the configuration of a PPS (Pulse Per Second) time source. It defines a unique identifier for the source and specifies which trigger port is used as the PPS input.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the PPS time source.
input_trigger_port sonardyne.api.common.ports.trigger_port.TriggerPortReference optional Trigger port used as PPS input.

Example

Example code: pps_time_source_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.PpsTimeSourceConfiguration(input_trigger_port=son.TriggerPortReference(set_any=True))))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.PpsTimeSourceConfiguration(input_trigger_port=son.TriggerPortReference(set_any=True))))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.PpsTimeSourceConfiguration(input_trigger_port=son.TriggerPortReference(set_any=True))))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.sources.time_source.PpsTimeSourceConfiguration",
                "inputTriggerPort": {
                    "setAny": true
                }
            }
        }
    ]
}, indent=4).encode())

PpsTimeSourceReference sonardyne/api/sources/time_source/pps_time_source_reference.proto

PpsTimeSourceReference specifies a reference to a PPS (Pulse Per Second) time source configuration. It allows selecting a PPS source by UniqueId, choosing any available source, or selecting none. The readonly_reference field provides a read-only copy of the referenced configuration.

Field Type Label Description
set_any bool Select any PpsTimeSourceConfiguration (selects lowest uid).
set_none bool Select no PpsTimeSourceConfiguration.
set_uid sonardyne.api.common.UniqueID Select PpsTimeSourceConfiguration by uid.
readonly_none_set bool If true, no PpsTimeSourceConfiguration set.
readonly_pps_time_source_reference PpsTimeSourceConfiguration Contains the referenced PpsTimeSourceConfiguration.

ZdaData sonardyne/api/sources/time_source/zda_data.proto

ZdaData represents the UTC time provided by an NMEA ZDA message.

Field Type Label Description
current_utc_time_seconds double Current UTC time in seconds.

ZdaTimeSourceConfiguration sonardyne/api/sources/time_source/zda_time_source_configuration.proto

ZdaTimeSourceConfiguration represents the configuration for a ZDA-based time source. This configuration specifies a unique identifier and the input data port providing ZDA (UTC time) messages from an NMEA-compatible device.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the ZDA time source.
input_data_port sonardyne.api.common.ports.DataPortReference optional Reference to the input data port providing ZDA time data.

Example

Example code: zda_time_source_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.ZdaTimeSourceConfiguration(input_data_port=son.DataPortReference(set_any_ethernet_port=True))))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.ZdaTimeSourceConfiguration(input_data_port=son.DataPortReference(set_any_ethernet_port=True))))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.ZdaTimeSourceConfiguration(input_data_port=son.DataPortReference(set_any_ethernet_port=True))))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.sources.time_source.ZdaTimeSourceConfiguration",
                "inputDataPort": {
                    "setAnyEthernetPort": true
                }
            }
        }
    ]
}, indent=4).encode())

ZdaTimeSourceObservation sonardyne/api/sources/time_source/zda_time_source_observation.proto

ZdaTimeSourceObservation represents an observation from a ZDA-based time source. It includes the unique identifier of the source, the arrival timestamp, and the measured UTC time data in seconds.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the ZDA time source.
time_of_arrival sonardyne.api.common.Timestamp optional Timestamp when the data was received; set if not provided.
zda_data ZdaData ZDA time measurement data.

Example

Example code: zda_time_source_observation.py

import sonardyne_api as son
import time

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation_stream.send(son.ZdaTimeSourceObservation(zda_data=son.ZdaData(current_utc_time_seconds = time.time())))
            time.sleep(1)
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation_stream.send(son.ZdaTimeSourceObservation(zda_data=son.ZdaData(current_utc_time_seconds = time.time())))
            time.sleep(1)
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation_stream.send(son.ZdaTimeSourceObservation(zda_data=son.ZdaData(current_utc_time_seconds = time.time())))
            time.sleep(1)
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.sources.time_source.ZdaTimeSourceObservation",
                    "zdaData": {
                        "currentUtcTimeSeconds": 1772458214.925132
                    }
                }
            ]
        }
    ]
}, indent=4).encode())

ZdaTimeSourceReference sonardyne/api/sources/time_source/zda_time_source_reference.proto

ZdaTimeSourceReference specifies a reference to a ZDA-based time source. It allows selecting any source, no source, or a specific source by UniqueId. The readonly_reference field contains the selected ZDA time source configuration.

Field Type Label Description
set_any bool Select any ZdaTimeSourceConfiguration (selects lowest uid).
set_none bool Select no ZdaTimeSourceConfiguration.
set_uid sonardyne.api.common.UniqueID Select ZdaTimeSourceConfiguration by uid.
readonly_none_set bool If true, no ZdaTimeSourceConfiguration set.
readonly_zda_time_source_reference ZdaTimeSourceConfiguration Contains the referenced ZdaTimeSourceConfiguration.

XPOS Source

XposData sonardyne/api/sources/xpos_source/xpos_data.proto

XposData represents a measured position from an XPOS system at a specific time. The message includes latitude, longitude, depth, associated uncertainties, and the source of the XPOS data.

Field Type Label Description
time_of_validity sonardyne.api.common.Timestamp Time at which the XPOS data is valid.
latitude_radians double Latitude in radians.
longitude_radians double Longitude in radians.
horizontal_position_uncertainty_ellipse sonardyne.api.common.navigation.HorizontalPositionErrorEllipse Error ellipse for horizontal position.
horizontal_position_uncertainty_metres double 1σ of horizontal uncertainty in metres.
depth_metres double Depth in metres.
depth_uncertainty_metres double 1σ of depth uncertainty in metres.
source XposSource Source of the XPOS data.

XposSourceConfiguration sonardyne/api/sources/xpos_source/xpos_source_configuration.proto

XposSourceConfiguration represents the configuration of an XPOS positioning source. This includes its unique identifier, the input data port providing XPOS measurements, lever arm offsets relative to the vessel reference point, and an optional fallback horizontal uncertainty value.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the XPOS source.
input_data_port sonardyne.api.common.ports.DataPortReference optional Reference to the input data port providing XPOS data.
lever_arms sonardyne.api.common.installation.LeverArms optional Lever arms from the vessel reference point.
fallback_horizontal_uncertainty_metres sonardyne.api.common.bounded_values.BoundedDouble optional 1σ of horizontal uncertainty applied to incoming XPOS measurements; ignored if 0.

Example

Example code: xpos_source_configuration.py

import sonardyne_api as son
import time

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.XposSourceConfiguration(
        input_data_port=son.DataPortReference(
            set_uid=son.UniqueID(name="External Control")
        )
    )))
import sonardyne_api as son
import time

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.XposSourceConfiguration(
        input_data_port=son.DataPortReference(
            set_uid=son.UniqueID(name="External Control")
        )
    )))
import sonardyne_api as son
import time

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.XposSourceConfiguration(
        input_data_port=son.DataPortReference(
            set_uid=son.UniqueID(name="External Control")
        )
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "uid": 1,
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.configuration_service.SetConfigurationRequest",
            "configuration": {
                "@type": "type.googleapis.com/sonardyne.api.sources.xpos_source.XposSourceConfiguration",
                "inputDataPort": {
                    "setUid": {
                        "name": "External Control"
                    }
                }
            }
        }
    ]
}, indent=4).encode())

XposSourceObservation sonardyne/api/sources/xpos_source/xpos_source_observation.proto

XposSourceObservation represents an observation from an XPOS positioning source. It includes the unique identifier of the source, the timestamp when the data was received, and the measured XPOS data including position and depth information.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the XPOS source.
time_of_arrival sonardyne.api.common.Timestamp optional Time of arrival of the data; set if not provided.
xpos_data XposData XPOS measurement data.

Example

Example code: xpos_source_observation.py

import sonardyne_api as son
import time

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation = son.XposSourceObservation(xpos_data=son.XposData(
                time_of_validity=son.Timestamp(common_time_seconds=time.time()),
                latitude_radians=0.0,
                longitude_radians=0.0,
                depth_metres=0.0,
                depth_uncertainty_metres=1.0,
                horizontal_position_uncertainty_metres=0.5,
                source=son.XPOS_SOURCE_GNSS
            ))
            observation_stream.send(observation)
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation"))
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation = son.XposSourceObservation(xpos_data=son.XposData(
                time_of_validity=son.Timestamp(common_time_seconds=time.time()),
                latitude_radians=0.0,
                longitude_radians=0.0,
                depth_metres=0.0,
                depth_uncertainty_metres=1.0,
                horizontal_position_uncertainty_metres=0.5,
                source=son.XPOS_SOURCE_GNSS
            ))
            observation_stream.send(observation)
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation"))
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import sonardyne_api as son
import time

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    # write to stream
    observation_stream = wrapper.open_observation_stream()
    print("\n(writing to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            observation = son.XposSourceObservation(xpos_data=son.XposData(
                time_of_validity=son.Timestamp(common_time_seconds=time.time()),
                latitude_radians=0.0,
                longitude_radians=0.0,
                depth_metres=0.0,
                depth_uncertainty_metres=1.0,
                horizontal_position_uncertainty_metres=0.5,
                source=son.XPOS_SOURCE_GNSS
            ))
            observation_stream.send(observation)
            time.sleep(1)
    except KeyboardInterrupt:
        pass

    # read from stream
    observation_stream = wrapper.open_observation_stream(
        son.ObservationSubscriptionRequest(observation_subscriptions=[
            son.ObservationSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="XposSourceObservation"))
        ])
    )
    print("\n(listening to observation stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in observation_stream.recv():
                print(type(message), message)
                print("(listening to observation stream) press ctrl-c to stop stream")
    except KeyboardInterrupt:
        pass
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))
socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.sources.xpos_source.XposSourceObservation",
                    "xposData": {
                        "timeOfValidity": {
                            "commonTimeSeconds": 1772458213.6010525
                        },
                        "horizontalPositionUncertaintyMetres": 0.5,
                        "depthUncertaintyMetres": 1.0,
                        "source": "XPOS_SOURCE_GNSS"
                    }
                }
            ]
        }
    ]
}, indent=4).encode())

socket.sendall(json.dumps(
{
    "@type": "type.googleapis.com/sonardyne.api.common.envelope.RequestEnvelope",
    "requests": [
        {
            "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationEnvelope",
            "observationMessages": [
                {
                    "@type": "type.googleapis.com/sonardyne.api.services.observation_service.ObservationSubscriptionRequest",
                    "observationSubscriptions": [
                        {
                            "matchingCriteria": {
                                "matchTypeNameSuffix": "XposSourceObservation"
                            }
                        }
                    ]
                }
            ]
        }
    ]
}, indent=4).encode())

while True:
    if data := socket.recv(10240):
        print(data.decode())

XposSource sonardyne/api/sources/xpos_source/xpos_source.proto

XposSource enumerates the possible sources of XPOS positioning data. It indicates whether the position was derived from GNSS, USBL, manually entered, or is unknown.

Name Number Description
XPOS_SOURCE_UNSPECIFIED 0 Unspecified XPOS source.
XPOS_SOURCE_UNKNOWN 1 Unknown XPOS source.
XPOS_SOURCE_GNSS 2 GNSS-derived XPOS position.
XPOS_SOURCE_USBL 3 USBL-derived XPOS position.
XPOS_SOURCE_MANUAL 4 Manually entered position.

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)

google.protobuf.Any

For more information on Protobuf's Any message, see protobuf.dev/programming-guides/proto3.