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 #ifndef COMMUNICATION_SUBCPU_CLIENT_INCLUDE_PERIPHERAL_SERVICE_COM_MESSAGE_HEADER_H_
18 #define COMMUNICATION_SUBCPU_CLIENT_INCLUDE_PERIPHERAL_SERVICE_COM_MESSAGE_HEADER_H_
21 * @file com_message_header.h
23 * @brief Defination of structure for message header
26 #include <sys/types.h>
28 /****************************************************************************
29 * TAG : typedef T_APIMSG_HEADER
30 * ABSTRACT : _CWORD64_API message header structure
32 ****************************************************************************/
35 * @brief Structure for message header
38 uint16_t replyid; //!< \~english Send Result ID
39 uint16_t sndpno; //!< \~english Send process No
40 uint16_t respno; //!< \~english Response No
41 uint16_t cid; //!< \~english Command ID
42 uint16_t msgbodysize; //!< \~english Message body size
43 uint8_t rid; //!< \~english Resource ID
44 uint8_t reserve; //!< \~english Reserve
45 uint8_t filler[2]; //!< \~english filler
46 } T_APIMSG_HEADER_COMM;
50 * @brief Structure for buffer message header
53 uint32_t signo; //!< \~english Signal No
54 T_APIMSG_HEADER_COMM hdr; //!< \~english Message Header
55 } T_APIMSG_MSGBUF_HEADER_COMM;
58 * @~english @brief Check for assert do not overflow buffer when Re-arrangement was cast to another structure
60 #define assert_static(e) \
62 enum { assert_static__ = 1 / (e) }; \
65 #endif // COMMUNICATION_SUBCPU_CLIENT_INCLUDE_PERIPHERAL_SERVICE_COM_MESSAGE_HEADER_H_