summaryrefslogtreecommitdiff
path: root/interface/vsomeip/primitive_types.hpp
blob: 0a9eaa5e18d472b45bfee9e886c34b6dbfde5fa5 (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
// Copyright (C) 2014-2021 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef VSOMEIP_V3_PRIMITIVE_TYPES_HPP_
#define VSOMEIP_V3_PRIMITIVE_TYPES_HPP_

#include <array>
#include <cstdint>
#include <string>

#if defined(__linux__) || defined(ANDROID)
#include <sys/types.h>
#endif

namespace vsomeip_v3 {

typedef uint32_t message_t;
typedef uint16_t service_t;
typedef uint16_t method_t;
typedef uint16_t event_t;

typedef uint16_t instance_t;
typedef uint16_t eventgroup_t;

typedef uint8_t major_version_t;
typedef uint32_t minor_version_t;

typedef uint32_t ttl_t;

typedef uint32_t request_t;
typedef uint16_t client_t;
typedef uint16_t session_t;

typedef uint32_t length_t;

typedef uint8_t protocol_version_t;
typedef uint8_t interface_version_t;

typedef uint8_t byte_t;
typedef uint16_t diagnosis_t;

typedef uint16_t port_t;

// Addresses
typedef std::array<byte_t, 4> ipv4_address_t;
typedef std::array<byte_t, 16> ipv6_address_t;
typedef std::uint16_t port_t;

typedef std::string trace_channel_t;

typedef std::string trace_filter_type_t;

typedef std::uint32_t pending_remote_offer_id_t;

typedef std::uint32_t pending_security_update_id_t;

#ifdef _WIN32
    typedef std::uint32_t uid_t;
    typedef std::uint32_t gid_t;
#else
    typedef ::uid_t uid_t;
    typedef ::uid_t gid_t;
#endif

} // namespace vsomeip_v3

#endif // VSOMEIP_V3_PRIMITIVE_TYPES_HPP