-
Notifications
You must be signed in to change notification settings - Fork 2
/
settings.py
28 lines (21 loc) · 955 Bytes
/
settings.py
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
from decouple import config
# server host and port
SERVER_HOST = config("SERVER_HOST", cast=str, default="localhost")
SERVER_PORT = config("SERVER_PORT", cast=int, default=6783)
# verbosity
VERBOSITY = config("VERBOSITY", cast=int, default=1)
# Error checking scheme
ERROR_CHECKING = config("ERROR_CHECKING", cast=str)
# CRC settings
CRC_KEY = config("CRC_KEY", cast=str, default="1001")
# Error generator scheme
ERROR_GENERATOR = config("ERROR_GENERATOR", cast=str)
ERROR_MAX_BITS = 2
ERROR_DISTRIBUTION = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 1, 1, 1, 1, 1, 2, 2, 2, 3]
# Frame Settings
PACKET_SIZE = 32
FRAMING_SCHEME = config("FRAMING_SCHEME", cast=str)
# Line Coding Schemes
LINE_CODING_SCHEME = config("LINE_CODING_SCHEME", cast=str)