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))

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))

AhrsAlgorithmStatus sonardyne/api/algorithms/ahrs_algorithm/ahrs_algorithm_status.proto

AhrsAlgorithmStatus contains data from the AHRS algorithm about its alignment progress.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the AHRS algorithm.
is_aligned bool Whether the heading quality threshold for the INS to start running has been reached yet.
percent_complete double Percentage (0-100) the AHRS has progressed towards completion.

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

Velocity limit enum internal to AdcpVelocityLimit.

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.
dvl_blanking_distance_metres sonardyne.api.common.bounded_values.BoundedDouble optional Blanking distance in metres, to specify a minimum altitude for the DVL algorithm.

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)
        ),
        dvl_blanking_distance_metres=son.BoundedDouble(value=5.687)
    )))
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)
        ),
        dvl_blanking_distance_metres=son.BoundedDouble(value=5.687)
    )))
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)
        ),
        dvl_blanking_distance_metres=son.BoundedDouble(value=5.687)
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))

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

DVL mode enum internal to DvlMode.

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

DvlRate.DvlRateEnum defines a DVL rate.

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.

DVL Filter Algorithm

DvlFilterAlgorithmObservation sonardyne/api/algorithms/dvl_filter_algorithm/dvl_filter_algorithm_observation.proto

DvlFilterAlgorithmObservation provides filtered measurement data from a DVL algorithm, including a unique identifier for the associated algorithm and the filtered DVL data.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the associated DVL algorithm.
filtered_dvl_data FilteredDvlData Filtered DVL measurement data from the algorithm.

DvlFilterBeamData sonardyne/api/algorithms/dvl_filter_algorithm/dvl_filter_beam_data.proto

DvlFilterBeamData provides detailed information for a single DVL beam measurement, including timestamp, velocity, uncertainty, range, correlation score, and any rejection reasons.

Field Type Label Description
time_of_validity sonardyne.api.common.Timestamp Timestamp indicating when the data is valid.
beam_number uint32 Beam number (typically 1 to 4).
velocity_metres_per_second double Measured velocity by this DVL beam in metres per second.
velocity_uncertainty_metres_per_second double 1σ of uncertainty of the measured velocity in metres per second.
slant_range_metres double Measured range from DVL to target along the beam in metres.
cross_correlation_score double Correlation score of the processed signal, indicating quality.
rejection_reasons DvlFilterBeamRejectionReasons Reasons for rejecting this beam's data; empty if valid.

DvlFilterBeamRejectionReasons sonardyne/api/algorithms/dvl_filter_algorithm/dvl_filter_beam_rejection_reasons.proto

DvlFilterBeamRejectionReasons represents the reasons for a rejection of individual DVL beam data.

Field Type Label Description
none bool No rejection. The observation was accepted.
rejection_reason_unspecified bool optional Miscellaneous rejection reason.
rejection_reason_disabled bool optional Rejection due to beam being disabled.
rejection_reason_bad_data bool optional Rejection due to bad data.
rejection_reason_timeout bool optional Rejection due to timeout.
rejection_reason_velocity_change bool optional Rejection due to velocity change.
rejection_reason_cross_correlation bool optional Rejection due to low cross correlation.
rejection_reason_signal_to_noise bool optional Rejection due to low signal to noise ratio.
rejection_reason_signal_level bool optional Rejection due to low signal level.
rejection_reason_velocity_error bool optional Rejection due to velocity error.

DvlFilterRejectionReasons sonardyne/api/algorithms/dvl_filter_algorithm/dvl_filter_rejection_reasons.proto

DvlFilterRejectionReasons represents the reasons for a rejection of DVL data.

Field Type Label Description
none bool No rejection. The observation was accepted.
rejection_reason_unspecified bool optional Miscellaneous rejection reason.
rejection_reason_zero_range bool optional Rejection due to zero range.
rejection_reason_zero_velocity bool optional Rejection due to zero velocity.
rejection_reason_time_delta bool optional Rejection due to time delta.
rejection_reason_velocity_change bool optional Rejection due to velocity change.
rejection_reason_invalid_status bool optional Rejection due to invalid status.
rejection_reason_janus_error bool optional Rejection due to Janus error.
rejection_reason_all_beams bool optional Rejection due to all beams.

FilteredDvlData sonardyne/api/algorithms/dvl_filter_algorithm/filtered_dvl_data.proto

FilteredDvlData provides processed DVL measurement data, including timestamps, altitude, sound velocity, ping status, individual beam data, and any rejection reasons.

Field Type Label Description
time_of_validity sonardyne.api.common.Timestamp Timestamp when the data is valid.
time_of_arrival sonardyne.api.common.Timestamp optional Timestamp when the data was received; set if not provided.
altitude_metres double Note that this "altitude" is the distance from the DVL to whichever way it is facing e.g. (could be the distance to a dam wall or could be under ice looking up) Altitude above based on average slant ranges in metres, corrected for the angle of the beams.
sound_velocity_metres_per_second double Sound speed used in DVL calculations, in metres per second.
ping_status FilteredDvlData.DvlPingStatus Status of the most recent DVL ping.
dvl_beam_data DvlFilterBeamData repeated Individual beam data including per-beam rejection reasons.
rejection_reasons DvlFilterRejectionReasons Overall rejection reasons for this DVL measurement; empty if valid.

FilteredDvlData.DvlPingStatus sonardyne/api/algorithms/dvl_filter_algorithm/filtered_dvl_data.proto

DvlPingStatus enumerates the possible statuses of a DVL ping, including bottom search, bottom ambiguity resolution, active bottom tracking, water column measurement, manual trigger, or no transmission.

Name Number Description
DVL_PING_STATUS_UNSPECIFIED 0 Unspecified DVL ping status.
DVL_PING_STATUS_BOTTOM_SEARCH 1 Searching for the bottom return.
DVL_PING_STATUS_BOTTOM_AMBIGUITY_RESOLVE 2 Resolving ambiguity in bottom detection.
DVL_PING_STATUS_BOTTOM_TRACK 3 Actively tracking the bottom.
DVL_PING_STATUS_WATER_TRACK 4 Measuring velocity in the water column (not bottom tracking).
DVL_PING_STATUS_MANUAL 5 Manual ping triggered by an operator or external command.
DVL_PING_STATUS_NO_TX 6 Ping not transmitted.

GNSS Filter Algorithm

FilteredGnssData sonardyne/api/algorithms/gnss_filter_algorithm/filtered_gnss_data.proto

FilteredGnssData provides processed GNSS measurement data, including position, altitude, uncertainty, quality source, timestamps, and any rejection reasons.

