syntax = "proto3";

enum infoType {
  IT_BASE = 0;
  IT_OTA = 1;
}

message baseInfo {
  string dev_version = 1;
  int32 dev_status = 2;
  int32 batt_val = 3;
  int32 init_status = 4;
  int32 is_tilt = 5;
}

message otaInfo {
  string otaid = 1;
  string version = 2;
  int32 progress = 3;
  int32 result = 4;
  string message = 5;
}

message getInfoReq {
  infoType type = 1;
}

message getInfoRsp {
  int32 result = 1;
  infoType type = 2;
  oneof info {
    baseInfo base = 3;
    otaInfo ota = 4;
  }
}

message MctlOta {
  oneof SubOtaMsg {
    getInfoReq todev_get_info_req = 1;
    getInfoRsp toapp_get_info_rsp = 2;
  }
}