forked from CiscoDevNet/n3550-timestamp-decoder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.hpp
50 lines (41 loc) · 967 Bytes
/
options.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
#pragma once
#include <string>
struct read_options
{
int verbose = 0;
std::string source = "";
bool promiscuous_mode = true;
};
struct process_options
{
enum
{
timestamp_format_auto = 0,
timestamp_format_32bit = 1,
timestamp_format_trailer = 2,
};
int verbose = 0;
bool fix_fcs = true;
int time_offset_end = -1;
int timestamp_format = timestamp_format_auto;
};
struct write_options
{
int verbose = 0;
std::string dest = "-";
bool write_keyframes = false;
bool write_micros = false;
bool write_clock_times = false;
bool write_packet = true;
std::string text_date_format = "%Y/%m/%d-%H:%M:%S";
};
struct options
{
int verbose = 0;
read_options read = read_options();
process_options process = process_options();
write_options write = write_options();
uint32_t count = 0;
int parse(int argc, char** argv);
static std::string usage_str();
};