Field Type Label Description
time_of_validity sonardyne.api.common.Timestamp Timestamp when the GNSS data is valid.
time_of_arrival sonardyne.api.common.Timestamp optional Timestamp when the data was received; set if not provided.
latitude_radians double Latitude in radians.
longitude_radians double Longitude in radians.
altitude_metres double Altitude in metres.
horizontal_position_error_ellipse sonardyne.api.common.navigation.HorizontalPositionErrorEllipse Horizontal position error ellipse in metres.
quality_source FilteredGnssData.GnssFilterQualitySource Source indicating the GNSS data quality.
rejection_reasons GnssFilterRejectionReasons Reasons for rejecting this GNSS data; empty if valid.

FilteredGnssData.GnssFilterQualitySource sonardyne/api/algorithms/gnss_filter_algorithm/filtered_gnss_data.proto

GnssFilterQualitySource enumerates the sources used to determine GNSS data quality, including none, GST messages, HDOP, or manual assignment.

Name Number Description
GNSS_FILTER_QUALITY_SOURCE_UNSPECIFIED 0 Unspecified quality source.
GNSS_FILTER_QUALITY_SOURCE_NONE 1 No quality information provided.
GNSS_FILTER_QUALITY_SOURCE_GST 2 Quality derived from GNSS GST (standard deviation of position) messages.
GNSS_FILTER_QUALITY_SOURCE_MANUAL 4 Quality set manually by an operator or system configuration.

GnssFilterAlgorithmObservation sonardyne/api/algorithms/gnss_filter_algorithm/gnss_filter_algorithm_observation.proto

GnssFilterAlgorithmObservation provides filtered GNSS data from a GNSS filter algorithm, including a unique algorithm identifier and the processed measurement data.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the associated GNSS filter algorithm.
filtered_gnss_data FilteredGnssData Filtered GNSS measurement data from the algorithm.

GnssFilterRejectionReasons sonardyne/api/algorithms/gnss_filter_algorithm/gnss_filter_rejection_reasons.proto

GnssFilterRejectionReasons defines one or more reasons for GNSS data being rejected by a filter.

Field Type Label Description
none bool No rejection. The observation was accepted.
rejection_reason_unspecified bool optional Miscellaneous rejection reason.
rejection_reason_quality bool optional Rejected due to poor GNSS quality.
rejection_reason_rate_of_change bool optional Rejected due to excessive change rate in position or velocity.
rejection_reason_timing bool optional Rejected due to timing issues or timestamp inconsistencies.

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))

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.
is_xvel_enabled bool optional True if XVEL aiding is enabled in the INS.
is_lbl_enabled bool optional True if LBL aiding is enabled in the INS.
is_dvl_enabled bool optional True if DVL aiding is enabled in the INS.
is_external_depth_enabled bool optional True if external depth aiding is enabled in the INS.
is_internal_depth_enabled bool optional True if internal depth aiding is enabled in the INS.
is_gnss_height_enabled bool optional True if GNSS height 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,
        is_external_depth_enabled=False,
        is_internal_depth_enabled=False,
        is_gnss_height_enabled=True
    )))
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,
        is_external_depth_enabled=False,
        is_internal_depth_enabled=False,
        is_gnss_height_enabled=True
    )))
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,
        is_external_depth_enabled=False,
        is_internal_depth_enabled=False,
        is_gnss_height_enabled=True
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))

InsAlgorithmLblFixStatus sonardyne/api/algorithms/ins_algorithm/ins_algorithm_lbl_fix_status.proto

InsAlgorithmLblFixStatus contains data from the INS algorithm about a running LBL Fix machine.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the INS algorithm.
slam_beacon_address uint32 optional Address of the LBL beacon being SLAMed which this Fix is being computed for.

InsAlgorithmStatus sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status.proto

InsAlgorithmStatus contains data from the INS algorithm about the aiding used in a Kalman cycle.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the INS algorithm.
DVL InsAlgorithmStatusDvl Status of the DVL aiding for this cycle.
GNSS InsAlgorithmStatusGnss Status of the GNSS aiding for this cycle.
internal_pressure InsAlgorithmStatusPressure Status of the Internal Pressure aiding for this cycle.
external_pressure_depth InsAlgorithmStatusPressure Status of the External Pressure/Depth aiding for this cycle.
SUSBL InsAlgorithmStatusSusbl Status of the SUSBL aiding for this cycle.
XPOS InsAlgorithmStatusXpos Status of the XPOS aiding for this cycle.
XVEL InsAlgorithmStatusXvel Status of the XVEL aiding for this cycle.
lbl_beacons InsAlgorithmStatusLblBeacon repeated Statuses of the aiding from each LBL beacon for this cycle.
is_ins_fix_machine_running bool Whether the fix machine that is used to initialise the INS's position is running.
free_inertial InsAlgorithmStatusFreeInertial Status of the predicted INS free inertial performance.

InsAlgorithmStatusDvl sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_dvl.proto

InsAlgorithmStatusDvl contains data from the INS algorithm about the DVL aiding used in a Kalman cycle.

Field Type Label Description
mean_normalised_residual double Mean average of the normalised residuals of observations processed by the algorithm this cycle.
observations_accepted_count int32 Count of the number of observations accepted and used by the algorithm this cycle.
observations_rejected_count int32 Count of the number of observations rejected by the algorithm this cycle.
last_used_time_of_validity double Time of validity of the last observation used by the algorithm this cycle.
reasons_rejected InsAlgorithmStatusDvl.ReasonsRejected Reasons observations were rejected by the algorithm this cycle.
last_processed_time_of_validity double Time of validity of the last observation processed by the algorithm this cycle.

InsAlgorithmStatusDvl.ReasonsRejected sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_dvl.proto

InsAlgorithmStatusDvl.ReasonsRejected defines one or more reasons for DVL data being rejected by an INS.

Field Type Label Description
zero_range bool DVL data rejected due to zero range.
zero_velocity bool DVL data rejected due to zero velocity.
time_delta bool DVL data rejected due to time delta.
velocity_change bool DVL data rejected due to velocity change.
invalid_status bool DVL data rejected due to invalid status.
janus_error bool DVL data rejected due to Janus error.
all_beams bool DVL data rejected due to all beams being rejected.
timeout bool DVL data rejected due to timeout.
disabled bool DVL data rejected as disabled.
sigma bool DVL data rejected due to sigma rejection.

InsAlgorithmStatusFreeInertial sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_free_inertial.proto

InsAlgorithmStatusFreeInertial contains data from the INS algorithm about predicted free inertial performance: time for uncertainty to reach 1NM, CEP50.

