#include <source/ariba/utility/addressing/endpoint_set.hpp>

Public Types | |
| enum | layers { Layer1 = 1, Layer2 = 2, Layer3 = 4, Layer4 = 8, Layer5 = 16, Layer6 = 32, Layer7 = 64, Layer8 = 128, NoLoopback = 256, AllLayers = ~0, Layer1_3 = Layer1|Layer2|Layer3, Layer1_4 = Layer1|Layer2|Layer3|Layer4 } |
| typedef boost::mutex::scoped_lock | scoped_lock |
Public Member Functions | |
| endpoint_set () | |
| endpoint_set (const endpoint_set ©) | |
| endpoint_set (const std::string &str) | |
| endpoint_set (const uint8_t *bytes, size_t size) | |
| void | add (const address_v *address, int layers=AllLayers) |
| adds an address or endpoint to this set | |
| void | add (const endpoint_set &eps, int layers=AllLayers) |
| adds addresses from another endpoint set | |
| void | remove (const address_vf address) |
| removes an address or endpoint from this set | |
| bool | disjoint_to (const endpoint_set &set) const |
| bool | intersects_with (const endpoint_set &set) const |
| bool | is_subset_of (const endpoint_set &set) const |
| bool | is_bytes_size_static () const |
| returns true, if this address has a fixed size in bytes | |
| size_t | to_bytes_size () const |
| returns the number of bytes used for serialization of this address | |
| void | to_bytes (uint8_t *bytes) const |
| converts this address to a binary representation | |
| bool | assign (const uint8_t *bytes, size_t size) |
| Assigns an address using a bunch of bytes. | |
| std::string | to_string () const |
| generates a string out of this endpoint-set | |
| void | assign (const std::string &str) |
| assigns an endpoint-set out of a string | |
| endpoint_set & | operator= (const endpoint_set &rhs) |
| bool | operator== (const endpoint_set &rhs) const |
| checks wheter the two endpoint sets are identical | |
| bool | operator!= (const endpoint_set &rhs) const |
Public Attributes | |
| unordered_set< mac_address > | bluetooth |
| unordered_set< ip_address > | ip |
| unordered_set< tcp_port_address > | tcp |
| unordered_set < rfcomm_channel_address > | rfcomm |
| boost::mutex | io_mutex |
Private Member Functions | |
| template<uint8_t type, class V > | |
| size_t | to_bytes_dynamic (const unordered_set< V > &set, uint8_t *bytes) const |
| template<class V > | |
| void | from_bytes_dynamic (unordered_set< V > &set, const uint8_t *bytes, uint8_t size) |
| template<uint8_t type, class V > | |
| size_t | to_bytes_fixed (const unordered_set< V > &set, uint8_t *bytes) const |
| template<class V > | |
| void | from_bytes_fixed (unordered_set< V > &set, const uint8_t *bytes, uint8_t size) |
| template<class V > | |
| std::string | to_string_set (const unordered_set< V > &set, const std::string &type) const |
| template<class V > | |
| size_t | from_string_set (unordered_set< V > &set, string::size_type pos, const std::string &str) |
Static Private Member Functions | |
| static void | trim (string &str) |
| static string::size_type | skip (const char *chars, string::size_type pos, const std::string &str) |
This end-point set shelters known addresses of a device. Transport protocols use this class to address devices.
Example of a string representation: "tcp{500|501};ip{10.11.12.13};bluetooth{01:02:03:04:05:06};rfcomm{1234}" Inside a address type specification, addresses are separated by a bar (|).
Definition at line 27 of file endpoint_set.hpp.
| typedef boost::mutex::scoped_lock ariba::addressing::endpoint_set::scoped_lock |
Definition at line 41 of file endpoint_set.hpp.
| Layer1 | |
| Layer2 | |
| Layer3 | |
| Layer4 | |
| Layer5 | |
| Layer6 | |
| Layer7 | |
| Layer8 | |
| NoLoopback | |
| AllLayers | |
| Layer1_3 | |
| Layer1_4 |
Definition at line 161 of file endpoint_set.hpp.
| ariba::addressing::endpoint_set::endpoint_set | ( | ) | [inline] |
Definition at line 168 of file endpoint_set.hpp.
| ariba::addressing::endpoint_set::endpoint_set | ( | const endpoint_set & | copy | ) | [inline] |
Definition at line 172 of file endpoint_set.hpp.
| ariba::addressing::endpoint_set::endpoint_set | ( | const std::string & | str | ) | [inline] |
Definition at line 176 of file endpoint_set.hpp.
References assign().
| ariba::addressing::endpoint_set::endpoint_set | ( | const uint8_t * | bytes, | |
| size_t | size | |||
| ) | [inline] |
Definition at line 180 of file endpoint_set.hpp.
References assign().
| void ariba::addressing::endpoint_set::add | ( | const endpoint_set & | eps, | |
| int | layers = AllLayers | |||
| ) | [inline] |
| void ariba::addressing::endpoint_set::add | ( | const address_v * | address, | |
| int | layers = AllLayers | |||
| ) | [inline] |
adds an address or endpoint to this set
Definition at line 185 of file endpoint_set.hpp.
References ariba::addressing::tcpip_endpoint::address(), bluetooth, ariba::addressing::rfcomm_endpoint::channel(), ariba::addressing::address_v::instanceof(), io_mutex, ip, ariba::addressing::ip_address::is_loopback(), Layer2, Layer3, Layer4, ariba::addressing::rfcomm_endpoint::mac(), NoLoopback, ariba::addressing::tcpip_endpoint::port(), rfcomm, and tcp.
Referenced by ariba::communication::AddressDiscovery::discover_ip_addresses(), and ariba::communication::BaseCommunication::receiveMessage().
| void ariba::addressing::endpoint_set::assign | ( | const std::string & | str | ) | [inline] |
| bool ariba::addressing::endpoint_set::assign | ( | const uint8_t * | bytes, | |
| size_t | size | |||
| ) | [inline] |
Assigns an address using a bunch of bytes.
Definition at line 318 of file endpoint_set.hpp.
References bluetooth, io_mutex, ip, rfcomm, and tcp.
Referenced by endpoint_set(), and ariba::communication::BaseCommunication::setEndpoints().
| bool ariba::addressing::endpoint_set::disjoint_to | ( | const endpoint_set & | set | ) | const [inline] |
checks whether two end-points are disjoint (only check lower level addresses)
Definition at line 253 of file endpoint_set.hpp.
References bluetooth, io_mutex, and ip.
Referenced by intersects_with().
| void ariba::addressing::endpoint_set::from_bytes_dynamic | ( | unordered_set< V > & | set, | |
| const uint8_t * | bytes, | |||
| uint8_t | size | |||
| ) | [inline, private] |
Definition at line 64 of file endpoint_set.hpp.
References internal::V().
| void ariba::addressing::endpoint_set::from_bytes_fixed | ( | unordered_set< V > & | set, | |
| const uint8_t * | bytes, | |||
| uint8_t | size | |||
| ) | [inline, private] |
Definition at line 89 of file endpoint_set.hpp.
References internal::V().
| size_t ariba::addressing::endpoint_set::from_string_set | ( | unordered_set< V > & | set, | |
| string::size_type | pos, | |||
| const std::string & | str | |||
| ) | [inline, private] |
Definition at line 140 of file endpoint_set.hpp.
References skip(), trim(), and internal::V().
| bool ariba::addressing::endpoint_set::intersects_with | ( | const endpoint_set & | set | ) | const [inline] |
Definition at line 262 of file endpoint_set.hpp.
References disjoint_to().
| bool ariba::addressing::endpoint_set::is_bytes_size_static | ( | ) | const [inline] |
returns true, if this address has a fixed size in bytes
Definition at line 272 of file endpoint_set.hpp.
| bool ariba::addressing::endpoint_set::is_subset_of | ( | const endpoint_set & | set | ) | const [inline] |
Definition at line 266 of file endpoint_set.hpp.
| bool ariba::addressing::endpoint_set::operator!= | ( | const endpoint_set & | rhs | ) | const [inline] |
Definition at line 410 of file endpoint_set.hpp.
| endpoint_set& ariba::addressing::endpoint_set::operator= | ( | const endpoint_set & | rhs | ) | [inline] |
| bool ariba::addressing::endpoint_set::operator== | ( | const endpoint_set & | rhs | ) | const [inline] |
| void ariba::addressing::endpoint_set::remove | ( | const address_vf | address | ) | [inline] |
removes an address or endpoint from this set
Definition at line 233 of file endpoint_set.hpp.
References ariba::addressing::tcpip_endpoint::address(), bluetooth, ariba::addressing::rfcomm_endpoint::channel(), io_mutex, ip, ariba::addressing::rfcomm_endpoint::mac(), ariba::addressing::tcpip_endpoint::port(), rfcomm, and tcp.
| static string::size_type ariba::addressing::endpoint_set::skip | ( | const char * | chars, | |
| string::size_type | pos, | |||
| const std::string & | str | |||
| ) | [inline, static, private] |
Definition at line 126 of file endpoint_set.hpp.
Referenced by assign(), and from_string_set().
| void ariba::addressing::endpoint_set::to_bytes | ( | uint8_t * | bytes | ) | const [inline] |
| size_t ariba::addressing::endpoint_set::to_bytes_dynamic | ( | const unordered_set< V > & | set, | |
| uint8_t * | bytes | |||
| ) | const [inline, private] |
Definition at line 45 of file endpoint_set.hpp.
References internal::V().
| size_t ariba::addressing::endpoint_set::to_bytes_fixed | ( | const unordered_set< V > & | set, | |
| uint8_t * | bytes | |||
| ) | const [inline, private] |
Definition at line 76 of file endpoint_set.hpp.
References internal::V().
| size_t ariba::addressing::endpoint_set::to_bytes_size | ( | ) | const [inline] |
returns the number of bytes used for serialization of this address
Definition at line 277 of file endpoint_set.hpp.
References bluetooth, io_mutex, ip, rfcomm, tcp, ariba::addressing::port_address_tpl< AddressInfo >::to_bytes_size(), ariba::addressing::ip_address::to_bytes_size(), and ariba::addressing::mac_address_tpl< AddressInfo >::to_bytes_size().
| std::string ariba::addressing::endpoint_set::to_string | ( | ) | const [inline] |
generates a string out of this endpoint-set
Definition at line 362 of file endpoint_set.hpp.
References bluetooth, io_mutex, ip, rfcomm, and tcp.
Referenced by ariba::communication::BaseCommunication::setEndpoints(), ariba::addressing::detail::test(), ariba::transport::detail::test_transport_process(), and ariba::communication::EndpointDescriptor::toString().
| std::string ariba::addressing::endpoint_set::to_string_set | ( | const unordered_set< V > & | set, | |
| const std::string & | type | |||
| ) | const [inline, private] |
Definition at line 100 of file endpoint_set.hpp.
References internal::V().
| static void ariba::addressing::endpoint_set::trim | ( | string & | str | ) | [inline, static, private] |
Definition at line 116 of file endpoint_set.hpp.
Referenced by assign(), and from_string_set().
| unordered_set<mac_address> ariba::addressing::endpoint_set::bluetooth |
Definition at line 30 of file endpoint_set.hpp.
Referenced by add(), assign(), disjoint_to(), operator=(), operator==(), remove(), ariba::transport::rfcomm::send(), to_bytes(), to_bytes_size(), and to_string().
| boost::mutex ariba::addressing::endpoint_set::io_mutex |
Definition at line 40 of file endpoint_set.hpp.
Referenced by add(), assign(), disjoint_to(), operator=(), remove(), to_bytes(), to_bytes_size(), and to_string().
| unordered_set<ip_address> ariba::addressing::endpoint_set::ip |
Definition at line 33 of file endpoint_set.hpp.
Referenced by add(), assign(), disjoint_to(), operator=(), operator==(), remove(), ariba::transport::tcpip::send(), to_bytes(), to_bytes_size(), and to_string().
| unordered_set<rfcomm_channel_address> ariba::addressing::endpoint_set::rfcomm |
Definition at line 37 of file endpoint_set.hpp.
Referenced by add(), assign(), operator=(), operator==(), remove(), ariba::transport::rfcomm::send(), to_bytes(), to_bytes_size(), to_string(), and ariba::transport::transport_peer::transport_peer().
| unordered_set<tcp_port_address> ariba::addressing::endpoint_set::tcp |
Definition at line 36 of file endpoint_set.hpp.
Referenced by add(), assign(), operator=(), operator==(), remove(), ariba::transport::tcpip::send(), to_bytes(), to_bytes_size(), to_string(), and ariba::transport::transport_peer::transport_peer().
1.6.1