21 #ifndef LIBS_ACN_DMPHEADER_H_
22 #define LIBS_ACN_DMPHEADER_H_
25 #include "libs/acn/DMPAddress.h"
35 static const unsigned int DMP_HEADER_SIZE = 1;
37 explicit DMPHeader(uint8_t header = 0): m_header(header) {}
41 dmp_address_type type,
42 dmp_address_size size) {
43 m_header = (uint8_t) (is_virtual << 7 |
50 bool IsVirtual()
const {
return m_header & VIRTUAL_MASK; }
51 bool IsRelative()
const {
return m_header & RELATIVE_MASK; }
53 dmp_address_type Type()
const {
54 return (dmp_address_type) ((m_header & TYPE_MASK) >> 4);
57 dmp_address_size Size()
const {
58 return (dmp_address_size) (m_header & SIZE_MASK);
61 unsigned int Bytes()
const {
return DMPSizeToByteSize(Size()); }
63 bool operator==(
const DMPHeader &other)
const {
64 return m_header == other.m_header;
67 bool operator!=(
const DMPHeader &other)
const {
68 return m_header != other.m_header;
71 uint8_t Header()
const {
return m_header; }
74 static const uint8_t VIRTUAL_MASK = 0x80;
75 static const uint8_t RELATIVE_MASK = 0x40;
76 static const uint8_t TYPE_MASK = 0x30;
77 static const uint8_t SIZE_MASK = 0x03;
82 #endif // LIBS_ACN_DMPHEADER_H_
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44