Field Type Label Description
time_to_1nm_cep50_uncertainty_seconds double Predicted time in seconds for an INS algorithm solution to reach 1NM CEP50 uncertainty
free_inertial_status InsAlgorithmStatusFreeInertial.FreeInertialStatus Classification of an INS algorithm's expected time to reach 1NM CEP50 uncertainty

InsAlgorithmStatusFreeInertial.FreeInertialStatus sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_free_inertial.proto

InsAlgorithmStatusFreeInertial.FreeInertialStatus provides classification fields for predicted free-inertial performance

Name Number Description
FREE_INERTIAL_STATUS_UNSPECIFIED 0 Free inertial status unspecified
FREE_INERTIAL_STATUS_DISABLED 1 Free inertial status disabled
FREE_INERTIAL_STATUS_INITIAL 2 Free inertial status initial
FREE_INERTIAL_STATUS_GOOD 3 Free inertial status good
FREE_INERTIAL_STATUS_EXCELLENT 4 Free inertial status excellent
FREE_INERTIAL_STATUS_OPTIMAL 5 Free inertial status optimal

InsAlgorithmStatusGnss sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_gnss.proto

InsAlgorithmStatusGnss contains data from the INS algorithm about the GNSS aiding used in a Kalman cycle.

Field Type Label Description
mean_normalised_residual double Mean average of the normalised residuals of observations processed by the algorithm this cycle.
observations_accepted_count int32 Count of the number of observations accepted and used by the algorithm this cycle.
observations_rejected_count int32 Count of the number of observations rejected by the algorithm this cycle.
last_used_time_of_validity double Time of validity of the last observation used by the algorithm this cycle.
reasons_rejected InsAlgorithmStatusGnss.ReasonsRejected Reasons observations were rejected by the algorithm this cycle.
last_processed_time_of_validity double Time of validity of the last observation processed by the algorithm this cycle.

InsAlgorithmStatusGnss.ReasonsRejected sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_gnss.proto

InsAlgorithmStatusGnss.ReasonsRejected defines one or more reasons for GNSS data being rejected by an INS.

Field Type Label Description
rate_of_change bool GNSS data rejected due to rate of change.
quality bool GNSS data rejected due to quality.
bad_time_tag bool GNSS data rejected due to bad time tag.
timeout bool GNSS data rejected due to timeout.
disabled bool GNSS data rejected as disabled.
sigma bool GNSS data rejected due to sigma rejection.

InsAlgorithmStatusLblBeacon sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_lbl_beacon.proto

InsAlgorithmStatusLblBeacon contains data from the INS algorithm about the LBL aiding from a single beacon used in a Kalman cycle.

Field Type Label Description
mean_normalised_residual double Mean average of the normalised residuals of observations processed by the algorithm this cycle.
observations_accepted_count int32 Count of the number of observations accepted and used by the algorithm this cycle.
observations_rejected_count int32 Count of the number of observations rejected by the algorithm this cycle.
last_used_time_of_validity double Time of validity of the last observation used by the algorithm this cycle.
reasons_rejected InsAlgorithmStatusLblBeacon.ReasonsRejected Reasons observations were rejected by the algorithm this cycle.
last_used_sound_velocity_metres_per_second double Range sound velocity of the last observation used by the algorithm this cycle.
beacon_address int32 Acoustic address of the beacon.
last_processed_sound_velocity_metres_per_second double Range sound velocity of the last observation processed by the algorithm this cycle.
last_processed_time_of_validity double Time of validity of the last observation processed by the algorithm this cycle.
last_processed_residual_metres double Range residual of the last observations processed by the algorithm this cycle.

InsAlgorithmStatusLblBeacon.ReasonsRejected sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_lbl_beacon.proto

InsAlgorithmStatusLblBeacon.ReasonsRejected defines one or more reasons for LBL data being rejected by an INS.

Field Type Label Description
missing_beacon_info bool Beacon data rejected due to missing beacon info.
signal_to_noise_and_rate_limit bool Beacon data rejected based on signal to noise and rate limiting.
signal_level_and_rate_limit bool Beacon data rejected based on signal level and rate limiting.
not_enough_observations bool Beacon data rejected as enough observations.
range_min_max bool Beacon data rejected based on range min/max limits.
predicted_range_error bool Beacon data rejected based on predicted range error.
correlation_score_limit bool Beacon data rejected due to poor correlation score.
range_rate bool Beacon data rejected based on range rate.
marked_invalid bool Beacon data rejected as marked invalid.
timeout bool Beacon data rejected due to timeout.
disabled bool Beacon data rejected as disabled.
sigma bool Beacon data rejected due to sigma rejection.
integrity bool Beacon data rejected due to integrity.
fix_rejected bool Beacon data rejected due to fix being rejected.
awaiting_slam_states bool Beacon data rejected as awaiting slam states.
invalid_slam_mode_change bool Beacon data rejected due to invalid slam mode change.
invalid_time_tag bool Beacon range data rejected due to invalid time tag (e.g. timestamp in the future). May indicate poor time sync.

InsAlgorithmStatusPressure sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_pressure.proto

InsAlgorithmStatusPressure contains data from the INS algorithm about the Pressure aiding used in a Kalman cycle.

Field Type Label Description
mean_normalised_residual double Mean average of the normalised residuals of observations processed by the algorithm this cycle.
observations_accepted_count int32 Count of the number of observations accepted and used by the algorithm this cycle.
observations_rejected_count int32 Count of the number of observations rejected by the algorithm this cycle.
last_used_time_of_validity double Time of validity of the last observation used by the algorithm this cycle.
reasons_rejected InsAlgorithmStatusPressure.ReasonsRejected Reasons observations were rejected by the algorithm this cycle.
last_processed_time_of_validity double Time of validity of the last observation processed by the algorithm this cycle.

InsAlgorithmStatusPressure.ReasonsRejected sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_pressure.proto

InsAlgorithmStatusPressure.ReasonsRejected defines one or more reasons for pressure data being rejected by an INS.

Field Type Label Description
rate_of_change bool Pressure data rejected due to rate of change.
bad_time_tag bool Pressure data rejected due to bad time tag.
invalid_data bool Pressure data rejected due to invalid data.
timeout bool Pressure data rejected due to timeout.
disabled bool Pressure data rejected as disabled.
sigma bool Pressure data rejected due to sigma rejection.

InsAlgorithmStatusSusbl sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_susbl.proto

InsAlgorithmStatusSusbl contains data from the INS algorithm about the SUSBL aiding used in a Kalman cycle.

