Merge branch 'master-develop' of gitee.com:shenzhen-jiuyilian/ipc into master-develop

This commit is contained in:
ljx 2023-09-02 23:13:21 +08:00
commit ac50191203
7 changed files with 38 additions and 14 deletions

View File

@ -12,7 +12,7 @@ set(HAL_SOURCE_PATH "${CMAKE_SOURCE_DIR_IPCSDK}/hal")
set(TEST_SOURCE_PATH "${CMAKE_SOURCE_DIR_IPCSDK}/test")
set(EXTERNAL_SOURCE_PATH "${CMAKE_SOURCE_DIR_IPCSDK}/external")
set(CLANG_TIDY_CHECKS "-*\
set(CLANG_TIDY_CHECKS "-*,\
llvm-else-after-return,\
llvm-header-guard,\
llvm-include-order,\

View File

@ -26,3 +26,24 @@ add_library(${ABSTRACT_TARGET} STATIC ${ABSTRACT_FILES})
target_link_libraries(${ABSTRACT_TARGET} ReturnCode)
add_library(${IMPL_TARGET} STATIC ${IMPL_SRC_FILES})
target_link_libraries(${IMPL_TARGET} ${ABSTRACT_TARGET} ReturnCode)
add_custom_target(
log_code_check
COMMAND ${CMAKE_SOURCE_DIR_IPCSDK}/tools/clang-tidy/clang-tidy
-checks='${CLANG_TIDY_CHECKS}'
${IMPL_SRC_FILES}
${ABSTRACT_FILES}
${CLANG_TIDY_CONFIG}
-header-filter=.*
-system-headers=false
-p ${CMAKE_SOURCE_DIR_IPCSDK}/cmake-shell-linux
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR_IPCSDK}/utils/LogC
)
# add_custom_command(
# TARGET ${IMPL_TARGET}
# TARGET ${ABSTRACT_TARGET}
# PRE_BUILD
# COMMAND make log_code_check
# WORKING_DIRECTORY ${PROJECT_ROOT_PATH}/cmake-shell-linux/
# )

View File

@ -1,5 +1,5 @@
#include "iLog.h"
#include "ReturnCode.h"
#include <stddef.h>
#include <string.h>

View File

@ -1,7 +1,7 @@
#ifndef _IPC_I_LOG_H_
#define _IPC_I_LOG_H_
#ifndef ILOG_H
#define ILOG_H
#include <stdarg.h>
// #include <stdarg.h>
#include <stdio.h>
#include "ReturnCode.h"
@ -62,4 +62,4 @@ RETURN_CODE_C destroy_log_module(void);
}
#endif
#endif //_IPC_I_LOG_H_
#endif //ILOG_H

View File

@ -1,8 +1,10 @@
#include "logMakePtr.h"
#include "ReturnCode.h"
#include "iLog.h"
#include "logUb.h"
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
// #include <stdlib.h>
RETURN_CODE_C create_log_module(void)
{
LogUbuntu *log = NULL;

View File

@ -1,5 +1,5 @@
#ifndef _IPC_LOG_MAKE_PTR_H_
#define _IPC_LOG_MAKE_PTR_H_
#ifndef LOGMAKEPTR_H
#define LOGMAKEPTR_H
#include "ReturnCode.h"
#include "logUb.h"
@ -39,4 +39,4 @@ static inline RETURN_CODE_C create_log_instance(LogUbuntu **log)
}
#endif
#endif //_IPC_LOG_MAKE_PTR_H_
#endif //LOGMAKEPTR_H

View File

@ -1,8 +1,9 @@
#include "iLog.h"
#include "ReturnCode.h"
#include "logUb.h"
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <time.h>
static const char *LogLevelStr[] = {
@ -44,12 +45,12 @@ static void ub_log_fmt(ILog *log, const LogLeveL level, const char *fmt, ...)
va_end(args);
}
RETURN_CODE_C ub_log_init(ILog *impl)
static RETURN_CODE_C ub_log_init(ILog *impl)
{
return CreateReturnCode(C_RETURN_CODE_OK);
}
RETURN_CODE_C ub_log_unInit(ILog *impl)
static RETURN_CODE_C ub_log_unInit(ILog *impl)
{
return CreateReturnCode(C_RETURN_CODE_OK);
}