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 /// \ingroup tag_SystemManager
19 /// \brief Application entry point.
21 ///////////////////////////////////////////////////////////////////////////////
23 #include <sys/types.h>
27 #include <system_service/ss_system_if.h>
28 #include <native_service/frameworkunified_dispatcher.h>
29 #include <system_service/ss_string_maps.h>
30 #include <system_service/ss_version.h>
31 #include <native_service/ns_version_if.h>
32 #include <system_service/ss_system_types.h>
33 #include <system_service/ss_logger_store_logs.h>
37 BOOL g_isExec = FALSE;
39 //////////////////////////////////////////
40 // Function : FrameworkunifiedOnInitialization
41 //////////////////////////////////////////
42 EFrameworkunifiedStatus FrameworkunifiedOnInitialization(HANDLE hApp) {
43 EFrameworkunifiedStatus eStatus = eFrameworkunifiedStatusOK;
44 eStatus = StartRtUsbLogThread(hApp);
48 //////////////////////////////////////////
49 // Function : FrameworkunifiedOnDestroy
50 //////////////////////////////////////////
51 EFrameworkunifiedStatus FrameworkunifiedOnDestroy(HANDLE hApp) {
52 return eFrameworkunifiedStatusOK;
55 //////////////////////////////////////////
56 // Function : FrameworkunifiedOnDummy
57 //////////////////////////////////////////
58 EFrameworkunifiedStatus FrameworkunifiedOnDummy(HANDLE hApp) {
59 return eFrameworkunifiedStatusOK;
62 //////////////////////////////////////////
64 //////////////////////////////////////////
65 int main(int argc, char *argv[]) {
68 char clientName[16] = "realtimeUsbLog";
69 FrameworkunifiedDefaultCallbackHandler cbFuncs;
71 cbFuncs.onInitilization = FrameworkunifiedOnInitialization;
72 cbFuncs.onDestroy = FrameworkunifiedOnDestroy;
74 cbFuncs.onStart = FrameworkunifiedOnDummy;
75 cbFuncs.onStop = FrameworkunifiedOnDummy;
76 cbFuncs.onDebugDump = FrameworkunifiedOnDummy;
77 cbFuncs.createStateMachine = FrameworkunifiedOnDummy;
78 cbFuncs.ssFrameworkInterface = FrameworkunifiedOnDummy;
80 FrameworkunifiedCreateDispatcherWithoutLoop(clientName, hApp, argc, argv, &cbFuncs, FALSE);
82 FrameworkunifiedGetDispatcherFD(hApp, &nsFd);
94 select(maxFd + 1, &fds, NULL, NULL, NULL);
96 if (FD_ISSET(nsFd, &fds)) {
97 FrameworkunifiedDispatchProcessWithoutLoop(hApp);
101 FrameworkunifiedDestroyDispatcherWithoutLoop(hApp);