Field Type Label Description
mean_normalised_residual double Mean average of the normalised residuals of observations processed by the algorithm this cycle.
observations_accepted_count int32 Count of the number of observations accepted and used by the algorithm this cycle.
observations_rejected_count int32 Count of the number of observations rejected by the algorithm this cycle.
last_used_time_of_validity double Time of validity of the last observation used by the algorithm this cycle.
reasons_rejected InsAlgorithmStatusSusbl.ReasonsRejected Reasons observations were rejected by the algorithm this cycle.
last_processed_time_of_validity double Time of validity of the last observation processed by the algorithm this cycle.

InsAlgorithmStatusSusbl.ReasonsRejected sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_susbl.proto

InsAlgorithmStatusSusbl.ReasonsRejected defines one or more reasons for SUSBL data being rejected by an INS.

Field Type Label Description
rate_of_change bool SUSBL data rejected due to rate of change.
quality bool SUSBL data rejected due to quality.
bad_time_tag bool SUSBL data rejected due to bad time tag.
message_format bool SUSBL data rejected due to message format.
beacon_id bool SUSBL data rejected due to beacon id.
timeout bool SUSBL data rejected due to timeout.
disabled bool SUSBL data rejected as disabled.
sigma bool SUSBL data rejected due to sigma rejection.
ins_position_uncertainty_too_high bool SUSBL data rejected due to INS position uncertainty being too high.

InsAlgorithmStatusXpos sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_xpos.proto

InsAlgorithmStatusXpos contains data from the INS algorithm about the XPOS aiding used in a Kalman cycle.

Field Type Label Description
mean_normalised_residual double Mean average of the normalised residuals of observations processed by the algorithm this cycle.
observations_accepted_count int32 Count of the number of observations accepted and used by the algorithm this cycle.
observations_rejected_count int32 Count of the number of observations rejected by the algorithm this cycle.
last_used_time_of_validity double Time of validity of the last observation used by the algorithm this cycle.
reasons_rejected InsAlgorithmStatusXpos.ReasonsRejected Reasons observations were rejected by the algorithm this cycle.
last_processed_time_of_validity double Time of validity of the last observation processed by the algorithm this cycle.

InsAlgorithmStatusXpos.ReasonsRejected sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_xpos.proto

InsAlgorithmStatusXpos.ReasonsRejected defines one or more reasons for XPOS data being rejected by an INS.

Field Type Label Description
rate_of_change bool XPOS data rejected due to rate of change.
quality bool XPOS data rejected due quality.
bad_time_tag bool XPOS data rejected due bad time tag.
timeout bool XPOS data rejected due to timout.
disabled bool XPOS data rejected as disabled.
sigma bool XPOS data rejected due to sigma rejection.

InsAlgorithmStatusXvel sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_xvel.proto

InsAlgorithmStatusXvel contains data from the INS algorithm about the XVEL aiding used in a Kalman cycle.

Field Type Label Description
mean_normalised_residual double Mean average of the normalised residuals of observations processed by the algorithm this cycle.
observations_accepted_count int32 Count of the number of observations accepted and used by the algorithm this cycle.
observations_rejected_count int32 Count of the number of observations rejected by the algorithm this cycle.
last_used_time_of_validity double Time of validity of the last observation used by the algorithm this cycle.
reasons_rejected InsAlgorithmStatusXvel.ReasonsRejected Reasons observations were rejected by the algorithm this cycle.
last_processed_time_of_validity double Time of validity of the last observation processed by the algorithm this cycle.

InsAlgorithmStatusXvel.ReasonsRejected sonardyne/api/algorithms/ins_algorithm/ins_algorithm_status_xvel.proto

InsAlgorithmStatusXvel.ReasonsRejected defines one or more reasons for XVEL data being rejected by an INS.

Field Type Label Description
bad_time_tag bool XVEL data rejected due to bad time tag.
acceleration_limit bool XVEL data rejected due to acceleration limit.
velocity_limit bool XVEL data rejected due to velocity limit.
uncertainty_limit bool XVEL data rejected due to uncertainty limit.
missing_field bool XVEL data rejected due to missing field.
timeout bool XVEL data rejected due to timeout.
disabled bool XVEL data rejected as disabled.
sigma bool XVEL data rejected due to sigma rejection.

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).

DataQualitySource sonardyne/api/common/data/data_quality_source.proto

DataQualitySource enumerates the different modes for determining the quality of inbound data.

Name Number Description
DATA_QUALITY_SOURCE_UNSPECIFIED 0 Unspecified quality source.
DATA_QUALITY_SOURCE_AUTO 1 Use an automatically determined quality.
DATA_QUALITY_SOURCE_DATA 2 Use quality values sourced from input data.
DATA_QUALITY_SOURCE_MANUAL 3 Use a manually specified quality value.

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

HorizontalResidual defines a horizontal position residual in latitude & longitude radians.

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.
per_byte_timestamps sonardyne.api.common.Timestamp repeated Optional per-byte timestamps. If set, matches 'data' in length. Enabled by setting 'include_per_byte_timestamps' in an 'ObservationSubscriptionRequest'.

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.

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.

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).

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, this remote point is the Common Reference Point.
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

Outcome of a particular sent command or set configuration.

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))

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))

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))

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.

DeviceModuleStatus sonardyne/api/modules/device_module/device_module_status.proto

DeviceModuleStatus represents the overall status of the device.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of the device.
overall_status DeviceModuleStatus.OverallStatus Overall status of the device.

Example

Example code: device_module_status.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="DeviceModuleStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="DeviceModuleStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="DeviceModuleStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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))
while True:
    if data := socket.recv(10240):
        print(data.decode())

DeviceModuleStatus.OverallStatus sonardyne/api/modules/device_module/device_module_status.proto

DeviceModuleStatus.OverallStatus represents the overall status of the device.

Name Number Description
OVERALL_STATUS_UNSPECIFIED 0 Unspecified device status.
OVERALL_STATUS_OK 1 Device status is OK, no active errors or warnings.
OVERALL_STATUS_WARNING 2 Device has one or more active warnings.
OVERALL_STATUS_ERROR 3 Device has one or more errors raised.

Example

Example code: device_module_status.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="DeviceModuleStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="DeviceModuleStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="DeviceModuleStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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))
while True:
    if data := socket.recv(10240):
        print(data.decode())

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))

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))
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))

