summaryrefslogtreecommitdiff
path: root/implementation/endpoints/src/endpoint_definition.cpp
blob: 9a4caea65c980c986f0173aef784c87ef29eac49 (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
// Copyright (C) 2014-2015 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/.

#include <vsomeip/constants.hpp>

#include "../include/endpoint_definition.hpp"

namespace vsomeip {

endpoint_definition::endpoint_definition()
        : port_(ILLEGAL_PORT) {
}

endpoint_definition::endpoint_definition(
        const boost::asio::ip::address &_address, uint16_t _port,
        bool _is_reliable)
        : address_(_address), port_(_port), is_reliable_(_is_reliable), remote_port_(_port) {
}

const boost::asio::ip::address & endpoint_definition::get_address() const {
    return address_;
}

void endpoint_definition::set_address(
        const boost::asio::ip::address &_address) {
    address_ = _address;
}

uint16_t endpoint_definition::get_port() const {
    return port_;
}

void endpoint_definition::set_port(uint16_t _port) {
    port_ = _port;
}

bool endpoint_definition::is_reliable() const {
    return is_reliable_;
}

void endpoint_definition::set_reliable(bool _is_reliable) {
    is_reliable_ = _is_reliable;
}

uint16_t endpoint_definition::get_remote_port() const {
    return remote_port_;
}

void endpoint_definition::set_remote_port(uint16_t _port) {
    remote_port_ = _port;
}


} // namespace vsomeip