-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUSBIDsTypes.hpp
124 lines (102 loc) · 1.81 KB
/
USBIDsTypes.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#ifndef PARSER_HPP
#define PARSER_HPP
#include <iostream>
#include <string>
#include <vector>
struct interface_t{
uint16_t id;
std::string name;
};
struct device_t{
uint16_t id;
std::string name;
std::vector<interface_t> interfaces;
};
struct vendor_t{
uint16_t id;
std::string name;
std::vector<device_t> devices;
};
struct hid_usage_t{
uint16_t id;
std::string name;
};
struct hid_usage_page_t{
uint8_t id;
std::string name;
std::vector<hid_usage_t> usage;
};
struct protocol_t{
uint8_t id;
std::string name;
};
struct subclass_t{
uint8_t id;
std::string name;
std::vector<protocol_t> protocol;
};
struct dev_class_t{
uint8_t id;
std::string name;
std::vector<subclass_t> subclass;
};
struct actt_t{
uint16_t id;
std::string name;
};
struct hid_desc_t{
uint8_t id;
std::string name;
};
struct hid_item_t{
uint8_t id;
std::string name;
};
struct bias_t{
uint8_t id;
std::string name;
};
struct phy_item_t{
uint8_t id;
std::string name;
};
struct dialect_t{
uint8_t id;
std::string name;
};
struct lang_t{
uint16_t id;
std::string name;
std::vector<dialect_t> dialects;
};
struct hid_country_code_t{
uint8_t id;
std::string name;
};
struct vctt_t{
uint16_t id;
std::string name;
};
struct usb_ids_t{
std::vector<vendor_t> vendors;
std::vector<dev_class_t> dev_class;
std::vector<actt_t> actt;
std::vector<hid_desc_t> hid_desc;
std::vector<hid_item_t> hid_item;
std::vector<bias_t> bias;
std::vector<phy_item_t> phy_item;
std::vector<hid_usage_page_t> hid_usage_pages;
std::vector<lang_t> lang;
std::vector<hid_country_code_t> hid_country;
std::vector<vctt_t> vctt;
};
struct params_t{
bool id_f {false};
bool interface_f {false};
bool help_f {false};
uint16_t id[2] {0,};
uint8_t interface[3] {0,};
std::string filepath {""};
};
#endif
/* vim: set ts=4 sw=4 tw=0 noet : */