Output Message Module

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
uid sonardyne.api.common.UniqueID Unique ID of the output message. These are unique and assigned by the system.
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.

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:  
    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:  
    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:  
    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))

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:  
    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)
                )
            ]
        )
    ))
    wrapper.send_command(son.OutputMessageModuleCommandRemoveOutput(
        output_message=son.OutputMessage(uid=son.UniqueID(name="LNAV Output Message"))
    ))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    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)
                )
            ]
        )
    ))
    wrapper.send_command(son.OutputMessageModuleCommandRemoveOutput(
        output_message=son.OutputMessage(uid=son.UniqueID(name="LNAV Output Message"))
    ))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    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)
                )
            ]
        )
    ))
    wrapper.send_command(son.OutputMessageModuleCommandRemoveOutput(
        output_message=son.OutputMessage(uid=son.UniqueID(name="LNAV Output Message"))
    ))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))

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))

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.
OUTPUT_MESSAGE_TYPE_HNAV_V2 19 HNAV Version 2 message type.
OUTPUT_MESSAGE_TYPE_AUVG3000 20 AUVG3000 message type.
OUTPUT_MESSAGE_TYPE_PSIMSSB 21 PSIMSSB message type.
OUTPUT_MESSAGE_TYPE_PSONALL 22 PSONALL message type.
OUTPUT_MESSAGE_TYPE_XLHNAV_V1 23 XLHNAV V1 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 managed by Fusion 2 is enabled for the SPRINT.
has_xvel_aiding_enabled bool Whether External Velocity (XVEL) aiding is enabled for the SPRINT.
has_autonomous_lbl_enabled bool Whether Autonomous LBL 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.
pps_output_trigger_port sonardyne.api.common.ports.trigger_port.TriggerPortReference optional Reference to the PPS output trigger port where a PPS pulse will be output on the UTC second boundary.
pps_output_trigger_edge sonardyne.api.common.ports.trigger_port.TriggerEdge optional Edge type for the PPS output trigger port. The chosen edge will indicate the UTC second boundary.

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))

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.
max_ethernet_ports uint32 Maximum number of 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

DvlBeamParameters sonardyne/api/sensors/dvl_sensor/dvl_beam_parameters.proto

DvlBeamParameters represents the orientation of a Doppler Velocity Log (DVL) beam. It includes the angle off the vertical (down) direction and the azimuth angle in the horizontal plane.

Field Type Label Description
beam_angle_off_vertical_radians double Positive pitch angle from the vertical (down) axis to the DVL beam in radians.
beam_angle_azimuth_radians double Positive clockwise azimuth angle of the DVL beam in radians.

DvlBeamParametersList sonardyne/api/sensors/dvl_sensor/dvl_beam_parameters_list.proto

DvlBeamParametersList represents a collection of DVL beam parameters. Each entry in the list corresponds to the orientation parameters of a single DVL beam.

Field Type Label Description
dvl_beam_parameters DvlBeamParameters repeated List of DVL beam parameters for all beams.

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.
lever_arms sonardyne.api.common.installation.LeverArms optional Lever arms from the instrument reference point in metres.
mounting_angles sonardyne.api.common.installation.MountingAngles optional Mounting angles in the instrument frame, in radians.
dvl_beam_parameters_list DvlBeamParametersList optional Parameters for all DVL beams.
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))

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.
externally_calculated_depth_metres double optional For use when a DepthSourceConfiguration is set to use externally calculated pressure to depth. To do this, stream out a PressureSensorObservation, populate 'externally_calculated_depth_metres', and stream it back in.

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.
lever_arms sonardyne.api.common.installation.LeverArms Lever arms from the instrument reference point in metres.
manual_depth_offset_metres double optional Deprecated. Manual depth offset applied to incoming data. Deprecated - replaced with InternalDepthSourceConfiguration.manual_depth_offset_metres.

Example

Example code: pressure_sensor_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.PressureSensorConfiguration(
        manual_depth_offset_metres=2
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.PressureSensorConfiguration(
        manual_depth_offset_metres=2
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.PressureSensorConfiguration(
        manual_depth_offset_metres=2
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))

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.requires_all_license_features.

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))

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))

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))

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))

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))

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))
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))
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))
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.
include_per_byte_timestamps bool Adds timestamped bytes to DataPortComms messages where applicable. May increase message sizes.

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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
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))
while True:
    if data := socket.recv(10240):
        print(data.decode())

Status Service

StatusEnvelope sonardyne/api/services/status_service/status_envelope.proto

StatusEnvelope wraps one or more status messages for sending or streaming.

Field Type Label Description
status_messages google.protobuf.Any repeated Any message ending in 'Status' or a 'StatusSubscriptionRequest'.

Example

Example code: status_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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))
while True:
    if data := socket.recv(10240):
        print(data.decode())

StatusService sonardyne/api/services/status_service/status_service.proto

StatusService allows streaming of status messages and provides a method to query the API version.

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.
StatusStream StatusEnvelope stream StatusEnvelope stream Publishes and receives status data via a bidirectional stream.

Example

Example code: status_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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))
while True:
    if data := socket.recv(10240):
        print(data.decode())

StatusSubscription sonardyne/api/services/status_service/status_subscription.proto

StatusSubscription is used to specify which status messages should be sent or received in a StatusStream. Matching can be done by message type name suffix and/or by unique identifiers of the originating objects.

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

Example

Example code: status_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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))
while True:
    if data := socket.recv(10240):
        print(data.decode())

StatusSubscriptionRequest sonardyne/api/services/status_service/status_subscription_request.proto

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

Field Type Label Description
request_uid uint32 Identifier to match the corresponding StatusSubscriptionResponse.
timestamp sonardyne.api.common.Timestamp Timestamp of the request.
status_subscriptions StatusSubscription repeated List of status subscriptions to request.

Example

Example code: status_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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))
while True:
    if data := socket.recv(10240):
        print(data.decode())

StatusSubscriptionResponse sonardyne/api/services/status_service/status_subscription_response.proto

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

Field Type Label Description
request_uid uint32 Matches the corresponding StatusSubscriptionRequest.
timestamp sonardyne.api.common.Timestamp Timestamp of the response.
result sonardyne.api.common.Result Indicates success or failure of the subscription request.
status_subscriptions StatusSubscription repeated List of status subscriptions included in the response.

Example

Example code: status_service.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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:  
    status_stream = wrapper.open_status_stream(
        son.StatusSubscriptionRequest(status_subscriptions=[
            son.StatusSubscription(matching_criteria=son.MatchingCriteria(match_type_name_suffix="InsAlgorithmStatus"))
        ])
    )
    print("\n(listening to status stream) press ctrl-c to stop stream")
    try:
        while True:
            for message in status_stream.recv():
                print(type(message), message)
                print("(listening to status 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))
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. This message is deprecated.

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. This message is deprecated, and is replaced by InternalDepthSourceConfiguration and ExternalDepthSourceConfiguration.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the depth source.
input_depth_data_source_reference DepthDataSourceReference optional Deprecated. Deprecated. Input depth data source reference is no longer configured here and will be removed in a later version.
lever_arms sonardyne.api.common.installation.LeverArms optional Deprecated. Deprecated. Lever arms is no longer configured here and will be removed in a later version.
manual_depth_offset_metres double optional Deprecated. Deprecated. Manual depth offset applied to incoming data.
pressure_to_depth_conversion DepthSourceConfiguration.PressureToDepthConversion optional Deprecated. Deprecated. Pressure to depth conversion method to use. Only applicable when input depth source is a pressure sensor.

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),
        manual_depth_offset_metres=0
    )))
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),
        manual_depth_offset_metres=0
    )))
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),
        manual_depth_offset_metres=0
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))

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

