syntax = "proto2";
import "goby/acomms/protobuf/driver_base.proto"; // load up message DriverBaseConfig
import "goby/protobuf/option_extensions.proto";
import "dccl/option_extensions.proto";

package xbee.protobuf;

message Config
{
    option (dccl.msg) = {
        unit_system: "si"
    };

    optional uint64 network_id = 1 [
        default = 7,
        (goby.field).description =
            "Network ID for this fleet (must match other peers in fleet): sets Xbee ATID=network_id"
    ];

    optional bool test_comms = 4 [
        default = false,
        (goby.field).description =
            "If true, enables testing functionality and diagnostics"
    ];
    optional string xbee_info_location = 5 [
        default = "/etc/jaiabot/xbee_info.pb.cfg",
        (goby.field).description =
            "Location to write a file with serial number and node id to be used by jaiabot_metadata."
    ];

    optional bool use_xbee_encryption = 7 [
        default = false,
        (goby.field).description =
            "This is used to determine if we should enable encryption."
    ];

    optional string xbee_encryption_password = 8 [
        default = "",
        (goby.field).description =
            "This is used for the encryption password. Password is a 128 bit value (16 bytes)"
    ];

    optional string xbee_mesh_unicast_retries = 10 [
        default = "0",
        (goby.field).description =
            "Set or read the maximum number of network packet delivery attempts."
    ];

    optional string xbee_unicast_mac_retries = 11 [
        default = "0",
        (goby.field).description =
            "Set or read the maximum number of MAC level packet delivery attempts for unicasts."
    ];

    optional string xbee_network_delay_slots = 12 [
        default = "5",
        (goby.field).description =
            "Set or read the maximum random number of network delay slots before rebroadcasting a network packet."
    ];

    optional string xbee_broadcast_multi_transmits = 13 [
        default = "0",
        (goby.field).description =
            "Set or read the number of additional MAC-level broadcast transmissions."
    ];

    required int32 fleet_id = 14 [(goby.field).description = "Fleet ID"];

    required uint32 subnet_mask = 15;

    optional bool is_in_sim = 16 [
        default = true,
        (goby.field).description = 
            "This is used to determine if a simulated XBee needs to be launched"
    ];
}

extend goby.acomms.protobuf.DriverConfig
{
    optional Config config = 1500;
}
