Mir
include
miroil
miroil
edid.h
Go to the documentation of this file.
1
/*
2
* Copyright © Canonical Ltd.
3
*
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License version 3,
6
* as published by the Free Software Foundation.
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*/
16
17
#
ifndef
MIROIL_EDID_H
18
#
define
MIROIL_EDID_H
19
20
#
include
<
cstdint
>
21
#
include
<
string
>
22
#
include
<
vector
>
23
24
namespace
miroil
25
{
26
27
struct
Edid
28
{
29
std::string
vendor
;
30
uint16_t
product_code
{0};
31
uint32_t
serial_number
{0};
32
33
struct
PhysicalSizeMM
{
int
width
;
int
height
; };
34
PhysicalSizeMM
size
{0,0};
35
36
struct
Descriptor
{
37
enum
class
Type
:
uint8_t
{
38
timing_identifiers
= 0xfa,
39
white_point_data
= 0xfb,
40
monitor_name
= 0xfc,
41
monitor_limits
= 0xfd,
42
unspecified_text
= 0xfe,
43
serial_number
= 0xff,
44
45
undefined
= 0x00,
46
};
47
48
union
Value
{
49
char
monitor_name
[13];
50
char
unspecified_text
[13];
51
char
serial_number
[13];
52
};
53
54
Type
type
{
Type
::
undefined
};
55
Value
value
{{0}};
56
57
std::string
string_value
()
const
;
58
};
59
Descriptor
descriptors
[4];
60
61
Edid
&
parse_data
(
std
::
vector
<
uint8_t
>
const
&);
62
};
63
64
}
65
66
#
endif
// MIROIL_EDID_H
miroil
Definition:
compositor.h:21
miroil::Edid::Descriptor
Definition:
edid.h:36
miroil::Edid::Descriptor::string_value
std::string string_value() const
miroil::Edid::Descriptor::value
Value value
Definition:
edid.h:55
miroil::Edid::Descriptor::Type
Type
Definition:
edid.h:37
miroil::Edid::Descriptor::Type::monitor_limits
@ monitor_limits
miroil::Edid::Descriptor::Type::timing_identifiers
@ timing_identifiers
miroil::Edid::Descriptor::Type::unspecified_text
@ unspecified_text
miroil::Edid::Descriptor::Type::undefined
@ undefined
miroil::Edid::Descriptor::Type::monitor_name
@ monitor_name
miroil::Edid::Descriptor::Type::serial_number
@ serial_number
miroil::Edid::Descriptor::Type::white_point_data
@ white_point_data
miroil::Edid::Descriptor::type
Type type
Definition:
edid.h:54
miroil::Edid::PhysicalSizeMM
Definition:
edid.h:33
miroil::Edid::PhysicalSizeMM::height
int height
Definition:
edid.h:33
miroil::Edid::PhysicalSizeMM::width
int width
Definition:
edid.h:33
miroil::Edid
Definition:
edid.h:28
miroil::Edid::product_code
uint16_t product_code
Definition:
edid.h:30
miroil::Edid::vendor
std::string vendor
Definition:
edid.h:29
miroil::Edid::size
PhysicalSizeMM size
Definition:
edid.h:34
miroil::Edid::parse_data
Edid & parse_data(std::vector< uint8_t > const &)
miroil::Edid::descriptors
Descriptor descriptors[4]
Definition:
edid.h:59
miroil::Edid::serial_number