-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
132 lines (119 loc) · 5.81 KB
/
index.html
File metadata and controls
132 lines (119 loc) · 5.81 KB
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
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Line Coding</title>
<link rel="stylesheet" href="style.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Kdam+Thmor+Pro&family=Orbitron&display=swap');
</style>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
</head>
<body>
<div class="main">
<div class="aside">
<h2>Line Coding</h2>
<div class="input-container">
<div class="button-container">
<button class="scheme-select-button active" id="digital">Digital</button>
<button class="scheme-select-button" id="analog">Analog</button>
</div>
<div class="form form-digital" id="digitalForm">
<label for="scheme-name">Select Scheme</label>
<select id="scheme-name" name="scheme-name" placeholder="coding scheme">
<option value="nrz">Unipolar</option>
<option value="nrzl">NRZ-L</option>
<option value="nrzi">NRZ-I</option>
<option value="manchester">Manchester</option>
<option value="diffmanchester">Diff. Manchester</option>
<option value="ami">AMI</option>
<option value="b8zs">scrambling: B8ZS</option>
<option value="hdb3">scrambling: HDB3</option>
</select>
<label for="input-stream">Enter Bit Stream </label>
<textarea rows="10" id="input-stream" name="input-stream" placeholder="e.g: --0010101--"
oninput="generateSignal()"></textarea>
<p id="wrong-input"></p>
<!-- <label for="output-stream">Output Stream </label> -->
<textarea id="output-stream"></textarea>
<!-- <p style="margin-bottom: 10px;">Decode</p>
<div class="flex-container">
<label class="switch">
<input type="checkbox" id="decode">
<span class="slider"></span>
</label>
</div> -->
</div>
<div class="form form-analog hide" id="analogForm">
<label for="type-select">Select Scheme</label>
<select id="type-select">
<!-- <option value="" selected disabled hidden>--select--</option> -->
<option value="pcm">PCM</option>
<!-- <option value="dm">DM</option> -->
</select>
<label for="function-select">Select Signal</label>
<select id="function-select" onchange="handleFunctionChange()">
<option value="" selected disabled hidden>--select--</option>
<option value="sin">sin</option>
<option value="cos">cos</option>
<option value="triangle">triangle</option>
<option value="square">square</option>
<option value="sawtooth">sawtooth</option>
</select>
<label for="frequency">Frequency</label>
<input type="number" name="frequency" id="frequency" value="1" placeholder="frequency (in Hz)"
min="1">
<label for="samplingRate">Sampling Rate</label>
<input type="number" name="samplingRate" id="samplingRate" value="1" placeholder="Sampling Rate"
min="1">
<div class="flex-container">
<label class="switch">
<input type="checkbox" id="sampling-btn">
<span class="slider"></span>
</label>
<p>Sampling</p>
</div>
<div class="flex-container">
<label class="switch">
<input type="checkbox" id="flatTop">
<span class="slider"></span>
</label>
<p>Flat Top</p>
</div>
<div class="flex-container">
<label class="switch">
<input type="checkbox" id="quantization-btn">
<span class="slider"></span>
</label>
<p>Quantization</p>
</div>
<label for="quantizationLevel">Quantization Level</label>
<input type="number" name="quantizationLevel" id="quantizationLevel" value="1"
placeholder="Quantization Level" min="1">
</div>
</div>
</div>
<div class="body">
<div class="header">
<div class="chart-bar" id="chart-bar">
<p></p>
<p></p>
<p></p>
</div>
</div>
<div class="panel">
<div class="chart-container">
<div class="canvasContainer">
<canvas id="chart" width="400" height="200"></canvas>
<!-- <canvas id="receiverChart" width="400" height="200"></canvas> -->
</div>
</div>
</div>
</div>
</div>
</body>
<script src="script.js"></script>
</html>