Deprecated. DepthSourceConfiguration.PressureToDepthConversion controls how the DepthSource calculates depth from a pressure sensor reading.

Name Number Description
PRESSURE_TO_DEPTH_CONVERSION_UNSPECIFIED 0 Pressure to depth conversion method not specified.
PRESSURE_TO_DEPTH_CONVERSION_FIXED_SCALING 1 Depth calculated by applying fixed scaling to pressure message.
PRESSURE_TO_DEPTH_CONVERSION_EXTERNAL 2 Depth calculated externally and streamed in as PressureSensorObservations.

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),
        manual_depth_offset_metres=0
    )))
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),
        manual_depth_offset_metres=0
    )))
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),
        manual_depth_offset_metres=0
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))

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.

PressureToDepthConversion sonardyne/api/sources/depth_source/pressure_to_depth_conversion.proto

PressureToDepthConversion lists the available methods for conversion of pressure observation data to depth observation data

Name Number Description
PRESSURE_TO_DEPTH_CONVERSION_UNSPECIFIED 0 Pressure to depth conversion method not specified.
PRESSURE_TO_DEPTH_CONVERSION_FIXED_SCALING 1 Depth calculated by applying fixed scaling to pressure message.
PRESSURE_TO_DEPTH_CONVERSION_EXTERNAL 2 Depth calculated externally and streamed in as PressureSensorObservations.
PRESSURE_TO_DEPTH_CONVERSION_UNESCO 3 Pressure to depth conversion utilises UNESCO equations.

External Depth Source

ExternalDepthSourceConfiguration sonardyne/api/sources/external_depth_source/external_depth_source_configuration.proto

ExternalDepthSourceConfiguration represents the configuration of an external depth source. Includes data port reference, lever arms, uncertainty handling.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the external depth source.
input_data_port sonardyne.api.common.ports.DataPortReference optional Reference to the input data port providing external depth data.
lever_arms sonardyne.api.common.installation.LeverArms optional Lever arms from the vessel reference point.
manual_depth_offset_metres double optional Manual depth offset applied to incoming data.
pressure_to_depth_conversion sonardyne.api.sources.depth_source.PressureToDepthConversion optional Pressure to depth conversion method for data from the external depth source. Only affects pressure input data.

Example

Example code: external_depth_source_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.ExternalDepthSourceConfiguration(
        input_data_port=son.DataPortReference(set_uid=son.UniqueID(name="TCP-8110")),
        lever_arms=son.LeverArms(forward_metres=1.5, starboard_metres=2, down_metres=3.2),
        manual_depth_offset_metres=0,
        pressure_to_depth_conversion=son.PRESSURE_TO_DEPTH_CONVERSION_FIXED_SCALING
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.ExternalDepthSourceConfiguration(
        input_data_port=son.DataPortReference(set_uid=son.UniqueID(name="TCP-8110")),
        lever_arms=son.LeverArms(forward_metres=1.5, starboard_metres=2, down_metres=3.2),
        manual_depth_offset_metres=0,
        pressure_to_depth_conversion=son.PRESSURE_TO_DEPTH_CONVERSION_FIXED_SCALING
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.ExternalDepthSourceConfiguration(
        input_data_port=son.DataPortReference(set_uid=son.UniqueID(name="TCP-8110")),
        lever_arms=son.LeverArms(forward_metres=1.5, starboard_metres=2, down_metres=3.2),
        manual_depth_offset_metres=0,
        pressure_to_depth_conversion=son.PRESSURE_TO_DEPTH_CONVERSION_FIXED_SCALING
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))

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.
data_quality_source sonardyne.api.common.data.DataQualitySource optional Mode to determine input data quality.

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))

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))
while True:
    if data := socket.recv(10240):
        print(data.decode())

Internal Depth Source

InternalDepthSourceConfiguration sonardyne/api/sources/internal_depth_source/internal_depth_source_configuration.proto

InternalDepthSourceConfiguration represents the configuration of an internal depth source. Includes data port reference, lever arms, uncertainty handling.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the internal depth source.
manual_depth_offset_metres double optional Manual depth offset applied to incoming data.
pressure_to_depth_conversion sonardyne.api.sources.depth_source.PressureToDepthConversion optional Pressure to depth conversion method for internal pressure sensor data.

Example

Example code: internal_depth_source_configuration.py

import sonardyne_api as son

with son.WrapperGrpc('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.InternalDepthSourceConfiguration(
        manual_depth_offset_metres=1,
        pressure_to_depth_conversion=son.PRESSURE_TO_DEPTH_CONVERSION_FIXED_SCALING
    )))
import sonardyne_api as son

with son.WrapperFramedTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.InternalDepthSourceConfiguration(
        manual_depth_offset_metres=1,
        pressure_to_depth_conversion=son.PRESSURE_TO_DEPTH_CONVERSION_FIXED_SCALING
    )))
import sonardyne_api as son

with son.WrapperJsonTcp('0.0.0.0', 8103) as wrapper:  
    print(wrapper.set_configuration(son.InternalDepthSourceConfiguration(
        manual_depth_offset_metres=1,
        pressure_to_depth_conversion=son.PRESSURE_TO_DEPTH_CONVERSION_FIXED_SCALING
    )))
import json, socket

socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect(('0.0.0.0', 8103))

LBL Source

AutonomousLblBeaconData sonardyne/api/sources/lbl_source/autonomous_lbl_beacon_data.proto

LBL data describing a beacon, its position and position error estimates, relevant acoustic properties and its mode of operation.

Field Type Label Description
address uint32 Address of the beacon.
horizontal_position sonardyne.api.common.navigation.GeographicCoordinates Horizontal position of the beacon.
depth_metres double Vertical position of beacon as metres of depth below the surface.
turn_around_time_seconds double Turn around time of the beacon in seconds.
is_enabled bool Whether the beacon is enabled for use.

AutonomousLblRangeData sonardyne/api/sources/lbl_source/autonomous_lbl_range_data.proto

