Init basesystem source codes.
[staging/basesystem.git] / video_in_hal / stub / diag_record / library_record_thread / include / stub / pfdrec_thread_ifc.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 #ifndef DIAG_RECORD_LIBRARY_RECORD_THREAD_INCLUDE_VEHICLE_SERVICE_PFDREC_THREAD_IFC_H_
18 #define DIAG_RECORD_LIBRARY_RECORD_THREAD_INCLUDE_VEHICLE_SERVICE_PFDREC_THREAD_IFC_H_
19
20 /**
21  * @file pfdrec_thread_ifc.h
22  * @brief diag_record thread header file
23  */
24
25 /** @addtogroup BaseSystem
26  *  @{
27  */
28 /** @addtogroup vehicle_service
29  *  @ingroup BaseSystem
30  *  @{
31  */
32 /** @addtogroup diag_record
33  *  @ingroup vehicle_service
34  *  @{
35  */
36
37 #include <native_service/frameworkunified_types.h>
38
39 /**
40  * @class CPFDRECThread
41  * \~english @brief diag_record thread
42  * \~english @par   Brief Introduction
43  *        Class to provide the trace data record function
44  *
45  */
46 class CPFDRECThread {
47  public:
48     /////////////////////////////////////////////////////////////////////////////////////
49     /// \ingroup CPFDRECThread
50     /// \~english @par Summary
51     ///       Constructor of CPFDRECThread class.
52     /// \~english @param None
53     /// \~english @retval None
54     /// \~english @par Preconditions
55     ///       - None.
56     /// \~english @par Change of the internal state
57     ///       - The internal state is not changed.
58     /// \~english @par Causes of failures
59     ///       None
60     /// \~english @par Classification
61     ///       Public
62     /// \~english @par Type
63     ///       None
64     /// \~english @par Detail
65     ///       To generate a CPFDRECThread class. \n
66     ///       Member variables initialize. \n
67     ///       After the constructor, be sure to call Initialize method.
68     /// \~english @see  ~CPFDRECThread, Initialize
69     ////////////////////////////////////////////////////////////////////////////////////
70     CPFDRECThread();
71
72     /////////////////////////////////////////////////////////////////////////////////////
73     /// \ingroup ~CPFDRECThread
74     /// \~english @par Summary
75     ///       Destructor of CPFDRECThread class.
76     /// \~english @param None
77     /// \~english @retval None
78     /// \~english @par Preconditions
79     ///       - None.
80     /// \~english @par Change of the internal state
81     ///       - The internal state is not changed.
82     /// \~english @par Causes of failures
83     ///       None
84     /// \~english @par Classification
85     ///       Public
86     /// \~english @par Type
87     ///       None
88     /// \~english @par Detail
89     ///       To delete a CPFDRECThread class.
90     /// \~english @see  CPFDRECThread
91     ////////////////////////////////////////////////////////////////////////////////////
92     virtual ~CPFDRECThread();
93
94     /////////////////////////////////////////////////////////////////////////////////////
95     /// \ingroup Initialize
96     /// \~english @par Summary
97     ///      - Initialize diag_record thread.
98     /// \~english @param [in]    h_app    The application handle
99     /// \~english @retval  eFrameworkunifiedStatusOK         Success
100     /// \~english @retval  eFrameworkunifiedStatusFail       Failure
101     /// \~english @par Precondition
102     ///      - BackupMgr is available.
103     ///      - The generation/initialization of dispatcher for application(PadCreateDispatcherWithoutLoop etc.) is done.
104     /// \~english @par Changes in internal status
105     ///      - There is no changes in internal status when the API is called.
106     /// \~english @par Conditions of processing failure
107     ///      - When fail to create TN_PFDRECTHREAD. [eFrameworkunifiedStatusFail]
108     /// \~english @par Details
109     ///      - The API is assumed to be executed only from the SS_LoggerService.
110     ///      - Initialize diag_record thread.
111     /// \~english @par Classification
112     ///      - Public
113     /// \~english @par Type
114     ///      - Sync
115     /// \~english @see FrameworkunifiedCreateChildThread, FrameworkunifiedStartChildThread
116     /////////////////////////////////////////////////////////////////////////////////////
117     EFrameworkunifiedStatus Initialize(HANDLE h_app);
118
119     /////////////////////////////////////////////////////////////////////////////////////
120     /// \ingroup Finalize
121     /// \~english @par Summary
122     ///      - Finalize diag_record thread.
123     /// \~english @param [in]    h_app    The application handle
124     /// \~english @retval  eFrameworkunifiedStatusOK         Success
125     /// \~english @par Precondition
126     ///      - The generation/initialization of dispatcher for application(PadCreateDispatcherWithoutLoop etc.) is done.
127     ///      - The diag_record thread is running.
128     /// \~english @par Changes in internal status
129     ///      - There is no changes in internal status when the API is called.
130     /// \~english @par Conditions of processing failure
131     ///      - None
132     /// \~english @par Details
133     ///      - The API is assumed to be executed only from the SS_LoggerService.
134     ///      - Finalize diag_record thread.
135     /// \~english @par Classification
136     ///      - Public
137     /// \~english @par Type
138     ///      - Sync
139     /// \~english @see FrameworkunifiedStopChildThread
140     /////////////////////////////////////////////////////////////////////////////////////
141     EFrameworkunifiedStatus Finalize(HANDLE h_app);
142
143  private:
144     EFrameworkunifiedStatus Start(HANDLE h_thread);
145     EFrameworkunifiedStatus Stop(HANDLE h_thread);
146
147     EFrameworkunifiedStatus SetFuncOnOff(HANDLE h_thread);
148     EFrameworkunifiedStatus GetFuncOnOff(HANDLE h_thread);
149     EFrameworkunifiedStatus DeleteData(HANDLE h_thread);
150
151     EFrameworkunifiedStatus DeleteIndividual(HANDLE f_hThread);
152     EFrameworkunifiedStatus ComDataBackup(HANDLE h_thread);
153     EFrameworkunifiedStatus ReadMemData(HANDLE h_thread);
154     EFrameworkunifiedStatus GetDataInfo(HANDLE h_thread);
155     EFrameworkunifiedStatus OutputData(HANDLE h_thread);
156     EFrameworkunifiedStatus ReadData(HANDLE h_thread);
157     EFrameworkunifiedStatus SearchData(HANDLE h_thread);
158     EFrameworkunifiedStatus OverwriteData(HANDLE h_thread);
159     EFrameworkunifiedStatus SetExtractMode(HANDLE h_thread);
160
161     HANDLE                   m_thread;
162 };
163
164 /** @}*/  // end of diag_record
165 /** @}*/  // end of vehicle_service
166 /** @}*/  // end of BaseSystem
167
168 #endif  // DIAG_RECORD_LIBRARY_RECORD_THREAD_INCLUDE_VEHICLE_SERVICE_PFDREC_THREAD_IFC_H_