herald  2.0.0
ble_mac_address.h
1 // Copyright 2020-2021 Herald Project Contributors
2 // SPDX-License-Identifier: Apache-2.0
3 //
4 
5 #ifndef HERALD_BLE_MAC_ADDRESS_H
6 #define HERALD_BLE_MAC_ADDRESS_H
7 
8 #include "../datatype/data.h"
9 
10 namespace herald {
11 namespace ble {
12 
13 using namespace herald::datatype;
14 
19 public:
20  BLEMacAddress();
21  BLEMacAddress(const std::uint8_t bytesBigEndian[6]);
22  BLEMacAddress(const Data& from);
23  BLEMacAddress(const BLEMacAddress& from);
24  BLEMacAddress(BLEMacAddress&& from) = delete;
25  // TODO add constructor that uses a const randomness source reference
26  ~BLEMacAddress();
27 
28  BLEMacAddress& operator=(const BLEMacAddress& other) noexcept;
29 
30  operator Data() const;
32  operator std::string() const;
33  bool operator==(const BLEMacAddress& other) const;
34  bool operator!=(const BLEMacAddress& other) const;
35 
36  void bytesBigEndian(std::uint8_t bytesBigEndian[6]) const;
37 
38  Data underlyingData() const;
39 
40 private:
41  Data data;
42 };
43 
44 
45 }
46 }
47 
48 #endif
Definition: ble_mac_address.h:18
The main data workhorse class of the Herald API.
Definition: data.h:33
Contains all low-level Herald datatype implementations.
Definition: base64_string.h:14
Acts as a non-global memory arena for arbitrary classes.
Definition: aggregates.h:15