// Copyright 2026:
//   JaiaRobotics LLC
// File authors:
//   Ed Sanville <edsanville@gmail.com>
//
//
// This file is part of the JaiaBot Hydro Project Binaries
// ("The Jaia Binaries").
//
// The Jaia Binaries are free software: you can redistribute them and/or modify
// them under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// The Jaia Binaries are distributed in the hope that they will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with the Jaia Binaries.  If not, see <http://www.gnu.org/licenses/>.

syntax = "proto2";

import "goby/middleware/protobuf/app_config.proto";
import "goby/zeromq/protobuf/interprocess_config.proto";
import "goby/middleware/protobuf/udp_config.proto";

import "jaiabot/messages/echo.proto";
import "jaiabot/messages/imu.proto";

package jaiabot.config;

message UDPGateway
{
    // required parameters for ApplicationBase3 class
    optional goby.middleware.protobuf.AppConfig app = 1;

    optional goby.zeromq.protobuf.InterProcessPortalConfig interprocess = 2;

    required goby.middleware.protobuf.UDPOneToManyConfig udp_config = 3;

    // Timeouts for sensors
    optional int32 imu_data_report_timeout_seconds = 10 [default = 30];
    optional jaiabot.protobuf.IMUIssue.SolutionType imu_issue_solution = 12 [default = REBOOT_BNO085_IMU];
    optional int32 imu_trigger_issue_timeout_seconds = 13 [default = 30];

    optional int32 salinity_data_report_timeout_seconds = 14 [default = 60];
    optional int32 pressure_temperature_data_report_timeout_seconds = 15 [default = 60];

    // TSYS01
    optional bool tsys01_enabled = 20 [default = false];
    optional int32 tsys01_data_report_timeout_seconds = 16 [default = 40];

    // Echo
    optional bool echo_enabled = 21 [default = true];
    optional int32 echo_data_report_timeout_seconds = 17 [default = 20];
    optional jaiabot.protobuf.EchoIssue.SolutionType echo_issue_solution = 18 [default = REBOOT_ECHO_IMU_AND_RESTART_ECHO_PY];
    optional int32 echo_trigger_issue_timeout_seconds = 19 [default = 20];

    // Salinity Chip
    optional bool salinity_enabled = 22 [default = true];
    
    // Bar30
    optional bool bar30_enabled = 23 [default = true];

    optional bool in_simulation = 11 [default = true];
}
