Init basesystem source codes.
[staging/basesystem.git] / video_in_hal / nsframework / framework_unified / client / include / native_service / ns_eventlogger.h
1 /*
2  * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
3  *
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
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 //////////////////////////////////////////////////////////////////////////////////////////////////
18 /// \ingroup  tag_NSLogger
19 /// \brief    structures used by ns_logger.cpp for event and counter logging
20 ///
21 ///
22 ///
23 //////////////////////////////////////////////////////////////////////////////////////////////////
24 /**
25  * @file
26  * @brief \~english structures used by ns_logger.cpp for event and counter logging
27  *
28  */
29 /** @addtogroup BaseSystem
30  *  @{
31  */
32 /** @addtogroup native_service
33  *  @ingroup BaseSystem
34  *  @{
35  */
36 /** @addtogroup framework_unified
37  *  @ingroup Native_service
38  *  @{
39  */
40 /** @addtogroup native
41  *  @ingroup framework_unified
42  *  @{
43  */
44 #ifndef  __NATIVESERVICES_EVENTLOGGER_H__  // NOLINT  (build/header_guard)
45 #define __NATIVESERVICES_EVENTLOGGER_H__
46
47
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51
52 // event log messageQ name
53 #define EVENTLOG_MSGQ_NAME          "/EvntLogQue"
54
55 typedef enum _Datatype_ {
56   COMMON,
57   EVENT_SPECIFIC
58 } Datatype;
59
60 typedef enum _SystemPhase_ {
61   STARTUP = 0x21,
62   NORMAL = 0x22,
63   SHUTDOWN = 0x23,
64 } SystemPhase;
65
66 typedef enum _NStoSS_LOGGERSERVICEPROTOCOL {
67   SS_MSG_EVTLOG = 6463,               // NS to Event Logger Thread
68   SS_MSG_LOGGERCNT,                   // NS to Event logger Thread
69   SS_MSG_LOGGER_CNT_EVTLOG    // NS to event logger thread
70 } NStoSS_loggerserviceprotocol;
71
72 // Note: Don't remove #paragma pack(1) this is required for the
73 // ARM processor, forces data structures to be on a byte boundary
74 // all messages should be place in between #pragma pack(1) and #pragma pack()
75 #pragma pack(1)
76 typedef struct _stLogEvent_ {
77   UI_32 ts;
78   UI_8 grp_ID;
79   UI_8 event_id;
80   UI_8 data[4];
81   SystemPhase phase;
82   UI_16 cnt_ID;
83   Datatype typeofdata;
84 } st_LogEvent;
85 #pragma pack(0)
86
87 #pragma pack(1)
88 typedef struct _stLogCount_ {
89   SystemPhase phase;
90   UI_16 cnt_id;
91 } st_LogCount;
92 #pragma pack(0)
93
94
95 #ifdef __cplusplus
96 }
97 #endif
98
99 #endif /* __NATIVESERVICES_EVENTLOGGER_H__ */  // NOLINT  (build/header_guard)
100 /** @}*/
101 /** @}*/
102 /** @}*/
103 /** @}*/