USRP Hardware Driver and USRP Manual Version: 4.1.0.1
UHD and USRP Manual
mac_addr.hpp
Go to the documentation of this file.
1//
2// Copyright 2010 Ettus Research LLC
3// Copyright 2018 Ettus Research, a National Instruments Company
4//
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
7
8#pragma once
9
10#include <uhd/config.hpp>
11#include <uhd/types/serial.hpp>
12#include <string>
13
14namespace uhd {
15
21{
22public:
28 static mac_addr_t from_bytes(const byte_vector_t& bytes);
29
35 static mac_addr_t from_string(const std::string& mac_addr_str);
36
42
47 std::string to_string(void) const;
48
49private:
50 mac_addr_t(const byte_vector_t& bytes); // private constructor
51 const byte_vector_t _bytes; // internal representation
52};
53
54} // namespace uhd
Definition: mac_addr.hpp:21
static mac_addr_t from_bytes(const byte_vector_t &bytes)
static mac_addr_t from_string(const std::string &mac_addr_str)
byte_vector_t to_bytes(void) const
std::string to_string(void) const
#define UHD_API
Definition: config.h:70
Definition: build_info.hpp:12
std::vector< uint8_t > byte_vector_t
Byte vector used for I2C data passing and EEPROM parsing.
Definition: byte_vector.hpp:19