/**
 * Copyright (c) 2025 Huawei Technologies Co., Ltd.
 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
 * CANN Open Software License Agreement Version 2.0 (the "License").
 * Please refer to the License for details. You may not use this file except in compliance with the License.
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
 * See LICENSE in the root of the software repository for the full text of the License.
 */

syntax = "proto3";
package ff.deployer;

message QueueAttrs {
  uint32 queue_id = 1;
  int32 device_type = 2; // CPU NPU
  int32 device_id = 3;
  uint32 logic_id = 4; // 动态请求全局id
}

message QueueStatus {
  QueueAttrs queue_attrs = 1;
  uint32 queue_depth = 2;
  uint32 input_consume_num = 3;
}

message DataflowException {
  int32 exception_code = 1;
  uint64 trans_id = 2;
  string scope = 3;
  uint64 user_context_id = 4;
  bytes exception_context = 5;  // userData +xxx + mbufHeadMsg = mbufHead
}

message SubmodelStatus {
  uint32 model_uuid = 1;
  repeated QueueStatus queue_statuses = 2;
  uint32 msg_type = 3;
  DataflowException exception_info = 4;
}