summaryrefslogtreecommitdiffstats
path: root/positioning_base_library/library/include/vehicle_service/pos_message_header.h
blob: b6af3353b0568d82fbf2afdb09079aac52acf5f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/*
 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef _POS_MESSAGE_HEADER_  // NOLINT(build/header_guard)
#define _POS_MESSAGE_HEADER_

/**
 * @file pos_message_header.h
 * @brief Header file for message data definitions
 */

/** @addtogroup BaseSystem
 *  @{
 */
/** @addtogroup vehicle_service
 *  @ingroup BaseSystem
 *  @{
 */
/** @addtogroup positioning_base_library
 *  @ingroup vehicle_service
 *  @{
 */

#include <sys/types.h>

/**
 * @struct T_APIMSG_HEADER
 * \~english _CWORD64_API message header structure
 */
typedef struct {
    uint16_t replyid;          //!< \~english message send result notify dest ID
    uint16_t sndpno;           //!< \~english message send source process No
    uint16_t respno;           //!< \~english message response process No
    uint16_t cid;              //!< \~english message command ID
    uint16_t msgbodysize;      //!< \~english message body size
    uint8_t  rid;              //!< \~english message resource ID */
    uint8_t  reserve;          //!< \~english reserve
    uint8_t  filler[2];        //!< \~english filter
} T_APIMSG_HEADER;

/**
 * @struct T_APIMSG_MSGBUF_HEADER
 * \~english _CWORD64_API message buffer header structure
 */
typedef struct {
    uint32_t  signo;  //!< \~english signal No, _pb_SndMsg to set 0
    T_APIMSG_HEADER hdr;   //!< \~english message header
} T_APIMSG_MSGBUF_HEADER;

/**
 * @struct _CWORD64_MSG_LOG_HDR
 * \~english _CWORD64_API message log header structure
 */
typedef struct {
    uint32_t    kickTime;    //!< \~english kick time
    uint32_t    srCid;       //!< \~english message command ID
    uint32_t    pno;         //!< \~english process No
    uint32_t    dataBytes;   //!< \~english data size
} _CWORD64_MSG_LOG_HDR;

/** @}*/  // end of positioning_base_library
/** @}*/  // end of vehicle_service
/** @}*/  // end of BaseSystem
#endif  // _POS_MESSAGE_HEADER_