summaryrefslogtreecommitdiffstats
path: root/positioning/server/include/common/com/com_message_header.h
blob: 9db438173a1a8b53d38349661c21ff6d07d7a5cd (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
/*
 * @copyright Copyright (c) 2016-2019 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 POSITIONING_SERVER_INCLUDE_COMMON_COM_COM_MESSAGE_HEADER_H_
#define POSITIONING_SERVER_INCLUDE_COMMON_COM_COM_MESSAGE_HEADER_H_

/**
 * @file com_message_header.h
 */


#ifndef _POS_MESSAGE_HEADER_

#include <sys/types.h>
#include <native_service/frameworkunified_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 resourceID */
    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    kick_time;    //!< \~english kick time
    uint32_t    sr_cid;       //!< \~english message command ID
    uint32_t    pno;         //!< \~english process No
    uint32_t    data_bytes;   //!< \~english data size
} _CWORD64_MSG_LOG_HDR;

#endif

#endif  // POSITIONING_SERVER_INCLUDE_COMMON_COM_COM_MESSAGE_HEADER_H_ */