• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2014-2017 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
2 // This Source Code Form is subject to the terms of the Mozilla Public
3 // License, v. 2.0. If a copy of the MPL was not distributed with this
4 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 
6 #ifndef VSOMEIP_V3_CONSTANTS_HPP_
7 #define VSOMEIP_V3_CONSTANTS_HPP_
8 
9 #include <string>
10 
11 #include <vsomeip/primitive_types.hpp>
12 #include <vsomeip/enumeration_types.hpp>
13 
14 namespace vsomeip_v3 {
15 
16 const major_version_t DEFAULT_MAJOR = 0x00;
17 const minor_version_t DEFAULT_MINOR = 0x00000000;
18 const ttl_t DEFAULT_TTL = 0xFFFFFF; // "until next reboot"
19 
20 const std::string DEFAULT_MULTICAST = "224.0.0.0";
21 const uint16_t DEFAULT_PORT = 30500;
22 const uint16_t ILLEGAL_PORT = 0;
23 const uint16_t ANY_PORT = 0;
24 
25 const uint16_t NO_TRACE_FILTER_EXPRESSION = 0x0000;
26 
27 const service_t ANY_SERVICE = 0xFFFF;
28 const instance_t ANY_INSTANCE = 0xFFFF;
29 const method_t ANY_METHOD = 0xFFFF;
30 const major_version_t ANY_MAJOR = 0xFF;
31 const minor_version_t ANY_MINOR = 0xFFFFFFFF;
32 
33 const eventgroup_t DEFAULT_EVENTGROUP = 0x0001;
34 
35 const client_t ILLEGAL_CLIENT = 0x0000;
36 const method_t INVALID_METHOD = 0x0000;
37 
38 const byte_t MAGIC_COOKIE_CLIENT_MESSAGE = 0x00;
39 const byte_t MAGIC_COOKIE_SERVICE_MESSAGE = 0x80;
40 const length_t MAGIC_COOKIE_SIZE = 0x00000008;
41 const request_t MAGIC_COOKIE_REQUEST = 0xDEADBEEF;
42 const client_t MAGIC_COOKIE_CLIENT = 0xDEAD;
43 const protocol_version_t MAGIC_COOKIE_PROTOCOL_VERSION = 0x01;
44 const interface_version_t MAGIC_COOKIE_INTERFACE_VERSION = 0x01;
45 const message_type_e MAGIC_COOKIE_CLIENT_MESSAGE_TYPE =
46         message_type_e::MT_REQUEST_NO_RETURN;
47 const message_type_e MAGIC_COOKIE_SERVICE_MESSAGE_TYPE =
48         message_type_e::MT_NOTIFICATION;
49 const return_code_e MAGIC_COOKIE_RETURN_CODE = return_code_e::E_OK;
50 
51 const byte_t CLIENT_COOKIE[] = { 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08,
52         0xDE, 0xAD, 0xBE, 0xEF, 0x01, 0x01, 0x01, 0x00 };
53 
54 const byte_t SERVICE_COOKIE[] = { 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00,
55         0x08, 0xDE, 0xAD, 0xBE, 0xEF, 0x01, 0x01, 0x02, 0x00 };
56 
57 const event_t ANY_EVENT = 0xFFFF;
58 const client_t ANY_CLIENT = 0xFFFF;
59 
60 const int VSOMEIP_ALL = -1;
61 
62 const pending_security_update_id_t DEFAULT_SECURITY_UPDATE_ID = 0x0;
63 
64 } // namespace vsomeip_v3
65 
66 #endif // VSOMEIP_V3_CONSTANTS_HPP_
67