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_CONSTANTS_HPP 7 #define VSOMEIP_CONSTANTS_HPP 8 9 #include <string> 10 11 #include "../../compat/vsomeip/enumeration_types.hpp" 12 #include "../../compat/vsomeip/primitive_types.hpp" 13 14 namespace vsomeip { 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 24 const uint16_t NO_TRACE_FILTER_EXPRESSION = 0x0000; 25 26 const service_t ANY_SERVICE = 0xFFFF; 27 const instance_t ANY_INSTANCE = 0xFFFF; 28 const method_t ANY_METHOD = 0xFFFF; 29 const major_version_t ANY_MAJOR = 0xFF; 30 const minor_version_t ANY_MINOR = 0xFFFFFFFF; 31 32 const eventgroup_t DEFAULT_EVENTGROUP = 0x0001; 33 34 const client_t ILLEGAL_CLIENT = 0x0000; 35 36 const byte_t MAGIC_COOKIE_CLIENT_MESSAGE = 0x00; 37 const byte_t MAGIC_COOKIE_SERVICE_MESSAGE = 0x80; 38 const length_t MAGIC_COOKIE_SIZE = 0x00000008; 39 const request_t MAGIC_COOKIE_REQUEST = 0xDEADBEEF; 40 const client_t MAGIC_COOKIE_NETWORK_BYTE_ORDER = 0xADDE; 41 const protocol_version_t MAGIC_COOKIE_PROTOCOL_VERSION = 0x01; 42 const interface_version_t MAGIC_COOKIE_INTERFACE_VERSION = 0x01; 43 const message_type_e MAGIC_COOKIE_CLIENT_MESSAGE_TYPE = 44 message_type_e::MT_REQUEST_NO_RETURN; 45 const message_type_e MAGIC_COOKIE_SERVICE_MESSAGE_TYPE = 46 message_type_e::MT_NOTIFICATION; 47 const return_code_e MAGIC_COOKIE_RETURN_CODE = return_code_e::E_OK; 48 49 const byte_t CLIENT_COOKIE[] = { 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 50 0xDE, 0xAD, 0xBE, 0xEF, 0x01, 0x01, 0x01, 0x00 }; 51 52 const byte_t SERVICE_COOKIE[] = { 0xFF, 0xFF, 0x80, 0x00, 0x00, 0x00, 0x00, 53 0x08, 0xDE, 0xAD, 0xBE, 0xEF, 0x01, 0x01, 0x02, 0x00 }; 54 55 const event_t ANY_EVENT = 0xFFFF; 56 const client_t ANY_CLIENT = 0xFFFF; 57 58 const pending_subscription_id_t DEFAULT_SUBSCRIPTION = 0x0; 59 const pending_security_update_id_t DEFAULT_SECURITY_UPDATE_ID = 0x0; 60 61 } // namespace vsomeip 62 63 #endif // VSOMEIP_CONSTANTS_HPP 64