15ba71b47Sopenharmony_ci// Copyright (C) 2024 Huawei Device Co., Ltd. 25ba71b47Sopenharmony_ci// Licensed under the Apache License, Version 2.0 (the "License"); 35ba71b47Sopenharmony_ci// you may not use this file except in compliance with the License. 45ba71b47Sopenharmony_ci// You may obtain a copy of the License at 55ba71b47Sopenharmony_ci// 65ba71b47Sopenharmony_ci// http://www.apache.org/licenses/LICENSE-2.0 75ba71b47Sopenharmony_ci// 85ba71b47Sopenharmony_ci// Unless required by applicable law or agreed to in writing, software 95ba71b47Sopenharmony_ci// distributed under the License is distributed on an "AS IS" BASIS, 105ba71b47Sopenharmony_ci// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 115ba71b47Sopenharmony_ci// See the License for the specific language governing permissions and 125ba71b47Sopenharmony_ci// limitations under the License. 135ba71b47Sopenharmony_ci 145ba71b47Sopenharmony_cienum Shift { 155ba71b47Sopenharmony_ci Critical = 0, 165ba71b47Sopenharmony_ci High, 175ba71b47Sopenharmony_ci Normal, 185ba71b47Sopenharmony_ci Default, 195ba71b47Sopenharmony_ci Proto, 205ba71b47Sopenharmony_ci} 215ba71b47Sopenharmony_ci 225ba71b47Sopenharmony_ciconst DUMP_FLAG_PRIORITY_CRITICAL: u32 = 1 << Shift::Critical as usize; 235ba71b47Sopenharmony_ciconst DUMP_FLAG_PRIORITY_HIGH: u32 = 1 << Shift::High as usize; 245ba71b47Sopenharmony_ciconst DUMP_FLAG_PRIORITY_NORMAL: u32 = 1 << Shift::Normal as usize; 255ba71b47Sopenharmony_ci 265ba71b47Sopenharmony_ciconst DUMP_FLAG_PRIORITY_DEFAULT: u32 = 1 << Shift::Default as usize; 275ba71b47Sopenharmony_ciconst DUMP_FLAG_PRIORITY_ALL: u32 = DUMP_FLAG_PRIORITY_CRITICAL 285ba71b47Sopenharmony_ci | DUMP_FLAG_PRIORITY_HIGH 295ba71b47Sopenharmony_ci | DUMP_FLAG_PRIORITY_NORMAL 305ba71b47Sopenharmony_ci | DUMP_FLAG_PRIORITY_DEFAULT; 315ba71b47Sopenharmony_ciconst DUMP_FLAG_PROTO: u32 = 1 << Shift::Proto as usize; 325ba71b47Sopenharmony_ci 335ba71b47Sopenharmony_ci#[repr(u32)] 345ba71b47Sopenharmony_cipub enum DumpFlagPriority { 355ba71b47Sopenharmony_ci Critical = DUMP_FLAG_PRIORITY_CRITICAL, 365ba71b47Sopenharmony_ci High = DUMP_FLAG_PRIORITY_HIGH, 375ba71b47Sopenharmony_ci Normal = DUMP_FLAG_PRIORITY_NORMAL, 385ba71b47Sopenharmony_ci Default = DUMP_FLAG_PRIORITY_DEFAULT, 395ba71b47Sopenharmony_ci All = DUMP_FLAG_PRIORITY_ALL, 405ba71b47Sopenharmony_ci Proto = DUMP_FLAG_PROTO, 415ba71b47Sopenharmony_ci} 42