syntax = "proto2";

enum DeviceAzimuth {
  LF = 1;
  RF = 2;
  LR = 3;
  RR = 4;
}

message Tof3dVzenseBuiltInParams {
  optional uint32 work_mode = 1 [default = 0x00];
  optional uint32 irgmmgain = 2 [default = 45];
  optional uint32 frame_rate = 3 [default = 10];
  optional bool enable_manual_exposure_time = 4 [default = true];
  optional uint32 exposure_time = 5 [default = 2000];
  optional bool enable_filter_fill_hole = 7 [default = true];
  optional bool enable_filter_spatial = 8 [default = true];
  optional bool enable_time_filter = 9 [default = true];
  optional uint32 time_filter_value = 10 [default = 3];
  optional bool enable_flying_pixel_filter = 11 [default = true];
  optional uint32 flying_pixel_filter_value = 12 [default = 15];
  optional bool enable_confidence_filter = 13 [default = true];
  optional uint32 confidence_filter_value = 14 [default = 0];
  optional bool enable_hdr_mode = 15 [default = true];
}

message Yolov8ProcessParams {
  // 保存图片设置
  optional bool save_mat = 1 [default = false];
  optional bool draw_rect = 2 [default = false];
  optional float save_confidence = 3 [default = 0.8];
  optional float save_aspect_ratio_min = 4 [default = 0.9];
  optional float save_aspect_ratio_max = 5 [default = 1.1];
}

message RabbitmqCommunicationParams {
  required bool enable_rabbitmq = 4;
  required string rabbitmq_ex = 5;
  required string rabbitmq_route_key = 6;
}

message MqttCommunicationParams {
  required bool enable_mqtt = 7;
  required string mqtt_topic = 8;
}

message tof3dVzenseEtc {
  required bool enable_device = 1;  // 设备启动才进行以下处理
  required string ip = 2 [default = "192.168.1.101"];
//  optional string url = 3 [default = ""];
  required Tof3dVzenseBuiltInParams bip = 4;
  required Yolov8ProcessParams yolo = 5;
  required DeviceAzimuth azimuth = 6;
//  optional RabbitmqCommunicationParams rabbitmq_param = 6;
//  optional MqttCommunicationParams mqtt_param = 7;
}

message tof3dManagerParams
{
  repeated tof3dVzenseEtc vzense_tof3d_devices = 1;
}
