-
Notifications
You must be signed in to change notification settings - Fork 0
/
packet-decoder.html
103 lines (96 loc) · 4.55 KB
/
packet-decoder.html
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
<!DOCTYPE html>
<html>
<head>
<!-- meta tags for mobile support -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- CSS for Bootstrap library -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<!-- JavaScript for Bootstrap libraries -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<title>Packet Decoder</title>
<base href="packet-decoder/index.html">
<link rel="shortcut icon" href="../TacoOper.png">
<!-- CSS project files -->
<link rel="stylesheet" href="css/main.css">
<!-- JavaScript project files -->
<script src="js/main.js"></script>
<script src="js/constants.js"></script>
<script src="../common/buttons.js"></script>
</head>
<body class="bg-dark">
<div class="container">
<!-- controls for specifying packet schema -->
<div class="d-flex flex-wrap justify-content-center p-3">
<span class="text-light">
Enter packet schema, formatted as comma-separated bit-field sizes, starting with the MSb:
</span>
</div>
<div class="d-flex flex-wrap justify-content-center">
<!-- wrap in extra div to limit width of input -->
<div>
<input type="text" class="form-control bg-dark text-light" id="packet-schema-input">
</div>
<div class="pl-3 my-auto">
<span class="text-light" id="packet-schema-total-span"></span>
</div>
</div>
<!-- controls for specifying raw packet -->
<div class="d-flex flex-wrap justify-content-center p-3">
<span class="text-light">
Enter raw packet, using specified hexadecimal or binary format in big-endian order:
</span>
</div>
<div class="d-flex flex-wrap justify-content-center">
<!-- wrap in extra div to limit width of input -->
<div>
<input type="text" class="form-control bg-dark text-light" id="raw-packet-input">
</div>
</div>
<!-- controls for selecting format and decoding raw packet -->
<div class="d-flex flex-wrap justify-content-center">
<div class="p-3 btn-group">
<button type="button" class="btn btn-primary" id="hex-format-button">Hex</button>
<button type="button" class="btn btn-light" id="bin-format-button">Bin</button>
</div>
<div class="pt-3 pr-3">
<button type="button" class="btn btn-warning" id="decode-button">Decode</button>
</div>
</div>
</div>
<hr class="bg-light">
<div class="container">
<!-- message for operational status -->
<div class="d-flex flex-wrap justify-content-center p-3">
<span class="text-light" id="status-message-span">Pending status for decoder...</span>
</div>
<!-- content for decoded packet in multiple formats -->
<div class="d-flex flex-wrap justify-content-center p-1">
<span class="text-light display-result" id="decoded-packet-bin-span"></span>
</div>
<div class="d-flex flex-wrap justify-content-center p-1">
<span class="text-light display-result" id="decoded-packet-hex-span"></span>
</div>
<!-- generated URL link with params -->
<div class="d-flex flex-wrap justify-content-center p-3">
<span class="text-light" id="generated-url-span"></span>
</div>
</div>
</body>
<footer>
<hr class="bg-light">
<div class="d-flex flex-wrap justify-content-center">
<div class="p-3">
<span class="text-light" id="version-span">
</div>
<div class="p-3">
<span class="text-light">-</span>
</div>
<div class="p-3">
<a href="https://github.com/tacooper/tacooper.github.io">Source Code</a>
</div>
</div>
</footer>
</html>