summaryrefslogtreecommitdiff
path: root/implementation/configuration/include/client.hpp
blob: 5c0805dda2e226d366d51cdf29efb9ae6fccd507 (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
// Copyright (C) 2016-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_CFG_CLIENT_HPP
#define VSOMEIP_V3_CFG_CLIENT_HPP

#include <map>
#include <memory>
#include <set>

#include <vsomeip/primitive_types.hpp>

namespace vsomeip_v3 {
namespace cfg {

struct client {
    client() : service_(ANY_SERVICE),
            instance_(ANY_INSTANCE) {
    }

    // ports for specific service / instance
    service_t service_;
    instance_t instance_;
    std::map<bool, std::set<uint16_t> > ports_;
    std::map<bool, uint16_t> last_used_specific_client_port_;

    // client port ranges mapped to remote port ranges
    std::map<bool, std::pair<uint16_t, uint16_t> > remote_ports_;
    std::map<bool, std::pair<uint16_t, uint16_t> > client_ports_;
    std::map<bool, uint16_t> last_used_client_port_;
};

} // namespace cfg
} // namespace vsomeip_v3

#endif // VSOMEIP_V3_CFG_CLIENT_HPP