Loading...
Searching...
No Matches
mac_addr.hpp
Go to the documentation of this file.
//
// Copyright 2010 Ettus Research LLC
// Copyright 2018 Ettus Research, a National Instruments Company
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/config.hpp>
#include <uhd/types/serial.hpp>
#include <string>
namespace uhd {
class UHD_API mac_addr_t
{
public:
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;
private:
mac_addr_t(const byte_vector_t& bytes); // private constructor
const byte_vector_t _bytes; // internal representation
};
} // namespace uhd
uhd::mac_addr_t::from_bytes
static mac_addr_t from_bytes(const byte_vector_t &bytes)
uhd::mac_addr_t::from_string
static mac_addr_t from_string(const std::string &mac_addr_str)
uhd::mac_addr_t::to_bytes
byte_vector_t to_bytes(void) const
uhd::mac_addr_t::to_string
std::string to_string(void) const
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
uhd
Definition build_info.hpp:12
uhd::byte_vector_t
std::vector< uint8_t > byte_vector_t
Byte vector used for I2C data passing and EEPROM parsing.
Definition byte_vector.hpp:21
serial.hpp