Range data from an LBL source. Describes a single range measurement to a beacon with associated parameters and diagnostics.

Field Type Label Description
time_of_validity sonardyne.api.common.Timestamp Timestamp when the data was valid; .
address uint32 Address of the target beacon.
travel_time_seconds double Measured two-way travel time (including turn around time) in seconds.
beacon_sound_velocity_metres_per_second double Sound velocity at the beacon in metres per second.
range_sound_velocity_metres_per_second double Average sound velocity used to calculate range in metres per second.
cross_correlation double Cross correlation value of the received signal as a percentage (0.0 to 100.0).
signal_to_noise_ratio_dbv double Signal to noise ratio in dBV.
signal_level double Signal level.
valid bool Indicates if the range data is valid.

AutonomousLblSourceObservation sonardyne/api/sources/lbl_source/autonomous_lbl_source_observation.proto

AutonomousLblSourceObservation is data from a LBL source, including range information and/or beacon information. Contains the unique ID of the LBL source and the timestamp of data arrival.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the LBL source.
time_of_arrival sonardyne.api.common.Timestamp optional Timestamp when the data arrived.
range_data AutonomousLblRangeData Range data from the LBL source.
beacon_data AutonomousLblBeaconData Beacon data from the LBL source.

LblSourceConfiguration sonardyne/api/sources/lbl_source/lbl_source_configuration.proto

LblSourceConfiguration represents the configuration of an LBL source, including its unique identifier, reference to the input data port, and lever arms from the vessel reference point.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the LBL source.
input_data_port sonardyne.api.common.ports.DataPortReference optional Reference to the input data port providing LBL data.
lever_arms sonardyne.api.common.installation.LeverArms optional Lever arms from the vessel reference point.
fixed_latency_seconds double optional Known latency to correct for.
min_signal_to_noise_ratio_decibels double optional Minimum signal-to-noise ratio.
max_reduced_signal_to_noise_ratio_decibels double optional Maximum reduced relative signal-to-noise ratio (low-pass filtered).
min_signal_level_decibels double optional Minimum signal level.
max_reduced_signal_level_decibels double optional Maximum reduced relative signal level (low-pass filtered).
tau double optional Low-pass filter time constant.
min_correlation_score double optional Minimum correlation score (0-100%).
required_recent_observations uint32 optional Number of recent ranges to a beacon to start using ranges as aiding.
recent_window_seconds double optional Time window for ranges to be considered "recent".
min_distance_metres double optional Minimum distance from a beacon to use ranges.
max_distance_metres double optional Maximum distance from a beacon to use ranges.
max_relative_speed_metres_per_second double optional Maximum range rate.
max_predicted_distance_error_metres double optional Maximum range prediction error.

Snap Source

SnapSource sonardyne/api/sources/snap_source/snap_source.proto

SnapSource selects the source of the position used by a snap command.

Name Number Description
SNAP_SOURCE_UNSPECIFIED 0 Not set. Rejected by commands.
SNAP_SOURCE_GNSS 1 Snap to the most recent position accepted from the GNSS aiding input.
SNAP_SOURCE_USBL 2 Snap to the most recent position accepted from the USBL aiding input.
SNAP_SOURCE_XPOS 3 Snap to the most recent position accepted from the external position (XPOS) input.
SNAP_SOURCE_MANUAL 4 Snap to the position and uncertainty supplied in the command.

SnapSourceCommandSendSnap sonardyne/api/sources/snap_source/snap_source_command_send_snap.proto

SnapSourceCommandSendSnap commands the SPRINT-Nav to snap its position to a supplied or recently received horizontal position. Source field behaviour:

  • SNAP_SOURCE_GNSS / SNAP_SOURCE_USBL / SNAP_SOURCE_XPOS: the most recent position received from that source is used, provided it was received within a fixed timeout. position and horizontal_position_uncertainty_metres are ignored.

  • SNAP_SOURCE_MANUAL: position and horizontal_position_uncertainty_metres must both be supplied.

Field Type Label Description
uid sonardyne.api.common.UniqueID Client-generated ID, returned in the command response so the request can be matched.
source SnapSource Source of the snap position.
position sonardyne.api.common.navigation.GeographicCoordinates Position to snap to. Lat/Lon in radians. Used when source is SNAP_SOURCE_MANUAL.
horizontal_position_uncertainty_metres double Horizontal position uncertainty, 1 standard deviation (1σ), metres. Used when source is SNAP_SOURCE_MANUAL.

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))

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))
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.
data_quality_source sonardyne.api.common.data.DataQualitySource optional Mode to determine input data quality.

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))

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))
while True:
    if data := socket.recv(10240):
        print(data.decode())

Time Source

NtpPeerInfo sonardyne/api/sources/time_source/ntp_peer_info.proto

NtpPeerInfo holds a collection of statistics relating a connection to an NTP server.

Field Type Label Description
status NtpPeerInfo.NtpPeerStatus Status of the connection to the peer.
reference_id string Identifier of the source used for synchronization.
stratum uint32 Distance from the reference clock (0 is highest precision).
age_of_last_packet_seconds uint32 Time elapsed since the last valid NTP packet was received.
polling_interval_seconds uint32 Current interval between outgoing NTP requests.
reachability uint32 8-bit shift register representing the success of the last 8 polls.
delay_seconds double Round-trip time to the peer in seconds.
offset_seconds double Time difference between the local clock and the peer in seconds.
jitter_seconds double Variance in the time offset.

NtpPeerInfo.NtpPeerStatus sonardyne/api/sources/time_source/ntp_peer_info.proto

NtpPeerInfo.NtpPeerStatus represents the status of the connection to the server.

Name Number Description
NTP_PEER_STATUS_UNSPECIFIED 0 Unspecified connection status.
NTP_PEER_STATUS_DISCARDED_HIGH_STRATUM 1 Peer stratum is too high or the peer is unreachable.
NTP_PEER_STATUS_FALSE_TICKER 2 Peer was rejected as an outlier.
NTP_PEER_STATUS_CULLED 3 Peer was removed during culling process.
NTP_PEER_STATUS_DISCARDED_BY_CLUSTERING 4 Peer was rejected by the clustering algorithm.
NTP_PEER_STATUS_IN_FINAL_SELECTION 5 Peer is a valid candidate for synchronisation.
NTP_PEER_STATUS_SELECTED_FOR_SYNC_BUT_EXCEEDS_MAX_DISTANCE 6 Peer is valid but its root distance exceeds the maximum distance limit.
NTP_PEER_STATUS_SELECTED_FOR_SYNC 7 Peer is the system peer used for synchronisation.
NTP_PEER_STATUS_SELECTED_FOR_SYNC_WITH_PPS 8 Peer is the system peer and is augmented by a pulse-per-second signal.

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))

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.

