NSUKit 1.4.0
板卡级统一交互接口
载入中...
搜索中...
未找到
config.cpp
浏览该文件的文档.
1//
2// Created by 56585 on 2023/8/14.
3//
4
5#include "base/config.h"
6
7
8std::string nsukit::api_info() {
9 return std::string("NSUKit: version: v") + std::string(NSUKIT_PROJECT_VER)
10 + std::string("\nbuild_time: ") + std::string(NSUKIT_BUILD_TIME)
11 + std::string("\ngit_info: ") + std::string(NSUKIT_GIT_INFO);
12}
13
14
16 auto res = std::string{};
17 switch (status) {
19 res += "&&NSUKIT_STATUS_SUCCESS";
20 break;
22 res += "&&NSUKIT_STATUS_NEED_RELOAD";
23 break;
25 res += "&&NSUKIT_STATUS_ARCH_MISMATCH";
26 break;
28 res += "&&NSUKIT_STATUS_ALLOC_FAILED";
29 break;
31 res += "&&NSUKIT_STATUS_INVALID_VALUE";
32 break;
34 res += "&&NSUKIT_STATUS_TEMP_MISMATCH";
35 break;
37 res += "&&NSUKIT_STATUS_MISMATCH_MIXIN";
38 break;
40 res += "&&NSUKIT_STATUS_ACCEPT_FAIL";
41 break;
43 res += "&&NSUKIT_STATUS_STREAM_FAIL";
44 break;
46 res += "&&NSUKIT_STATUS_STREAM_RUNNING";
47 break;
49 res += "&&NSUKIT_STATUS_TIMEOUT";
50 break;
52 res += "&&NSUKIT_STATUS_MEMBER_NOT_SUPPORT";
53 break;
55 res += "&&NSUKIT_STATUS_ITF_FAIL";
56 break;
58 res += "&&NSUKIT_STATUS_NOT_LINK";
59 break;
60 default:
61 res += "&&NSUKIT_UNKNOWN_STATUS";
62 break;
63 }
64 return res.substr(2);
65}
std::string NSU_DLLEXPORT status2_string(nsukitStatus_t status)
Definition: config.cpp:15
std::string NSU_DLLEXPORT api_info()
Definition: config.cpp:8
nsukitStatus_t
Definition: type.h:53
@ NSUKIT_STATUS_MISMATCH_MIXIN
@ NSUKIT_STATUS_MEMBER_NOT_SUPPORT
@ NSUKIT_STATUS_STREAM_RUNNING
@ NSUKIT_STATUS_ALLOC_FAILED
@ NSUKIT_STATUS_ARCH_MISMATCH
@ NSUKIT_STATUS_TEMP_MISMATCH
@ NSUKIT_STATUS_INVALID_VALUE
#define NSUKIT_PROJECT_VER
Definition: version.h:5
#define NSUKIT_GIT_INFO
Definition: version.h:15
#define NSUKIT_BUILD_TIME
Definition: version.h:14