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.
18 //////////////////////////////////////////////////////////////////////////////////////////////////
19 /// \ingroup tag_NativeServices
22 //////////////////////////////////////////////////////////////////////////////////////////////////
25 * @file frameworkunified_service_protocol.h
26 * @brief \~english Include enums, structs and frameworkunified_types.h
29 /** @addtogroup BaseSystem
32 /** @addtogroup native_service
36 /** @addtogroup framework_unified
37 * @ingroup native_service
40 /** @addtogroup framework
41 * @ingroup framework_unified
44 #ifndef FRAMEWORKUNIFIED_SERVICE_PROTOCOL_H_ // NOLINT (build/header_guard)
45 #define FRAMEWORKUNIFIED_SERVICE_PROTOCOL_H_
47 #include <native_service/frameworkunified_types.h>
49 #define NS_INVALID_SESSION 0xFFFF
51 typedef enum _EBaseProtocol {
52 PROTOCOL_OPEN_SESSION_REQ = 0x00, ///< Open session request (client > service)
53 PROTOCOL_OPEN_SESSION_ACK = 0x01, ///< Open session ack (service > client)
54 PROTOCOL_OPEN_SESSION_REQ_SYNC = 0x02, ///< Open session request sync (client > service)
55 PROTOCOL_CLOSE_SESSION_REQ = 0x03, ///< Close session request (client > service)
56 PROTOCOL_CLOSE_SESSION_ACK = 0x04, ///< Close session ack (service > client)
57 PROTOCOL_CLOSE_SESSION_REQ_SYNC = 0x05, ///< Close session request sync (client > service)
59 PROTOCOL_REGISTER_EVENTS = 0x06, ///< Register for events (client > service)
60 PROTOCOL_REGISTER_EVENTS_ACK = 0x07, ///< Register for events ack (service > client)
61 PROTOCOL_UNREGISTER_EVENTS = 0x08, ///< Un-Register for events (client > service)
63 PROTOCOL_THREAD_INITIALIZATION = 0x09, ///< Initialize thread after creation
64 PROTOCOL_THREAD_WAKEUP = 0x0A, ///< Wakeup Thread after sleep
65 PROTOCOL_THREAD_SHUTDOWN = 0x0B, ///< Stop the thread
66 PROTOCOL_THREAD_DESTROY = 0x0C, ///< Destroy the thread
67 PROTOCOL_RSV_0D = 0x0D, ///< Reserved
68 PROTOCOL_RSV_0E = 0x0E, ///< Reserved
69 PROTOCOL_DIS_MSGPROFILER = 0x0F, ///< Reserved
71 PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD = 0x10, ///< Protocols between range PROTOCOL_FRAMEWORKUNIFIED_BASE_CMD to PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD
72 PROTOCOL_FRAMEWORKUNIFIED_MAX_CMD = 0xFFFFFFF0, ///< are available for FRAMEWORKUNIFIED applications to use.
74 PROTOCOL_RSV_xF1 = 0xFFFFFFF1, ///< Reserved
75 PROTOCOL_RSV_xF2 = 0xFFFFFFF2, ///< Reserved
76 PROTOCOL_RSV_xF3 = 0xFFFFFFF3, ///< Reserved
77 PROTOCOL_RSV_xF4 = 0xFFFFFFF4, ///< Reserved
78 PROTOCOL_RSV_xF5 = 0xFFFFFFF5, ///< Reserved
79 PROTOCOL_RSV_xF6 = 0xFFFFFFF6, ///< Reserved
80 PROTOCOL_RSV_xF7 = 0xFFFFFFF7, ///< Reserved
81 PROTOCOL_RSV_xF8 = 0xFFFFFFF8, ///< Reserved
82 PROTOCOL_RSV_xF9 = 0xFFFFFFF9, ///< Reserved
83 PROTOCOL_RSV_xFA = 0xFFFFFFFA, ///< Reserved
84 PROTOCOL_RSV_xFB = 0xFFFFFFFB, ///< Reserved
85 PROTOCOL_RSV_xFC = 0xFFFFFFFC, ///< Reserved
87 PROTOCOL_TIMER_DUMMY_CMD = 0xFFFFFFFD, ///< NS internally use this command in timer
89 PROTOCOL_FRAMEWORKUNIFIED_NOTIFICATION = 0xFFFFFFFE,
90 PROTOCOL_FRAMEWORKUNIFIED_ANY_COMMAND = 0xFFFFFFFF
93 typedef struct _OpenSessionAck {
94 EFrameworkunifiedStatus eStatus;
96 CHAR cSessionName[MAX_QUEUE_NAME_SIZE];
101 typedef struct _CloseSessionReq {
103 CHAR cSessionName[MAX_QUEUE_NAME_SIZE];
106 typedef struct _CloseSessionAck {
108 EFrameworkunifiedStatus eStatus;
111 #endif /* FRAMEWORKUNIFIED_SERVICE_PROTOCOL_H_ */ // NOLINT (build/header_guard)