NtpTimeSourceStatus sonardyne/api/sources/time_source/ntp_time_source_status.proto

NtpTimeSourceStatus represents the status for an NTP (Network Time Protocol) time source. It includes the unique identifier of the source which relates this message to other NtpTimeSource messages.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the NTP time source.
peers_info NtpPeerInfo repeated NTP peer information.

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))

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.

PpsTimeSourceStatus sonardyne/api/sources/time_source/pps_time_source_status.proto

PpsTimeSourceStatus represents the status for a PPS time source. It includes the unique identifier of the source which relates this message to other PpsTimeSource messages.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the PPS time source.
reasons_rejected PpsTimeSourceStatus.PpsReasonsRejected Reasons PPS messages were rejected.
filtered_pps_fractional_seconds double PPS derived UTC minus instrument time.
pps_message_uncertainty_seconds double 1σ of uncertainty of the incoming PPS message time.
pps_trigger_edge sonardyne.api.common.ports.trigger_port.TriggerEdge Edge of the PPS trigger used.
num_observations_in_window uint32 Number of observations processed in the last window.

PpsTimeSourceStatus.PpsReasonsRejected sonardyne/api/sources/time_source/pps_time_source_status.proto

PpsTimeSourceStatus.PpsReasonsRejected represents the bitmask of reasons PPS data may be rejected.

Field Type Label Description
none bool No PPS rejection reasons.
too_few_obs bool Rejected due to too few observations received in window.
uncertainty_too_high bool Rejected due to uncertainty in PPS messages being too high.
obs_from_future bool Rejected observation timestamped in future.

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))

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))

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.

ZdaTimeSourceStatus sonardyne/api/sources/time_source/zda_time_source_status.proto

ZdaTimeSourceStatus represents the status for a ZDA time source. It includes the unique identifier of the source which relates this message to other ZdaTimeSource messages.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the ZDA time source.
reasons_rejected ZdaTimeSourceStatus.ZdaReasonsRejected Reasons ZDA messages were rejected.
derived_utc_minus_instrument_time_seconds double ZDA derived UTC minus instrument time.
derived_utc_uncertainty_seconds double 1σ of uncertainty of the derived utc time.
zda_message_uncertainty_seconds double 1σ of uncertainty of the incoming ZDA message time.
zda_message_median_latency_seconds double Median latency of incoming ZDA messages.
num_observations_in_window uint32 Number of observations processed in the last window.
time_since_valid_estimate_seconds double Seconds since valid time estimate.

ZdaTimeSourceStatus.ZdaReasonsRejected sonardyne/api/sources/time_source/zda_time_source_status.proto

ZdaTimeSourceStatus.ZdaReasonsRejected represents the bitmask of reasons ZDA data may be rejected.

Field Type Label Description
none bool No ZDA rejection reasons.
too_few_obs bool Rejected due to too few observations received in window.
uncertainty_too_high bool Rejected due to uncertainty in ZDA messages being too high.

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.

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.

XposSourceCommandManualPosition sonardyne/api/sources/xpos_source/xpos_source_command_manual_position.proto

XposSourceCommandManualPosition provides a command to send a manual position observation via an XPOS source.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique ID of an XPOS source.
position sonardyne.api.common.navigation.GeographicCoordinates Position 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.
data_quality_source sonardyne.api.common.data.DataQualitySource optional Mode to determine input data quality.

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))

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))
while True:
    if data := socket.recv(10240):
        print(data.decode())

XVEL Source

XvelData sonardyne/api/sources/xvel_source/xvel_data.proto

XvelData represents a measured velocity from an XVEL system at a specific time. The message includes a velocity and the uncertainty for that velocity measurement.

Field Type Label Description
time_of_validity sonardyne.api.common.Timestamp Time at which the XVEL data is valid.
velocity_metres_per_second sonardyne.api.common.maths.Vector3d XYZ velocity in metres per second in the reference frame.
velocity_uncertainty_metres_per_second sonardyne.api.common.maths.Vector3d XYZ velocity uncertainty, where each field is 1σ of uncertainty in the reference frame.
velocity_reference_frame XvelData.XvelVelocityReferenceFrame Reference frame of the XVEL velocity.
is_water_relative_velocity bool Water relative: false for ground-relative, true for water-relative.

XvelData.XvelVelocityReferenceFrame sonardyne/api/sources/xvel_source/xvel_data.proto

Reference frame of XVEL velocity data.

Name Number Description
XVEL_VELOCITY_REFERENCE_FRAME_UNSPECIFIED 0 Unspecified XVEL velocity reference frame.
XVEL_VELOCITY_REFERENCE_FRAME_BODY_FRAME 1 XVEL velocity is in body frame where x-y-z is forward-starboard-down.
XVEL_VELOCITY_REFERENCE_FRAME_EARTH_FRAME 2 XVEL velocity is in earth frame where x-y-z is north-east-down.

XvelSourceConfiguration sonardyne/api/sources/xvel_source/xvel_source_configuration.proto

XvelSourceConfiguration represents the configuration of an XVEL data source. This includes its unique identifier, the input data port providing XVEL measurements, lever arms and mounting angles relative to the vessel reference point, an uncertainty scale factor value, and an optional fallback velocity uncertainty value.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the XVEL source.
input_data_port sonardyne.api.common.ports.DataPortReference optional Reference to the input data port providing XVEL data.
lever_arms sonardyne.api.common.installation.LeverArms optional Lever arms from the vessel reference point.
mounting_angles sonardyne.api.common.installation.MountingAngles optional Mounting angles in vessel frame.
fallback_velocity_uncertainty_metres_per_second sonardyne.api.common.bounded_values.BoundedDouble optional 1σ of uncertainty applied to incoming XVEL measurements; ignored if 0.
scale_uncertainty sonardyne.api.common.bounded_values.BoundedDouble optional Scale factor applied to uncertainty values in the XVEL message.
data_quality_source sonardyne.api.common.data.DataQualitySource optional Mode to determine input data quality.

XvelSourceObservation sonardyne/api/sources/xvel_source/xvel_source_observation.proto

XvelSourceObservation represents an observation from an XVEL source. It includes a unique identifier for the source, the time of arrival of the data, and the XVEL measurement data itself.

Field Type Label Description
uid sonardyne.api.common.UniqueID Unique identifier of the XVEL source.
time_of_arrival sonardyne.api.common.Timestamp optional Time of arrival of the data; set if not provided.
xvel_data XvelData XVEL measurement data.

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.