Line data Source code
1 : /**
2 : * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3 : * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4 : * CANN Open Software License Agreement Version 2.0 (the "License").
5 : * Please refer to the License for details. You may not use this file except in compliance with the License.
6 : * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7 : * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 : * See LICENSE in the root of the software repository for the full text of the License.
9 : */
10 :
11 : #include "adx_dump_soc_helper.h"
12 :
13 : /**
14 : * @brief dump start api,create a HDC session for dump
15 : * @param [in] connectInfo: remote connect info
16 : *
17 : * @return
18 : * not NULL: Handle used by hdc
19 : * NULL: dump start failed
20 : */
21 3 : extern "C" IDE_SESSION IdeDumpStart(const char *connectInfo)
22 : {
23 3 : return Adx::SocDumpStart(connectInfo);
24 : }
25 :
26 : /**
27 : * @brief dump data to remote server
28 : * @param [in] session: HDC session to dump data
29 : * @param [in] dumpChunk: Dump information
30 : * @return
31 : * IDE_DAEMON_INVALID_PARAM_ERROR: invalid parameter
32 : * IDE_DAEMON_UNKNOW_ERROR: write data failed
33 : * IDE_DAEMON_NONE_ERROR: write data succ
34 : */
35 2 : extern "C" IdeErrorT IdeDumpData(IDE_SESSION session, const IdeDumpChunk *dumpChunk)
36 : {
37 2 : return Adx::SocDumpData(session, dumpChunk);
38 : }
39 :
40 : /**
41 : * @brief send dump end msg
42 : * @param [in] session: HDC session to dump data
43 : * @return
44 : * IDE_DAEMON_UNKNOW_ERROR: send dump end msg failed
45 : * IDE_DAEMON_NONE_ERROR: send dump end msg success
46 : */
47 1 : extern "C" IdeErrorT IdeDumpEnd(IDE_SESSION session)
48 : {
49 1 : return Adx::SocDumpEnd(session);
50 : }
|