2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 ///////////////////////////////////////////////////////////////////////////////
18 /// \brief This file contains the callback for Notifications and Protocol
21 ///////////////////////////////////////////////////////////////////////////////
23 /** @addtogroup BaseSystem
26 /** @addtogroup system_service
30 /** @addtogroup logger_service
31 * @ingroup system_service
35 #ifndef LOGGER_SERVICE_SERVER_INCLUDE_SS_LOGGER_COMMON_H_
36 #define LOGGER_SERVICE_SERVER_INCLUDE_SS_LOGGER_COMMON_H_
38 #include <native_service/frameworkunified_types.h>
39 #include <native_service/frameworkunified_framework_types.h>
41 const CHAR DEBUG_LOG_PATH_DIR[] = "/tmp/frameworkunifiedlog";
42 const CHAR DEBUG_LOG_PATH_FN[] = "/tmp/frameworkunified_debug.log";
43 const CHAR TRANSMIT_LOG_PATH_FN[] = "/tmp/interfaceunified_transmit.log";
44 const CHAR PERFORMANCE_LOG_PATH_FN[] = "/tmp/frameworkunified_performance.log";
45 const CHAR DRINITIAL_LOG_PATH_FN[] = "/tmp/loggerservice_drinitial.log";
46 const CHAR DRLOCATION_LOG_PATH_FN[] = "/tmp/loggerservice_drlocation.log";
47 const CHAR KERNEL_LOG_PATH_FN[] = "/tmp/kernel.log";
48 const CHAR KERNEL_BOOT_LOG_PATH_FN[] = "/var/local/lib/basesystem/ramd/BS/ss/logger_service/rwdata/frameworkunifiedlog/kernelboot.log";
50 const UI_32 PERFORMANCELOG_FILE_SZ = 256 * 1024;
52 #define CLEAR_LOG_PATH_FN "/var/local/lib/basesystem/nv/BS/ss/logger_service/rwdata/frameworkunifiedlog/"
55 #define DEBUG_USB_PATH "/mnt/sda1"
56 #define KERNEL_LOG_PATH_DIR "kernellog"
58 template<typename C, EFrameworkunifiedStatus (C::*M)(HANDLE)>
61 static CallbackFunctionPtr set(void* pInst) {
65 return &cpp_callback::call;
67 static EFrameworkunifiedStatus call(HANDLE y) {
69 return eFrameworkunifiedStatusFault;
70 C* c = static_cast<C*>(ms_pInst);
74 static void* ms_pInst;
77 template<typename C, EFrameworkunifiedStatus (C::*M)(HANDLE)>
78 void* cpp_callback<C, M>::ms_pInst = NULL;
80 typedef enum _LoggerServiceStatus {
84 } ELOGGERSERVICESTATUS;
87 SS_LOGGER_KLOG_GET, /* type : get kernel.log */
88 SS_LOGGER_KBOOTLOG_CREATE /* type : create kernelboot.log */
89 } SS_LOGGER_KLOG_OPE_TYPE;
91 ////////////////////////////////////////////////////////////////////////////////////////////
92 /// \ingroup StopLoggingFunction
93 /// \~english @par Summary
94 /// Stop the logging function.
95 /// \~english @param [in] hApp
96 /// HANDLE - Application handle
99 /// \~english @par Detail
100 /// - The API stops the logging function.\n
102 /// - Include ss_logger_common.h
103 /// - Library libSS_SystemIfUnified.so
104 /// \~english @par Classification
108 ////////////////////////////////////////////////////////////////////////////////////////////
109 void StopLoggingFunction(HANDLE hApp);
111 #endif // LOGGER_SERVICE_SERVER_INCLUDE_SS_LOGGER_COMMON_H_
113 /** @}*/ // end of LoggerService
114 /** @}*/ // end of SystemService
115 /** @}*/ // end of BaseSystem